Why upsampling would degrade sound quality ?, DAC job vs software job |
![]() ![]() |
Why upsampling would degrade sound quality ?, DAC job vs software job |
Jun 16 2012, 03:38
Post
#1
|
|
|
Group: Members Posts: 311 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. |
|
|
|
Jun 16 2012, 03:42
Post
#2
|
|
|
Group: Members Posts: 4163 Joined: 2-September 02 Member No.: 3264 |
I was thinking that the DAC must be doing interpolation itself in order to reconstruct the final smooth signal. Correct. 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. |
|
|
|
Jun 16 2012, 04:19
Post
#3
|
|
|
Group: Members Posts: 311 Joined: 15-August 09 Member No.: 72330 |
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 |
|
|
|
Jun 16 2012, 06:46
Post
#4
|
|
|
Group: Members Posts: 4163 Joined: 2-September 02 Member No.: 3264 |
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. |
|
|
|
Jun 16 2012, 17:45
Post
#5
|
|
![]() Group: Members Posts: 110 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 |
|
|
|
Jun 16 2012, 18:28
Post
#6
|
|
|
Group: Members Posts: 4163 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.
|
|
|
|
Jun 18 2012, 17:29
Post
#7
|
|
|
Group: Members Posts: 738 Joined: 23-November 04 Member No.: 18295 |
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 |
|
|
|
Jun 18 2012, 18:15
Post
#8
|
|
|
Group: Members Posts: 738 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.
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 |
|
|
|
Jun 18 2012, 18:44
Post
#9
|
|
|
Group: Members Posts: 2137 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. |
|
|
|
Jun 18 2012, 19:00
Post
#10
|
|
|
Group: Members Posts: 738 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.
This post has been edited by uart: Jun 18 2012, 19:02 |
|
|
|
Jun 18 2012, 19:04
Post
#11
|
|
|
Group: Members Posts: 79 Joined: 9-May 10 Member No.: 80499 |
Resamplers comparison here:
http://src.infinitewave.ca analyzed by Rightmark Audio Analyzer V5.5 Any reason why you prefer to use v5.5 over v6.2.4 ? |
|
|
|
Jun 18 2012, 19:07
Post
#12
|
|
|
Group: Members Posts: 738 Joined: 23-November 04 Member No.: 18295 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 07:29 |