From: Gabriel B. <bou...@mp...> - 2004-03-28 16:16:35
|
Guillaume Lessard wrote: >> In calc_noise, we have this: >> >> noise = *distort++ = noise / *l3_xmin++; >> >> /* multiplying here is adding in dB, but can overflow */ >> noise = FAST_LOG10(Max(noise,1E-20)); >> >> In those 2 cases, we are considering the noise of the sfb to be -20, and >> even worst we are adding -20 to total noise instead of 0. > This is just a question of size. As long as 1e-20 is much smaller than a > normal value, everything is fine. All we can do is use the log of a > vanishingly small number instead of log(0); 10^(-20) seems, at first > blush, good enough. The (potential) problem is that: 1) we are then considering the sfb to be distorted, and are increasing the "over_count" value b) we are using a log of the value, so 10^(-20) is becoming -20, which is not minor at all when added to tot_noise. I might be wrong, but I think that the zero noise case should be specifically handled, by setting noise to 0 and not -20. Regards, -- Gabriel Bouvigne www.mp3-tech.org personal page: http://gabriel.mp3-tech.org |