camera_frame_cbycry_t

A frame descriptor for a YCbCr 4:2:2 packed frame type.

Synopsis:

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;

Since:

BlackBerry 10.0.0

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 between the first pixel of the first row in memory and the first pixel of the second row in memory.

Stride is often called pitch.

uint32_t packing
The inter-pixel distance, in bits.
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 of false indicates that the bytes are packed using big-endian order.

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

Use this frame descriptor when CAMERA_FRAMETYPE_CBYCRY is reported as 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: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus