[Ffmpeg-devel] Re: [PATCH] fix DV encoder VLC bit accounting

Michael Niedermayer michaelni
Wed Feb 22 12:29:55 CET 2006


Hi

On Wed, Feb 22, 2006 at 11:51:55AM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Wed, Feb 22, 2006 at 11:14:44AM +0100, Michael Niedermayer wrote:
> > Hi
> > >On Tue, Feb 21, 2006 at 10:52:48PM -0500, Dan Maas wrote:
> > > > One question before I apply it -- did you measure the performance 
> > > > degradation with this patch (at least roughly speaking) ?
> > > 
> > > The fixed encoder is about 6% slower than the unmodified encoder.
> > 
> > rejected
> 
> also note that the patch is full of tabs and cosmetical changes ...

and last the patch recalculates all coefficients of all areas
after any !0 -> 0 change, while only a single coefficient would
need to be checked and only if the change was the last non zero
coeff of an area, ugh this is inefficient code

so either
* recalc only the single coeff and only when needed
* find the worst case bitsize increase and and add that to the amount of
  bits needed in case a !0->0 chnange at an area end happens
* detect during final encoding that too many bits are there and simply
  redo the whole with higher quantization

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list