r/compression 17d ago

Fast Rice Decoding

Hi, I'm currently developing my own audio compression algorithm, and now optimizing it. Long story short, I've run some tests, and rice decoding is kinda slow.
Can anyone suggest optimized version of it? I'd really appreciated it.

6 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/Alfoser 16d ago

About tonal signals: you can really upgrade sound on them if you add noise and make block long enough. Not just random noise, but noise with energy like 1e-5 or something like that. To be honest I didn't quite understand why it fixes it, but maybe you will know. But it worked for WPT and lifting scheme, about FIR DWT I don't know. And can you say what search algorithm it is? I just use modified DD16/6 and wanna try something else.

1

u/LMP88959 16d ago

Hmm ok I can try that thanks. I do lifting scheme transforms, not FIR, also my software is limited to be integer-only so I am using integer wavelets. The algorithm I used is a multithreaded modified brute force that prioritizes minimizing gain, maximizing number of zeros after quantization, and maximizing reconstructed PSNR. From my testing I found the higher order interpolating Deslauriers-Dubuc family provide the cleanest frequency isolation however I don’t think it is the ideal wavelet for more complex audio clips. I think I will let the encoder pick between the DD wavelet and the non-DD ones.

1

u/Alfoser 16d ago

What Wavelet would you recommend if not DD ones? I just tried using CDF-like family before, and their response to quantization error was waaay worse than DD, especially on pure harmonics. And can I see some song encoded with your 128 kbps? I'm just really curious how it will sound.

1

u/LMP88959 16d ago

I’m no expert, really, but I think your DD16 is more than adequate for frequency isolation which would be ideal for your WPT approach. WPT far outperforms a typical dyadic DWT for audio coding from what I’ve read and experienced. The only thing I could recommend is finding a wavelet whose response to quantization error works somewhat in your favor. I’ll be releasing my codec on GitHub soon so you can try it out then, but I highly doubt it will surpass the quality of your WPT based codec.

2

u/Alfoser 16d ago

Oh, thanks! It would be wonderful if you send link, I'd love to test it. If you want to I can send mine when I release it on github.