> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Mark Thompson > Sent: Thursday, January 9, 2020 06:19 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH 4/8] lavc/vaapi_hevc: Add HEVC Rext > parameter for VAPicture and VASlice > > On 29/12/2019 16:29, Linjie Fu wrote: > > Add VAPictureParameterBufferHEVCRext and > VASliceParameterBufferHEVCRext. > > > > Pass Range Extension flags to support the decode for HEVC REXT. > > > > Signed-off-by: Linjie Fu <linjie...@intel.com> > > --- > > libavcodec/vaapi_hevc.c | 79 > +++++++++++++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 76 insertions(+), 3 deletions(-) > > > > diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c > > index c69d63d..ab48b73 100644 > > --- a/libavcodec/vaapi_hevc.c > > +++ b/libavcodec/vaapi_hevc.c > > @@ -30,7 +30,13 @@ > > > > typedef struct VAAPIDecodePictureHEVC { > > VAPictureParameterBufferHEVC pic_param; > > +#if VA_CHECK_VERSION(1, 2, 0) > > + VAPictureParameterBufferHEVCRext pic_rext_param; > > +#endif > > VASliceParameterBufferHEVC last_slice_param; > > +#if VA_CHECK_VERSION(1, 2, 0) > > + VASliceParameterBufferHEVCRext slice_rext_param; > > +#endif > > I would feel happier if this wasn't playing games with concatenated > structures and sizing. Can you have a single > VAPictureParameterBufferHEVCExtension here, and then use either just the > first element of it for Main / Main 10, or the whole thing for extension > profiles?
Will update. > > const uint8_t *last_buffer; > > size_t last_size; > > > > @@ -119,6 +125,11 @@ static int > vaapi_hevc_start_frame(AVCodecContext *avctx, > > const ScalingList *scaling_list = NULL; > > int err, i; > > > > + int pic_param_size = sizeof(pic->pic_param); > > +#if VA_CHECK_VERSION(1, 2, 0) > > + pic_param_size += sizeof(pic->pic_rext_param); > > But only if in an extension profile? (Or replace with sizeof the extension > structure.) Will update to use sizeof the extension structure for rext. > > +#endif > > + > > Do inferred values do the right thing if pps_range_extension_flag is not set? ... > It doesn't look like the presence of this value depends on > sps_range_extension_flag? > Will check the profile and only pass above parameters to driver/hardware while decoding HEVC range extension clips. Thanks for the review. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".