Jump to content
Computer Audiophile
miguelito

DSD vs PCM resolution

Rate this topic

Recommended Posts

Bonsoir,

 

If we are debating PCM to DSD conversion, this process must be lossy, UNLESS we employ a theoretically perfect modulator with a noise-free bandwidth greater than the noise-free bandwidth than the source. As for 32/44.1 this bandwidth is 22.05kHz at the minimum 128 FS Sigma Delta would have to be used.

 

Perhaps you should re-read a few articles - PCM to DSD conversion is perfectly lossless. No audio or timing information whatsoever is lost. It is a conversion, -> not <- a compression algorithm.

 

Only in discussions of compression algorithms, such as ZIP, FLAC, MP3, etc. does the term lossless mean anything in terms of hobbit digital audio.

 

What you are doing is mixing up the domains - in the audio domain, lossless means "all the bits in the original audio file are sent to the player, regardless of whether or not the file has been compressed." In those terms, AIFF and FLAC are lossless, even though one is compressed and one is not. MP3 and AAC are, on the other hand, not lossless.

 

PCM to DSD conversion is similar to, in computer terms, converting the integer value 1 to the decimal value 1.000000000... they are exactly the same values. Of course, the converted data is a different representation, but perfectly whole and lossless in audio terms.

 

In computer science terms, this a conversion, not a compression, and "lossless" has exactly zero meaning.

 

Continuing to claim otherwise is doing nothing more than spreading FUD around. That means (F)ear, (U)ncertainty, and (D)oubt.

 

-Paul

Share this post


Link to post
Share on other sites
Perhaps you should re-read a few articles - PCM to DSD conversion is perfectly lossless. No audio or timing information whatsoever is lost. It is a conversion, -> not <- a compression algorithm.

 

Only in discussions of compression algorithms, such as ZIP, FLAC, MP3, etc. does the term lossless mean anything in terms of hobbit digital audio.

 

What you are doing is mixing up the domains - in the audio domain, lossless means "all the bits in the original audio file are sent to the player, regardless of whether or not the file has been compressed." In those terms, AIFF and FLAC are lossless, even though one is compressed and one is not. MP3 and AAC are, on the other hand, not lossless.

 

PCM to DSD conversion is similar to, in computer terms, converting the integer value 1 to the decimal value 1.000000000... they are exactly the same values. Of course, the converted data is a different representation, but perfectly whole and lossless in audio terms.

 

In computer science terms, this a conversion, not a compression, and "lossless" has exactly zero meaning.

 

Continuing to claim otherwise is doing nothing more than spreading FUD around. That means (F)ear, (U)ncertainty, and (D)oubt.

 

-Paul

 

Paul, that's not correct as a matter of mathematics. We've been through this before. What is "similar to, in computer terms, converting the integer value 1 to the decimal value 1.000000000" is "zero padding" LSBs to change 16-bit words to 24-bit, for example. What is "lossless," mathematically, and not just for compression/decompression, is being able to derive the original from the converted file through a mathematical operation. This cannot be done with DSD <-> PCM conversions; that is, having converted, e.g., a PCM file to DSD, there is no mathematical operation that will give you back, bit-perfectly, the PCM file you started with.

 

You might be able to say in some circumstances that for some definitions of "information" the DSD file may contain more information than the PCM file. But this doesn't make the DSD conversion "lossless," since in fact the information of exactly what the PCM file bits were has been lost.

Share this post


Link to post
Share on other sites

A conversion can be said to be lossless if there exists an inverse conversion that restores the original data, bit for bit. If no such inverse exists, it is likely that repeated conversions will result in degradation. In a purely mathematical sense, PCM <-> DSD conversions can be exact. In practice, e.g. due to finite filter lengths, this is not generally the case. That said, for a single conversion, the inaccuracies are small enough to be entirely negligible.

Share this post


Link to post
Share on other sites
Perhaps you should re-read a few articles - PCM to DSD conversion is perfectly lossless. No audio or timing information whatsoever is lost. It is a conversion, -> not <- a compression algorithm.

 

PCM to DSD and DSD to PCM both lossy.

 

There present resampling and non-linear elements.

 

There are ringing, non-linear distortions, noise.

Share this post


Link to post
Share on other sites
A conversion can be said to be lossless if there exists an inverse conversion that restores the original data, bit for bit.

 

Yes, that's the definition I was trying to explain; thanks for the more precise formulation.

 

In a purely mathematical sense, PCM <-> DSD conversions can be exact.

 

I was unaware of that. Interesting.

 

In practice, e.g. due to finite filter lengths, this is not generally the case.

 

Is it *ever* the case in practice?

 

That said, for a single conversion, the inaccuracies are small enough to be entirely negligible.

 

This is interesting, considering the number of different-sounding modulators on the market.

Share this post


Link to post
Share on other sites
A conversion can be said to be lossless if there exists an inverse conversion that restores the original data, bit for bit. If no such inverse exists, it is likely that repeated conversions will result in degradation. In a purely mathematical sense, PCM <-> DSD conversions can be exact. In practice, e.g. due to finite filter lengths, this is not generally the case. That said, for a single conversion, the inaccuracies are small enough to be entirely negligible.

 

I do not believe PCM to DSD conversions can be exact, at least not 44/16 to DSD64. I don't believe this conversion can even pass the following, somewhat relaxed test where 44/16 is converted to DSD and back to 44/16:

 

1. The output stream must be a legal DSD bit stream

2. The decoder must perform the same function digitally as would an analog DSD decoder, namely some kind of low pass filtering and the result of this is then converted back to 44/16.

3. The 44/16 input stream is required to have no information above 20 kHz that can show up at the 16 bit level

4. The result will be considered "perfect" if it is off by no more than +-1 in the least significant bit. (In other words, is good to 15 bits.) This requirement will apply only for the middle of the test, i.e. start-up and shut-down glitches will be ignored.

5. The test consists of up to 75 minutes worth of samples at 44/16. It is failed if any single sample is off by more than the allowed tolerance in (4).

 

The bandwidth restriction in (3) allows the use of bounded filters and avoids the problem of the harmonic series diverging. Without some such restriction one can create a 16 bit file that has huge intersample peaks. Such pathological files have huge amounts of energy at 22050 Hz.

 

Providing (3) and (4) are in force, then this is a fair test, in that it could be passed with conversion to high resolution PCM, e.g. 44/16 to 176.4/32 and back to 44/16. It is necessary to allow some slop (e.g. the 15 bit accuracy allowed in (4))) because it is not possible to ensure that there is zero energy at 22050 Hz due to the 16 bit quantization. (Perhaps there is research that deals with the interaction between filtering and quantization, but I am not aware of it.)

 

Please note that the essence of this test is the almost bit perfect comparison. Mathematically it consists of using the L-infinity norm. The usual measurement of noise and distortion uses the L2 norm, a.k.a. RMS. The RMS norm implies equality only if it is a true zero. Impressive numbers of dB down RMS does not necessarily say anything about the accuracy unless the averaging period is also specified.

Share this post


Link to post
Share on other sites

Actually, Jud - it certainly is, at least the computer branch of them. Decimal 1.0000... is exactly equal to Integer 1 - with no fractional component. It is an EXACT one for one conversion. Yes, there are floating problems in software and hardware that make the floating point value inexact at some point, a decimal 1.0 is in fact equal to an Integer 1. They will have the same - the exact same - bit pattern in memory.

 

We are not talking about power flow , where quadratic functionals come into play and we can talk about dissipative and lossless systems. Even there, I think if you integrate the power the system absorbs over time (and distance?) you can get a "lossless" system. If the integral is zero, and in strict speaking, only in terms of the quad differential form. (I think, haven't thought about that stuff in 30 years almost...)

 

In any case, what you are talking about is ONLY applicable in computer theory when you are talking about compression theory. I am open to being corrected on this, but I spent considerable time working that out and reading up on it a year or so ago.

 

Saying DSD -> PCM is "lossy" is a gross misuse of the term, and is misleading as well.

 

It's the same to me as some bringing you a legal document where they used the word abduct when they meant adduct. Sounds the same, one might *think* they mean the same or is a meaningless typo, but they are very different.

 

Yours,

 

-Paul

 

 

 

Paul, that's not correct as a matter of mathematics. We've been through this before. What is "similar to, in computer terms, converting the integer value 1 to the decimal value 1.000000000" is "zero padding" LSBs to change 16-bit words to 24-bit, for example. What is "lossless," mathematically, and not just for compression/decompression, is being able to derive the original from the converted file through a mathematical operation. This cannot be done with DSD <-> PCM conversions; that is, having converted, e.g., a PCM file to DSD, there is no mathematical operation that will give you back, bit-perfectly, the PCM file you started with.

 

You might be able to say in some circumstances that for some definitions of "information" the DSD file may contain more information than the PCM file. But this doesn't make the DSD conversion "lossless," since in fact the information of exactly what the PCM file bits were has been lost.

Share this post


Link to post
Share on other sites
A conversion can be said to be lossless if there exists an inverse conversion that restores the original data, bit for bit. If no such inverse exists, it is likely that repeated conversions will result in degradation. In a purely mathematical sense, PCM <-> DSD conversions can be exact. In practice, e.g. due to finite filter lengths, this is not generally the case. That said, for a single conversion, the inaccuracies are small enough to be entirely negligible.

 

 

From one compressed format to another, not as a general rule for conversions I think.

 

In other fields, like images for example, if a vector file is converted to another format that supports all the same primitives, it is considered lossless. Even in cases where it can not be converted back any longer, such as when it has been edited and a new primitive is added the original format does not support.

 

I agree that in practice, there will always be some errors, they will be below the level of audibility.

 

In pure layman's terms - then up sampling from 16/44.1 to 24/196 is a very lossy operation. You cannot recover the original information from the 24/196 file and recreate - exactly - the 16/44.1 file. At least not unless you did the equivalent of sample and hold, which is pretty useless.

 

So--- almost every DAC made is providing us with losses sound! :) Not!

 

(grin)

-Paul

Share this post


Link to post
Share on other sites

I have to say, this particular argument can push my buttons good. Fred has a hilarious column this week that more or less might describe this type of thing in groups like ours... Be warned, don't read the whole essay if you are allergic to sarcasm!

 

The Evolutionary Biology of Political Parties: Some Buffalo Don’t Rot | Fred On Everything

 

Even before the latest results from PET scans and functional MRI, simple observation convinced the sentient that rationality was not involved in political discourse. The chief evidence is that political adherences tend strongly to cluster together. For example, if you tell me that a man favors capitalism, with high confidence I can predict his attitudes toward China, race, immigration, environmentalism, bombing Iran, evolution, abortion, and so on. If you tell me that he advocates socialism, I will similarly know in advance his ideas regarding these things.

This suggests a genetic origin. The various views have no necessary connections to one another. For example, there is no logical contradiction in being in favor of national medical care and simultaneously of sending heavy weaponry to the Ukraine, or being against abortion but for the legalization of drugs. Yet one seldom sees such juxtapositions. Political views are a package.

This suggests that people start with genetically determined conclusions, and work backward to find supporting evidence.

 

Share this post


Link to post
Share on other sites
I do not believe PCM to DSD conversions can be exact, at least not 44/16 to DSD64.

 

For a DSD conversion from PCM of a given rate and bit depth, the quantisation noise below the Nyquist frequency can be made arbitrarily low by choosing a sufficiently high DSD rate in conjunction with noise shaping. I don't know what that rate is for 16/44 PCM, but it's obviously much higher than DSD64. It may well not be possible with any practical DSD rate.

Share this post


Link to post
Share on other sites
For a DSD conversion from PCM of a given rate and bit depth, the quantisation noise below the Nyquist frequency can be made arbitrarily low by choosing a sufficiently high DSD rate in conjunction with noise shaping. I don't know what that rate is for 16/44 PCM, but it's obviously much higher than DSD64. It may well not be possible with any practical DSD rate.

 

But this is not the same as saying there is a mathematical operation to perfectly reverse the conversion, which is the definition of "lossless."

Share this post


Link to post
Share on other sites

Lots of interesting theory on these pages. I finished my EE degree 32 years ago so I'm a bit rusty and don't follow all of it. Anyway, digital theory didn't get much past Nyquist theory in those days.

 

But at the end of the day - you gotta listen to music. You can't enjoy music by looking at bits and graphs. And the reason I listen to DSD is simple. I can listen to DSD without a DAC. And I do. Regardless of the technical merits of FSD vs PCM, I reckon that the physical implementation of the DAC is the biggest determinant of sound quality. And I find that DSD, played through a simple LPF, is better than any DAC. The sound has a holographic (analog) character that i don't experience from any DAC.

 

I've remained a committed analog man ever since CD was introduced. CD just never cut it for me. Hi Res is definitely better, but as far as my listening test goes, ANY DAC will kill the music. Now I find that I can listen to digital all night. Theoretical discussions can only take you so far, but you need a physical device to play back the music. And if you have never listened to DSD with a simple LPF output, then your POV will be limited. I know this is getting into DIY territory, but this is what I built. Sounds good to me!

 

dsd convertor.jpg

Share this post


Link to post
Share on other sites
But this is not the same as saying there is a mathematical operation to perfectly reverse the conversion, which is the definition of "lossless."

 

Jud - where are you getting that definition? Cause in multiple years of school and more than thirty years as a CS/SE/SA, and with a heavy math background, I have never seen that definition used *other than in reference to compression*.

 

We are not compressing and decompressing data here, like a ZIP file. It is a pure conversion, and no conversion is required to be reversible to be considered lossless, unless again, you are talking about compression.

 

Do you consider a music track up sampled from 16/44.1 to 24/96 as lossless? Even though it cannot be reconverted?

 

-Paul

Share this post


Link to post
Share on other sites
For a DSD conversion from PCM of a given rate and bit depth, the quantisation noise below the Nyquist frequency can be made arbitrarily low by choosing a sufficiently high DSD rate in conjunction with noise shaping. I don't know what that rate is for 16/44 PCM, but it's obviously much higher than DSD64. It may well not be possible with any practical DSD rate.

 

Except noise there ringing artefacts by resampling. For any DSD sample rate.

 

Also any resampling filter has amplitude distortions in pass band.

 

If original PCM 16/44 signal has spectrum up to 22050 Hz we get ambiguity in transient band (20000 ... 22050 Hz) of downsampling filter of DSD demodulator (restoring back to 16/44).

Share this post


Link to post
Share on other sites
But this is not the same as saying there is a mathematical operation to perfectly reverse the conversion, which is the definition of "lossless."

 

For infinite-precision maths, such an operation does not exist. Since PCM has finite precision, it's sufficient to get close enough, but even that is going to be very hard.

 

In order to perform a lossless PCM-DSD-PCM round-trip, there are two main problems to overcome:

 

1) The DSD noise below the Nyquist frequency of the PCM must be effectively zero, i.e. much smaller than the PCM precision.

2) The passband ringing from the downsampling filters must also be effectively zero.

 

One way of solving this would be to use a ludicrously high DSD rate such that the noise only starts much higher than the PCM Nyquist frequency even with a low-order noise shaping filter that ensures stability. This then allows a downsampling filter with a cutoff much higher than the Nyquist frequency such that the ringing below it is close enough to zero.

 

This may well require a DSD rate of several GHz, but it should be possible if (almost certainly) not practical.

Share this post


Link to post
Share on other sites
Jud - where are you getting that definition? Cause in multiple years of school and more than thirty years as a CS/SE/SA, and with a heavy math background, I have never seen that definition used *other than in reference to compression*.

 

We are not compressing and decompressing data here, like a ZIP file. It is a pure conversion, and no conversion is required to be reversible to be considered lossless, unless again, you are talking about compression.

 

Do you consider a music track up sampled from 16/44.1 to 24/96 as lossless? Even though it cannot be reconverted?

 

-Paul

 

Consider a repeated conversion back and forth between two forms. Usually, we get one of the following behaviours or slight variants thereof:

 

1) The conversions are mathematically exact. Example: going from 16-bit integer to 32-bit and back (without dither).

 

2) The conversions may be inexact at first but converge towards a stable pair. Example: going from 32-bit integer to 16-bit (without dither) and back.

 

3) The values never converge but remain within a finite distance from the original. (Can't think of a simple example.)

 

4) The values slowly degrade towards pure noise. Example: going from 16-bit integer to 32-bit and back with dither.

 

5) The values converge towards zero.

 

6) The values converge towards ±infinity. Example: anything with a slight bias.

 

1-3 can be considered lossless in most situations, the rest only if both the error in each step and the number of conversions are bounded.

Share this post


Link to post
Share on other sites
Jud - where are you getting that definition? Cause in multiple years of school and more than thirty years as a CS/SE/SA, and with a heavy math background, I have never seen that definition used *other than in reference to compression*.

 

We are not compressing and decompressing data here, like a ZIP file. It is a pure conversion, and no conversion is required to be reversible to be considered lossless, unless again, you are talking about compression.

 

Do you consider a music track up sampled from 16/44.1 to 24/96 as lossless? Even though it cannot be reconverted?

 

-Paul

 

The point is that the 44/16 upsampled to 96/24 can be reconverted to 44/16, at least to a very close approximation. And the same thing can be said of upsampling 44/24 to 96/32 and reconverting it back, except that the approximation can be 8 bits closer.

 

The point is also that this reconversion can not be done when upsampling 44/16 to DSD. It will not be possible to reconvert it. Not even close.

Share this post


Link to post
Share on other sites
For infinite-precision maths, such an operation does not exist. Since PCM has finite precision, it's sufficient to get close enough, but even that is going to be very hard.

 

In order to perform a lossless PCM-DSD-PCM round-trip, there are two main problems to overcome:

 

1) The DSD noise below the Nyquist frequency of the PCM must be effectively zero, i.e. much smaller than the PCM precision.

2) The passband ringing from the downsampling filters must also be effectively zero.

 

One way of solving this would be to use a ludicrously high DSD rate such that the noise only starts much higher than the PCM Nyquist frequency even with a low-order noise shaping filter that ensures stability. This then allows a downsampling filter with a cutoff much higher than the Nyquist frequency such that the ringing below it is close enough to zero.

 

This may well require a DSD rate of several GHz, but it should be possible if (almost certainly) not practical.

 

You can calculate the rate of a simple conversion that can be accurate. It the sampling rate is 2^n times higher than the PCM sample rate then a simple thermometer code can represent the 2^n levels that are encoded by n bit linear PCM. Some extra margin will be needed to avoid filter ringing and finite word length calculations. (About 3 Gbps for 44/16 PCM). There may be more efficient bit perfect encodings based on noise shaping or other encoding techniques. I am not saying that this data rate is actually necessary for a lossless conversion. I don't know the lower bound.

Share this post


Link to post
Share on other sites
Except noise there ringing artefacts by resampling. For any DSD sample rate.

 

Also any resampling filter has amplitude distortions in pass band.

 

Exactly, resampling (downsampling as well as upsampling) causes ringing artifacts. I don't understand why anyone would want to brickwall a recording back to 16/44 PCM.

 

The major benefit of DSD is that it avoids all resampling steps in the ADDA chain that typically occur in delta sigma converters when they handle PCM. Direct SDM recording and playback obliterates the need for downsampling, decimation, upsampling, and oversampling.

 

Upsampling CD to DSD256 is a way to bypass resource-limited upsampling algorithms on DAC chips, move PCM aliasing artifacts farther out in the ultrasonic region, and improve THD/IMD (see Miska's measurements).

Edited by Hiro

Share this post


Link to post
Share on other sites
Exactly, resampling (downsampling as well as upsampling) causes ringing artifacts. I don't understand why anyone would want to brickwall a recording back to 16/44 PCM.

 

The major benefit of DSD is that it avoids all resampling steps in the ADDA chain.

 

Resampling can be done in such a way that it introduces no ringing. Filters only ring if they are excited by signals with energy in their transition band. If the input signal has no energy at (and just below) one half of the lower of the old and new sampling rates then it will be possible to resample without introducing any ringing.

 

The problem with PCM is that it has low sampling rates in the first place. This means that the analog audio coming off microphones will have to be filtered at least once. This filtering will introduce ringing (on musical signals that have high frequency energy that gets removed). By increasing the sampling rate high enough then no filtering will be needed, other than that provided by the humidity of the air, the mass of the microphone diaphragm and the microphone preamplifier electronics. However, once a too low sampling rate has ever been used there will either be aliasing distortion (horrible beat tones unrelated to the musical notes) or ringing that can not be removed without removing musical information as well.

 

Filters also exist that do not ring at all, but they have a very slow and gradual roll-off and so if aliasing is to be avoided there will be high frequency roll off, even below 20 kHz.

Share this post


Link to post
Share on other sites
Resampling can be done in such a way that it introduces no ringing.

 

Well, the reality is that the vast majority of resampling DACs do ring. I realize that some perform better than others, and hence the room for all those different algorithms offered by various manufacturers and developers.

Share this post


Link to post
Share on other sites
Well, the reality is that the vast majority of resampling DACs do ring. I realize that some perform better than others, and hence the room for all those different algorithms offered by various manufacturers and developers.

 

The ringing is almost certainly on the original 44 kHz recordings. There is plenty of room for different filters in DACs because there was no standard involved in how DACs render a continuous stream out of their input. Such a standard would have been possible, but only if the original Red Book standard included specifications for anti-alias filters as part of the 44/16 format. This would also have eliminated the problem of unknown digital head room if done correctly. However, nothing about Redbook was done correctly, so it's time to throw it into the dustbin of audio history.

 

Existing 44/16 recordings can be made to sound better through appropriate choice of filters. There are plenty of software tools available to do this if one goes the computer audio approach. This includes off-line resampling and on-line resampling. In the end, however, results will be marginal. If one tweaks performance in one sonic dimension then a problem will pop-out in another. It's like trying to squeeze a large balloon in a small suitcase.

Share this post


Link to post
Share on other sites
Resampling can be done in such a way that it introduces no ringing. Filters only ring if they are excited by signals with energy in their transition band. If the input signal has no energy at (and just below) one half of the lower of the old and new sampling rates then it will be possible to resample without introducing any ringing.

 

Tony,

 

May be lost of translation (sorry for my English).

 

Here 4 points:

 

 

1. When we resample, signal always have energy in passband ("...one half of the lower of the old and new sampling rates...").

 

2. Analog filters used in ADC and DAC for any sample rate for both PCM and DSD.

 

Otherwise mirrored useful spectrum (all that upper sample rate /2) can be shifted to 0 ... sample rate/2.

For ADC without filtration will periodically mirrored parts of all spectrum [0 ... infinity] due ambiguity of measurements for frequencies above [sample rate/2].

 

 

3. Filters used for mixing / postproduction. Often it is real-time IIR filters what distort phase response.

 

4. We can decrease ringing with lesser steepness. But we can't say about filter with "zero ringing".

 

 

 

1) Could you comment it in link with your words ("...input signal has no energy...")?

 

2) Could you illustrate (spectrum, scheme pictures or other way) what you said above?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Superphonica
×