Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th February 2012, 07:58   #1  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Two questions about audio depth

I use Adobe Audition. While saving files, I'm wondering,

1. Resampling depth from 16bit to 24bit or 32bit, or from 24bit to 32bit, it's lossless, right?

2. If I save a 32bit floating wav file to 24bit, is it still lossless? I guess, from 32bit to 24bit, only some addtional bits are cut off. The audio is still not affected, right?
doom-nine is offline   Reply With Quote
Old 9th February 2012, 10:40   #2  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.

Last edited by J_Darnley; 9th February 2012 at 10:42.
J_Darnley is offline   Reply With Quote
Old 9th February 2012, 11:16   #3  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by doom-nine View Post
1. Resampling depth from 16bit to 24bit or 32bit, or from 24bit to 32bit, it's lossless, right?

2. If I save a 32bit floating wav file to 24bit, is it still lossless? I guess, from 32bit to 24bit, only some addtional bits are cut off. The audio is still not affected, right?
The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 10th February 2012, 02:50   #4  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by J_Darnley View Post
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.
I assume human can almost have no way to identify the distortion, at least I can't tell the differences with my poor ear. However, the questions are just bothering me for quite a long time.
doom-nine is offline   Reply With Quote
Old 10th February 2012, 02:54   #5  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by Ghitulescu View Post
The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.
Got your point. Thanks.
doom-nine is offline   Reply With Quote
Old 10th February 2012, 14:24   #6  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by J_Darnley View Post
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.
Yes, I believe human can have no way to identify the minor distortion, at least I can't with my poor ear. However, the questions has been bothering me for quite a long time.
doom-nine is offline   Reply With Quote
Old 10th February 2012, 14:26   #7  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by Ghitulescu View Post
The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.
Thank you, Ghitulescu. Got your point now, it helps.
doom-nine is offline   Reply With Quote
Old 10th February 2012, 16:37   #8  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by doom-nine View Post
Thank you, Ghitulescu. Got your point now, it helps.
Maybe I should detail a bit:

if you add 8 bits to a 24b signal to make it in 32b then remove the same 8 bits the very same way as you added them, the transformation is lossless.

if you convert 32b in 32float then viceversa, there are chances that you can obtain a lossless transformation.


However, you miss the point of having 24b, 32b or 32f. The human hearing is somewhere ~14b (around ~-70dB), so the CD is 4x better in this respect. 24b and 32b for customers are marketing bonuses. No card in the world (even in the pro field) can come close to 24b, what they like to quote are the DAC specs, not the real dynamic, limited by the electronic noise to somewhere around -110 dB (or ~19b).

24b was invented to avoid the clipping during the processing of music. 32f was invented to "clean" complicated operations, for a even better sound.

Bottom line: while 24b may provide the music with cleaner "curves", one really need audiophile grade equipment to sense any improvement. Far better is to increase the sampling rate.
__________________
Born in the USB (not USA)

Last edited by Ghitulescu; 10th February 2012 at 16:39.
Ghitulescu is offline   Reply With Quote
Old 13th February 2012, 07:14   #9  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by Ghitulescu View Post
24b was invented to avoid the clipping during the processing of music. 32f was invented to "clean" complicated operations, for a even better sound.
Thanks Ghitulescu. Did you mean the 32f contains the operations record information, just like for example, the history record in Photoshop?
doom-nine is offline   Reply With Quote
Old 13th February 2012, 08:10   #10  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,347
Quote:
Originally Posted by doom-nine View Post
Thanks Ghitulescu. Did you mean the 32f contains the operations record information, just like for example, the history record in Photoshop?
32f is a raw format like any other, just with better precision in some areas. It does not contain any extra metadata.

Technically, 32f has the same precision as 24b (23-bit mantissa, 8 bit exponent, 1 bit sign), however with one advantage - 32f has the full precision over the full range of possible values. In 24b, "1" is just that, information of 1-bit. Converted to 32f, you can have 23 bits of full precision to represent the slightest variations of "1".
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 13th February 2012 at 08:14.
nevcairiel is offline   Reply With Quote
Old 14th February 2012, 03:35   #11  |  Link
doom-nine
Registered User
 
doom-nine's Avatar
 
Join Date: Dec 2011
Posts: 22
Quote:
Originally Posted by nevcairiel View Post
32f is a raw format like any other, just with better precision in some areas. It does not contain any extra metadata.

Technically, 32f has the same precision as 24b (23-bit mantissa, 8 bit exponent, 1 bit sign), however with one advantage - 32f has the full precision over the full range of possible values. In 24b, "1" is just that, information of 1-bit. Converted to 32f, you can have 23 bits of full precision to represent the slightest variations of "1".
Thank you, nevcairiel.
doom-nine is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.