Skip to main content

Topic: Why upsampling would degrade sound quality ? (Read 7402 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Why upsampling would degrade sound quality ?
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.

  • saratoga
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #1
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.


Why upsampling would degrade sound quality ?
Reply #2
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.
  • Last Edit: 15 June, 2012, 11:19:47 PM by extrabigmehdi

  • saratoga
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #3
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.

  • stephan_g
  • [*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #4
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).
  • Last Edit: 16 June, 2012, 12:49:45 PM by stephan_g
My little "blogalike":
http://stephan.win31.de/music.htm

  • saratoga
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #5
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.

  • uart
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #6
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.
  • Last Edit: 18 June, 2012, 12:55:38 PM by uart

  • uart
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #7
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
  • Last Edit: 18 June, 2012, 01:20:20 PM by uart

  • DVDdoug
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #8
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.

  • uart
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #9
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.
  • Last Edit: 18 June, 2012, 02:02:26 PM by uart

  • Brazil2
  • [*][*][*]
Why upsampling would degrade sound quality ?
Reply #10
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 ?

  • uart
  • [*][*][*][*][*]
Why upsampling would degrade sound quality ?
Reply #11
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.
  • Last Edit: 18 June, 2012, 02:08:01 PM by uart