dbry/adpcm-xq

Working with adpcm-xq

Closed this issue · 2 comments

Hi David, first of all sorry about my english.

I am a student who is working with your code for a project.
I need to know where the temporary weight is in the code. I think that it is in static double minimum_error
but i am not really sure.
I have to execute the program in a board with a low performance processor and coding a small .wav file takes almost 2 hours. Why could this be?

Thanks.

Gonzalo

dbry commented

Hi Gonzalo,

Well, the adpcm-xq encoder is not really intended to be run on embedded devices...it's really mean to encode ADPCM that is decoded on embedded devices. I am surprised at 2 hours though...using the default -3 level I was able to compress CD audio faster than realtime on a Raspberry Pi 2. Or are you talking about a real low performance processor, like a PIC? The main function is recursive, and this might be very slow on a processor without a proper stack.

You might be able to improve the performance some by using float instead of double in the math. And of course, the lookahead value will make a huge difference. Level 0 should be 10-20 times faster than the default of 3.

I'm sorry, but I don't know what you mean by the "temporary weight". The static double minimum_error is the main recursive function that performs the "lookahead" search for the bext encode nybble at each step.

Hope this helps!

-David

Hi David,

Sorry for not answering before.
I tell you a little about my project.
I am working with MIPSfpga, this is a Imagination MIPS32 microaptiv microprocessor with cache and memory management unit for educational use. That microprocessor has a CorExtend Interface where you can create new instructions.
My goal is to accelerate your coder/decoder by introducing new instructions in the processor that perform parts of the code. For that I would like to know the main recursive function.

By the way, I use the level 0 and the execution is done in 5 minutes more or less. So it's something better.

Thank you David.

-Gonzalo