[Ffmpeg-devel] [PATCH] port ratecontrol step_mult stuff from x264

Michael Niedermayer michaelni
Fri Oct 13 13:41:31 CEST 2006


Hi

On Wed, Oct 11, 2006 at 07:23:17PM -0700, Corey Hickey wrote:
> Hello,
> 
> A while ago Michael suggested this change.
> 
> http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-September/014896.html
> 
> I'm not advocating the inclusion of this patch as of yet, but I wanted
> to submit it for review.
> 
> Most of the code is copied straight out of x264 ratecontrol.c, with
> slight modifications to make structure names and macro usage match
> libavcodec.

the qscale2bits() may or may not be better (its for h.264 not mpeg* and
these are somewhat different)
this needs to be split out and tested (simple sum of 
(realbits - qscale2bits(...))^2) would be ok i guess
also qp2bits() should be == qscale2bits() and bits2qp() should be updated


> 
> I ran a few test encodes, but there wasn't much effect: a 0.05%
> difference in bitrate on the 2nd and 3rd passes.

posting only bitrate or only psnr is meaningless, both always need
to be known (saying one is constant is of course somethig too but you
didnt say that ...)
so take a few short testfiles (a few minutes length) and encode them
at a few different bitrates and provide bitrate and PSNR for them
if you have, the standard test sequences foreman, ... would be perfect


> 
> Michael, Loren, have I made this patch correctly? If so, what is the
> expected benefit?

the qscale2bits() change (if qp2bits/bits2qp is fixed) could have some 
nice PSNR/bitrate effects
the other part probably will have not much effect at all except that
some ratecontrol equations which resulted in excessively large or small
values will work now


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list