[FFmpeg-devel] [PATCH 2/4] lavc/qsvenc: fix hevc vps extradata issues

Li, Zhong zhong.li at intel.com
Thu Mar 28 13:36:35 EET 2019



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Mark Thompson
> Sent: Thursday, March 28, 2019 6:06 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 2/4] lavc/qsvenc: fix hevc vps extradata
> issues
> 
> On 26/03/2019 19:46, Zhong Li wrote:
> > cbs trace qsv vps header failed due to some reasons:
> > 1. vps_temporal_id_nesting_flag is not set but spec required it must to
> >    be 1 when vps_max_sub_layers_minus1 is equal to 0.
> > 2. vps_num_hrd_parameters is not set and written.
> > 3. other issues in ff_hevc_encode_nal_vps() (have fixed in pervious
> commit).
> >
> > Reproduce: ffmpeg -hwaccel qsv -v verbose -c:v h264_qsv -i
> > bbb_sunflower_1080p_30fps_normal.mp4 -vframes 1 -c:v hevc_qsv
> -bsf:v
> > trace_headers -f null -
> >
> > Signed-off-by: Zhong Li <zhong.li at intel.com>
> > ---
> >  libavcodec/qsvenc_hevc.c | 16 +++++++++-------
> >  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> I had a patch sitting around for a long time for this - see
> <https://lists.libav.org/pipermail/libav-devel/2017-December/085498.html>.
> It just deletes all of the ad-hoc writing code and uses the tested CBS paths
> instead, which have the additional advantage of correctly preserving various
> things which the existing code doesn't cover at all (e.g. newer PTL flags
> which didn't exist when this was written).
> 
> The main problem with it was that I didn't have enough libmfx platforms at
> the time to be confident in testing of it, so it got stalled.
> 
> Would it be useful to resurrect that?
> 
> - Mark

MSDK can support vps extra_data since V1.17. Actually now it have been moved to V1.29.
So maybe we can consider the lightweight way to fix the fake vps error issue, instead of introduce cbs.

Using cbs can be a good idea if we decided to delete ff_hevc_encode_nal_vps() totally (IHMO, qsv hevc encoder is the only user of ff_hevc_encode_nal_vps()).


More information about the ffmpeg-devel mailing list