hi_vdec_video_attr

Description

Defines the VDEC video attributes.

Prototype

hi_vdec_video_attr = {"ref_frame_num": ref_frame_num, "temporal_mvp_en": temporal_mvp_en, "tmv_buf_size": tmv_buf_size}

Members

Member

Description

ref_frame_num

Int, number of reference frames for decoding. A larger value indicates a larger VB allocation. If the set value is greater than the number of reference frames in the actual stream, the system adjusts the value based on the actual number to save the buffer. However, the adjusted value cannot be greater than the value of this parameter.

Value range: [0, 16], in frames.

5 is recommended for other types of streams.

16 is recommended for stream testing.

This is a static attribute.

temporal_mvp_en

Int, whether to support temporal MVP.

Value range: [0, 1].

If decoding of B frames is not required for H.264 decoding or the function of temporal motion vector prediction (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 attribute is set to 0, VB allocation for the temporal motion vector (TMV) output is spared, which is memory-saving.

When calling acl.himpi.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

Int, TMV buffer size of the decoded image. Valid when temporal_mvp_en is 1.

You can call acl.himpi.vdec_get_tmv_buf_size to obtain the size.