Skip to content

Commit ae9a5ca

Browse files
Eino-Ville TalvalaAndroid (Google) Code Review
authored andcommitted
Merge "Editing fixes to ImageFormat documentation."
2 parents 62901af + 9184ec3 commit ae9a5ca

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

graphics/java/android/graphics/ImageFormat.java

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,38 @@ public class ImageFormat {
2525
public static final int UNKNOWN = 0;
2626

2727
/**
28-
* RGB format used for pictures encoded as RGB_565 see
28+
* RGB format used for pictures encoded as RGB_565. See
2929
* {@link android.hardware.Camera.Parameters#setPictureFormat(int)}.
3030
*/
3131
public static final int RGB_565 = 4;
3232

3333
/**
34-
* Android YUV format:
34+
* <p>Android YUV format.</p>
3535
*
36-
* This format is exposed to software decoders and applications.
36+
* <p>This format is exposed to software decoders and applications.</p>
3737
*
38-
* YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed
39-
* by (W/2) x (H/2) Cr and Cb planes.
38+
* <p>YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed
39+
* by (W/2) x (H/2) Cr and Cb planes.</p>
4040
*
41-
* This format assumes
42-
* - an even width
43-
* - an even height
44-
* - a horizontal stride multiple of 16 pixels
45-
* - a vertical stride equal to the height
41+
* <p>This format assumes
42+
* <ul>
43+
* <li>an even width</li>
44+
* <li>an even height</li>
45+
* <li>a horizontal stride multiple of 16 pixels</li>
46+
* <li>a vertical stride equal to the height</li>
47+
* </ul>
48+
* </p>
4649
*
47-
* y_size = stride * height
48-
* c_size = ALIGN(stride/2, 16) * height/2
49-
* size = y_size + c_size * 2
50-
* cr_offset = y_size
51-
* cb_offset = y_size + c_size
50+
* <pre> y_size = stride * height
51+
* c_size = ALIGN(stride/2, 16) * height/2
52+
* size = y_size + c_size * 2
53+
* cr_offset = y_size
54+
* cb_offset = y_size + c_size</pre>
5255
*
53-
* Whether this format is supported by the camera hardware can be determined
54-
* by
56+
* This format is guaranteed to be supported for camera preview images since
57+
* API level 12; for earlier API versions, check
5558
* {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
59+
* </p>
5660
*/
5761
public static final int YV12 = 0x32315659;
5862

0 commit comments

Comments
 (0)