[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c,1.115,1.116

Michael Niedermayer michaelni
Sat Jan 21 17:48:05 CET 2006


Hi

On Fri, Jan 20, 2006 at 10:44:28PM -0800, Corey Hickey wrote:
> Michael Niedermayer wrote:
> >>I don't know how universally applicable these tests are, but if 16 was
> >>default before and 1 is default now, adjusting to somewhere toward the
> >>middle is probably a safe change. I've attached patches for ffmpeg and
> >>mplayer, if anyone else wants to test this. If the patches should be
> >>applied, I'll make a patch for the mplayer man page. Otherwise, 6 could
> >>just be hardcoded.
> >>
> >>
> >>I haven't tried sc_threshold yet. My understanding is that using
> > 
> > 
> > can you achive the same improvement with sc_threshold? if yes the patch
> > is rejected, if no the patch is ok and can be applied
> 
> Well, that took a really long time, mostly because I didn't have any
> idea what values to start with. I have failed to achieve the same
> quality improvement with sc_threshold. Here are the PSNR results:
> 
> sc_threshold=0:         PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-10:       PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-20:       PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-30:       PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-100:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-200:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-300:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-400:      PSNR: Y:42.06, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-500:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-600:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.93
> sc_threshold=-700:      PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-800:      PSNR: Y:42.06, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-900:      PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.94
> sc_threshold=-1000:     PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.94
> sc_threshold=-1100:     PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-1200:     PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.94
> sc_threshold=-1300:     PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-1400:     PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-1500:     PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.94
> sc_threshold=-2000:     PSNR: Y:42.06, Cb:45.17, Cr:45.86, All:42.94
> sc_threshold=-2500:     PSNR: Y:42.07, Cb:45.17, Cr:45.87, All:42.95
> sc_threshold=-3000:     PSNR: Y:42.08, Cb:45.18, Cr:45.89, All:42.96
> sc_threshold=-3500:     PSNR: Y:42.08, Cb:45.18, Cr:45.88, All:42.95
> sc_threshold=-4000:     PSNR: Y:42.08, Cb:45.18, Cr:45.88, All:42.96
> sc_threshold=-4500:     PSNR: Y:42.08, Cb:45.18, Cr:45.89, All:42.96
> sc_threshold=-5000:     PSNR: Y:42.08, Cb:45.18, Cr:45.88, All:42.95
> sc_threshold=-5500:     PSNR: Y:42.08, Cb:45.18, Cr:45.88, All:42.96
> sc_threshold=-6000:     PSNR: Y:42.08, Cb:45.18, Cr:45.88, All:42.96
> sc_threshold=-7000:     PSNR: Y:42.09, Cb:45.18, Cr:45.87, All:42.96
> sc_threshold=-8000:     PSNR: Y:42.09, Cb:45.18, Cr:45.87, All:42.96
> sc_threshold=-9000:     PSNR: Y:42.09, Cb:45.18, Cr:45.88, All:42.96
> sc_threshold=-10000:    PSNR: Y:42.09, Cb:45.18, Cr:45.87, All:42.96
> 
> Or, if you prefer, a graph is attached.
> 
> 
> As you can see, the PSNR hits a plateau at around sc_threshold=-3000, so
> I don't think testing lower values would yield any better PSNR. As far

maybe try -20000, -40000 and -80000 too just to be sure


> as visual quality goes, I didn't see any of the same gains as with my
> sc_factor patch. I found a few new I-frames at higher values of
> sc_threshold, but they weren't placed in locations that improved
> bad-looking high-motion scenes as much as with sc_factor=6 (which,
> incidentally, yields 42.97 PSNR with current CVS).

iam curious how vqcomp=0.7 or larger and various vi_qfactors (both negative
and positive) would affect these relations :)


> 
> I've attached patches for ffmpeg and mplayer; they're like the last ones
> I posted, except:
> * I made 6 the default

iam against changing the default currently


> * I added sc_factor to the mplayer man page
> * for convenience, I moved all sc_factor lines to right after sc_threshold

not ok, as it breaks the ABI


[...]

> +{"sc_factor", NULL, OFFSET(scenechange_factor), FF_OPT_TYPE_INT, 6, 1, 16, V|E},

why 16? larger values should be ok too


except these the patch is ok and can be applied

[...]

-- 
Michael





More information about the ffmpeg-cvslog mailing list