A frame descriptor for a YCbCr 4:2:2 packed frame type
#include <camera/camera_api.h>
typedef struct camera_frame_cbycry_t { uint64_t bufsize; uint32_t height; uint32_t width; uint32_t stride; uint32_t packing; uint32_t bpp; bool le; } camera_frame_cbycry_t;
Stride is often called pitch.
A value of true indicates that the bytes are packed using little-endian order, otherwise, a value of false indicates that the bytes are packed using big-endian order.
Use this frame descriptor when CAMERA_FRAMETYPE_CBYCRY is reported as the camera_frametype_t.
Each set of 2 pixel values in the CbYCrY frame is part of a macro-pixel. Each macro-pixel is made up of four components in the following order: a Cb (blue-difference chroma) component, a Y (luma) component, a Cr (red-difference chroma) component, and a Y (luma) component. Each macro-pixel is stored contiguously on the same line.
A pixel of the CBYCRY macro-pixel consists of a luma (Y) component and an associated chroma (Cb or Cr) component. Each pixel contains bpp bits of component data and is stored in packing bits. The endian order le indicates if the bit packing was done in little-endian or big-endian order.
Bit: 0 1 2 3 4 5 6 7 01234567 0 1 2 3 4 5 6 7 01234567 Scanline n: CbCbCbCbCbCbCbCb YYYYYYYY CrCrCrCrCrCrCrCr YYYYYYYY = 32 bits