A frame descriptor used for Y Cb Cr 4:2:0 planar frame type
Synopsis:
#include <camera/camera_api.h>
typedef struct camera_frame_ycbcr420p_t {
uint32_t height;
uint32_t width;
uint32_t y_stride;
int32_t cb_offset;
int32_t cb_stride;
int32_t cr_offset;
int32_t cr_stride;
} camera_frame_ycbcr420p_t;
Data:
- uint32_t height
- The height of the frame in pixels.
- uint32_t width
- The width of the frame in pixels.
- uint32_t y_stride
- The number of bytes between the first pixel of a given row in memory and the first pixel of the next row in memory of the luminance (Y) plane.
Stride is often called pitch.
- int32_t cb_offset
- The number of bytes between the first pixel of the Y plane in memory and the first pixel of the Cb plane in memory.
- int32_t cb_stride
- The number of bytes between the first pixel of a given row in memory and the first pixel of the next row in memory of the Cb plane.
- int32_t cr_offset
- The number of bytes between the first pixel of the Y plane in memory and the first pixel of the Cr plane in memory.
- int32_t cr_stride
- The number of bytes between the first pixel of a given row in memory and the first pixel of the next row in memory of the Cr plane.
Library:
libcamapi
Description:
Use this frame descriptor when
CAMERA_FRAMETYPE_YCBCR420P is reported as the
camera_frametype_t. The data is organized in memory as follows:
- Y plane (luminance data) containing 'height' lines of 'width' luminance values, each line separated by 'y_stride' bytes.
- Cb plane (blue chrominance data) that is located 'cb_offset' bytes after the start of the Y plane. It contains 'height'/2 lines of 'width'/2 chroma values, each line separated by 'cb_stride' bytes.
- Cr plane (red chrominance data) that is located 'cr_offset' bytes after the start of the Y plane. It contains 'height'/2 lines of 'width'/2 chroma values, each line separated by 'cr_stride' bytes.
- each value (luminance and chrominance) consumes 8-bits