Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-12-01 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 4:23 PM, Ganesh Ajjanagadde wrote: > On Sat, Nov 28, 2015 at 3:19 PM, Derek Buitenhuis > wrote: >> On 11/28/2015 7:51 PM, Ganesh Ajjanagadde wrote: >>> In principle of course, e.g with more ifdefry, configure, or something >>>

[FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
This is useful for build-time table generation (--enable-hardcoded-tables), by providing compat shims for hosts that have broken libms. This file is deliberately kept minimal; functions can always be added on an as-needed basis. Reviewed-by: Clément Bœsch Reviewed-by: Ronald S.

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: > +static inline double ff_cbrt(double x) > +{ > +return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); > +} > +#define cbrt ff_cbrt Didn't Clément say to not pollute the global namespace like this? - Derek

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 1:31 PM, Derek Buitenhuis wrote: > On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: >> +static inline double ff_cbrt(double x) >> +{ >> +return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); >> +} >> +#define cbrt ff_cbrt > > Didn't

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 2:45 PM, Derek Buitenhuis wrote: > On 11/28/2015 7:33 PM, Ganesh Ajjanagadde wrote: >> 2. Clement's idea AFAIK does not work, since the names must be >> identical to the standard C names for the build to work with/without >> hardcoded tables. >

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 7:51 PM, Ganesh Ajjanagadde wrote: > In principle of course, e.g with more ifdefry, configure, or something > of that sort. I do not believe this is what he meant. I will await his reply to clarify, then. Perhaps do not write so matter-of-factly. > In any case, the point is moot -

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 7:33 PM, Ganesh Ajjanagadde wrote: > 2. Clement's idea AFAIK does not work, since the names must be > identical to the standard C names for the build to work with/without > hardcoded tables. ... yes it can. It doesn't work without more work, but it it sure can work. Anyway,

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 3:19 PM, Derek Buitenhuis wrote: > On 11/28/2015 7:51 PM, Ganesh Ajjanagadde wrote: >> In principle of course, e.g with more ifdefry, configure, or something >> of that sort. I do not believe this is what he meant. > > I will await his reply to