[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c,1.115,1.116
Michael Niedermayer
michaelni
Thu Dec 29 01:01:05 CET 2005
Hi
On Thu, Dec 29, 2005 at 12:25:03AM +0100, Michael Niedermayer wrote:
> Hi
>
> On Wed, Dec 28, 2005 at 12:35:09PM -0800, Corey Hickey wrote:
> > Michael Niedermayer CVS wrote:
> > > Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
> > > In directory mail:/var2/tmp/cvs-serv19133
> > >
> > > Modified Files:
> > > motion_est.c
> > > Log Message:
> > > hmm did i mess the scaling of these up at some point?
> > > anyway, this change decreases bitrate and increase PSNR by ~1.00 on my test file, other files also benefit significantly
> >
> > I tested this on The Matrix:
> >
> > -----------------------------------------------------------------
> > for i in 1:turbo 2 ; do
> > time mencoder ~/dumpstream/matrix.vob -aid 128 -oac copy \
> > -vf crop=718:356:0:60,scale=640:272 -sws 9 -ovc lavc -lavcopts \
> > vcodec=mpeg4:vbitrate=581:psnr:vpass=$i:mbd=2:mv0:trell:cbp:\
> > precmp=2:cmp=2:subcmp=2:predia=2:dia=2:preme=2:vme=5:v4mv:\
> > last_pred=2:vqcomp=0.6:vmax_b_frames=2:qpel -ofps 24000/1001 \
> > -o test.avi
> > done
> >
> > -----------------------------------------------------------------
> > before:
> >
> > (pass 1)
> > PSNR: Y:40.06, Cb:44.34, Cr:44.64, All:41.10
> > user 35m12.394s
> >
> > (pass 2)
> > PSNR: Y:42.10, Cb:45.17, Cr:45.85, All:42.96
> > user 186m52.325s
> >
> >
> > -----------------------------------------------------------------
> > after:
> >
> > (pass 1)
> > PSNR: Y:40.05, Cb:44.29, Cr:44.59, All:41.08
> >
> > (pass 2)
> > PSNR: Y:42.04, Cb:45.15, Cr:45.84, All:42.91
> >
> > -----------------------------------------------------------------
> >
> > I don't have the user times listed for "after" because for some reason
> > my CPU frequency scaling went screwy and stuck my CPU at a low
> > frequency. Nevertheless, I don't think the encoding speeds are
> > significantly different -- the user times for after the next commit were
> > 34m52.509s and 190m8.100s, respectively for each pass.
> >
> > Unfortunately, I didn't see a large PSNR gain like I had hoped from the
> > log message. The PSNR actually dropped a bit. As for quality
> > differences, here's the breakdown from looking at several different scenes.
> > - mostly the same (low-motion scenes are all the same)
> > - several places that look slightly better
> > - a few places that look slightly worse
> > - a few places that look significantly better
> > - one place that looks significantly worse
> > - one frame that looks way worse (flickering lightning for a second)
> >
> > Overall, I have the impression that quality is improved.
>
> good, i also havnt seen such huge PSNR improvments on all files, +1.00
> was just the maximum IIRC, ill post the exact PSNR from my files as soon as
> the system on which they are is up again (might take some time ...), i
> should have posted them already when i did the testing
> anyway its subjective quality that counts not PSNR
btw, if you want you could try to replace
all 'c->scene_change_score+= s->qscale' in motion_est.c
with 'c->scene_change_score+= s->qscale*N'
where N is a interger between 1..16 (16 should be the old, 1 the new)
according to my tests 1 was best overall on my files but the differences
at the low values where small (all IIRC as i cant check that ATM), so
maybe we should increase it ...
you could also try different values for scene_change_threshold ...
allthough 6h encoding for each case maybe a serious problem, my files
where all short <=2min
[...]
--
Michael
More information about the ffmpeg-cvslog
mailing list