Skip to main content
Topic: How to tell if a 24/32 bit audio file is padded with 0's? (Read 4695 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to tell if a 24/32 bit audio file is padded with 0's?

For example, if I had a 16bit file and changed the bit depth to 32, I assume it would be padded with 0's.
What utility would allow me to examine such a file so as to provide visible evidence?
If a Hex Editor, what am I looking for?

Thanks.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #1
In a hex editor you will see a repeating pattern with the unused bytes containing the same value, most commonly displayed as a space " ". But you probably know that if you're familiar with hex editors.

If you open the file in Sonic Foundry Sound Forge and zoom in to 1:1 horizontally, you'll see if the data is quantized in discernable levels. You must zoom in, because otherwise the graph has only 16-bit resolution. I've identified a couple CDs this way having only 14-bit precision. This method is more reliable because you get to see what the quantization steps are "statistically" over a greater period of time, and can identify high bitrate lossy or data that's been multiplied by a non-integral number.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #2
Ah. Not so good with Hex Editor, but I do have Sound Forge.

Thanks!

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #3
Adobe Audition: Analyse > Statistics > Actual Bit Depth.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #4
hex editors are pretty easy to use. Just download XVI32 i think it is (google "hex editor"). open the file in it.

Each cell is one byte (displayed in hexidecimal as a value between 00 and FF (0 and 255, in regular old decimal). So a 16-bit file padded to 32-bits would have a repeating sequence of 2 "00" cells.

3 padded 32-bit samples would something like: 00 00 4E 32 00 00 F2 EE 00 00 11 A2.

wheras the original 16-bit file would have contained: 4E 32 F2 EE 11 A2.

make sense?

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #5
This is a very simple case of 16 to 32 bit conversion, where you get a repeating pattern of 0x00. Ideally one should be able to detect when the source had originally used less bits even after a couple of edits were performed – like volume, lossy compression or even a simple EQ.

Doesn't Adobe "Cool Edit" Audition get tripped by a simple volume boost/cut? Technically the program would be right by replying with 20-32 bits. But that doesn't mean the audio sounds any better than the low resolution source, or that a any low level signals can suddenly be extracted as if the material would really be 32-bit.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #6
hex editors are pretty easy to use. Just download XVI32 i think it is (google "hex editor"). open the file in it.

Each cell is one byte (displayed in hexidecimal as a value between 00 and FF (0 and 255, in regular old decimal). So a 16-bit file padded to 32-bits would have a repeating sequence of 2 "00" cells.

3 padded 32-bit samples would something like: 00 00 4E 32 00 00 F2 EE 00 00 11 A2.

wheras the original 16-bit file would have contained: 4E 32 F2 EE 11 A2.

make sense?


That is the editor I'm using.
What you are saying makes sense, indeed.
Thanks very much to all of you. There is a wealth of knowledge among the members here. 

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #7
I know this is not an audio RECORDING forum, but I'd suggest the audio engineer's way to to this anyway.

Just use a (DirectX or VST or whatever) bitmeter plugin (if I remember right there's a freeware plugin out there). There you can see the bits that are actually changing, and the ones that are constantly zero.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #8
Quote
For example, if I had a 16bit file and changed the bit depth to 32, I assume it would be padded with 0's.
  Usually that's how it's done, at least with 24-bits.  But, some software will re-calibrate the 0dB reference to add some headroom, and some additional noise floor. 

I just happen to have a  link to XVI32 in my "Favorites".

But, Polouess' bitmeter suggestion sounds like a much better idea!

It's not so easy to "look at" audio data with a hex editor.  With a hex editor, you are looking at a loooong series of bytes (8-bit values).  So, when you are dealing with 16-bit to 32-bit data and looking at a megabyte-long string of numbers... it's hard to know where each sample starts or if you are looking at the high-byte, low-byte, or one of the middle bytes...  And, I almost forgot about the sign bit.    So, when you see "00", you can't tell what it represents.  And, you've got the left & right channels interleaved.  And, usually 32-bit audio is floating-point which get's really "messy"  (here's a floating-point reference if anybody's interested.

A long series of zeros does have to represent true zero-value samples.

Quote
In a hex editor you will see a repeating pattern with the unused bytes containing the same value, most commonly displayed as a space " ".
  Hmmmm...    That's probably true, but only because zero doesn't represent a printable ASCII[/color] character.  An actual ASCII space (i.e. in a text file) is represented by 32 (20 hex).  There are other non-ASCII values that will show-up as spaces too...  It's just that you are not likely to see any number other than zero repeated over-and-over like that in an audio file.

P.S.
A hex editor is meant to be a programming tool
(used by computer programmers).  I'm not saying that only computer programmers can use one, but if you don't understand how to use it, or if you don't have any use for it, that's why.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #9
Quote
Usually that's how it's done...

This is why you need to open the stream in a graphical sound editor, as I said in my first post.

And hex editor can show more than it would appear on the first glance. It just takes some time you get used to that specific program, code page & font face. It is immediately apparent if a file is in floating point format, for example. WinHex has an additional tool, the histogram of all byte values. While these aren't dwords to be immediately useful in our example (who can draw a 4 billion pixels wide picture anyway), they might tell useful information.

Just because there is no longer a possibility to create 32-bits fixed point files in Foobar, doesn't mean they don't existing. LAME, at least the latest stable version, can't take float as input to have a practical example.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #10
This is a very simple case of 16 to 32 bit conversion, where you get a repeating pattern of 0x00. Ideally one should be able to detect when the source had originally used less bits even after a couple of edits were performed – like volume, lossy compression or even a simple EQ.
How could you ever do that? If correctly dithered, the limit of the original recording is just a noise floor. If you pad with zeros then obviously you can count zeros, but any subsequent processing will fill those zeros with data - and just having a noise floor at a given level doesn't prove that the recording originally had only than many bits - plenty of genuine 24-bit recordings will have a noise floor equivalent to the 14th bit (for example) because that's how quiet the recording venue was.

Cheers,
David.

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #11
This can be seen in Sound Forge, not a hex editor. And only if there are quiet noiseless sections, like fades.

Examples, created from lossy sources with Foobar:

Most MP3 files are made from 16-bit sources, but don't have to be. 192 kBit/s, simple stereo, Lame 3.89:

http://j7n.sytes.net/www/ha-bitdepth-1.png

Stereo downmix of a movie soundtrack. Obviously either the master wasn't 24-bit or DTS couldn't preserve this depth (unlikely).

http://j7n.sytes.net/www/ha-bitdepth-2.png

The previous sample processed with for DC offset with highpass equalizer, after being mistakenly downconverted to 16-bit. This way one could check how his commandline tools such as BeSweet perform. The dynamic movie soundtracks demand 24-bits more than anything else.

http://j7n.sytes.net/www/ha-bitdepth-3.png

How to tell if a 24/32 bit audio file is padded with 0's?

Reply #12
Thanks for the examples j7n. They are quite clear.

I don't think all combinations of source material, orginal bit depth, and post processing will be so easy to distinguish...

This can be seen in Sound Forge, not a hex editor. And only if there are quiet noiseless sections, like fades.
That's an area where you might get a clue, but it's not certain. If it's a cut, rather than a fade, and there's no dither, then you won't have a clue.

If someone does an undithered fade at 14-bits, and then re-dithers at 16-bits, you'd be hard pressed to know it had once been 14 bits.

I'm not doubting that there are situations where it is possible to know, and other situations where it might be possible to guess. However, once those padded zeros have been filled with data, you can't always know how many real bits existed before.

Cheers,
David.

 
SimplePortal 1.0.0 RC1 © 2008-2020