[FFmpeg-devel] [PATCH] vaapi_h265: general_level_idc should times 3.
Li, Zhong
zhong.li at intel.com
Wed Nov 29 05:51:55 EET 2017
> On 28/11/17 07:46, Ruiling Song wrote:
> > Signed-off-by: Ruiling Song <ruiling.song at intel.com>
> > ---
> > libavcodec/vaapi_encode_h265.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/vaapi_encode_h265.c
> > b/libavcodec/vaapi_encode_h265.c index 3ae92a7..32b8bc6 100644
> > --- a/libavcodec/vaapi_encode_h265.c
> > +++ b/libavcodec/vaapi_encode_h265.c
> > @@ -219,7 +219,7 @@ static int
> vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
> > .general_non_packed_constraint_flag = 1,
> > .general_frame_only_constraint_flag = 1,
> >
> > - .general_level_idc = avctx->level,
> > + .general_level_idc = avctx->level * 3,
> > };
> >
> > vps->profile_tier_level.general_profile_compatibility_flag[avctx->prof
> > ile & 31] = 1;
> >
> >
> The documentation has always said "profile and level set the values of
> general_profile_idc and general_level_idc respectively"
> (<http://ffmpeg.org/ffmpeg-codecs.html#VAAPI-encoders>) - the code
> disagreed for a while, but that was made consistent in
> 00179664bccd1dd6fa0d1c40db453528757bf6f7.
>
> Why do you want to change it to be general_level_idc / 3 instead?
As HEVC spec, "general_level_idc and sub_layer_level_idc[ i ] shall be set equal to a value of 30 times the level number specified in
Table A.4."
And use the tool "mediainfo" to check the encoded bitstream, it show the level is 1.7 if set the option "-level" to be 51.
Maybe the documentation ((<http://ffmpeg.org/ffmpeg-codecs.html#VAAPI-encoders>)) also needs to be changed?
More information about the ffmpeg-devel
mailing list