[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est.c, 1.113, 1.114 avcodec.h, 1.434, 1.435 utils.c, 1.165, 1.166

Corey Hickey bugfood-ml
Sun Feb 5 22:22:44 CET 2006


Michael Niedermayer CVS wrote:
> Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
> In directory mail:/var2/tmp/cvs-serv7780
> 
> Modified Files:
> 	motion_est.c avcodec.h utils.c 
> Log Message:
> bidir refine support


I tested this on The Matrix.

MEncoder dev-CVS-060127-12:25-4.0.3 (C) 2000-2006 MPlayer Team

for i in 1:turbo:vb_strategy=2 2 ; do
  mencoder 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:qpel:sc_factor=6 -ofps 24000/1001 -o test.avi
done

...with the following values of bidir_refine

bidir_refine=0 (default; disabled)
  pass 1:
PSNR: Y:40.24, Cb:44.40, Cr:44.73, All:41.26
user    122m21.705s
  pass 2:
PSNR: Y:42.18, Cb:45.16, Cr:45.86, All:43.03
user    180m3.776s

frame counts: I:   3346  1%  P:  81506 41%  B: 111214 56%
average qps:  I: 3.053796    P: 3.132776    B: 4.977988



bidir_refine=1
  pass 1:
PSNR: Y:40.29, Cb:44.40, Cr:44.73, All:41.30
user    135m18.301s
  pass 2:
PSNR: Y:42.19, Cb:45.16, Cr:45.86, All:43.04
user    204m10.938s

frame counts: I:   3342  1%  P:  81721 41%  B: 111003 56%
average qps:  I: 3.057151    P: 3.127691    B: 4.965487



bidir_refine=2
  pass 1:
PSNR: Y:40.31, Cb:44.40, Cr:44.74, All:41.32
user    155m4.897s
  pass 2:
PSNR: Y:42.20, Cb:45.16, Cr:45.85, All:43.05
user    254m6.514s

frame counts: I:   3347  1%  P:  81827 41%  B: 110892 56%
average qps:  I: 3.053182    P: 3.128210    B: 4.957472



bidir_refine=3
  pass 1:
PSNR: Y:40.32, Cb:44.41, Cr:44.75, All:41.33
user    178m7.467s
  pass 2:
PSNR: Y:42.21, Cb:45.17, Cr:45.87, All:43.05
user    317m59.722s

frame counts: I:   3341  1%  P:  81902 41%  B: 110823 56%
average qps:  I: 3.044897    P: 3.126871    B: 4.958971



bidir_refine=4
  pass 1:
PSNR: Y:40.32, Cb:44.41, Cr:44.75, All:41.33
user    189m9.897s
  pass 2:
PSNR: Y:42.21, Cb:45.17, Cr:45.87, All:43.06
user    350m32.745s

frame counts: I:   3352  1%  P:  81893 41%  B: 110821 56%
average qps:  I: 3.041766    P: 3.131232    B: 4.957283



The actual quality effect is hard to discern. There was a definite
change -- some frames (or parts of frames) I looked at were slightly
better-looking, and some were slightly worse. Overall, there isn't
really much difference, though. If encoding time is not an issue (at
all), then I'd say using bidir_refine=4 is good simply because the PSNR
is better. Otherwise, it's probably not worth it.

-Corey





More information about the ffmpeg-cvslog mailing list