camera_frame_ycrcb420p_t

A frame descriptor used for a YCrCb 4:2:0 planar frame type

Synopsis:

#include <camera/camera_api.h>
typedef struct camera_frame_ycrcb420p_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_ycrcb420p_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_YCRCB420P is reported as the camera_frametype_t. It's similar with camera_frame_ycbcr420p_t. But Cr plane is stored after Y plane and before Cb plane. So cb_offset > cr_offset.

Page updated: