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: Index tables for unofficial IMA ADPCM bit depths (Read 6415 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Index tables for unofficial IMA ADPCM bit depths

Hello, I want to use IMA ADPCM for unofficial bit depths like 2bps, 3bps, 5bps, or 6bps. I have index tables for them. I got them from https://open-flash.github.io/mirrors/swf-spec-19.pdf for 2bps, 3bps, and 5bps (Flash ADPCM). I had to make the index table myself for 6bps. As 5bps index table is logarithmic, i thinked 6bps must also be logarithmic at first. And, i made [1,  2,  3,  4,  5,  6,  8, 10, 12, 14, 16, 19, 22, 25, 28, 32] for a half of the index table (the other half is just -1's). But, later i thinked: why logarithmic? Can [2,  4,  6,  ..., 28, 30, 32] for 6bps and [2,  4,  6,  ..., 12, 14, 16] for 5bps be better? Why 5bps SWF ADPCM has a logarithmic index table, and can a linear index table be better for 5bps and 6bps?

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #1
Why nobody answered this?

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #2
ADPCM stopped being relevant long before Adobe Flash was a thing. Only place where it would make some sense is in some ancient software that supported nothing else. In that setting unofficial variations make no sense at all.
Replacing a lookup table with a linear variant would mean worse quality per bitrate. Storing an index number for something that could be directly computed simply by multiplying with a constant is a waste of space.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #3
@Case Codec's are not only required for high-performance computers, they are also required for tiny microcontroller's and etc.. Using a modern codec like MP3 can be very hard or impossible with these tiny MCU's and etc.. So, ADPCM is still required for some low processing power tasks. I'm asking this because i want to use ADPCM with Arduino. Anyway, thanks for recommendation.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #4
This is codec experts forum, your question was put on the queue.
Please remove my account from this forum.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #5
Write PCM. Is there a reason not to?
TAPE LOADING ERROR

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #6
@itisljar ADPCM is more efficient than PCM.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #7
If it is for your own "canned" audio, then there was a fun thing discussed here recently, the new Quite OK Audio format: https://hydrogenaud.io/index.php/topic,123838.0.html . It has even made its way into ffmpeg.
The idea behind it: https://phoboslab.org/log/2023/02/qoa-time-domain-audio-compression

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #8
Why nobody answered this?
Because there are very few people on this planet reading this forum and knowing how a certain 40-year-old codec works.

Short answer: in audio and speech coding, logarithmic quantizers usually fit the (residual) audio data better than linear quantizers - many small values, few large values. You simply get better perofrmance.

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

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #9
@Porcus Thank you, i can use it for some stuff but it can be too big for some stuff as it is 3.2 bits per sample (sometimes 2 bits per sample is needed for me) and i'll be happy if a 2 bits per sample version comes. @C.R.Helmrich Thank you, the reason i was thinking linear can be better was the fact that difference values are linear.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #10
ADPCM is still required for some low processing power tasks. I'm asking this because i want to use ADPCM with Arduino.
Have you taken a look at LC3? That coding standard is longer (in terms of specification and code lines) but was specifically designed for operation on low-power devices, allows for much finer variation of bit-rate, and should perform much better than ADPCM in terms of audio quality.

https://github.com/marzzzello/LC3plus
https://github.com/google/liblc3
More details: https://www.iis.fraunhofer.de/en/ff/amm/communication/lc3.html

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

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #11
@C.R.Helmrich Looks like this codec works in frequency domain and i'm not sure Arduino can handle it, but thank you anyway.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #12
@Case Codec's are not only required for high-performance computers, they are also required for tiny microcontroller's and etc.. Using a modern codec like MP3 can be very hard or impossible with these tiny MCU's and etc.. So, ADPCM is still required for some low processing power tasks. I'm asking this because i want to use ADPCM with Arduino. Anyway, thanks for recommendation.
Are you going to use "tiny MCU" to decode or to encode?

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #13
@Bogozo Probably decode, but maybe encode. I think most frequency based codecs will be too hard even for decode.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #14
If to decode, you can consider LossyFLAC in "extraportable" mode. It has high quality, high effeciency. It can be decoded faster than mp3 and even faster than ADPCM.

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #15
@Bogozo What's it's supported minimum bit depth?

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #16
I don't know if Klymins is familiar with this, but this Arduino Audio Tools collection makes it look like there are ready made libraries to get pretty much everything working on Arduino.

 

Re: Index tables for unofficial IMA ADPCM bit depths

Reply #17
@Case This looks very good, thanks!