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

2016-01-05 Thread Carl Eugen Hoyos
Carl Eugen Hoyos ag.or.at> writes: > Clément Bœsch 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

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

2016-01-04 Thread Clément Bœsch
On Mon, Jan 04, 2016 at 08:53:24PM +, Carl Eugen Hoyos wrote: > Clément Bœsch 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" th

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

2016-01-04 Thread Carl Eugen Hoyos
Clément Bœsch 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 differ

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

2016-01-04 Thread Clément Bœsch
On Mon, Jan 04, 2016 at 05:32:32PM +, Derek Buitenhuis wrote: > On 1/4/2016 5:17 PM, Carl Eugen Hoyos wrote: > > I wish I would understand;-( > > > > Since this fixes a reported issue here, I will > > commit my patch if nobody objects. > > [17:30] * Daemon404 pokes ubitux > [17:30] <@ubitux

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

2016-01-04 Thread Carl Eugen Hoyos
Carl Eugen Hoyos ag.or.at> writes: > -dm->queue[dm->fid].totdiff = INT64_MAX; > +dm->queue[dm->fid].totdiff = dm->scthresh; This is not correct, I will try to find the actual issue. Sorry, Carl Eugen ___ ffmpeg-devel mailing

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

2016-01-04 Thread Derek Buitenhuis
On 1/4/2016 5:17 PM, Carl Eugen Hoyos wrote: > I wish I would understand;-( > > Since this fixes a reported issue here, I will > commit my patch if nobody objects. [17:30] * Daemon404 pokes ubitux [17:30] <@ubitux> yup? [17:30] <@Daemon404> do you have a comment on carl's decimate change [17:31

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

2016-01-04 Thread Carl Eugen Hoyos
Derek Buitenhuis gmail.com> writes: > > -dm->queue[dm->fid].totdiff = INT64_MAX; > > +dm->queue[dm->fid].totdiff = dm->scthresh; > > Upstream uses +1 here, but I'm not sure why I wish I would understand;-( Since this fixes a reported issue here, I will commit my patch if nob

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

2016-01-03 Thread Derek Buitenhuis
On 1/3/2016 7:04 PM, Carl Eugen Hoyos wrote: > "dm->scthresh+1" is equivalent to INT_MAX afaict and > makes the given sample fail with our decimate filter. I think it should be OK, then. Perhaps Clement can comment if not. - Derek ___ ffmpeg-devel mai

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

2016-01-03 Thread Carl Eugen Hoyos
Derek Buitenhuis gmail.com> writes: > > On 1/3/2016 3:11 PM, Carl Eugen Hoyos wrote: > > With the patch, the frame with the lowest diff is actually dropped > > instead of the first frame that indicates a scene change without > > the patch (iiuc). > > Is this for all scene changes or just fram

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

2016-01-03 Thread Derek Buitenhuis
On 1/3/2016 3:11 PM, Carl Eugen Hoyos wrote: > With the patch, the frame with the lowest diff is actually dropped > instead of the first frame that indicates a scene change without > the patch (iiuc). Is this for all scene changes or just frame 0? If for all scene changes, ignore the lower comme

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

2016-01-03 Thread Carl Eugen Hoyos
Hi! Attached patch fixes ticket #4990 for me, I tested the following command line: $ ffmpeg -loglevel debug -i bugged.avi -vf fieldmatch,decimate -f null - The first frames show the following debug output: before: [Parsed_decimate_0 @ 0x329e160] 1/5 frame drop: [Parsed_decimate_0 @ 0x329e160]