[FFmpeg-devel] [PATCH] lavc/aacenc_quantization: use cbrt table

Ganesh Ajjanagadde gajjanag at gmail.com
Fri Mar 11 03:46:40 CET 2016

On Thu, Mar 10, 2016 at 2:46 AM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Thu, Mar 10, 2016 at 12:49 AM, Ganesh Ajjanagadde <gajjanag at gmail.com> wrote:
>> There is no reason for computing cbrtf at runtime; we have a table for
>> this.
>> Cruft needed due to the build system, the people who still like using
>> hardcoded tables and need for single cbrt_tab across the code.
> The build-system changes look *extremely* messy, I would rather not go
> down that route.
> Don't we have an example somewhere of a hardcoded table thats used by
> multiple components with a cleaner solution? mpegaudio_tables.h looks
> shared by the float and fixed decoder without magic special sauce?

The data can't go into a header, it needs to be in a .c file to avoid
duplication across multiple include sites. mpegaudio_tablegen is only
included in mpegaudiodec_template.c. Here, it needs to be used by both
aacenc and aacdec*. If one just confined it to a header, one would
have separate copies of the cbrt_tab in the decoder and encoder. I
observed this while naively init'ing cbrt_tab in aacenc,
aacenc_quantization.h sees a different cbrt_tab that is all zeros.

> - Hendrik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list