Hi Juha,

>  By changing the binary_search algorithm used in bin_search_StepSize
> a major speed up can be achieved.
> 

How about a patch for LAME?


> 
> Usually, the (top - bottom) range is quite huge, the top value is hard
> fixed to 200
> and the bottom is approximated with the quantanf_init function.. and
> than substracted
> some 70 to make the check range even larger, range something between
> 256, 512 which
> makes 9 iterations before final value.

In LAME we've done a little of this:  quantanf_init is gone
(it had some bugs that Weg first pointed out).  And we have
limited the search range to -210..45 (the actual range valid
range for quantizerStepSize).  


> value is calculated
> by using the max_bits[ch] as the limit, but than the first inner_loop
> gets 
> max_bits[ch] - cod_info[ch]->part2_length.. And for that, inner_loop has
> a loop for 
> makeing the quantizer stepsize larger to makes bit counter less.. urgh.
> why not use it for
> the first time too?
> 

LAME also has some code (from Chris) that will re-use the quantization
computed in bin_search_StepSize in outer_loop() if possible.
But on all the iterations except the first, this is not possible
because the scalefactors have changed, and thus part2_length has
changed, and a new quantization has to be computed.  

Mark

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to