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

Bug reports go here.
serieril
Posts: 5
Joined: Fri Feb 07, 2020 3:42 pm

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

Post 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.
admin
Site Admin
Posts: 964
Joined: Wed Nov 17, 2010 12:56 pm

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

Post by admin »

Thanks for the report. What program did you use to create those graphs?
serieril
Posts: 5
Joined: Fri Feb 07, 2020 3:42 pm

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

Post 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.
admin
Site Admin
Posts: 964
Joined: Wed Nov 17, 2010 12:56 pm

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

Post by admin »

serieril
Posts: 5
Joined: Fri Feb 07, 2020 3:42 pm

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

Post 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.
Galdamez
Posts: 1
Joined: Thu Feb 20, 2020 1:24 pm

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

Post by Galdamez »

What do you think actually would affect the distortion?
serieril
Posts: 5
Joined: Fri Feb 07, 2020 3:42 pm

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

Post 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
admin
Site Admin
Posts: 964
Joined: Wed Nov 17, 2010 12:56 pm

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

Post 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
serieril
Posts: 5
Joined: Fri Feb 07, 2020 3:42 pm

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

Post 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.
admin
Site Admin
Posts: 964
Joined: Wed Nov 17, 2010 12:56 pm

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

Post by admin »

Yeah, those are the ones.
Post Reply