camera_frame_cbycry_t

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, in pixels.
uint32_t width
The width of the image, in pixels.
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 endian order used for packing the data.

A value of true indicates that the bytes are packed using little-endian order, otherwise, a value value false indicates that the bytes are packed using big-endian order.

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 color components: one U (CR, or red-difference chroma), one V (CB, or blue-difference chroma), and two Y (luma) components. We refer to the color components as pixels, and the group of four color components 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 color information, if le is false, the higher bpp bits of packing contain color information.

For example, le = true, bpp = 8, and packing = 8 describes an 8-bit CBYCRY frame such that each color 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

Last modified: 2013-12-21

comments powered by Disqus