Paul B Mahol [Sun, 27 Dec 2015 19:45:46 +0000 (20:45 +0100)]
avfilter/af_silenceremove: add peak detector
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Michael Niedermayer [Sun, 27 Dec 2015 09:55:48 +0000 (10:55 +0100)]
avcodec/on2avc: Fix stability issues with scale_tab generation
This also simplifies the code
the resulting values are binary identical to what pow(10, i/10.0) produces
Reynaldo H. Verdejo Pinochet [Wed, 23 Dec 2015 23:05:32 +0000 (15:05 -0800)]
avio: add detail to avio_printf() size warning
Previous "currently size is limited" didn't give away
much in terms of useful info.
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reynaldo H. Verdejo Pinochet [Wed, 23 Dec 2015 06:24:40 +0000 (22:24 -0800)]
ffserver: add a doctype heading to our HTML pages
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reynaldo H. Verdejo Pinochet [Tue, 22 Dec 2015 08:53:38 +0000 (00:53 -0800)]
ffserver: HTML encode msgs instead of blindly stripping chars out
Fixes weirdness like our "??filename? not found" 404.
None of the chars being used from the previously blacklisted
list needs to be scaped on an UTF-8 document context
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reynaldo H. Verdejo Pinochet [Tue, 22 Dec 2015 19:28:56 +0000 (11:28 -0800)]
ffserver: make our 404 explicitly HTML5/UTF-8
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 23:56:03 +0000 (15:56 -0800)]
lavc/snowenc: replace rint by lrint
avoids float to int cast.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 23:54:16 +0000 (15:54 -0800)]
lavc/dds: replace rint by lrint
avoids float to int cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:22:00 +0000 (13:22 -0800)]
lavc/texturedsp: replace rint by lrint
avoids float to int cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:19:12 +0000 (13:19 -0800)]
lavfi/avf_showspectrum: replace rint by lrint
avoids float to int cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:17:14 +0000 (13:17 -0800)]
lavfi/vf_hue: replace rint by lrint
avoids float to int cast.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Lou Logan [Sun, 27 Dec 2015 02:14:15 +0000 (17:14 -0900)]
doc/filters: note NetCDF dependency for sofalizer
Also add @url for link.
Signed-off-by: Lou Logan <lou@lrcd.com>
Ganesh Ajjanagadde [Sun, 27 Dec 2015 00:53:12 +0000 (16:53 -0800)]
avcodec/on2avc: fix regression on icc since
5495c7f
Should fix the regression, and also speeds up table generation.
Tables tested on GNU/Linux+clang: they are identical to the ones prior
to
5495c7f. ff_exp10 caused one slight change in one entry, 50000 became
50001 due to somewhat incorrect rounding.
Untested on ICC; passes FATE on GNU/Linux+gcc.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Michael Niedermayer [Sat, 26 Dec 2015 18:38:13 +0000 (19:38 +0100)]
avformat/img2dec: Reuse main IO context instead of reopening a single file
Fixes part of Ticket4849
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 26 Dec 2015 17:57:09 +0000 (18:57 +0100)]
avformat/img2dec: Skip checking the input files existence if it has already been opened
Avoids a unneeded open
Fixes part of Ticket4849
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 19:27:53 +0000 (11:27 -0800)]
ffplay: replace rint by lrint
avoids the float to integer cast, and is slightly superior in terms of
rounding ("Dutch/Gauss rounding").
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 20:24:44 +0000 (12:24 -0800)]
lavc/acelp_pitch_delay: replace exp2f(M_LOG2_10 *x) by ff_exp10f(x)
Suggested-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:38:39 +0000 (10:38 -0800)]
lavc/wmaprodec: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:36:30 +0000 (10:36 -0800)]
lavc/wmaenc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:34:22 +0000 (10:34 -0800)]
lavc/wmadec: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:31:54 +0000 (10:31 -0800)]
lavc/opus: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:30:08 +0000 (10:30 -0800)]
lavc/on2avc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:26:37 +0000 (10:26 -0800)]
lavc/imc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:23:47 +0000 (10:23 -0800)]
lavc/dcaenc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:20:15 +0000 (10:20 -0800)]
lavc/cngdec: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:09:01 +0000 (10:09 -0800)]
lavc/aacpsy: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:06:57 +0000 (10:06 -0800)]
lavfi/af_compand: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:05:34 +0000 (10:05 -0800)]
lavfi/af_volume: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:04:04 +0000 (10:04 -0800)]
lavfi/f_ebur128: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:01:35 +0000 (10:01 -0800)]
lavfi/vsrc_testsrc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:00:13 +0000 (10:00 -0800)]
lavu/eval: replace pow(10,x) by ff_exp10(x)
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:27:59 +0000 (10:27 -0800)]
lavc/libopusdec: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 16:07:08 +0000 (08:07 -0800)]
lavu/internal: add ff_exp10
Fast, reasonably accurate 10^x. Alternative of detection of libm exp10 at configure
time is not worth the trouble, since it is anyway not POSIX or ISO C,
and currently only the GNU libm has it. Furthermore, GNU libm's variant
is ~ 2x slower, and is ironically not correctly rounded (2 ulp off) to justify all
that slowdown.
Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 16:30:06 +0000 (08:30 -0800)]
lavu/libm,configure: remove exp10, exp10f detection
Subsequent commit introduces ff_exp10 instead.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Fri, 25 Dec 2015 17:20:27 +0000 (09:20 -0800)]
lavu/libm: misc, minor changes
Addition of comments marking the end of ifdef blocks, correction of an
incorrect (at double precision) M_LN2, removal of an unnecessary undef.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Reto Kromer [Thu, 24 Dec 2015 14:00:46 +0000 (15:00 +0100)]
tools/bookmarklets: HTML code fixes
Minor HTML5 code changes.
Closes #167
Paul B Mahol [Fri, 25 Dec 2015 14:03:46 +0000 (15:03 +0100)]
avfilter/af_anequalizer: make cliping filter type actually useful
Previously result was ignored.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Fri, 25 Dec 2015 14:00:06 +0000 (15:00 +0100)]
avfilter/af_anequalizer: use pow instead of exp10
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Sun, 20 Dec 2015 08:50:35 +0000 (09:50 +0100)]
avfilter: add high-order parametric multiband equalizer filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Stefan Pöschel [Fri, 25 Dec 2015 09:33:35 +0000 (10:33 +0100)]
doc/muxers/mpegts: update doc after adding flag to embed an AC-3/E-AC-3 ES the DVB way
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Bradshaw [Mon, 2 Nov 2015 03:11:12 +0000 (19:11 -0800)]
avcodec: add OpenJPEG 2.x compatibility
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
wanzhang [Wed, 29 Jul 2015 17:16:43 +0000 (01:16 +0800)]
ffplay: Fix auto insertion point of rotation filter
Fixes watermark rotation for videos using auto rotation
Closes #141
Michael Niedermayer [Thu, 24 Dec 2015 20:46:15 +0000 (21:46 +0100)]
swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 24 Dec 2015 19:32:11 +0000 (20:32 +0100)]
avformat/mpegts: consider stream_type 4 just a hint toward mp3 and not definite
Fixes Ticket 4864
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Thu, 24 Dec 2015 16:46:12 +0000 (17:46 +0100)]
avcodec/ac3dec: Print the value of out of range exponents
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ganesh Ajjanagadde [Wed, 23 Dec 2015 22:48:40 +0000 (14:48 -0800)]
swr/resample: use av_clip_int16 instead of av_clip
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Paul B Mahol [Thu, 24 Dec 2015 16:53:11 +0000 (17:53 +0100)]
avfilter/af_sofalizer: make virtual speaker positioning supports all channel layouts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
James Almer [Thu, 24 Dec 2015 02:55:56 +0000 (23:55 -0300)]
x86/vf_blend: add sse2 versions of blend_difference and blend_negation
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Thu, 24 Dec 2015 02:54:33 +0000 (23:54 -0300)]
x86/vf_blend: make all functions work on x86_32
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Thu, 24 Dec 2015 02:51:45 +0000 (23:51 -0300)]
x86/vf_blend: simplify using macros
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Wed, 23 Dec 2015 23:37:37 +0000 (20:37 -0300)]
x86/vf_maskedmerge: make ff_maskedmerge8_sse2 work on x86_32
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Stefan Pöschel [Sun, 13 Dec 2015 10:54:32 +0000 (11:54 +0100)]
avformat/mpegtsenc: add flag to embed an AC-3/E-AC-3 ES the DVB way
So far an AC-3 elementary stream is refered to in the PMT according to
System A (ATSC). An E-AC-3 ES in contrast is embedded the System B (DVB) way.
To fix this inconsistency, this commit changes the default E-AC-3 behaviour to
use the ATSC way, too. Furthermore a new flag is added to optionally select the
DVB way (regarding both codecs and possible further differences in the future).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Wed, 23 Dec 2015 20:57:31 +0000 (21:57 +0100)]
avfilter/x86/vf_maskedmerge: Clear upper part of width
Fixes crash
Fixes: Ticket5055
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Wed, 23 Dec 2015 18:15:25 +0000 (19:15 +0100)]
avfilter/af_biquads: display clipping warnings once per filtered frame
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Ganesh Ajjanagadde [Tue, 22 Dec 2015 03:05:00 +0000 (19:05 -0800)]
lavu/libm: add exp10 support
exp10 is a function available in GNU libm. Looks like no other common
libm has it. This adds support for it to FFmpeg.
There are essentially 2 ways of handling the fallback:
1. Using pow(10, x)
2. Using exp2(M_LOG2_10 * x).
First one represents a Pareto improvement, with no speed or accuracy
regression anywhere, but speed improvement limited to GNU libm.
Second one represents a slight accuracy loss (relative error ~ 1e-13)
for non GNU libm. Speedup of > 2x is obtained on non GNU libm platforms,
~30% on GNU libm. These are "average case numbers", another benefit is
the lack of triggering of the well-known terrible worst case paths
through pow.
Based on reviews, second one chosen. Comment added accordingly.
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Tue, 22 Dec 2015 01:12:04 +0000 (17:12 -0800)]
lavfi/af_aemphasis: remove unnecessary complex number usage
complex is not available on all platforms. Furthermore, it is trivial to
rewrite complex number expressions to real arithmetic, and in fact
sometimes advantageous for performance reasons: by wrapping as a complex,
one forces a particular Cartesian representation that is not necessarily optimal for the purpose.
Configure dependencies also removed, and aemphasis is now available across
all platforms.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
wm4 [Wed, 23 Dec 2015 14:08:58 +0000 (15:08 +0100)]
avformat/subtitles: treat negative duration like unknown duration
Fixes a specific srt sample, which has an event with negative duration.
libavcodec will convert an event with negative duration to an ASS event
which will be displayed forever, which is not wanted here.
Treat negative duration always as unknown duration instead, and show it
until the next subtitle event.
Paul B Mahol [Wed, 23 Dec 2015 11:46:23 +0000 (12:46 +0100)]
avcodec/s302menc: comment out allowed channel layouts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Hendrik Leppkes [Wed, 23 Dec 2015 09:22:00 +0000 (10:22 +0100)]
avcodec/libschroedingerenc: add missing AVClass to private context
Fixes ticket #5104.
Andreas Cadhalpun [Tue, 22 Dec 2015 18:44:00 +0000 (19:44 +0100)]
diracdec: add missing check for pixel_range_index
This fixes an out-of-bounds read introduced in commit
0379603.
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Andreas Cadhalpun [Sat, 19 Dec 2015 22:45:00 +0000 (23:45 +0100)]
mlvdec: validate bits_per_coded_sample
A negative bits_per_coded_sample doesn't make sense.
If it is too large, the size calculation for av_get_packet overflows,
resulting in allocation of a too small buffer.
Also make sure width and height are sane.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Michael Niedermayer [Tue, 22 Dec 2015 16:12:02 +0000 (17:12 +0100)]
avformat/movenc-test: Make format static
Makes greping for non static consts easier
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 22 Dec 2015 15:19:44 +0000 (16:19 +0100)]
avformat/mov: Update handbrake_version threshold for full mp3 parsing
Fixes: Endangered\ Species\ 1x01\ Collecting\ Merl.mp4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Nicolas George [Wed, 30 Sep 2015 14:11:57 +0000 (16:11 +0200)]
lavfi: make request_frame() non-recursive.
Instead of calling the input filter request_frame() method,
ff_request_frame() now marks the link and returns immediately.
buffersink is changed to activate the marked filters until
a frame is obtained.
Nicolas George [Thu, 24 Sep 2015 08:07:42 +0000 (10:07 +0200)]
lavfi: replace link.closed by link.status.
The status field can carry any error code instead of just EOF.
Also only update it through a wrapper function and provide a timestamp.
Update the few filters that used it directly.
Nicolas George [Thu, 24 Sep 2015 08:06:26 +0000 (10:06 +0200)]
lavfi: deprecate avfilter_link_set_closed().
Applications are not supposed to mess with links,
they should close the sinks.
Furthermore, this function does not distinguish what end
of the link caused the close and does not have a timestamp.
Nicolas George [Thu, 24 Sep 2015 08:05:42 +0000 (10:05 +0200)]
lavfi: add link.current_pts field.
Nicolas George [Thu, 24 Sep 2015 07:30:05 +0000 (09:30 +0200)]
lavfi: rename link.current_pts to current_pts_us.
This field is used for fast comparison between link ages,
it is in AV_TIME_BASE units, in other words microseconds,
µs =~ us.
Renaming it allows a second field in link time base units.
Nicolas George [Sun, 29 Nov 2015 12:06:28 +0000 (13:06 +0100)]
lavfi/vf_mpdecimate: remove request_frame().
It is no longer needed since looping is not necessary.
Michael Niedermayer [Tue, 22 Dec 2015 13:41:27 +0000 (14:41 +0100)]
avcodec/ass: check for av_mallocz() failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
erankor [Tue, 22 Dec 2015 07:20:34 +0000 (09:20 +0200)]
MAINTAINERS: add Eran Kornblau for aes_ctr and movenccenc
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Timo Rothenpieler [Sat, 19 Dec 2015 19:31:00 +0000 (20:31 +0100)]
vaapi: Add VP9 hwaccell support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Carl Eugen Hoyos [Tue, 22 Dec 2015 08:29:08 +0000 (09:29 +0100)]
lavf/rmdec: Use correct format specifier for int64_t.
Fixes ticket #5100.
Claudio Freire [Tue, 22 Dec 2015 08:26:12 +0000 (05:26 -0300)]
AAC encoder: fix possible assertion failure in PNS
Fix possible SF delta violation that would cause an
eventual assertion failure in some corner cases (esp
on very low bitrates) when marking bands for PNS due
to misuse of the sf_delta utilities
Rostislav Pehlivanov [Mon, 21 Dec 2015 17:23:38 +0000 (17:23 +0000)]
aacenc_is: rename variable
'erf' is far from the best name for a variable and is not very
descriptive since the actual variable points to the comparitively best
IS phase. Therefore rename it to 'best'.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Ganesh Ajjanagadde [Sun, 20 Dec 2015 02:17:03 +0000 (18:17 -0800)]
lavu/libm: add erf hack and make dynaudnorm available everywhere
Source code is from Boost:
http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp
with appropriate modifications for FFmpeg.
Tested on interval -6 to 6 (beyond which it saturates), +/-NAN, +/-INFINITY
under -fsanitize=undefined on clang to test for possible undefined behavior.
This function turns out to actually be essentially as accurate and faster than the
libm (GNU/BSD's/Mac OS X), and I can think of 3 reasons why upstream
does not use this:
1. They are not aware of it.
2. They are concerned about licensing - this applies especially to GNU
libm.
3. They do not know and/or appreciate the benefits of rational
approximations over polynomial approximations. Boost uses them to great
effect, see e.g swr/resample for bessel derived from them, which is also
similarly superior to libm variants.
First, performance.
sample benchmark (clang -O3, Haswell, GNU/Linux):
3e8 values evenly spaced from 0 to 6
time (libm):
./test 13.39s user 0.00s system 100% cpu 13.376 total
time (boost based):
./test 9.20s user 0.00s system 100% cpu 9.190 total
Second, accuracy.
1e8 eval pts from 0 to 6
maxdiff (absolute): 2.
2204460492503131e-16
occuring at point where libm erf is correctly rounded, this is not.
Illustration of superior rounding of this function:
arg : 0.
83999999999999997
erf : 0.
76514271145499457
boost : 0.
76514271145499446
real : 0.
76514271145499446
i.e libm is actually incorrectly rounded. Note that this is clear from:
https://github.com/JuliaLang/openlibm/blob/master/src/s_erf.c (the Sun
implementation used by both BSD and GNU libm's), where only 1 ulp is
guaranteed.
Reasons it is not easy/worthwhile to create a "correctly rounded"
variant of this function (i.e 0.5ulp):
1. Upstream libm's don't do it anyway, so we can't guarantee this unless
we force this implementation on all platforms. This is not easy, as the
linker would complain unless measures are taken.
2. Nothing in FFmpeg cares or can care about such things, due to the
above and FFmpeg's nature.
3. Creating a correctly rounded function will in practice need some use of long
double/fma. long double, although C89/C90, unfortunately has problems on
ppc. This needs fixing of toolchain flags/configure. In any case this
will be slower for miniscule gain.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 21 Dec 2015 16:36:46 +0000 (08:36 -0800)]
lavf/avformat: add av_warn_unused_result to avformat_write_header
May be useful as a defense, see e.g
c62d1780fff8a1997dd1707bbc557efc8fe41e3c.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:59:12 +0000 (14:59 -0500)]
lavd/pulse_audio_enc: replace lround by lrint
Here it is mostly a cosmetic change, but there might be benefits in that
there are no compat hacks for lround, while there are for lrint.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:56:18 +0000 (14:56 -0500)]
lavfi/vf_histogram: replace round by lrint
lrint is at least as fast, uses a superior rounding mode, and avoids an
implicit cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:51:09 +0000 (14:51 -0500)]
lavfi/af_dynaudnorm: replace round by lrint
lrint is at least as fast, uses a superior rounding mode, and avoids an
implicit cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:50:00 +0000 (14:50 -0500)]
lavfi/vf_crop: replace round by lrint
lrint is at least as fast, avoids an implicit cast, and uses a superior
rounding mode.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:48:45 +0000 (14:48 -0500)]
lavc/libvpxenc: replace round by lrint
Mostly cosmetic here.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:39:37 +0000 (14:39 -0500)]
lavfi/vf_drawtext: replace round by llrint
llrint is at least as fast, and avoids an implicit cast.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:36:53 +0000 (14:36 -0500)]
lavfi/vf_colorlevels: replace round by lrint
lrint avoids an implicit cast, and is not slower on non-broken libm's. Thus this
represents a Pareto improvement.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 16 Dec 2015 19:34:09 +0000 (14:34 -0500)]
lavfi/vf_colorchannelmixer: replace round by lrint
lrint is faster here on -ftree-vectorize with GCC. This is likely simply
an artifact of GCC's rather terrible auto-vectorizer, since as per the
instruction set manuals cvtsd2si and cvttsd2si (or their vector equivalents)
have identical cycle timings.
Anyway, regardless of above, lrint is superior to round accuracy wise.
Safety guaranteed as long int has at least 32 bits.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Clément Bœsch [Mon, 21 Dec 2015 15:42:14 +0000 (16:42 +0100)]
lavfi/drawtext: fix shadow[xy] descriptions
Clément Bœsch [Mon, 21 Dec 2015 15:07:22 +0000 (16:07 +0100)]
lavfi/drawtext: hide first font load warning when fontconfig is present
Clément Bœsch [Mon, 21 Dec 2015 14:54:20 +0000 (15:54 +0100)]
lavfi/drawtext: fix crash when no text, file or timecode provided
Paul B Mahol [Mon, 21 Dec 2015 12:26:17 +0000 (13:26 +0100)]
avfilter/af_ladspa: fix av_assert0()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Clément Bœsch [Tue, 8 Dec 2015 09:44:31 +0000 (10:44 +0100)]
lavf/img2enc: add atomic_writing option
This behaviour change caused a regression on our side recently, we might
want to disable the option by default.
Clément Bœsch [Thu, 17 Dec 2015 11:23:35 +0000 (12:23 +0100)]
lavc: add text encoder
Clément Bœsch [Fri, 18 Dec 2015 14:44:33 +0000 (15:44 +0100)]
lavfi/scale: add nb_slices debug option
Paul B Mahol [Sun, 20 Dec 2015 20:31:55 +0000 (21:31 +0100)]
avcodec/indeo2: use init_get_bits8
Signed-off-by: Paul B Mahol <onemda@gmail.com>
James Almer [Sun, 6 Dec 2015 05:47:45 +0000 (02:47 -0300)]
x86/hevc_sao: add ff_hevc_sao_edge_filter_{8,16}_{10,12}
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Sun, 6 Dec 2015 05:46:51 +0000 (02:46 -0300)]
x86/hevc_sao: simplify sao_edge_filter 10/12bit
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Sun, 6 Dec 2015 05:42:34 +0000 (02:42 -0300)]
x86/hevc_sao: simplify sao_band_filter 10/12bit
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Paul B Mahol [Sun, 20 Dec 2015 18:52:51 +0000 (19:52 +0100)]
avfilter/avf_showfreqs: make it possible to split channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Sun, 20 Dec 2015 16:47:21 +0000 (17:47 +0100)]
avcodec/flacenc: use designated initializers for AVClass
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Sat, 19 Dec 2015 20:52:19 +0000 (21:52 +0100)]
avcodec/s302menc: check if buf_size can actually be put into 16bit size
This disallows creating unplayable audio.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Sat, 19 Dec 2015 20:34:27 +0000 (21:34 +0100)]
avcodec/s302menc: set supported channel layouts by codec
Signed-off-by: Paul B Mahol <onemda@gmail.com>