> Date: Mon, 10 Jan 2000 21:58:11 +0900
> From: Iwasa Kazmi <[EMAIL PROTECTED]>
> 
> Hi all,
> 
> I have checked actual reason to become notdone == 0 in outer_loop(),
> and I found a half of them is caused from fails of scale_bitcount().
> 
> The reason of fail of scale_bitcount() is that some scalefac exceed
> maximum limits.
> The maximum limits of scalefac are differ between two ranges of
> sfb.  In sfb=0 to 10, maximum limit is 15.  In sfb=11 to 20, maximum
> limit is 7.
> 
> If one scalefac in sfb=11..20 exceeds 7, the loop of amplification
> will be stopped. But it's not a good way. Other scalefactor bands
> should be more amplified.
> 
> I added some codes in amp_scalefac_bands().
> It increases only scalefac values which don't exceed limits.
> Next, it checks if preflag should be used or not.
> If preflag is enabled, it amplifies the scalefac bands not amplified
> yet.  So it can amplify scalefac to maximum value even if preflag
> is enabled.
> 
> Maybe, there are some mistakes.
> Some exit-loop conditions might not work correctly.
> 
> 
> Iwasa Kazmi
> [EMAIL PROTECTED]
> 
Hi Iwasa,

I think this is a good idea - But how much slower is it?  It looks
like the only way to terminate the loop now is when all the
scalefactors in bands with distortion are amplified to their max
value, and I'm guessing this takes many more iterations?

This might be why FhG is so slow: the big difference between FhG and
other encoders (including lame and xing) is that FhG seems to use
a much bigger dynamic range of scalefactors, so I assume they 
are doing a much more exhaustive search for a set of scalefactors.

A couple of minor comments: The preflag check can probably be left in
scale_bitcount() where it is now?  Setting preflag has no effect on
the distortion, it just allows the scalefactors to be encoded with
less bits.  (thus it would be a mistake to check the distortion a
second time after setting preflag).  Also, the whole cod_info struct
is saved & restored, so you dont need the preflagsave variable.

Mark

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

Reply via email to