AAC Decoder Optimizations
Posted: Fri May 12, 2017 5:04 pm
I've got the Fraunhofer fdk-aac decoder running, and its fine for LC but too slow for AAC+ (SBR etc.), even on 240MHz.
There are some optimizations for other archs, but not xtensa:
https://github.com/mstorsjo/fdk-aac/tre ... DK/include
Has anyone done anything in that direction? Which of the architectures with optimizations enabled (aarch64, arm, mips, ppc, x86) is most similar to xtensa?
Also, most of the interesting opcodes seem to be optional - is there a document that tells me which ones are implemented in the ESP32?
EDIT: the ISA options are listed here: /esp-idf/components/esp32/include/xtensa/config/core-isa.h
Will check out the MUL32 and DIV32 opcodes (sadly no HIFI DSP extensions).
Edit 2: looks like two functions is all it takes. This is x86, any takers?
There are some optimizations for other archs, but not xtensa:
https://github.com/mstorsjo/fdk-aac/tre ... DK/include
Has anyone done anything in that direction? Which of the architectures with optimizations enabled (aarch64, arm, mips, ppc, x86) is most similar to xtensa?
Also, most of the interesting opcodes seem to be optional - is there a document that tells me which ones are implemented in the ESP32?
EDIT: the ISA options are listed here: /esp-idf/components/esp32/include/xtensa/config/core-isa.h
Will check out the MUL32 and DIV32 opcodes (sadly no HIFI DSP extensions).
Edit 2: looks like two functions is all it takes. This is x86, any takers?
Code: Select all
inline INT fixmul_DD (INT a, const INT b)
{
INT result;
asm( "imul %2;\n"
"shl $1, %0;\n"
: "=d"(result), "+a"(a)
: "r"(b) );
return result;
}
inline INT fixmuldiv2_DD (INT a, const INT b)
{
INT result;
asm ( "imul %2;"
: "=d"(result), "+a"(a)
: "r"(b) );
return result;
}