From 951516358e2841d2425f610bcd0175d9960135d2 Mon Sep 17 00:00:00 2001
From: Eino-Ville Talvala
y_size = stride * height
- * c_size = ALIGN(stride/2, 16) * height/2
+ * c_stride = ALIGN(stride/2, 16)
+ * c_size = c_stride * height/2
* size = y_size + c_size * 2
* cr_offset = y_size
* cb_offset = y_size + c_size
*
- * This format is guaranteed to be supported for camera preview images since
+ * This format is guaranteed to be supported for camera preview images since * API level 12; for earlier API versions, check * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}. + * + *
Note that for camera preview callback use (see + * {@link android.hardware.Camera#setPreviewCallback}), the + * stride value is the smallest possible; that is, it is equal + * to: + * + *
stride = ALIGN(width, 16)+ * + * @see android.hardware.Camera.Parameters#setPreviewCallback + * @see android.hardware.Camera.Parameters#setPreviewFormat + * @see android.hardware.Camera.Parameters#getSupportedPreviewFormats * */ public static final int YV12 = 0x32315659; -- cgit v1.2.3-59-g8ed1b