IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Why upsampling would degrade sound quality ?, DAC job vs software job
extrabigmehdi
post Jun 16 2012, 03:38
Post #1





Group: Members
Posts: 400
Joined: 15-August 09
Member No.: 72330



I was thinking that the DAC must be doing interpolation itself in order to reconstruct the final smooth signal.
So if we upsample with sox (i.e foo_sox) inside foobar , before the DAC interpret the data, I don't see why the upsampling would "deteriorate" the data, since anyway it would end up by being interpolated by the DAC. I don't understand the usual position I see, "don't upsample", it will just deteriorate data ...I was thinking that on the contrary, that upsampling before on sox, would just do a part of interpolation job before it's finalized by the DAC .
So beside chewing additional cpu cycles, I don't see why upsampling while playing music would be discouraged.
Go to the top of the page
+Quote Post
saratoga
post Jun 16 2012, 03:42
Post #2





Group: Members
Posts: 4715
Joined: 2-September 02
Member No.: 3264



QUOTE (extrabigmehdi @ Jun 15 2012, 22:38) *
I was thinking that the DAC must be doing interpolation itself in order to reconstruct the final smooth signal.


Correct.

QUOTE (extrabigmehdi @ Jun 15 2012, 22:38) *
I don't understand the usual position I see, "don't upsample", it will just deteriorate data


Where do you see this? Properly implemented, upsampling will do nothing at all except waste space.

Go to the top of the page
+Quote Post
extrabigmehdi
post Jun 16 2012, 04:19
Post #3





Group: Members
Posts: 400
Joined: 15-August 09
Member No.: 72330



QUOTE (saratoga @ Jun 16 2012, 02:42) *
Where do you see this? Properly implemented, upsampling will do nothing at all except waste space.

Hum ok, I needed confirmation. Perhaps I'm a bit too much influenced by audiophiles.
But if I search a minimum here, someone talked of the quantization noise problem; I guess it's too small to be perceived.

This post has been edited by extrabigmehdi: Jun 16 2012, 04:19
Go to the top of the page
+Quote Post
saratoga
post Jun 16 2012, 06:46
Post #4





Group: Members
Posts: 4715
Joined: 2-September 02
Member No.: 3264



QUOTE (extrabigmehdi @ Jun 15 2012, 23:19) *
But if I search a minimum here, someone talked of the quantization noise problem; I guess it's too small to be perceived.


It can be a problem, but not if the resampling is implemented correctly. Generally that means performing the filtering operations at a higher precision then the effective number of bits in the input PCM, then again passing the result to a DAC with more resolution then the effective number of bits in the output. This way the quantization error added at each step is much smaller then what the input contains. Note that this is not very hard to satisfy in practice, usually music is actually mastered with quite limited dynamic range compared to what even a modest DAC can produce.

Anyway, you may want to take a look at how modern DACs are implemented. Modern DACs are resampling to MHz frequencies anyway, so worrying about a few Khz on the input format is pointless.
Go to the top of the page
+Quote Post
stephan_g
post Jun 16 2012, 17:45
Post #5





Group: Members
Posts: 156
Joined: 6-June 10
From: Bavaria
Member No.: 81240



Software resampling is a chance of using better-performing interpolation lowpass filters (good rejection at fs/2 already, better stopband rejection) at the expense of computing time and extra delay.

The only risk I can see is intersample-overs turned into actual clipping (assuming the DAC's built-in filter can handle that without a problem). Even that is easily taken care of by reducing levels by 2..3 dB (typ), potentially complemented by software that complains when clipping is detected (like e.g. Foobar does).

This post has been edited by stephan_g: Jun 16 2012, 17:49
Go to the top of the page
+Quote Post
saratoga
post Jun 16 2012, 18:28
Post #6





Group: Members
Posts: 4715
Joined: 2-September 02
Member No.: 3264



Do you really care about a few db difference at about 25 kHz? since you can't actually hear it wouldn't seem to matter.
Go to the top of the page
+Quote Post
uart
post Jun 18 2012, 17:29
Post #7





Group: Members
Posts: 757
Joined: 23-November 04
Member No.: 18295



QUOTE (extrabigmehdi @ Jun 15 2012, 20:19) *
QUOTE (saratoga @ Jun 16 2012, 02:42) *
Where do you see this? Properly implemented, upsampling will do nothing at all except waste space.

Hum ok, I needed confirmation. Perhaps I'm a bit too much influenced by audiophiles.


Well let me confirm that. I've done tests of re-sampling 44.1kHz to 48kHz, then back to 44.1 (so re-sampled twice) and then used audio analyzer software compare this with the original and check for any artifacts. Believe me that resulting artifacts were so low it would be completely pointless even trying to do a listening test. I was looking at graphs of added noise and harmonic/inter-modulation distortion and there was nothing above -130dB, so about 40dB below what I could even hope to try and hear. From the results I've seen I'd say that software resampling (done correctly) would be 100% inaudible (difference) to 100% of people. Yeah that's a pretty strong claim but I believe it.


This post has been edited by uart: Jun 18 2012, 17:55
Go to the top of the page
+Quote Post
uart
post Jun 18 2012, 18:15
Post #8





Group: Members
Posts: 757
Joined: 23-November 04
Member No.: 18295



Here's a summary of the results of a 44.1 to 48 then back to 44.1 resample chain, as analyzed by RMAA ver 5.5. There are lots of graphs but everything is off scale (below scale) so I'll just post the summary. If anyone's got playback equipment so good that they think this will degrade their output, well hats off to you. smile.gif


Summary
Frequency response (from 40 Hz to 15 kHz), dB: +0.00, -0.00 Excellent
Noise level, dB (A): -197.7 Excellent
Dynamic range, dB (A): 133.5 Excellent
THD, %: 0.0000 Excellent
IMD + Noise, %: 0.0002 Excellent
Stereo crosstalk, dB: -199.5 Excellent
IMD at 10 kHz, %: 0.0000 Excellent

General performance: Excellent


BTW. This was resampled (twice) with R8Brain V1.9, freeware version, and analyzed by Rightmark Audio Analyzer V5.5

This post has been edited by uart: Jun 18 2012, 18:20
Go to the top of the page
+Quote Post
DVDdoug
post Jun 18 2012, 18:44
Post #9





Group: Members
Posts: 2441
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



QUOTE
I don't understand the usual position I see, "don't upsample", it will just deteriorate data ...
I'd say, "Don't resample unless you have a need or a good reason".

Any small change could be considered a deterioration or corruption of the data, even if there is no change in the sound. And in general, upsampling is not mathematically reversible (due to filtering)... That is, if you upsample and then downsample you won't get back the exact-original bytes, although hopefully there is no change in the sound.
Go to the top of the page
+Quote Post
uart
post Jun 18 2012, 19:00
Post #10





Group: Members
Posts: 757
Joined: 23-November 04
Member No.: 18295



Hi Doug. It can be advantageous to software resample in cases where the DAC or soundcard would have internally resampled anyway. I'm using crappy ol' Realtek onboard audio and it works measurably better at 48kHz than it does at 44.1 (verified via external loopback tests). So I resample (on the fly) to 48kHz with my playback software (foobar2000). As I say, I can actually measure the improvement in terms of noise and distortion (several dB improvement) when doing this. smile.gif

This post has been edited by uart: Jun 18 2012, 19:02
Go to the top of the page
+Quote Post
Brazil2
post Jun 18 2012, 19:04
Post #11





Group: Members
Posts: 119
Joined: 9-May 10
Member No.: 80499



Resamplers comparison here:
http://src.infinitewave.ca



QUOTE (uart @ Jun 18 2012, 19:15) *
analyzed by Rightmark Audio Analyzer V5.5

Any reason why you prefer to use v5.5 over v6.2.4 ?
Go to the top of the page
+Quote Post
uart
post Jun 18 2012, 19:07
Post #12





Group: Members
Posts: 757
Joined: 23-November 04
Member No.: 18295



QUOTE (Brazil2 @ Jun 18 2012, 11:04) *
Any reason why you prefer to use v5.5 over v6.2.4 ?

I did those tests some time ago and still had the results on my hard-drive. smile.gif

This post has been edited by uart: Jun 18 2012, 19:08
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 10:14