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 decoding of B-frames is not required for H.264 decoding or the function of temporal MVP (sps_temporal_mvp_enabled_flag = 1) is not required for H.265 decoding, set temporal_mvp_en to 0; otherwise, set temporal_mvp_en to 1.

When this member is set to 0, VB allocation for the TMV output is spared, which is memory-saving.

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.