[FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely
atomnuker at gmail.com
Sat Nov 28 09:38:49 CET 2015
On Fri, 2015-11-27 at 19:35 -0500, Ganesh Ajjanagadde wrote:
> @@ -40,6 +39,57 @@
> * Tables in this file are shared by the AAC decoders and encoder
> +#define POW_SF2_ZERO 200 ///< ff_aac_pow2sf_tab index
> corresponding to pow(2, 0);
Move POW_SF2_ZERO to aac.h, which is already included by aactab.h and
by everything else which uses it, so it'll be fine. Just put it like
> 152 #define SCALE_DIFF_ZERO 60 //....
> 153 +
> 154 + #define POW_SF2_ZERO 200 //....
> 156 #define NOISE_PRE 256 //....
> +extern float ff_aac_pow2sf_tab;
> +extern float ff_aac_pow34sf_tab;
> +static av_cold inline void ff_aac_tableinit(void)
The av_cold attribute seems pointless here. Since the function is
inlined and always executed on the already av_cold decoder and encoder
table init functions there shouldn't be a branch making it pointless.
Other than those 2 remarks, looks good to me.
More information about the ffmpeg-devel