Page 1 of 2

[SOLVED] Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Fri Feb 07, 2020 4:13 pm
by serieril
Hello,

I found some issues in converting PCM-DSD or DSD-PCM. The version of XRECODE3 is v1.99.

*PCM-DSD
There is a big distortion noise. The noise looks to appear in converting from all PCM sampling rate or bit-depth to all DSD sampling rate.

I have attached a graph of a conversion test. The test includes an FFT result of these files:
Source PCM Data - 1kHz sine wave(-6dBFS) - 32f/88.2
DSD64 converted from the source data by XRECODE3 - big distortion
DSD64 converted from the source data by a tool

Image

*DSD-PCM
There is a very high noise floor. The noise looks to appear in converting only from DSD256. The result is the same even if I change the encoder(SoX, SWA) or the quality setting.
The noise floor is related to DSD sampling rate. DSD64 is no problem, but DSD128 is a little bit higher and DSD256 is audible.

I have also attached a graph:
Source DSD64 Data - 1kHz sine wave(-6dB SACD)
Source DSD256 Data - 1kHz sine wave(-6dB SACD)
PCM96kHz converted from the DSD256 with SoX option by XRECODE3 - very high noise floor
PCM96kHz converted from the DSD256 with SWA option by XRECODE3 - very high noise floor
PCM96kHz converted from the DSD64 with SoX option by XRECODE3 - no problem

Image

I have uploaded all of the data to this URL:
https://pcmdsd.com/DSD_Conversion_Noise ... _v1.99.zip

I think those are easy to fix by checking filter calculation or quantization algorism.

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Fri Feb 07, 2020 5:41 pm
by admin
Thanks for the report. What program did you use to create those graphs?

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Fri Feb 07, 2020 6:13 pm
by serieril
Hello,

I use my own program because there is not a proper one for a comparison between multiple formats.
The algorithm is as follow:
1. Do FFT PCM or DSD data in their original sampling rate and bit-depth with 7 terms blackman harris window.
The sample size is 32768*Fs/44100.

2. Average each result. The number of times is related to the data. In those cases, the number is around 40, because the length of the source data is around 30sec.

3. Reading each averaged FFT bin in Gnuplot. Normalize 1kHz and output png.

However, I think you can analyze those files in other software. The problem does not need absolute correctness for finding.

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Sat Feb 08, 2020 9:54 am
by admin

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Sat Feb 08, 2020 11:01 am
by serieril
I updated the two graphs:
Image
Image

DSD-PCM has improved. In PCM-DSD, some noise-shaping coeffs have been changed, but it does not affect the distortion.

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Fri Feb 21, 2020 1:25 pm
by Galdamez
What do you think actually would affect the distortion?

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Fri Feb 21, 2020 7:13 pm
by serieril
In my opinion as a weekend DSP programmer, such as the distortion usually shows when there is a wrong code in a part of error feedback.

For your references:
LL.375-395 https://docs.google.com/viewer?a=v&pid= ... E1YjcwNWI2

https://github.com/serieril/PCM-DSD_Con ... g.cpp#L952

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Mon Mar 09, 2020 4:55 pm
by admin
Here's the update to try - https://xrecode.com/test/setup_xrecode3 ... _1.101.exe.
You can play around the filters https://imgur.com/W7HfTqX

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Mon Mar 09, 2020 7:27 pm
by serieril
I confirmed improvements in the version as follow:
Image

I guess you have adopted the filter sets from SoX-DSD.
https://github.com/mansr/sox

The filter sets are very well-engineered. There is no doubt.

Re: Noise in PCM-DSD or DSD-PCM conversion v1.99

Posted: Mon Mar 09, 2020 7:46 pm
by admin
Yeah, those are the ones.