Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
Hi, On Wed, Apr 29, 2020 at 8:08 AM Fu, Linjie wrote: > > From: ffmpeg-devel On Behalf Of Fu, > > Linjie > > Sent: Friday, March 20, 2020 09:49 > > To: Ronald S. Bultje ; FFmpeg development > > discussions and patches > > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > > dimensions check for SINGLE_REFERENCE mode > > > > > From: Ronald S. Bultje > > > Sent: Thursday, March 19, 2020 20:10 > > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > > Cc: Fu, Linjie > > > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > > dimensions check for SINGLE_REFERENCE mode > > > > > > Hi, > > > > > > On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu > > mailto:linjie...@intel.com>> wrote: > > > 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 > > SINGLE_REFERENCE > > > mode that not all reference frames have valid dimensions. > > > > > > Check and error out if invalid reference frame is used in inter_recon. > > > > > > One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE > mode) > > > with following reference pool: > > > > > > 0. 960x544LASTvalid > > > 1. 1920x1088 GOLDEN invalid, but not used in single reference mode > > > 2. 1920x1088 ALTREF invalid, but not used in single reference mode > > > 3~7 ... Unused > > > > > > Identical logic in libvpx: > > > > > <https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_d > > ecodeframe.c#L736> > > > > > > Signed-off-by: Linjie Fu linjie...@intel.com>> > > > --- > > > [v3]: replace assert with check/return, tested in both multi > frame/slice > > mode > > > [v4]: clear error_info to make decoding still work for other frames in > this > > stream > > > > > > libavcodec/vp9.c | 20 ++-- > > > libavcodec/vp9dec.h | 5 + > > > libavcodec/vp9recon.c | 10 ++ > > > 3 files changed, 33 insertions(+), 2 deletions(-) > > > > > > LGTM, thanks for the revisions. (We have been discussing this on IRC.) > > > > Thanks for the review and valuable suggestions. > > > Ping for merge, thx. Applied. Ronald ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
> From: ffmpeg-devel On Behalf Of Fu, > Linjie > Sent: Friday, March 20, 2020 09:49 > To: Ronald S. Bultje ; FFmpeg development > discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > > From: Ronald S. Bultje > > Sent: Thursday, March 19, 2020 20:10 > > To: FFmpeg development discussions and patches de...@ffmpeg.org> > > Cc: Fu, Linjie > > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > > > Hi, > > > > On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu > mailto:linjie...@intel.com>> wrote: > > 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 > SINGLE_REFERENCE > > mode that not all reference frames have valid dimensions. > > > > Check and error out if invalid reference frame is used in inter_recon. > > > > One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE mode) > > with following reference pool: > > > > 0. 960x544LASTvalid > > 1. 1920x1088 GOLDEN invalid, but not used in single reference mode > > 2. 1920x1088 ALTREF invalid, but not used in single reference mode > > 3~7 ... Unused > > > > Identical logic in libvpx: > > > <https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_d > ecodeframe.c#L736> > > > > Signed-off-by: Linjie Fu mailto:linjie...@intel.com>> > > --- > > [v3]: replace assert with check/return, tested in both multi frame/slice > mode > > [v4]: clear error_info to make decoding still work for other frames in this > stream > > > > libavcodec/vp9.c | 20 ++-- > > libavcodec/vp9dec.h | 5 + > > libavcodec/vp9recon.c | 10 ++ > > 3 files changed, 33 insertions(+), 2 deletions(-) > > > > LGTM, thanks for the revisions. (We have been discussing this on IRC.) > > Thanks for the review and valuable suggestions. > Ping for merge, thx. - Linjie ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
> From: Ronald S. Bultje > Sent: Thursday, March 19, 2020 20:10 > To: FFmpeg development discussions and patches > Cc: Fu, Linjie > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > Hi, > > On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu > mailto:linjie...@intel.com>> wrote: > 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 SINGLE_REFERENCE > mode that not all reference frames have valid dimensions. > > Check and error out if invalid reference frame is used in inter_recon. > > One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE mode) > with following reference pool: > > 0. 960x544LASTvalid > 1. 1920x1088 GOLDEN invalid, but not used in single reference mode > 2. 1920x1088 ALTREF invalid, but not used in single reference mode > 3~7 ... Unused > > Identical logic in libvpx: > <https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_decodeframe.c#L736> > > Signed-off-by: Linjie Fu mailto:linjie...@intel.com>> > --- > [v3]: replace assert with check/return, tested in both multi frame/slice mode > [v4]: clear error_info to make decoding still work for other frames in this > stream > > libavcodec/vp9.c | 20 ++-- > libavcodec/vp9dec.h | 5 + > libavcodec/vp9recon.c | 10 ++ > 3 files changed, 33 insertions(+), 2 deletions(-) > > LGTM, thanks for the revisions. (We have been discussing this on IRC.) Thanks for the review and valuable suggestions. - Linjie ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
> From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Friday, March 20, 2020 00:47 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > Am Do., 19. März 2020 um 16:12 Uhr schrieb Fu, Linjie : > > > > > From: ffmpeg-devel On Behalf Of > > > Carl Eugen Hoyos > > > Sent: Thursday, March 19, 2020 22:13 > > > To: FFmpeg development discussions and patches > > de...@ffmpeg.org> > > > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > > > dimensions check for SINGLE_REFERENCE mode > > > > > > Am Do., 19. März 2020 um 14:45 Uhr schrieb Fu, Linjie > : > > > > > > > This fix [v4] intended to report errors and exit decode_frame() for the > > > exact frame witch has > > > > invalid mvscale factors used, and didn't mean to break the decoding for > > > subsequent frames if > > > > they could be decoded correctly. > > > > > > How does the output look visually before this patch and how does it > > > look with this patch? > > > > > $ ffmpeg -i g2_decoder_case_15865.ivf -f null - > > > > * 1. Before this patch: > > Reported "Invalid ref frame dimensions" in the decode_frame_header() > and abort the decoding. > > (only 8 frame decode) > > > > > > [vp9 @ 0x55e6496b3050] Invalid ref frame dimensions 1920x1088 for frame > size 480x272 > > [vp9 @ 0x55e6496baab0] Not all references are available > > [vp9 @ 0x55e6496c2510] Not all references are available > > [vp9 @ 0x55e6496c5620] Not all references are available > > Output #0, null, to 'pipe:': > > Metadata: > > encoder : Lavf58.42.100 > > Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 > kb/s, 25 fps, 25 tbn, 25 tbc > > Metadata: > > encoder : Lavc58.76.100 wrapped_avframe > > Error while decoding stream #0:0: Invalid data found when processing input > > Last message repeated 3 times > > frame=8 fps=7.7 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A > speed=0.464x > > > > > > * 2. With this patch: > > All frames (12) decoded correctly (visually) with a warning in the header > check. > > > > > > Input #0, ivf, from 'g2_decoder_case_15865.ivf': > > Duration: 00:00:00.01, start: 0.00, bitrate: 100442 kb/s > > Stream #0:0: Video: vp9 (Profile 0) (VP90 / 0x30395056), yuv420p(tv), > 1920x1088, 25 fps, 25 tbr, 1k tbn, 1k tbc > > Stream mapping: > > Stream #0:0 -> #0:0 (vp9 (native) -> wrapped_avframe (native)) > > Press [q] to stop, [?] for help > > [vp9 @ 0x56072d8df080] Invalid ref frame dimensions 1920x1088 for frame > size 480x272 > > Last message repeated 1 times > > Output #0, null, to 'pipe:': > > Metadata: > > encoder : Lavf58.41.100 > > Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 > kb/s, 25 fps, 25 tbn, 25 tbc > > Metadata: > > encoder : Lavc58.75.100 wrapped_avframe > > frame= 12 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A > speed=1.77x > > Then I wonder if the commit message can be improved but that is just > nit-picking. > > Thank you for your patience! > With pleasure, thank you for the review. - Linjie ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
Am Do., 19. März 2020 um 16:12 Uhr schrieb Fu, Linjie : > > > From: ffmpeg-devel On Behalf Of > > Carl Eugen Hoyos > > Sent: Thursday, March 19, 2020 22:13 > > To: FFmpeg development discussions and patches > de...@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > > dimensions check for SINGLE_REFERENCE mode > > > > Am Do., 19. März 2020 um 14:45 Uhr schrieb Fu, Linjie : > > > > > This fix [v4] intended to report errors and exit decode_frame() for the > > exact frame witch has > > > invalid mvscale factors used, and didn't mean to break the decoding for > > subsequent frames if > > > they could be decoded correctly. > > > > How does the output look visually before this patch and how does it > > look with this patch? > > > $ ffmpeg -i g2_decoder_case_15865.ivf -f null - > > * 1. Before this patch: > Reported "Invalid ref frame dimensions" in the decode_frame_header() and > abort the decoding. > (only 8 frame decode) > > > [vp9 @ 0x55e6496b3050] Invalid ref frame dimensions 1920x1088 for frame size > 480x272 > [vp9 @ 0x55e6496baab0] Not all references are available > [vp9 @ 0x55e6496c2510] Not all references are available > [vp9 @ 0x55e6496c5620] Not all references are available > Output #0, null, to 'pipe:': > Metadata: > encoder : Lavf58.42.100 > Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 > kb/s, 25 fps, 25 tbn, 25 tbc > Metadata: > encoder : Lavc58.76.100 wrapped_avframe > Error while decoding stream #0:0: Invalid data found when processing input > Last message repeated 3 times > frame=8 fps=7.7 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A speed=0.464x > > > * 2. With this patch: > All frames (12) decoded correctly (visually) with a warning in the header > check. > > > Input #0, ivf, from 'g2_decoder_case_15865.ivf': > Duration: 00:00:00.01, start: 0.00, bitrate: 100442 kb/s > Stream #0:0: Video: vp9 (Profile 0) (VP90 / 0x30395056), yuv420p(tv), > 1920x1088, 25 fps, 25 tbr, 1k tbn, 1k tbc > Stream mapping: > Stream #0:0 -> #0:0 (vp9 (native) -> wrapped_avframe (native)) > Press [q] to stop, [?] for help > [vp9 @ 0x56072d8df080] Invalid ref frame dimensions 1920x1088 for frame size > 480x272 > Last message repeated 1 times > Output #0, null, to 'pipe:': > Metadata: > encoder : Lavf58.41.100 > Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 > kb/s, 25 fps, 25 tbn, 25 tbc > Metadata: > encoder : Lavc58.75.100 wrapped_avframe > frame= 12 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A speed=1.77x Then I wonder if the commit message can be improved but that is just nit-picking. Thank you for your patience! Carl Eugen ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
> From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Thursday, March 19, 2020 22:13 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > Am Do., 19. März 2020 um 14:45 Uhr schrieb Fu, Linjie : > > > This fix [v4] intended to report errors and exit decode_frame() for the > exact frame witch has > > invalid mvscale factors used, and didn't mean to break the decoding for > subsequent frames if > > they could be decoded correctly. > > How does the output look visually before this patch and how does it > look with this patch? > $ ffmpeg -i g2_decoder_case_15865.ivf -f null - * 1. Before this patch: Reported "Invalid ref frame dimensions" in the decode_frame_header() and abort the decoding. (only 8 frame decode) [vp9 @ 0x55e6496b3050] Invalid ref frame dimensions 1920x1088 for frame size 480x272 [vp9 @ 0x55e6496baab0] Not all references are available [vp9 @ 0x55e6496c2510] Not all references are available [vp9 @ 0x55e6496c5620] Not all references are available Output #0, null, to 'pipe:': Metadata: encoder : Lavf58.42.100 Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.76.100 wrapped_avframe Error while decoding stream #0:0: Invalid data found when processing input Last message repeated 3 times frame=8 fps=7.7 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A speed=0.464x * 2. With this patch: All frames (12) decoded correctly (visually) with a warning in the header check. Input #0, ivf, from 'g2_decoder_case_15865.ivf': Duration: 00:00:00.01, start: 0.00, bitrate: 100442 kb/s Stream #0:0: Video: vp9 (Profile 0) (VP90 / 0x30395056), yuv420p(tv), 1920x1088, 25 fps, 25 tbr, 1k tbn, 1k tbc Stream mapping: Stream #0:0 -> #0:0 (vp9 (native) -> wrapped_avframe (native)) Press [q] to stop, [?] for help [vp9 @ 0x56072d8df080] Invalid ref frame dimensions 1920x1088 for frame size 480x272 Last message repeated 1 times Output #0, null, to 'pipe:': Metadata: encoder : Lavf58.41.100 Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1088, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.75.100 wrapped_avframe frame= 12 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.48 bitrate=N/A speed=1.77x If talking about the error out, it didn't happen in this bitstream since the invalid refs is not used. It would take effect in the situations that invalid ref is unexpected used in either single/comp reference during inter recon. And identical messages would be reported that invalid data found when processing input, and the outputted frames is less than expected. - Linjie ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
Am Do., 19. März 2020 um 14:45 Uhr schrieb Fu, Linjie : > This fix [v4] intended to report errors and exit decode_frame() for the exact > frame witch has > invalid mvscale factors used, and didn't mean to break the decoding for > subsequent frames if > they could be decoded correctly. How does the output look visually before this patch and how does it look with this patch? Carl Eugen ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
Hi Carl, > From: ffmpeg-devel On Behalf Of > Carl Eugen Hoyos > Sent: Thursday, March 19, 2020 21:04 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame > dimensions check for SINGLE_REFERENCE mode > > > > > Am 19.03.2020 um 13:10 schrieb Ronald S. Bultje : > > > > Hi, > > > >> On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu wrote: > >> > >> 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 > SINGLE_REFERENCE > >> mode that not all reference frames have valid dimensions. > >> > >> Check and error out if invalid reference frame is used in inter_recon. > >> > >> One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE > mode) > >> with following reference pool: > >> > >> 0. 960x544LASTvalid > >> 1. 1920x1088 GOLDEN invalid, but not used in single reference mode > >> 2. 1920x1088 ALTREF invalid, but not used in single reference mode > >> 3~7 ... Unused > >> > >> Identical logic in libvpx: > >> < > >> > https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_de > codeframe.c#L736 > >>> > >> > >> Signed-off-by: Linjie Fu > >> --- > >> [v3]: replace assert with check/return, tested in both multi frame/slice > >> mode > >> [v4]: clear error_info to make decoding still work for other frames in > >> this stream > >> > >> libavcodec/vp9.c | 20 ++-- > >> libavcodec/vp9dec.h | 5 + > >> libavcodec/vp9recon.c | 10 ++ > >> 3 files changed, 33 insertions(+), 2 deletions(-) > > > > > > LGTM, thanks for the revisions. (We have been discussing this on IRC.) > > Why does this error out even if explode is not set? "explode" seems to mean that aborting the whole decode procedure on minor error detection. This fix [v4] intended to report errors and exit decode_frame() for the exact frame witch has invalid mvscale factors used, and didn't mean to break the decoding for subsequent frames if they could be decoded correctly. It's not an aborting for the whole decoding hence I think this behavior may not match the description of explode. Thanks, - Linjie ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
> Am 19.03.2020 um 13:10 schrieb Ronald S. Bultje : > > Hi, > >> On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu wrote: >> >> 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 SINGLE_REFERENCE >> mode that not all reference frames have valid dimensions. >> >> Check and error out if invalid reference frame is used in inter_recon. >> >> One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE mode) >> with following reference pool: >> >> 0. 960x544LASTvalid >> 1. 1920x1088 GOLDEN invalid, but not used in single reference mode >> 2. 1920x1088 ALTREF invalid, but not used in single reference mode >> 3~7 ... Unused >> >> Identical logic in libvpx: >> < >> https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_decodeframe.c#L736 >>> >> >> Signed-off-by: Linjie Fu >> --- >> [v3]: replace assert with check/return, tested in both multi frame/slice >> mode >> [v4]: clear error_info to make decoding still work for other frames in >> this stream >> >> libavcodec/vp9.c | 20 ++-- >> libavcodec/vp9dec.h | 5 + >> libavcodec/vp9recon.c | 10 ++ >> 3 files changed, 33 insertions(+), 2 deletions(-) > > > LGTM, thanks for the revisions. (We have been discussing this on IRC.) Why does this error out even if explode is not set? Carl Eugen ___ 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".
Re: [FFmpeg-devel] [PATCH, v4] lavc/vp9: fix reference frame dimensions check for SINGLE_REFERENCE mode
Hi, On Tue, Mar 17, 2020 at 10:59 AM Linjie Fu wrote: > 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 SINGLE_REFERENCE > mode that not all reference frames have valid dimensions. > > Check and error out if invalid reference frame is used in inter_recon. > > One of the failure case is a 480x272 inter frame (SINGLE_REFERENCE mode) > with following reference pool: > > 0. 960x544LASTvalid > 1. 1920x1088 GOLDEN invalid, but not used in single reference mode > 2. 1920x1088 ALTREF invalid, but not used in single reference mode > 3~7 ... Unused > > Identical logic in libvpx: > < > https://github.com/webmproject/libvpx/blob/master/vp9/decoder/vp9_decodeframe.c#L736 > > > > Signed-off-by: Linjie Fu > --- > [v3]: replace assert with check/return, tested in both multi frame/slice > mode > [v4]: clear error_info to make decoding still work for other frames in > this stream > > libavcodec/vp9.c | 20 ++-- > libavcodec/vp9dec.h | 5 + > libavcodec/vp9recon.c | 10 ++ > 3 files changed, 33 insertions(+), 2 deletions(-) LGTM, thanks for the revisions. (We have been discussing this on IRC.) Ronald ___ 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".