In one of Chris' patches to loop.c, he noted that subblock_gain is
always 0, and took out some code that uses it.  This prompted me to
look up what subblock_gain is.  It effectively allows the three blocks
within a shortblock granule to have different global gain settings.
This is a pretty good idea, since the energy in these different blocks
can vary by factors of 50 or more.  LAME and dist10 make no use of
subblock_gain.  But I added this output to MP3x and looked at some FhG
frames: they use it for all short blocks.  

I consider this good news.  It is bad that the dist10 crippleware
didn't include it, but it is good to have a well defined feature
that we can put in and debug against the FhG encoder.

I think the first thing to try would be a simple formula that chooses
3 subblock gains to bring the average xr within each block as close as
possible.  A typical shortblock energy fluctuation is 50.  A
value of 50 means the average xr value varies by a factor of 7.
subblock_gain=1 will amplify by 2^(2*subblock_gain) = 8, so this is
about right.  (FhG seems to use 0,1 or 2).

It should be computed in outer_loop, before the first call to
bin_search.  

quantize(), calc_noise1 and calc_noise2 (any others?) need to be
modified to use subblock_gain in the istep formulas.

It's probably never been used, so we will have to hope l3bitstream.c
includes working code to add non-zero values to the bitstream.

I might get started on this next weekend, But I would
encourage anyone interested to also take a stab at it.

Mark
























--
MP3 ENCODER mailing list

Reply via email to