hi_video_frame
Description
Defines the dictionary of a source video frame.
Prototype
hi_video_frame = {"width": width,
"height": height,
"field": hi_video_field,
"pixel_format": hi_pixel_format,
"video_format": hi_video_format,
"compress_mode": hi_compress_mode,
"dynamic_range": hi_dynamic_range,
"color_gamut": hi_color_gamut,
"header_stride": [header_stride, header_stride, header_stride],
"width_stride": [width_stride, width_stride, width_stride],
"height_stride": [height_stride, height_stride, height_stride],
"header_phys_addr": [header_phys_addr, header_phys_addr, header_phys_addr],
"phys_addr": [phys_addr, phys_addr, phys_addr],
"header_virt_addr:[header_virt_addr_list, header_virt_addr_list, header_virt_addr_list],
"virt_addr": [virt_addr, virt_addr, virt_addr],
"time_ref": time_ref,
"pts": pts,
"user_data": [user_data],
"frame_flag": frame_flag, # frame_flag, can be OR operation.
"supplement": hi_video_supplement}
Members
Member |
Description |
|---|---|
width |
Int, image width. |
height |
Int, image height. |
field |
Int, field mode, reserved. |
pixel_format |
Int, pixel format. |
video_format |
Int, video format, |
compress_mode |
Int, compression mode, |
dynamic_range |
Int, dynamic range, reserved. |
color_gamut |
Int, color gamut, reserved. |
header_stride |
List, header stride of image compression, reserved. |
width_stride |
List, width stride of an output image component. For a YUV image, this member indicates the stride of the Y, U, and V components. For an RGB image, this member indicates the stride of the R, G, and B components. |
height_stride |
List, height stride of an output image component. For a YUV image, this member indicates the stride of the Y, U, and V components. For an RGB image, this member indicates the stride of the R, G, and B components. If VENC video encoding and JPEGE image encoding functions are involved, this parameter is reserved and is not supported. |
header_phys_addr |
List, physical address of the compression header, reserved. |
phys_addr |
List, physical address, reserved. |
header_virt_addr |
List, virtual address of the compression header, reserved. |
virt_addr |
List, 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 or RGB 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 |
Int, sequence number of an image frame. This parameter is reserved in the decoding scenario. This parameter is reserved in the JPEGE encoding scenario. In the VENC encoding scenario, set this parameter to an even number in ascending order based on the frame sequence. For example, set this parameter to 2 for the first frame, 4 for the second frame, and so on. |
pts |
Int, image PTS. |
user_data |
List, private data, reserved. |
frame_flag |
Int.
|
supplement |
Dictionary, supplementary image information, |
Precautions
- In general, 10-bit data is compactly stored in the buffer 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 64x16 data, which is video decoder hardware (VDH) output, the first 8 bits and last 2 bits are stored separately in the buffer, regardless of whether the data is compressed or not.