camera_frame_nv12_t

A frame descriptor used for NV12 frame types

Synopsis:

#include <camera/camera_api.h>
#include <camera/camera_api.h>
typedef struct camera_frame_nv12_t {
    uint32_t height;
    uint32_t width;
    uint32_t stride;
    int64_t uv_offset;
    int64_t uv_stride;
} camera_frame_nv12_t;

Data:

uint32_t height
The height of the frame in pixels.
uint32_t width
The width of the frame 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 of the luminance (Y) plane.

Stride is often called pitch. For more information, see the uv_stride member.

int64_t uv_offset
The number of bytes between the first pixel of the Y plane in memory and the first pixel of the UV plane in memory.

On a device where there is no gap between the Y and UV planes, the uv_offset would be height times stride bytes. This equivalence is not guaranteed across all devices, so it is important to observe the uv_offset value rather than attempting to compute the offset.

int64_t uv_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 of the chrominance (UV) plane.

For more information, see the stride member.

Library:

libcamapi

Description:

Use this frame descriptor when CAMERA_FRAMETYPE_NV12 is reported as the camera_frametype_t.