camera_frame_cbycry_t

Structure representing a frame descriptor for a YCbCr 4:2:2 packed frame type.

Synopsis:

#include <camera/camera_api.h>
    
      
typedef struct  {
    uint64_t bufsize ;
    uint32_t height ;
    uint32_t width ;
    uint32_t stride ;
    uint32_t packing ;
    uint32_t bpp ;
    bool le ;
}camera_frame_cbycry_t;

Data:

uint64_t bufsize
The size of the buffer as a 64-bit integer.
uint32_t height
The height of the image.
uint32_t width
The width of the image.
uint32_t stride
The number of bytes per line in the image.
uint32_t packing
The inter-pixel distance, in bytes.
uint32_t bpp
The bits per pixel component inside the packing size.
bool le
The whether little-endian used to pack the frame. When le is true, the bytes are packed in little-endian, otherwise when le is false, the bytes are packed using big-endian.

Library:

libcamapi

Description:

Use this frame descriptor when CAMERA_FRAMETYPE_CBYCRY is used for the camera_frametype_t.

Each pixel in the CBYCRY frame is part of a macro-pixel. Each CBYCRY macro-pixel is made up of four colour components: one U (CR, or blue-difference chroma), one V (CB, or blue-difference chroma), and two Y (luma) components. We refer to the colour components as pixels, and the group of four as a macro-pixel.

Each macro-pixel is stored contiguously on the same line, unlike camera_frame_bayer_t , where each macro-pixel is divided into two lines.

Each pixel of the CBYCRY macro-pixel is stored in packing bits. If le is true, the lower bpp bits of packing contain colour information, if le is false, the higher bpp bits of packing contain colour information.

For example, le = true, bpp = 8, and packing = 8 describes an 8-bit CBYCRY frame such that each colour component is stored in the lower 8 bits of a 8-bit pixel. Thus, the macro-pixel would be stored like so:

Bit: 01234567 01234567 01234567 01234567 Scanline n: UUUUUUUU YYYYYYYY VVVVVVVV YYYYYYYY = 32 bits

Each macro-pixel is stored