Help - Search - Members - Calendar
Full Version: Question about scales.h
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
c15zyx
Just wondering, what is the consequence of defining VORBIS_IEEE_FLOAT32 in scales.h?
I've read that it adds a speed boost by avoiding trig functions (atan, etc) and I do get increases of 15-20% but it also seems to affect filesize. Without it being defined one encoded file is 177 kbps. After defining it the same file encoded at 184 kbps. Is there a quality difference between the two? Which is more accurate (better quality), using the equations or the table?
HotshotGG
QUOTE
Just wondering, what is the consequence of defining VORBIS_IEEE_FLOAT32 in scales.h?


yes, this is correct the VORBIS_IEEE_FLOAT32 does give a significant speed boost by avoiding lot's of trigonometry.

QUOTE
but it also seems to affect filesize. Without it being defined one encoded file is 177 kbps. After defining it the same file encoded at 184 kbps. Is there a quality difference between the two? Which is more accurate (better quality), using the equations or the table?


It is a possibility as I have never tested this before. Monty notes within the header file the bark equations chosen for the table are the best possible fit approximations. He believes they are more "accurate" approximations and longer in range than the bark equations he has within his texts. Therefore to reiterate my interpretation of this statement would leave me to believe that the rolled tables with the bark scale approximations are more precise then the ones within the text. Therefore the equations within the table are "of a better quality" when you say "accurate", because they are approximated and less precise than the original, which could lead to the larger file size, as opposed to the ones without it defined. Any feedback would be helpful from anyone else who may have experimented with this, as well and has a slightly better understanding would be helpful.
c15zyx
I was just looking through the file and found that the #endif for the #ifdef VORBIS_IEEE_FLOAT32 stops before the bark equations, so the bark equations are the same whether VORBIS_IEEE_FLOAT32 is defined or not. It only seems to affect 2 functions, todB(x) and todB_nn(x). When it is defined the 256 element array is used as a lookup table and if it is not then vorbis must use a log() call. Hope this info helps anyone and sorry for any code misinterpretations.
HotshotGG
No problem, I didn't even cite any references from the source-code as I had misinterpreted the question you had been asking. Had a known I might have been able to provide a little more insite.
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.