Skip to main content

Topic: Is 96KHz -> 48 better than 96 -> 44.1? (Read 14818 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • me7
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
I need to downsample some 96 kHz tracks to a sample rate supported by DAP. I was wondering whether 48 kHz would be a better choice than the standard Audio-CD 44.1.
Thinking in simple math, 96 to 48 can be achieved by "dividing" with 2. Would such a conversion lead to less loss than say 96 to 44.1?
  • Last Edit: 26 September, 2008, 11:08:45 AM by me7

  • weaker
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #1
Of course there is more information in the 48 kHz sampled signal than in the 44.1 kHz one. But I think what you rather want to know is, if it is "easier" to go to 48 kHz.
That depends on the downsample algorithm. If you use SSRC in high quality mode for downsampling then I'd say the difference is negligible.
SSRC: http://shibatch.sourceforge.net/

  • me7
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #2
SSRC seems to be the best free resampler. Is it also 'superior' to commercial products (Adobe Audition) like lame mp3?

  • weaker
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #3
Here is a comparison that shows SSRC being among the top of most (also commercial) resamplers:
http://src.infinitewave.ca/
Be sure to have the monitor brightness not too dark to see the differences in the dark areas.

  • krabapple
  • [*][*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #4
Can you show one measurement on that page indicating where Audition 2 (Pre/Post filter) and SSRC could be expected to actually SOUND different?

  • Ron Jones
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #5
Thinking in simple math, 96 to 48 can be achieved by "dividing" with 2. Would such a conversion lead to less loss than say 96 to 44.1?

Theoretically, yes.

Can you show one measurement on that page indicating where Audition 2 (Pre/Post filter) and SSRC could be expected to actually SOUND different?

Nobody claimed that there would be any audible differences between SSRC and Audition's resampler, just that there is a measurable difference.
  • Last Edit: 26 September, 2008, 12:44:56 PM by Ron Jones

  • DVDdoug
  • [*][*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #6
Quote
I was wondering whether 48 kHz would be a better choice than the standard Audio-CD 44.1.
  The question is really what format do you want/need?  And/or what format does your playback device want/need? 

Quote
Thinking in simple math, 96 to 48 can be achieved by "dividing" with 2.
  True.  At 48kHz, you can simply throw-away every other sample (after filtering).  If you downsample to 44.1kHz the data has to be interpolated.  But in either case, the data has to be low-pass filtered (to prevent alaising) before downsampling.  The math required for interpolation is trivial compared to the math required for filtering.  And, the errors/rounding introduced by interpolation are less than the errors/rounding caused by filtering.  (I'm not saying you will hear the rounding/errors.)

Quote
Would such a conversion lead to less loss than say 96 to 44.1?
  Yes.  Clearly, more samples are lost at 44.1 than at 48.  But, you are unlikely to hear any difference between 96, 48, or 44.1.
  • Last Edit: 26 September, 2008, 01:22:24 PM by DVDdoug

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #7
Here is a comparison that shows SSRC being among the top of most (also commercial) resamplers:
http://src.infinitewave.ca/
Be sure to have the monitor brightness not too dark to see the differences in the dark areas.


I'd beware of SSRC; it's buggy.  Create a spectrogram of ssrc_hp with a swept sine rate converted from 22050 --> 96000 and you'll see what I mean.

Edit: here's one I created earlier:


Also, if you look at the graph at the infinitewave URL, there's a nasty 'burning' effect at the top of the graph and other artifacts at the far right of the graph.

-bandpass
  • Last Edit: 26 September, 2008, 02:15:10 PM by bandpass

  • weaker
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #8
@bandpass: So if the graphs on infinitewave a buggy, which resampler do you suggest as being the most accurate? I'm not talking about audible differences here, but the one with the cleanest filtering results.
  • Last Edit: 26 September, 2008, 04:03:04 PM by weaker

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #9
@bandpass: So if the graphs on infinitewave a buggy, which resampler do you suggest as being the most accurate? I'm not talking about audible differences here, but the one with the cleanest filtering results.


The graphs on infinitewave aren't buggy; SSRC is buggy, see the graph I posted above.

Resamplers make a compromise between maximizing the width of the passband, minimizing aliasing noise, minimizing ringing and maximizing speed of conversion; some would add maintaining linear phase to this list.  So the best resampler is the one that best meets your particular requirements in these areas.

Free resamplers that strike a reasonable compromise for general use include R8brain Free and Secret Rabbit Code.

  -bandpass

  • Tahnru
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #10
A perhaps useful prior discussion of resamplers:
http://www.hydrogenaudio.org/forums/index....showtopic=64989

  • saratoga
  • [*][*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #11
Quote
Thinking in simple math, 96 to 48 can be achieved by "dividing" with 2.
  True.  At 48kHz, you can simply throw-away every other sample (after filtering).  If you downsample to 44.1kHz the data has to be interpolated. 


Unless the 96k audio was already band limited to < 24kHz, you still need to interpolate anyway.  The difference is that you get to skip the upsampling step (which can be lossless anyway).

The math required for interpolation is trivial compared to the math required for filtering.


Actually, filtering and interpolation are the same in this case.  Hence the lowpass filter is often called an "interpolation filter".

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #12
Free resamplers that strike a reasonable compromise for general use include R8brain Free and Secret Rabbit Code.

Latest version of R8brain Free is 1.9, 26-aug-2005. I found some strange issue with it.
Create wave file with 44.1 kHz sample rate. Generate 5 minutes long 10 kHz sine wave. Resample it to 96 kHz with R8brain Free and some other resampler (audition, srcdrop,...) and subtract one resampled wave from other. You'll get:

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #13

Free resamplers that strike a reasonable compromise for general use include R8brain Free and Secret Rabbit Code.

Latest version of R8brain Free is 1.9, 26-aug-2005. I found some strange issue with it.
Create wave file with 44.1 kHz sample rate. Generate 5 minutes long 10 kHz sine wave. Resample it to 96 kHz with R8brain Free and some other resampler (audition, srcdrop,...) and subtract one resampled wave from other. You'll get: ...


Looks like r8brain suffers from a slight phase drift.

Mathematically: poor show; linear phase should be linear phase (esp. with rational resample ratio).
Audibly: nothing to worry about.

BTW, the most recent version of SoX has an updated resampler which compares favorably with r8brain and SRC.

  -bandpass
  • Last Edit: 27 September, 2008, 08:21:10 AM by bandpass

  • Martin F.
  • [*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #14
Be aware that the DAP hardware may have a fixed sampling rate. In the rockbox IRC channel I was told the Cowon iAudio X5 runs at 44.1 kHz and 48 kHz files would be resampled in software. In such cases you should resample to the sampling rate of the hardware to avoid repeated resampling (which may be of inferior quality since it has to happen in realtime on relatively slow hardware).
FLAC.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #15
BTW, the most recent version of SoX has an updated resampler which compares favorably with r8brain and SRC.

Is it linear-phase or not? src.infinitewave.ca tests only downsampling. I tried to up-sample test file with SoX 14.1 and Audition. There are differencies between them in spectral view (they start from 16kHz; bigger frequency - bigger difference)

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #16

BTW, the most recent version of SoX has an updated resampler which compares favorably with r8brain and SRC.

Is it linear-phase or not? src.infinitewave.ca tests only downsampling. I tried to up-sample test file with SoX 14.1 and Audition. There are differencies between them in spectral view (they start from 16kHz; bigger frequency - bigger difference)

Yes SoX 14.1 is linear phase.  Can't comment on Audition -- don't have a copy to hand.

  -bandpass

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #17
Yes SoX 14.1 is linear phase.  Can't comment on Audition -- don't have a copy to hand.

Well, I also did the following:
1) created wav (1 second long) with only one non-zero sample (32 bit float, mono, 44100 Hz)
2)resampled it to 96 kHz: "sox test0.wav test1.wav rate -v 96000"
3)resampled back to 44.1 kHz: "sox test1.wav test2.wav rate -v 44100"
4) subtracted test0.wav from test2.wav -> test3.wav

I also did the same using SRCDrop.exe.

Results are following: red is original file (test0.wav), green is resulting test3.wav (made with SoX), blue is made with SRCDrop.


  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #18
Well, I also did the following:
1) created wav (1 second long) with only one non-zero sample (32 bit float, mono, 44100 Hz)
...

I don't think this is showing phase non-linearity; I think this view relates to the envelope of the resampling filter impulse, which, since SoX's bandwidth is 99% and SRC's is around 95%, is probably to be expected.
If you look at the resultant signals in the time domain, you'll see the whole filter impulse (viewing in dB makes this easiest).  One test for phase linearity is that the impulse is left/right symmetrical (it is for both SoX and SRC).
Your 5-minute test is good for checking phase drift; also, comparing (in the time domain) the result of resampling a swept sine is another good test for phase linearity.  Again, both SRC and SoX pass these two tests.

  -bandpass

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #19
Quote
One test for phase linearity is that the impulse is left/right symmetrical (it is for both SoX and SRC).

I agree. (I just wonder the reason of SoX behaviour between 15 and 21.5 kHz...)

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #20
Quote
One test for phase linearity is that the impulse is left/right symmetrical (it is for both SoX and SRC).

I agree. (I just wonder the reason of SoX behaviour between 15 and 21.5 kHz...)

If you want to see the frequency response of a resampler, then plot the frequency response of test2.wav (I don't know what it means to plot the response of test3.wav).  Both SRC & SoX look fine -- straight line until at least 21k.

  -bandpass

  • lvqcl
  • [*][*][*][*][*]
  • Developer
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #21
If you want to see the frequency response of a resampler, then plot the frequency response of test2.wav

Red is original, yellow is 44100->96000->44100 resampled.



Zoomed:



So, difference is about 0.002dB at 21 kHz. Well, nothing to worry about.

  • knutinh
  • [*][*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #22
I think that if the coefficients of the resampling filter are calculated with "infinite" precision in time, then 96->48 is no different from 96->44.1 other than the obvious loss of bandwidth. If the time-precision is finite, but large enough that any errors are smaller than the step-size afforded by 16 or 24 bits, then it also may not matter.

In practical implementations, there will typically be a fixed set of filtertaps because of speed, some kind of polyphase implementation. If that is the case, then one would expect that the precision would be slightly better for resampling ratios that "fits" with the fixed filtertaps. What fits and doesnt fit is obviously implementation-dependant, but I think it is fair to assume that low integer ratios are more likely to fit well than fractional resampling with large nominator/denominators.

BTW, I am sceptical about the real perceptual importance of this. It might be mostly academic.

-k
  • Last Edit: 29 September, 2008, 05:33:33 AM by knutinh

  • bandpass
  • [*][*][*][*]
Is 96KHz -> 48 better than 96 -> 44.1?
Reply #23
96kHz -> 48kHz allows the use of a `half-band' filter.  This doesn't improve accuracy of conversion, but may improve the speed of conversion:

Half-band filter: a type of FIR filter where the
transition region is centered at one quarter of the sampling rate, or fs/4.
Specifically, the end of the passband and the beginning of the stopband are
equally spaced on either side of fs/4. Half-band filters are often used in
decimation filtering because (almost) half their time domain coefficients are
zero. This means, for example, you can achieve the performance of an M-tap FIR
filter while only paying the computational price of (M+1)/2 + 1 multiplications.

  -bandpass