1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

77826 Commits

Author SHA1 Message Date
Nicolas George
1655788712 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.
2015-12-22 16:04:30 +01:00
Nicolas George
108b4de552 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.
2015-12-22 16:04:30 +01:00
Nicolas George
39a09e995d 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.
2015-12-22 16:04:22 +01:00
Nicolas George
b8b7d5ac6c lavfi: add link.current_pts field. 2015-12-22 15:55:00 +01:00
Nicolas George
d03eab34dd 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.
2015-12-22 15:55:00 +01:00
Nicolas George
63f7bee752 lavfi/vf_mpdecimate: remove request_frame().
It is no longer needed since looping is not necessary.
2015-12-22 15:55:00 +01:00
Michael Niedermayer
05af8608c2 avcodec/ass: check for av_mallocz() failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-22 14:41:27 +01:00
erankor
18cd7891cb MAINTAINERS: add Eran Kornblau for aes_ctr and movenccenc
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-22 13:57:55 +01:00
Timo Rothenpieler
d7c2b75681 vaapi: Add VP9 hwaccell support
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-12-22 12:54:23 +01:00
Carl Eugen Hoyos
b18230ee8c lavf/rmdec: Use correct format specifier for int64_t.
Fixes ticket #5100.
2015-12-22 09:29:08 +01:00
Claudio Freire
4720a562c8 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
2015-12-22 05:26:12 -03:00
Janne Grunau
489e6add44 checkasm: add fmtconvert tests 2015-12-21 18:58:46 +01:00
Rostislav Pehlivanov
c0f67e1123 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>
2015-12-21 17:23:38 +00:00
Ganesh Ajjanagadde
dd68cde28a 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>
2015-12-21 09:03:11 -08:00
Janne Grunau
568a4323fb checkasm: add synth_filter test 2015-12-21 17:40:18 +01:00
Janne Grunau
e71b747e9d checkasm: add tests for dcadsp 2015-12-21 17:40:18 +01:00
Janne Grunau
9d218d573f checkasm: add float comparison util functions 2015-12-21 17:40:18 +01:00
Janne Grunau
711781d7a1 x86: checkasm: check for or handle missing cleanup after MMX instructions
Not every asm routine is expected clear the MMX state after returning.
It is however a requisite for testing floating point code in checkasm.
Annotate functions requiring cleanup with declare_func_emms() and issue
emms after the call. The remaining functions are checked for having  a
cleared MMX state after return.
2015-12-21 17:40:18 +01:00
Ganesh Ajjanagadde
fc5e39544b lavf/avformat: add av_warn_unused_result to avformat_write_header
May be useful as a defense, see e.g c62d1780ff.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-21 08:39:57 -08:00
Ganesh Ajjanagadde
879b4a9d3e 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>
2015-12-21 08:25:30 -08:00
Ganesh Ajjanagadde
ea2f04bffe 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>
2015-12-21 08:23:21 -08:00
Ganesh Ajjanagadde
ad795f6394 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>
2015-12-21 08:22:23 -08:00
Ganesh Ajjanagadde
2a486869d9 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>
2015-12-21 08:21:20 -08:00
Ganesh Ajjanagadde
b9c2ebeee4 lavc/libvpxenc: replace round by lrint
Mostly cosmetic here.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-21 08:20:26 -08:00
Ganesh Ajjanagadde
ff1442a51d 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>
2015-12-21 08:18:12 -08:00
Ganesh Ajjanagadde
7af14b3726 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>
2015-12-21 08:17:13 -08:00
Ganesh Ajjanagadde
cc37b31ad3 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>
2015-12-21 08:15:31 -08:00
Clément Bœsch
d3dbae1c71 lavfi/drawtext: fix shadow[xy] descriptions 2015-12-21 16:42:14 +01:00
Clément Bœsch
1d6308dbc6 lavfi/drawtext: hide first font load warning when fontconfig is present 2015-12-21 16:07:22 +01:00
Clément Bœsch
4cb26c3c35 lavfi/drawtext: fix crash when no text, file or timecode provided 2015-12-21 15:54:20 +01:00
Janne Grunau
cc29d96d5a arm64: fix inverted register order in transpose_4x4H
Fix related register order issue in ff_h264_idct_add_neon.

Found-by: zjh8890 <243186085@qq.com>
2015-12-21 13:44:20 +01:00
Paul B Mahol
a142308dcd avfilter/af_ladspa: fix av_assert0()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-21 13:27:56 +01:00
Clément Bœsch
b4431c80ef 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.
2015-12-21 11:19:51 +01:00
Clément Bœsch
f122ba36cb lavc: add text encoder 2015-12-21 11:14:02 +01:00
Clément Bœsch
244766e407 lavfi/scale: add nb_slices debug option 2015-12-21 10:30:52 +01:00
Paul B Mahol
484cc66f57 avcodec/indeo2: use init_get_bits8
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-20 21:31:55 +01:00
James Almer
d4c47333e1 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>
2015-12-20 17:01:15 -03:00
James Almer
3ff2beff65 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>
2015-12-20 16:45:37 -03:00
James Almer
34b2bd03cf 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>
2015-12-20 16:42:36 -03:00
Paul B Mahol
9e569abe99 avfilter/avf_showfreqs: make it possible to split channels
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-20 19:52:51 +01:00
Paul B Mahol
367ffa0c15 avcodec/flacenc: use designated initializers for AVClass
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-20 17:47:21 +01:00
Paul B Mahol
db6e337b41 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>
2015-12-20 16:05:37 +01:00
Paul B Mahol
577f057355 avcodec/s302menc: set supported channel layouts by codec
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-20 16:05:37 +01:00
Andreas Cadhalpun
f6830cf5ba nuv: sanitize negative fps rate
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-20 12:22:45 +01:00
Andreas Cadhalpun
699e68371e rawdec: only exempt BIT0 with need_copy from buffer sanity check
Otherwise the too small buffer is directly used in the frame, causing
segmentation faults, when trying to use the frame.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-20 12:15:56 +01:00
Andreas Cadhalpun
9fcfe4a3cd mlvdec: check that index_entries exist
This fixes NULL pointer dereferencing.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-20 11:57:54 +01:00
Michael Niedermayer
70f13abb4f avcodec/mpeg4videodec: also for empty partitioned slices
Fixes assertion failure
Fixes: id_acf3e47f864e1ee4c7b86c0653e0ff31e5bde56e.m4v

Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-19 23:54:10 +01:00
Ganesh Ajjanagadde
062e3e2382 lavu/libm: add copysign hack
For systems with broken libms.
Tested with NAN, -NAN, INFINITY, -INFINITY, +/-x for regular double x and
combinations of these.

Old versions of MSVC need some UINT64_C hackery.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-19 14:05:49 -08:00
James Almer
0f520e489a avcodec/Makefile: add missing dep for g723_1 encoder
Signed-off-by: James Almer <jamrial@gmail.com>
2015-12-19 18:50:47 -03:00
Paul B Mahol
7caf381a95 avfilter/af_dynaudnorm: use av_malloc_array()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-12-19 22:46:10 +01:00