hi_vdec_video_attr

Description

Defines the VDEC video attributes.

Prototype

typedef struct {
    hi_u32 ref_frame_num;  
    hi_bool temporal_mvp_en; 
    hi_u32 tmv_buf_size; 
}hi_vdec_video_attr;

Members

Member

Description

ref_frame_num

Number of reference frames for decoding. Note that a larger value indicates a larger VB allocation. If the configured value is greater than the actual number of reference frames in the stream, the system adjusts the value to the latter to save memory space.

Value range: [0, 16]

5 is recommended for other types of streams.

16 is recommended for stream testing.

This is a static attribute.

temporal_mvp_en

Temporal MVP enable.

Value range: [0, 1]

If set to 0, skips decoding B-frames in H.264 streams or skips decoding H.265 streams with temporal MVP support (sps_temporal_mvp_enabled_flag = 1). If set to 1, otherwise. When this attribute is set to 0, VB allocation for the temporal motion vector (TMV) output is spared, which is memory-saving.

Note: When calling hi_mpi_vdec_set_chn_param to set channel parameters, set hi_video_dec_mode to only HI_VIDEO_DEC_MODE_IPB (decoding I, P, and B frames). temporal_mvp_en can only be set to 1 when H.264 streams are decoded.

tmv_buf_size

Size of the TMV buffer for storing decoded video images (in bytes). This parameter is valid when temporal_mvp_en is set to 1. You can call hi_vdec_get_tmv_buf_size to obtain the size.