[FFmpeg-devel] [PATCH] Move cbrt tables to a separate cbrt_data(_fixed).c files.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Mar 13 18:09:50 CET 2016
On Sun, Mar 13, 2016 at 05:53:10PM +0100, Reimar Döffinger wrote:
> 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.
Wasn't (though I haven't tested properly), see attached,
still don't think it is a good idea though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cbrt_single_init.diff
Type: text/x-diff
Size: 4886 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160313/de649e5c/attachment.diff>
More information about the ffmpeg-devel
mailing list