On Wed, Jan 18, 2012 at 8:14 AM, Diego Biurrun <[email protected]> wrote: > On Wed, Jan 18, 2012 at 01:39:54AM -0700, Nathan Caldwell wrote: >> --- a/libavcodec/aac_tablegen.c >> +++ b/libavcodec/aac_tablegen.c >> @@ -32,6 +32,9 @@ int main(void) >> >> WRITE_ARRAY("const", float, ff_aac_pow2sf_tab); >> +#if CONFIG_AAC_ENCODER >> + WRITE_ARRAY("const", float, ff_aac_pow34sf_tab); >> +#endif /* CONFIG_AAC_ENCODER */ >> >> return 0; >> --- a/libavcodec/aac_tablegen.h >> +++ b/libavcodec/aac_tablegen.h >> @@ -31,12 +31,19 @@ >> float ff_aac_pow2sf_tab[428]; >> +#if CONFIG_AAC_ENCODER >> +float ff_aac_pow34sf_tab[428]; >> +#endif /* CONFIG_AAC_ENCODER */ >> >> void ff_aac_tableinit(void) >> { >> int i; >> - for (i = 0; i < 428; i++) >> + for (i = 0; i < 428; i++) { >> ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.); >> +#if CONFIG_AAC_ENCODER >> + ff_aac_pow34sf_tab[i] = sqrt(ff_aac_pow2sf_tab[i] * >> sqrt(ff_aac_pow2sf_tab[i])); >> +#endif /* CONFIG_AAC_ENCODER */ >> + } >> } > > What are you intending to achieve with all the ifdeffery? > Generating the tables will not hurt - the build may take > slightly longer, but the table will not end up in any > binary. Not worth any ifdeffery IMO. > > Also note that these files lack config.h #includes, so I very > much wonder how the #ifdef ever worked in the first place.
Thanks for pointing this out. I moved this to aacenc.c, so it's only enabled with the encoder. It should probably be moved to a separate aacenc tablegen at some point. -- -Nathan Caldwell _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
