Help - Search - Members - Calendar
Full Version: why use w=y*y in noisemask function in ogg
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - Tech
jackychen
I find very strange question in ogg makes noisemask.

In the noisemask function ogg uses linear regression in the same bark value. ogg use w=y*y not w=1 in linear regression, so ogg use the more complex linear regression rather than the simple linear regression.

Through doing some experiments, i find that if i make the w=1 in noisemask function, the KBPS of ogg will be very very high. so i want to know why w=y*y can reduce KBPS greatly.

thank you!
xiphmont
Actually, pct.c:bark_noise_hybridmp() is somewhat overcomplex for what it's doing. It's doing a simple, complete least-squares linefit that's somewhat unneccessary (just because it's conceptually correct doesn't mean that the implementation needs to implement it in the most general, unoptimized way possible). That said, though, it's not solving for the center of the line segment, it's solving for the center of the critical band so there's a little twist there. And that difference *is* audible.

This function could be greatly simplified, and it has been a few times; unfortunately the first time I did so, I did it as part of an optimization contract for a vendor, so that faster code is locked up as a trade secret. That doesn't stop me from doing it again, of course, but I really hate doing things twice :-)

As for simply setting w = 1, I'm not sure why you think that would work.

Monty
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.