[FFmpeg-devel] [PATCH] lavc/vp9: fix reference frame dimensions check

Fu, Linjie linjie.fu at intel.com
Wed Mar 11 17:51:18 EET 2020


> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Carl Eugen Hoyos
> Sent: Wednesday, March 11, 2020 21:42
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/vp9: fix reference frame
> dimensions check
> 
> Am Mi., 11. März 2020 um 13:44 Uhr schrieb Fu, Linjie <linjie.fu at intel.com>:
> >
> > > From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> > > Carl Eugen Hoyos
> > > Sent: Wednesday, March 11, 2020 18:48
> > > To: FFmpeg development discussions and patches <ffmpeg-
> > > devel at ffmpeg.org>
> > > Subject: Re: [FFmpeg-devel] [PATCH] lavc/vp9: fix reference frame
> > > dimensions check
> > >
> > > Am Mi., 11. März 2020 um 11:44 Uhr schrieb Linjie Fu
> <linjie.fu at intel.com>:
> > > >
> > > > With the description in frame size with refs semantics (SPEC 7.2.5),
> > > > it is a requirement of bitstream conformance that for at least one
> > > > reference frame has the valid dimensions.
> > > >
> > > > Modify the check to make sure the decoder works well in the condition
> > > > that not all references frames have valid dimensions.
> > > >
> > > > Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> > > > ---
> > > > Fix the the decoding faiure for frames with dimension-ilegal refs.
> > > > Verifying with native vp9 and libvpx-vp9 decoder, the md5 result
> matches.
> > > >
> > >
> https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_de
> > > codeframe.c#L1580
> > >
> > > Did you provide a sample?
> > >
> > I'd like to, but to be honest, it seems kind of hard to produce such a stream
> available
> > for public (compared with setting TU depth for one frame), hence I could
> not promise
> > but will try. (any hints for this?)
> >
> > To elaborate more, one of the failure case is a 480x272 inter frame with two
> refs:
> > Ref[0]: 1920x1088 key frame, invalid;
> > Ref[1]:  960x 544 inter frame, valid;
> >
> > Which reports:
> > [vp9 @ 0x55b18d9be280] Invalid ref frame dimensions 1920x1088 for frame
> size 480x272
> 
> This should be even more part of the commit message if you cannot
> provide a sample.
> 
Ok, will elaborate more in the commit message.
Waiting for more comments (if there is any) before doing this, thanks

- Linjie



More information about the ffmpeg-devel mailing list