>===== Original Message From [EMAIL PROTECTED] =====
>Menno wrote:
>> While implementing M/S threshold calculations for FAAC, I noticed some
>> things that could be improved in GPSYCHO.
>>
>> The formula for the BMLD protection ratios you reverse engineered should
>> look like this:
>> mld[b] = pow(10, -3*(0.5+0.5*(M_PI*(min(bval[b], 15.5)/15.5))));
>> I took this from the 14496-3 ISO document.
>> If you want to see what the rest of the calculations should look like, you
>> should take a look at psy_step11andahalf() in psych.c from FAAC 0.55beta.
>> Also the paper advises to use the more tonal tonality values from the left
>> and right channels for the mid and side channels. And the minimum of
>> unpredictability from the left and right channels for both the mid and side
>> channels.
>> I haven't tried this in LAME myself, but in FAAC it works very good.
>>
>> Bye, Menno
>
>Hi Menno,
>I just compared your mld with the one implemented in Lame, and they
>are totaly different, even in the tendency.
>With your mld = -3*(0.5+0.5*(M_PI*(min(bval[b], 15.5)/15.5)))
>and Lames mld = 1.25*(1-cos(PI*b/SBPSY_s))-2.5
>the one in Lame increases monoton, yours falls monoton.
>Here are the mlds for short blocks:
>
>        Lame mld   your mld   difference
>        -2.5       -1.5      -1
>        -2.45741   -2.02384  -0.433572
>        -2.33253   -2.54737   0.214835
>        -2.13388   -3.03745   0.903571
>        -1.875     -3.45245   1.57745
>        -1.57352   -3.81333   2.2398
>        -1.25      -4.14806   2.89806
>        -0.926476  -4.43749   3.51101
>        -0.625     -4.69682   4.07182
>        -0.366117  -4.93336   4.56724
>        -0.167468  -5.15104   4.98357
>        -0.0425927 -5.33832   5.29572
>
>So, what is going on here?
>
>And where can I find the sources for FAAC 0.55beta? I only found
>the sources for FAAC 0.42.
>
>Robert
>
>--
>MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Hi,

That's right. therefore in FAAC you will see this:
if ((nb[0][b] <= 1.58*nb[1][b])||(nb[1][b] <= 1.58*nb[0][b]))
and in LAME:
if ((ratio[0][b] >= 1.58*ratio[1][b])||(ratio[1][b] >= 1.58*ratio[0][b]))

Or the other way around, I don't have access to my source code where I am now.
Also I think that LAME is doing these calculations with the final ratios, 
while I in FAAC use the nb values (can't remember how they were called in 
LAME, sorry).
The beta source code is available on the developers page, I hope you can find 
them, it will make this a lot clearer.

Bye, Menno

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

Reply via email to