[FFmpeg-devel] [PATCH] libavcodec/h263dec.c: Duplicate the last decoded frame when xvid marks the packet as skipped.

Thierry Foucu tfoucu at gmail.com
Wed Oct 25 21:38:18 EEST 2017


Derek,

On Wed, Oct 25, 2017 at 9:43 AM, Derek Buitenhuis <
derek.buitenhuis at gmail.com> wrote:

> On 10/25/2017 2:42 AM, Thierry Foucu wrote:
> > Changed the return value when no VOD were encoded in Mpeg4 bistream.
> > And if we do have already a decoded frames and we are not in xvid_packed
> > mode, output the existing decoded frame instead of nothing.
> > ---
> >  libavcodec/h263dec.c       | 9 ++++++++-
> >  libavcodec/mpeg4videodec.c | 2 +-
> >  libavcodec/mpegutils.h     | 1 +
> >  3 files changed, 10 insertions(+), 2 deletions(-)
>
> Would this considerably slow down pathological files with a lot of
> NVOPs purposely inserted? For example, it use to be A Thing to use
> NVOPs to hack in "variable framerate" Xvid-in-avi encodes, by for
> example, setting the fps to 120 for a file with 24 and 30 fps sections,
> and padding the rest with NVOPs.
>

I tried using one of those files.
Without the patch, the decoder will return only 29 frames
With this patch, the decoder will return 1947 frames.
The time of decoding the file were the same (with or without)

I think where it may slow down, it's in case we transcode the file and we
are not doing constant frame rate, then the encoder will have to encode
1947 frames instead of 24 frames.
But for decoding it the same.


>
> Do we care about such files? (Probably not...)
>
> I can provide some samples, probably, if needed.
>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list