[FFmpeg-devel] [PATCH]lavf/decimate: Fix total difference for the first frame

Clément Bœsch u at pkh.me
Mon Jan 4 22:02:05 CET 2016

On Mon, Jan 04, 2016 at 08:53:24PM +0000, Carl Eugen Hoyos wrote:
> Clément Bœsch <u <at> pkh.me> writes:
> > +    if (cyclestart == 0) {
> > +        vdm->vmi[0].maxbdiff = vdm->vmi[1].maxbdiff;
> > +        vdm->vmi[0].totdiff = vdm->scthresh + 1;
> > +    }
> > +
> > I suggest to "cherry-pick" this if it works.
> Nicolas has already found a very similar solution 
> that only differs in rare cases (although the change 
> should be ported) and not for the file in question.
> Sorry to say this but I wonder how the filter ever 
> passed any test without this (or a similar) change.

I must confess that my initial testing was very light (it did match the
behaviour I was trying to copy with the sample I was using though), but I
remember saying that I was waiting for more testing from users since it
was supposedly a very much requested feature. Unfortunately, the issues
were raised very late, at a time when I didn't actually have much time to
look into this (like right now).

BTW, the main reason I pasted the commit was because of the explanation
for the "+1" you seemed to be wondering about.

> The OP of ticket #4990 claims that for his sample 
> the first frames are correctly handled with avisynth.
> (I have no idea how to test this.)

You can maybe test with Vapoursynth (works on Linux). It was IMO a real
pain to use years ago, and documentation was severely lacking
(understandable because of the ambition of the project), but it might be
simpler nowadays.


Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160104/187279e5/attachment.sig>

More information about the ffmpeg-devel mailing list