hi_video_frame

Description

Defines a source video frame.

Definition

typedef struct {
    hi_u32              width;
    hi_u32              height;
    hi_video_field      field;
    hi_pixel_format     pixel_format;
    hi_video_format     video_format;
    hi_compress_mode    compress_mode;
    hi_dynamic_range    dynamic_range;
    hi_color_gamut      color_gamut;

    hi_u32              header_stride[HI_MAX_COLOR_COMPONENT];
    hi_u32              width_stride[HI_MAX_COLOR_COMPONENT];
    hi_u32              height_stride[HI_MAX_COLOR_COMPONENT];

    hi_u64              header_phys_addr[HI_MAX_COLOR_COMPONENT];
    hi_u64              phys_addr[HI_MAX_COLOR_COMPONENT];
    hi_void* ATTRIBUTE  header_virt_addr[HI_MAX_COLOR_COMPONENT];
    hi_void* ATTRIBUTE  virt_addr[HI_MAX_COLOR_COMPONENT];

    hi_u32              time_ref;
    hi_u64              pts;

    hi_u64              user_data[HI_MAX_USER_DATA_NUM];
    hi_u32              frame_flag; 
    hi_video_supplement supplement;
} hi_video_frame;

Members

Member

Description

width

Image width.

height

Image height.

field

Field mode. Reserved.

pixel_format

Pixel format.

video_format

Video format.

compress_mode

Video compression mode

dynamic_range

Dynamic range. Reserved.

color_gamut

Color gamut. Reserved.

header_stride

Compression header stride. Reserved.

width_stride

Width stride of an output image component. For a YUV image, this member indicates the stride of the Y, U, and V components.

height_stride

Height stride of an output image component. For a YUV image, this member indicates the stride of the Y, U, and V components.

This parameter is reserved for VI video capture, ISP system control, VPSS video processing, VENC video encoding, and JPEGE image encoding.

header_phys_addr

Physical address of the compression header. Reserved.

phys_addr

Physical address. Reserved.

header_virt_addr

Virtual address of the compression header. Reserved.

virt_addr

Start virtual address of an image in the device buffer.

For an input YUV image, virt_addr[0] is the start address of the image or Y component, virt_addr[1] is the start address of the U component, and virt_addr[2] is the start address of the V component.

For an output YUV image, virt_addr[0] is the start address of the image on the device, and virt_addr[1] and virt_addr[2] are reserved.

time_ref

Sequence number of an image frame.

pts

Image presentation timestamp (PTS).

user_data

Private data. Reserved.

frame_flag

Reserved.

supplement

Supplementary information about an image. Reserved.

Restrictions

In general, 10-bit data is compactly stored in the memory in non-compression mode.

For 10-bit YUV data, the first 8 bits and last 2 bits are stored separately in segment-based compressed mode.

For 10-bit tile 64 x 16 data, which is video decoder hardware (VDH) output, the first 8 bits and last 2 bits are stored separately in the memory, regardless of whether the data is compressed or not.