[vorbis-dev] mdct.c

Dave Hooper dave at beermex.com
Wed Mar 20 11:19:39 PST 2002



I'm no authority but I'll hazard a few answers...

> Hmm, I have some quite stupid questions. The data in Ogg/Vorbis file -->
> each sample = int 16-bit word? And output pcm data also = int 16-bit word?

That can't be correct.  If the data in an Ogg/Vorbis file was such that each
sample was a 16-bit int then it would hardly be a compression system.
The Ogg/Vorbis file format encapsulates a bit stream - there is not a direct
n-bits-per-sample correspondence (unlike certain other compression formats
e.g. ATRAC1)

> If yes then..
> -why is the conversion to float back and forth needed? Is there any
> particular benefit as the reason to choose floating point at the time you
> implemented the MDCT code?

I'm under the impression that, in general, on modern computer hardware, the
kind of arithmetic you need in an MDCT is quicker with floats than with
ints.  This is especially true with multiplication and (often even more so)
with division.  Whether or not this was the original reason behind a
floating-point MDCT I couldn't say.

> -is there any limit (or reasonable limit) of this floating point input &
> output data value for MDCT? From my observation I see that the range is
> between -1 to 1.

I don't see any reason why the input limits must be +- 1.  Consider the
spectrogram of a peak-to-peak square wave.  I seem to remember that the
output range is indeed +-1 however I can't recall if it is clamped at this
or if it will stray outside given the right kind of input data.

Dave

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list