[FFmpeg-devel] [PATCH 4/8] lavc/vaapi_hevc: Add HEVC Rext parameter for VAPicture and VASlice
Fu, Linjie
linjie.fu at intel.com
Tue Jan 14 10:43:28 EET 2020
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Mark Thompson
> Sent: Thursday, January 9, 2020 06:19
> To: ffmpeg-devel at 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.fu at 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.
More information about the ffmpeg-devel
mailing list