[vlc-devel] [RFC PATCH] input: decoder: optimize dpb_size of H264
Francois Cartegnie
fcvlcdev at free.fr
Fri May 19 10:40:25 CEST 2017
Le 19/05/2017 à 10:31, Zhao Zhili a écrit :
> + {
> +#define H264_MAX_DPB_SIZE 18
> + dpb_size = H264_MAX_DPB_SIZE;
> +
> + int profile = -1;
> + int level = -1;
> +
> + profile = p_dec->fmt_in.i_profile;
> + level = p_dec->fmt_in.i_level;
> + if( profile == -1 || level == -1 )
> + {
> + if( h264_get_profile_level( &p_dec->fmt_in, &profile,
> &level, NULL ) == false )
> + {
> + msg_Warn( p_dec, "get profile and level failed" );
> + break;
> + }
> + }
> + msg_Dbg( p_dec, "H264 profile %d, level %d", profile,
> level );
> +
> +#define PROFILE_H264_MAIN 77
> +#define PROFILE_H264_HIGH 100
> + if( profile != PROFILE_H264_MAIN && profile !=
> PROFILE_H264_HIGH )
> + break;
Unfortunately, because of possible configuration changes, that max DPB
will always be set to max.
And in all cases, dpb value computation does not belong to core, and
cannot be correct if relying on extradata.
Francois
More information about the vlc-devel
mailing list