[FFmpeg-devel] [PATCH] Move cbrt tables to a separate cbrt_data(_fixed).c files.
Reimar.Doeffinger at gmx.de
Sun Mar 13 17:53:10 CET 2016
On Sun, Mar 13, 2016 at 05:50:17PM +0100, Hendrik Leppkes wrote:
> On Sun, Mar 13, 2016 at 5:24 PM, Ganesh Ajjanagadde <gajjanag at gmail.com> wrote:
> >> @@ -75,9 +66,8 @@ static av_cold void AAC_RENAME(cbrt_tableinit)(void)
> >> }
> >> for (i = 0; i < 1<<13; i++)
> >> - cbrt_tab[i] = CBRT(cbrt_tab_dbl[i]);
> >> + AAC_RENAME(ff_cbrt_tab)[i] = CBRT(cbrt_tab_dbl[i]);
> >> }
> >> }
> > Note that cbrt_tab_dbl is really intended to be shared by both the
> > fixed/floating table inits. This was another thing my patch achieved:
> > only doing the more expensive double table init once across
> > float/fixed, and then doing the cheap conversion to uint32_t via
> > av_float2int or lrint(x*8192). Please change; it could go into a
> > separate patch if you prefer.
> Having both float and fixed decoders used at the same time seems like
> a rather unlikely use-case, so if such an optimization takes rather
> high complexity, its probably not worth going, IMHO.
Nah, it should be done separately because it needs some
code reshuffling that easily gets confusing, but I don't
think it will be hard.
I don't think it's a good idea though (well, it would
be somewhat nice to share the function to reduce code
size, but that is a kind of questionable benefit as well,
if you care about code size why do you build in both fixed
and float decoder in the first place?).
More information about the ffmpeg-devel