Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: 20 bit wav file structure (Read 5877 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

20 bit wav file structure

Greetings,

Does anybody know to store 20 bit audio samples in the WAVE format? It is obvious how to strore 8, 16, 24, and 32 bit samples. However it is not so clear on how to store 20 bit samples. One possibility is to use 2 and a half bytes but that would be quite an ugly way, as some bytes in the stream would be have one half used by one sample and another half for another sample.

According to "Enhanced Audio Formats For Multi-Channel Configurations And High Bit Resolution" from Microsoft, is suggests to store 20 bit samples in 24 bit containers. They give the following example for storing a stereo 20 bit stream:

Byte 1 – Channel 1, Left Front, Low Order Byte, only top four bits have valid data
Byte 2 – Channel 1, Left Front, Mid Order Byte, all valid data
Byte 3 – Channel 1, Left Front, High Order Byte, all valid data
Byte 4 – Channel 2, Right Front, Low Order Byte, top four bits have valid data
Byte 5 – Channel 2, Right Front, Mid Order Byte, all valid data
Byte 6 – Channel 2, Right Front, High Order Byte, all valid data

Byte 7 – Channel 1, Left Front, Low Order Byte, top four bits have valid data, Sample 2
Byte 8 – Channel 1, Left Front, Mid Order Byte, all valid data, Sample 2
etc.

However, according to this,the signal would no longer be a 20 bit signal, but 24. This would be quite a waste of storage space and bandwidth. 

Does anybody know more about this?

Thanks,

Aristotel

20 bit wav file structure

Reply #1
Basically, what you descibe is entirely correct, and there is nothing more to say...

20 bit wav file structure

Reply #2
Quote
Basically, what you descibe is entirely correct, and there is nothing more to say...
[a href="index.php?act=findpost&pid=325207"][{POST_SNAPBACK}][/a]


Hhhmmm....and I thought I was missing something somewhere.

OK then 

Thanks

20 bit wav file structure

Reply #3
By the way,

does anybody know where I can find information about the storing of audio (byte structures etc) for DVD?I can only find general information like sample rates, number of channels, and bit depths supported, not how the DVD standard stores them.

This is for uncompressed audio on dvd by the way.

thanks

20 bit wav file structure

Reply #4
don't know if you already know this

be sure to write 20-bit data to an wave-format-extensible file
the blockalign-field gets the 'containersize' and the dwValidBits-field the
original bitdept. otherwise the file would be recognized as a 24-bit file
if the decoder doesn't check for bitshifts...

 
SimplePortal 1.0.0 RC1 © 2008-2021