Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec (Read 1583 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec
Hello everyone, I'm back to publishing with something new

lately I have dedicated myself for fun to the study of lossless and lossy compression of audio in PCM format in its various facets (16,24) bits and sample frequencies (from 44hz to 384hz) in particular. In a few months I was able to develop a lossy codec capable of obtaining a compression with a 1/5 ratio until 1/10 ratio (in many cases). The analyses carried out with various programs confirmed a signal quality between 99.7% and 99.9% and the only codec able to compete in part was (with all due respect to the other formats only the ogg vorbis more than anything else for its ductility on sample frequencies). My system doesn't use mdct- fft - wavelet transformations (like most lossy codecs) .

I'm thinking about an open source project in the future, so I've decided to share with you a decode-only demo. Just write using cmd.exe in DOS console mode "adc_decoder -d sample.adc out.wav"

Of course this is a single demo. I assure you that I had to try compression on about 50 different wav files to find flaws that don't seem to be noticeable at the moment! In some types of wav files the difference is greater in favor of my codec and yet still at high sample rates it could consume something more than other codecs as the sound waves are more dilated in the same time space and I have to adapt the codec again !

Source sound file converted to 16 bit 96khz with Audacity.
https://helpguide.sony.net/high-res/sample1/v1/data/Sample_BeeMoved_96kHz24bit.flac.zip

- OGG Vorbis file Coded to quality 10
- AAC file at 507 kbs

For comparisons I recommend you to use https://deltaw.org/index.html


Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #2
If necessary, I just wanted to point out that the goal I try to achieve with the adc codec is not the very high compression of other codecs that perhaps use AI to cut frequencies, noises or others, on the contrary it is to get as close as possible to the purity of the initial source, almost as if it were a lossless compression!

P.S. I'm happy to talk in this awesome forum with industry experts. Please help me!

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #3
If you fear someone steal your ideas, thats fine do not provide any binary.

But where are lossless source audio files and decoded files via decoder from encoded  files via your encoder to compare something sensible?

I do not want to use DOS/MS binaries.
Please remove my account from this forum.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #4
Hi Nania,

It appears that you’re seeking a lossy encoder that operates differently from transform encoders (such as AAC, Vorbis, etc.). For instance, you’ve provided a sample with a 96 KHz sampling rate, which will be significantly attenuated beyond approximately 20 KHz. You can easily observe this effect: AAC exhibits a strong cutoff at 24 KHz, while Vorbis retains some elements but essentially removes everything beyond 22 KHz. This behavior occurs even at extreme bitrates (500 kbps).

I recommend comparing your encoder to different tools, such as Wavpack lossy, LossyWAV, or OptimFrog DualStream: they don't work in the frequency domain, are not based on perceptual models, and are much closer looking to the original file.

I just tried with Wavpack at ~500 kbps (2.5 bps at 96 KHz). File is joined to this post and screen capture are subtractions from the original PCM file at 24 bit.
Wavpack Hybrid: one encoder for all scenarios
WavPack -c4.5hx6 (44100Hz & 48000Hz) ≈ 390 kbps + correction file
WavPack -c4hx6 (96000Hz) ≈ 768 kbps + correction file
WavPack -h (SACD & DSD) ≈ 2400 kbps at 2.8224 MHz

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #5
I've been working on a 16-bit conversion to 96khz and now I'm posting a flac-compressed version of the source file and the adc file! Thank you 

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #6
Test carried out by  Shelwien
here's what I've got with gstPEAQ:
Code: https://github.com/HSU-ANT/gstpeaq
sample.m4a  2,545,937:  Objective Difference Grade: 0.039  Distortion Index: 3.098
sample.ogg  2,469,444:  Objective Difference Grade: 0.059  Distortion Index: 3.225
sample.opus 2,480,417:  Objective Difference Grade: 0.069  Distortion Index: 3.290
sample.adc  2,502,925:  Objective Difference Grade: 0.035  Distortion Index: 3.079

I wanted to test the lossyWAV 1.4.2 program and only with the "-q X "function was I able to obtain something similar in terms of bytes with flac option 8!

With the next version I'll publish it will be possible to compress and decompress wav files (I'm trying to stabilize some incompatible wav formats). Up to version 1.0 I do not guarantee backward compatibility.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #7
the goal I try to achieve with the adc codec is not the very high compression of other codecs that perhaps use AI to cut frequencies, noises or others, on the contrary it is to get as close as possible to the purity of the initial source, almost as if it were a lossless compression!
Interesting, but the sample adc file you shared is already quite strongly compressed (judging from the bitstream size). Could you share a flac decoding of a slightly higher-bitrate ADC file made from the same Sample-Bee input?

Chris
If I don't reply to your reply, it means I agree with you.


Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #9
I had downloaded that already, I meant a decoding of an ADC file consuming more than the 2,502,925 bytes... something close to 3 Mbytes e.g. Or does your codec currently not support different bit-rate modes?

Chris
If I don't reply to your reply, it means I agree with you.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #10
I started working on this codec about two months ago, at first for fun, then out of curiosity and when I realized that it was interesting I started comparing it with other formats. I'm currently working on quality, stability, and universal support for every type of frequency or harmonic present in any sound. Consider that there are songs with waves and distortions that could put any codec, even an advanced one, in difficulty. I want to prevent any distortion. Obviously in future versions I will put the option with different bitrates and I hope to get great results at low bitrates. I'm at work. 



Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #13
I didn't know the limit was 30 seconds of clips!


I include the encoder and decoder in a single file adc_encdec.exe , to compress just type "adc_encdec.exe -c infile.wav outfile.adc" and "adc_encdec.exe -d outfile.adc infile.wav " to decode.  Does not support all wav header types! Happy testing everyone!

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #14
I am sending the audio analysis sheet of the song for which I have placed the free distribution link!
Encoded file
ADC          = 8.050.958 Bytes
WAVPACK = 8.430.716 Bytes

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #15
Here's what a generic AI that I don't want to mention who I had to analyze the data replied to me.
FILE 1 =ADC
FILE 2 =WavPack

Detailed Analysis of Audio Compression Results (File 1 and File 2)
Thank you for providing the complete data for both audio compression results. Now I can analyze the information in more depth to help you compare the audio quality and choose the best codec for your needs.

General Information:

Both compressed files are not a bit-perfect match to the original WAV audio file at 16 bits. This is normal for lossy compression, which sacrifices some audio data to reduce the file size.

Comparison of Results:

Parameter   File 1   File 2
16-bit Match   0.43%   0.74%
Reduced-Bit Match   49.9981% @ 8.46 bits   49.9656% @ 8.91 bits
Group Delay (1 kHz)   536.3 ns (0.19°)   1.2 μs (0.45°)
Group Delay (16 kHz)   170.7 ns (0.98°)   64.3 ns (0.37°)
RMS Jitter   12.8 μs   9.4 μs
Linearity   13.1 bit @ 0.5 dB error   19.8 bit @ 0.5 dB error


Detailed Analysis:

Audio Match:
File 1 shows a slightly lower match at 16 bits (0.43%) compared to File 2 (0.74%). However, both files exhibit good matches when compressed at reduced bits (around 50%).
Compression Efficiency:
File 1 achieves slightly higher compression, reducing the file to about 8.5% of the original. File 2 requires a slightly higher bitrate (around 8.9%).
Group Delay:
File 1 has lower group delay for most frequencies, except for 16 kHz (which could cause slight coloration of the sound). File 2 has lower group delay at 16 kHz, but generally higher for other frequencies.
Jitter:
File 1 exhibits slightly higher jitter compared to File 2. High jitter can cause distortion and audio artifacts.
Linearity:
File 2 has greater linearity (19.8 bits) compared to File 1 (13.1 bits). Linearity indicates the codec's ability to maintain a proportional relationship between the original and compressed signal. A higher value generally indicates lower distortion.
Final Considerations:

The choice of the best codec depends on your priorities:
Audio Quality Priority: If sound fidelity is paramount, File 1 might be preferable despite the higher group delay at 16 kHz and lower linearity.
File Size Priority: If storage space is limited and slight quality loss is acceptable, File 2 might be sufficient.
Sound Transparency Priority: If avoiding distortion or coloration is important, lower jitter (as in File 2) could be a factor to consider.
Subjective Listening: Ultimately, the best approach is always to listen to both compressed files to evaluate which sounds better to your ears. Human sound perception is subjective, and you might prefer one file over the other based on your hearing and listening preferences.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #16
I rolled up my sleeves and managed to improve something especially in terms of compression. I have implemented the analysis of frequencies and audio waves. This is the new version 0.02 not compatible with the previous one. Obviously it is still unstable especially in the sampling of files with a frequency higher than 96 khz!

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #17
By increasing the compression, certain parameters certainly cannot remain unchanged. Listening gave excellent results in terms of frequency response and clarity of sound. At the moment from my tests for this song it is equivalent to a variable mp3 compression at 187 kbps

 

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #18
Version 0.02 represents a turning point. In fact it presented many errors of evaluation on the complexity and evaluation of the approach to the characteristics of the waves. I'm working on the new version which is significantly higher in quality and global compression proving to be superior to wavpack, oggvorbis, AAC etc.  in the same kbits range! 

The set of errors created problems with sampling at frequencies above 96 Khz

I will release the new version soon.  ;)

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #19
I have developed a slightly different approach for better performance in terms of jitter and linearity of the sound. I have added the possibility of choosing a compression range from 512 to 4096 variable to your liking. I added the "p" option which allows you to decompress and play (with the standard Windows application) the adc file.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #20
I have developed a slightly different approach for better performance in terms of jitter and linearity of the sound. I have added the possibility of choosing a compression range from 512 to 4096 variable to your liking. I added the "p" option which allows you to decompress and play (with the standard Windows application) the adc file.

I hope that this version can give better results than previous one. I will test it tomorrow when I have access to a computer (I'm posting from smartphone lol).
Anyway, there's a long path to make a good and useful codec (QOA is almost just a joke and there are some basic 'codecs' that are just so bad and useless).

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #21
I have developed a slightly different approach for better performance in terms of jitter and linearity of the sound. I have added the possibility of choosing a compression range from 512 to 4096 variable to your liking. I added the "p" option which allows you to decompress and play (with the standard Windows application) the adc file.

I hope that this version can give better results than previous one. I will test it tomorrow when I have access to a computer (I'm posting from smartphone lol).
Anyway, there's a long path to make a good and useful codec (QOA is almost just a joke and there are some basic 'codecs' that are just so bad and useless).

Okay I'm late but that isn't relevant. The .zip (and .exe inside) is detected as virus by Windows Defender (but that is not problem for me because I finally test all in a Windows 7 VM). VirusTotal also gives a prudent result, so I'm not sure of what's hapenning here. Anyways for testing in VM there's no problem, but I advise for have caution.
And a question for the author of the codec, what can be a reasonable explanation to that issue?

About the codec itself, it sucks when coding mono, it has an annoying hissing tone (viewing the spectrogram them are apparently the low frequencies inverted in the high band). But in stereo it does a good work, reducing filesize to a ~¼ of the original, and being transparent (as far I can hear). It does not support more than 2 channels.

Re: ADC (Adaptive Differential Coding) My Experimental Lossy Audio Codec

Reply #22
Thanks for any help you will give me to improve the codec which is still in its initial state with many things to improve. By the way, I think I've solved the problem of single or multi-channel files. The hourly compression limit for 16-bit files remains. Forget. I still implemented compression while the ADC engine remains the same. I am therefore releasing this version 0.0.4! this version compresses 1-2% better with the same quality.

I installed avg free and it doesn't report any viruses. I use upx to compress the exe file, maybe that's the problem!

Of course, to see backward compatibility I have to stabilize the codec. I don't know when, I hope soon.