On Wed, Dec 23, 2015 at 3:38 PM, Michael Niedermayer <mich...@niedermayer.cc> wrote: > On Wed, Dec 23, 2015 at 10:47:20AM -0800, Ganesh Ajjanagadde wrote: >> exp10(x) is superior to pow(10,x). >> Note that in some cases, this may affect integers derived from pow calls. >> When >> spotted, this remark has been added to the relevant commit message. >> >> Note that if such a thing is troublesome, one can do one of two things: >> 1. leave the pow(10,x) call as is in such places. >> 2. replace the lavu/libm fallback by the correct pow(10,x) as opposed to the >> sloppy exp2(M_LOG2_10 * x). >> >> Patches tested with FATE on x86-64, GNU/Linux. > > some of these fail on arm > > i suspect thats because exp10 is only available with GNU_SOURCE > and we dont define that nor do we want to define that > -DGNU_SOURCE often leaks in from pkg_config files though
ah, thanks for this. Out of curiousity, why don't we want to always define it? My FFmpeg runs fine, built with GNU_SOURCE. > my arm setup doesnt include many external libs so GNU_SOURCE doesnt > get enabled It is only with GNU_SOURCE as per man page; I assumed that was handled via configure and the like and I thought I mentioned this somewhere during the discussion. > > i didnt think deeply abot it but would it make sense to always enable > the fallback even if exp10 is available? that is assuming the fallback > is faster everywhere The fallback is faster everywhere. The trouble is I run into linker issues when it is available natively. Better solution may be via an ifdef GNU_SOURCE in addition to HAVE_EXP10. Can you please check if that works? > > > > ffmpeg/libavfilter/af_volume.c: In function ‘filter_frame’: > ffmpeg/libavfilter/af_volume.c:379:13: error: implicit declaration of > function ‘exp10’ > ffmpeg/libavfilter/af_compand.c: In function ‘config_output’: > ffmpeg/libavfilter/af_compand.c:509:9: error: implicit declaration of > function ‘exp10’ > CC libavcodec/cngdec.o > make: *** [libavfilter/af_compand.o] Error 1 > make: *** [libavfilter/af_volume.o] Error 1 > CC libavcodec/dcaenc.o > ffmpeg/libavfilter/f_ebur128.c: In function ‘get_histogram’: > ffmpeg/libavfilter/f_ebur128.c:451:9: error: implicit declaration of function > ‘exp10’ > make: *** [libavfilter/f_ebur128.o] Error 1 > CC libavcodec/imc.o > ffmpeg/libavfilter/vsrc_testsrc.c: In function ‘test_fill_picture’: > ffmpeg/libavfilter/vsrc_testsrc.c:618:23: error: implicit declaration of > function ‘exp10’ > make: *** [libavfilter/vsrc_testsrc.o] Error 1 > CC libavcodec/on2avc.o > CC libavcodec/opus.o > ffmpeg/libavcodec/acelp_pitch_delay.c: In function ‘ff_amr_set_fixed_gain’: > ffmpeg/libavcodec/acelp_pitch_delay.c:135:9: error: implicit declaration of > function ‘exp10f’ > CC libavcodec/wmadec.o > make: CC libavcodec/wmaenc.o > *** [libavcodec/acelp_pitch_delay.o] Error 1 > CC libavcodec/wmaprodec.o > CC libavutil/eval.o > ffmpeg/libavcodec/aacpsy.c: In function ‘psy_3gpp_init’: > ffmpeg/libavcodec/aacpsy.c:352:13: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/aacpsy.o] Error 1 > ffmpeg/libavcodec/cngdec.c: In function ‘cng_decode_frame’: > ffmpeg/libavcodec/cngdec.c:116:9: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/cngdec.o] Error 1 > ffmpeg/libavcodec/dcaenc.c: In function ‘encode_init’: > ffmpeg/libavcodec/dcaenc.c:183:13: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/dcaenc.o] Error 1 > ffmpeg/libavcodec/opus.c: In function ‘ff_opus_parse_extradata’: > ffmpeg/libavcodec/opus.c:337:9: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/opus.o] Error 1 > ffmpeg/libavcodec/imc.c: In function ‘iac_generate_tabs’: > ffmpeg/libavcodec/imc.c:140:13: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/imc.o] Error 1 > ffmpeg/libavcodec/wmadec.c: In function ‘wma_decode_block’: > ffmpeg/libavcodec/wmadec.c:630:13: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/wmadec.o] Error 1 > ffmpeg/libavcodec/on2avc.c: In function ‘on2avc_decode_init’: > ffmpeg/libavcodec/on2avc.c:938:9: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/on2avc.o] Error 1 > ffmpeg/libavcodec/wmaenc.c: In function ‘init_exp’: > ffmpeg/libavcodec/wmaenc.c:136:9: error: implicit declaration of function > ‘exp10’ > make: *** [libavcodec/wmaenc.o] Error 1 > ffmpeg/libavutil/eval.c: In function ‘av_strtod’: > ffmpeg/libavutil/eval.c:109:13: error: implicit declaration of function > ‘exp10’ > make: *** [libavutil/eval.o] Error 1 > ffmpeg/libavcodec/wmaprodec.c: In function ‘decode_subframe’: > ffmpeg/libavcodec/wmaprodec.c:1354:17: error: implicit declaration of > function ‘exp10’ > make: *** [libavcodec/wmaprodec.o] Error 1 > make: Target `all' not remade because of errors. > > > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > He who knows, does not speak. He who speaks, does not know. -- Lao Tsu > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel