sensor_format_video_semiplanar_t

Updated: April 19, 2023

Format for semi-planar video

Synopsis:

#include <sensor/sensor_api.h>
typedef struct sensor_format_video_semiplanar_t {
    uint32_t height;
    uint32_t width;
    uint32_t stride;
    int64_t chroma_offset;
    int64_t chroma_stride;
} sensor_format_video_semiplanar_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 and the first pixel of the second row, in the memory of the luminance Y-plane.

Stride is often called pitch.

int64_t chroma_offset
The number of bytes between the first pixel of the Y-plane and the first pixel of the chroma-plane in memory.

On a device where there isn't a gap between the Y-plane and chroma-plane, the chroma_offset is height times stride bytes.

int64_t chroma_stride
The number of bytes between the first pixel of the first row and the first pixel of the second row, in the memory of the chrominance plane.

Stride is often called pitch.

Library:

libsensor

Description:

This format is used for semi-planar video where luminance and chrominance information is stored in two separate planes.