Ganesh Ajjanagadde [Sun, 22 Nov 2015 16:50:22 +0000 (11:50 -0500)]
avfilter/vsrc_mptestsrc: use hypot()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 25 Nov 2015 04:34:48 +0000 (23:34 -0500)]
avfilter/af_dynaudnorm: remove wasteful pow
This removes wasteful pow(x, 2.0) that although not terribly important
for speed, is still useless.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 25 Nov 2015 03:56:28 +0000 (22:56 -0500)]
avfilter/af_afade: improve accuracy and speed of gain computation
Gain computation for various curves was being done in a needlessly
inaccurate fashion. Of course these are all subjective curves, but when
a curve is advertised to the user, it should be matched as closely as
possible within the limitations of libm. In particular, the constants
kept here were pretty inaccurate for double precision.
Speed improvements are mainly due to the avoidance of pow, the most
notorious of the libm functions in terms of performance. To be fair, it
is the GNU libm that is among the worst, but it is not really GNU libm's fault
since others simply yield a higher error as measured in ULP.
"Magic" constants are also accordingly documented, since they take at
least a minute of thought for a casual reader.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Tue, 24 Nov 2015 00:05:54 +0000 (19:05 -0500)]
avutil/lls: speed up performance of solve_lls
This is a trivial rewrite of the loops that results in better
prefetching and associated cache efficiency. Essentially, the problem is
that modern prefetching logic is based on finite state Markov memory, a reasonable
assumption that is used elsewhere in CPU's in for instance branch
predictors.
Surrounding loops all iterate forward through the array, making the
predictor think of prefetching in the forward direction, but the
intermediate loop is unnecessarily in the backward direction.
Speedup is nontrivial. Benchmarks obtained by 10^6 iterations within
solve_lls, with START/STOP_TIMER. File is tests/data/fate/flac-16-lpc-cholesky.err.
Hardware: x86-64, Haswell, GNU/Linux.
new:
17291 decicycles in solve_lls,
2096706 runs, 446 skips
17255 decicycles in solve_lls,
4193657 runs, 647 skips
17231 decicycles in solve_lls,
8384997 runs, 3611 skips
17189 decicycles in solve_lls,
16771010 runs, 6206 skips
17132 decicycles in solve_lls,
33544757 runs, 9675 skips
17092 decicycles in solve_lls,
67092404 runs, 16460 skips
17058 decicycles in solve_lls,
134188213 runs, 29515 skips
old:
18009 decicycles in solve_lls,
2096665 runs, 487 skips
17805 decicycles in solve_lls,
4193320 runs, 984 skips
17779 decicycles in solve_lls,
8386855 runs, 1753 skips
18289 decicycles in solve_lls,
16774280 runs, 2936 skips
18158 decicycles in solve_lls,
33548104 runs, 6328 skips
18420 decicycles in solve_lls,
67091793 runs, 17071 skips
18310 decicycles in solve_lls,
134187219 runs, 30509 skips
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Paul B Mahol [Thu, 26 Nov 2015 08:56:43 +0000 (09:56 +0100)]
avfilter/vf_stack: make it possible to stop with shortest stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Timothy Gu [Thu, 26 Nov 2015 06:46:09 +0000 (03:46 -0300)]
aaccoder_twoloop: Mark sfdiff as av_unused
Silences warning when building without assertions
Signed-off-by: Claudio Freire <klaussfreire@gmail.com>
Claudio Freire [Thu, 26 Nov 2015 06:37:29 +0000 (03:37 -0300)]
AAC encoder: fix wrong gain sacalefactor being set
In some conditions, where the first band was being zeroed
mainly, the wrong global gain scalefactor would be written
to the stream since it's always taken from the first band
regardless of whether it's been marked as zero or not.
So, always make sure it contians something useful.
Claudio Freire [Thu, 26 Nov 2015 06:27:06 +0000 (03:27 -0300)]
AAC encoder: Fix application of M/S with PNS
When both M/S coding and PNS are enabled, scalefactors
and coding books would be mistakenly clobbered when setting
the M/S flag on PNS'd bands. The flag needs to be set to
signal the generation of correlated noise, but the scalefactors,
coefficients and the coding books need to be kept intact.
Timothy Gu [Thu, 26 Nov 2015 05:03:14 +0000 (21:03 -0800)]
fate-run: Fix indentation
Rodger Combs [Sun, 18 Oct 2015 22:50:21 +0000 (17:50 -0500)]
lavf/http: fix incorrect warning in range requests
Michael Niedermayer [Wed, 18 Nov 2015 23:58:35 +0000 (00:58 +0100)]
avcodec/pthread_slice: Remove rets_count
It appears rets_count is redundant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Wed, 25 Nov 2015 22:22:19 +0000 (19:22 -0300)]
avcodec/mjpegdec: fix typo on a warning
Paul B Mahol [Wed, 25 Nov 2015 21:22:17 +0000 (22:22 +0100)]
avfilter: add '.' at and of long filter description where it is missing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Wed, 25 Nov 2015 20:59:33 +0000 (21:59 +0100)]
avfilter: do not leak frame if ff_get_audio_buffer() fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Wed, 25 Nov 2015 20:52:36 +0000 (21:52 +0100)]
avfilter/af_alimiter: make description a bit longer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Stefano Sabatini [Wed, 25 Nov 2015 16:53:58 +0000 (17:53 +0100)]
doc/indevs: fix x11grab options consistency
Paul B Mahol [Wed, 25 Nov 2015 11:44:07 +0000 (12:44 +0100)]
avfilter/af_sidechaincompress: add forgotten option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Ganesh Ajjanagadde [Wed, 25 Nov 2015 02:29:35 +0000 (21:29 -0500)]
avutil/libm: fix isnan compatibility hack
Commit
14ea4151d7c3c26500193f11ac661ed20c7c2b9c had a bug in that the
conversion of the uint64_t result to an int (the return signature) would
lead to implementation defined behavior, and in this case simply
returned 0 for NAN. A fix via AND'ing the result with 1 does the trick,
simply by ensuring a 0 or 1 return value.
Patch tested with FATE on x86-64, GNU/Linux by forcing the compatibility
code via an ifdef hack suggested by Michael.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Timothy Gu [Wed, 25 Nov 2015 02:17:49 +0000 (18:17 -0800)]
doc/indevs: Fix German
Timothy Gu [Wed, 25 Nov 2015 02:17:38 +0000 (18:17 -0800)]
configure: Fix pseudo-German
Ganesh Ajjanagadde [Tue, 24 Nov 2015 18:00:54 +0000 (13:00 -0500)]
avfilter/vsrc_mandelbrot: change sin to sinf for color computation
lrintf is anyway used, suggesting we only care up to floating precision.
Rurthermore, there is a compat hack in avutil/libm for this function,
and it is used in avcodec/aacps_tablegen.h.
This yields a non-negligible speedup. Sample benchmark:
x86-64, Haswell, GNU/Linux:
old (draw_mandelbrot):
274635709 decicycles in draw_mandelbrot, 256 runs, 0 skips
300287046 decicycles in draw_mandelbrot, 512 runs, 0 skips
371819935 decicycles in draw_mandelbrot, 1024 runs, 0 skips
336663765 decicycles in draw_mandelbrot, 2048 runs, 0 skips
581851016 decicycles in draw_mandelbrot, 4096 runs, 0 skips
new (draw_mandelbrot):
269882717 decicycles in draw_mandelbrot, 256 runs, 0 skips
296359285 decicycles in draw_mandelbrot, 512 runs, 0 skips
370076599 decicycles in draw_mandelbrot, 1024 runs, 0 skips
331478354 decicycles in draw_mandelbrot, 2048 runs, 0 skips
571904318 decicycles in draw_mandelbrot, 4096 runs, 0 skips
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sun, 22 Nov 2015 16:49:15 +0000 (11:49 -0500)]
avfilter/vsrc_mandelbrot: avoid sqrt for epsilon calculation
This rewrites into a similar expression avoiding sqrt. Similarity is
assured since sqrt(x^2 + y^2)/(x+y) lies in [1/sqrt(2), 1] for x, y > 0.
Tested on x86-64, Haswell, GNU/Linux.
Command:
ffmpeg -f lavfi -i mandelbrot -f null -
old (draw_mandelbrot):
277625266 decicycles in draw_mandelbrot, 256 runs, 0 skips
304527322 decicycles in draw_mandelbrot, 512 runs, 0 skips
377593582 decicycles in draw_mandelbrot, 1024 runs, 0 skips
338539499 decicycles in draw_mandelbrot, 2048 runs, 0 skips
583630357 decicycles in draw_mandelbrot, 4096 runs, 0 skips
new (draw_mandelbrot):
274635709 decicycles in draw_mandelbrot, 256 runs, 0 skips
300287046 decicycles in draw_mandelbrot, 512 runs, 0 skips
371819935 decicycles in draw_mandelbrot, 1024 runs, 0 skips
336663765 decicycles in draw_mandelbrot, 2048 runs, 0 skips
581851016 decicycles in draw_mandelbrot, 4096 runs, 0 skips
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sun, 22 Nov 2015 16:30:52 +0000 (11:30 -0500)]
avcodec/aacps_tablegen: use hypot()
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:59:20 +0000 (16:59 -0500)]
avcodec/aacps_tablegen_template: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:51:30 +0000 (16:51 -0500)]
avcodec/aac_defines: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Timothy Gu [Wed, 25 Nov 2015 01:33:07 +0000 (17:33 -0800)]
vsrc_mandelbrot: Don't use German in comments
Marton Balint [Sat, 24 Oct 2015 19:06:38 +0000 (21:06 +0200)]
lavfi/select: add support for concatdec_select option
This option can be used to select useful frames from an ffconcat file which is
using inpoints and outpoints but where the source files are not intra frame
only.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Sat, 24 Oct 2015 15:16:11 +0000 (17:16 +0200)]
concatdec: add option for adding segment start time and duration metadata
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Mon, 9 Nov 2015 22:49:25 +0000 (23:49 +0100)]
concatdec: simplify duration calculation in open_next_file
If duration is still AV_NOPTS_VALUE when opening the next file, we can assume
that outpoint is not set.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Sat, 24 Oct 2015 14:20:41 +0000 (16:20 +0200)]
concatdec: calculate duration early if outpoint is known
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
Michael Niedermayer [Tue, 24 Nov 2015 21:12:37 +0000 (22:12 +0100)]
avcodec/h264_slice: Limit max_contexts when slice_context_count is initialized
Fixes out of array access
Fixes:
1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2049_f2192b6829ab6e0eefcb035329c03c60.264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Derek Buitenhuis [Tue, 24 Nov 2015 13:48:28 +0000 (13:48 +0000)]
Merge commit '
fb8753ada23189076bdf903c1c001c0ca8287fae'
* commit '
fb8753ada23189076bdf903c1c001c0ca8287fae':
qsvenc: factor out common options
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Timothy Gu [Sat, 21 Nov 2015 04:49:23 +0000 (20:49 -0800)]
avformat/v210: Check width and height
Fixes a floating point exception when width and height are not supplied
(and therefore are zero).
Timothy Gu [Sat, 21 Nov 2015 05:15:08 +0000 (21:15 -0800)]
avformat/rawvideodec: Rework packet size calculation
Calculate packet size only once, and propagate errors earlier in the chain.
Also remove use of the deprecated av_image_get_buffer_size().
Timothy Gu [Sat, 21 Nov 2015 04:48:06 +0000 (20:48 -0800)]
imgutils: Use designated initializers for AVClass
More readable and less breakable.
Michael Niedermayer [Tue, 24 Nov 2015 01:59:59 +0000 (02:59 +0100)]
avfilter/vsrc_mandelbrot: Fix speed regression
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Carl Eugen Hoyos [Tue, 24 Nov 2015 01:17:54 +0000 (02:17 +0100)]
lavf/rawenc: Recognize more extensions to encode raw hevc.
Requested-by: Mike Brown, brown at mrvideo vidiot com
Michael Niedermayer [Sun, 22 Nov 2015 19:09:11 +0000 (20:09 +0100)]
avcodec/mpegvideo_enc: Remove slice structured mode from H.263 as well as the code automatically enabing it
There is no such thing as a slice structured mode in the original version 1 H.263,
that mode was added in H.263+ in 1998. Also the headers for slice structured mode
are not part of the older version 1 and this would result in unplayable files
An alternative to this patch would be to merge the H263 and H263P AVCodecs and use
other means to distinguish the older and newer versions.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 23 Nov 2015 13:25:41 +0000 (14:25 +0100)]
avformat/movenc-test: Fix integer overflows
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Matthieu Bouron [Thu, 5 Nov 2015 13:49:57 +0000 (14:49 +0100)]
swscale/arm: add ff_nv{12,21}_to_{argb,rgba,abgr,bgra}_neon
Signed-off-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
Signed-off-by: Clément Bœsch <clement@stupeflix.com>
Matt Oliver [Mon, 23 Nov 2015 12:03:32 +0000 (23:03 +1100)]
avutil/x86/bswap: Remove warning about bswap intrinsics with msvc.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
Clément Bœsch [Thu, 12 Nov 2015 14:03:07 +0000 (15:03 +0100)]
avutil/motion_vector: export subpel motion information
FATE test changes because of the switch from shift to division.
Paul B Mahol [Mon, 23 Nov 2015 09:42:23 +0000 (10:42 +0100)]
doc/filters: mention afifo
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Mon, 23 Nov 2015 09:37:51 +0000 (10:37 +0100)]
avfilter/af_afade: add missing fifo write for second stream
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Hagen Schmidt [Sat, 21 Nov 2015 23:54:56 +0000 (00:54 +0100)]
patcheck: Fix false detection of 'mergeable calls' when line is removed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ganesh Ajjanagadde [Sun, 22 Nov 2015 22:01:12 +0000 (17:01 -0500)]
Revert "avcodec/dct32_template: fix typo"
This reverts commit
82c5f3178930285f84c42ab4b026ee48d53305ec.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sun, 22 Nov 2015 21:55:45 +0000 (16:55 -0500)]
avcodec/dct32_template: fix typo
Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sat, 21 Nov 2015 14:04:58 +0000 (09:04 -0500)]
avcodec/ppc/fdctdsp: use M_SQRT2 instead of ad-hoc SQRT2
This actually fixes an incorrect float literal. It is believed by
examining the precision that the literals were all pre-computed as
floats, resulting in this needless loss of precision. There is no
benefit to keeping such reduced precision:
1. These constants are used for static array computation, hence
compile-time.
2. They will be treated as doubles anyway, since f specifier was not
present.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avcodec/dct32_template: use M_SQRT1_2 instead of actual literal
Fixed point value remains unchanged.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avcodec/cos_tablegen: use M_PI instead of actual literal
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avcodec/ac3: use M_SQRT1_2, M_SQRT2
This uses M_SQRT1_2, M_SQRT2 instead of the actual literals. This yields
greater precision in some places in avcodec/ac3, while fixed point
values remain unchanged.
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avfilter/vf_fspp: use M_SQRT1_2, M_SQRT2
This uses M_SQRT1_2, M_SQRT2 instead of the actual literals. Fixed point
values remain unchanged.
Patch tested with FATE on x86.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sun, 22 Nov 2015 16:15:39 +0000 (11:15 -0500)]
avformat/mov: use hypot()
This simplifies the code.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Michael Niedermayer [Sun, 22 Nov 2015 18:15:19 +0000 (19:15 +0100)]
avcodec/dvdsubdec: Fix types for offset1/2 in ff_dlog()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Derek Buitenhuis [Sun, 22 Nov 2015 17:47:21 +0000 (17:47 +0000)]
Merge commit '
3edac01f79a08635d8d2c08e9410651d9a330d61'
* commit '
3edac01f79a08635d8d2c08e9410651d9a330d61':
qsvenc: fix setting maxrate for VBR
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:46:57 +0000 (17:46 +0000)]
Merge commit '
4d8f536b535487063a08609636e712ad86d2ad54'
* commit '
4d8f536b535487063a08609636e712ad86d2ad54':
qsvenc: print the actual video parameters used by MSDK
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:46:26 +0000 (17:46 +0000)]
Merge commit '
f6c94457b44f41d900cd0991857f54e1f0ccedd6'
* commit '
f6c94457b44f41d900cd0991857f54e1f0ccedd6':
mpegvideo_enc: enable rtp_mode when multiple slices are used
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:43:26 +0000 (17:43 +0000)]
Merge commit '
d80f0a4ad634b3949b91b85f21fd608c0cddeef7'
* commit '
d80f0a4ad634b3949b91b85f21fd608c0cddeef7':
mpevideo_enc: disallow multiple slices for h261 and flv
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:41:51 +0000 (17:41 +0000)]
Merge commit '
ca489564ae150bc41764f175b88151d883e69ae0'
* commit '
ca489564ae150bc41764f175b88151d883e69ae0':
movenc: add fallback audio track tref support
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:41:27 +0000 (17:41 +0000)]
Merge commit '
79ae1e630b476889c251fc905687a3831b43ab5e'
* commit '
79ae1e630b476889c251fc905687a3831b43ab5e':
avcodec: Define side data type for fallback track
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:19:10 +0000 (17:19 +0000)]
Merge commit '
7f4ec4364bc4a73036660c1c6a3c4801db524e9e'
* commit '
7f4ec4364bc4a73036660c1c6a3c4801db524e9e':
avformat: expose av_stream_new_side_data helper
Conflicts:
libavformat/internal.h
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:16:13 +0000 (17:16 +0000)]
Merge commit '
21ab6fd01b9107d7171fc1a77c2bfacff845a97a'
* commit '
21ab6fd01b9107d7171fc1a77c2bfacff845a97a':
lavf: document that passing valid timestamps to muxers is now mandatory
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:15:21 +0000 (17:15 +0000)]
Merge commit '
5c30ae1a09b66179e16694f6137658023ed1fef3'
* commit '
5c30ae1a09b66179e16694f6137658023ed1fef3':
dvdsubdec: Validate the RLE offsets
Conflicts:
libavcodec/dvdsubdec.c
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:12:24 +0000 (17:12 +0000)]
Merge commit '
eda183287489b2c705843aa373a19c4e46fb2fec'
* commit '
eda183287489b2c705843aa373a19c4e46fb2fec':
travis: Enable OSX integration
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 17:10:42 +0000 (17:10 +0000)]
Merge commit '
79d89cf2f4b62eeb653fd8139041c87e75f7ca65'
* commit '
79d89cf2f4b62eeb653fd8139041c87e75f7ca65':
flacenc: Clamp user-supplied min/max prediction orders
Conflicts:
libavcodec/flacenc.c
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 16:55:56 +0000 (16:55 +0000)]
Merge commit '
4bb1070c154e49d35805fbcdac9c9e92f702ef96'
* commit '
4bb1070c154e49d35805fbcdac9c9e92f702ef96':
ffv1: Explicitly name the coder type
Conflicts:
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 14:38:57 +0000 (14:38 +0000)]
Merge commit '
9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c'
These are all no-ops.
* commit '
9fd2bf09dbc630484d9e88a1d27f7e8508b70a2c':
hqx: correct type and size check of info_offset
dds: disable palette flag for compressed images
segafilm: Fix current_sample after seeking and avio_seek return type
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 14:38:11 +0000 (14:38 +0000)]
Merge commit '
62b4a6f1b9aa83d56701af226adda98faa5ede09'
* commit '
62b4a6f1b9aa83d56701af226adda98faa5ede09':
rtmpcrypt: Provide the xtea keys in little endian format for consistency
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Derek Buitenhuis [Sun, 22 Nov 2015 14:29:09 +0000 (14:29 +0000)]
Merge commit '
588b6215b4c74945994eb9636b0699028c069ed2'
* commit '
588b6215b4c74945994eb9636b0699028c069ed2':
rtmpcrypt: Do the xtea decryption in little endian mode
xtea: Add functions for little endian mode
Conflicts:
libavutil/xtea.c
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Carl Eugen Hoyos [Sun, 22 Nov 2015 00:49:18 +0000 (01:49 +0100)]
lavc/opusdec: Fix a memleak when reading invalid files.
Reviewed-by: James Almer
Carl Eugen Hoyos [Sun, 22 Nov 2015 00:44:18 +0000 (01:44 +0100)]
lavc/rscc: Fix colourspace for codec_tag RSCC.
Paul B Mahol [Sat, 21 Nov 2015 20:58:24 +0000 (21:58 +0100)]
avformat/vpk: check samples_per_block size
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol [Mon, 19 Oct 2015 12:42:56 +0000 (14:42 +0200)]
avformat: add FSB demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Ganesh Ajjanagadde [Sat, 14 Nov 2015 17:04:53 +0000 (12:04 -0500)]
avutil/eval: change sqrt to hypot
This improves the mathematical behavior of hypotenuse computation.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sat, 14 Nov 2015 16:57:28 +0000 (11:57 -0500)]
configure+libm.h: add hypot emulation
It is known that the naive sqrt(x*x + y*y) approach for computing the
hypotenuse suffers from overflow and accuracy issues, see e.g
http://www.johndcook.com/blog/2010/06/02/whats-so-hard-about-finding-a-hypotenuse/.
This adds hypot support to FFmpeg, a C99 function.
On platforms without hypot, this patch does a reaonable workaround, that
although not as accurate as GNU libm, is readable and does not suffer
from the overflow issue. Improvements can be made separately.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Sun, 15 Nov 2015 00:52:57 +0000 (19:52 -0500)]
avutil/libm: correct isnan, isinf compat hacks
isnan and isinf are actually macros as per the standard. In particular,
the existing implementation has incorrect signature. Furthermore, this
results in undefined behavior for e.g double values outside float range
as per the standard.
This patch corrects the undefined behavior for all usage within FFmpeg.
Note that long double is not handled as it is not used in FFmpeg.
Furthermore, even if at some point long double gets used, it is likely
not needed to modify the macro in practice for usage in FFmpeg. See
below for analysis.
Getting long double to work strictly per the spec is significantly harder
since a long double may be an IEEE 128 bit quad (very rare), 80 bit
extended precision value (on GCC/Clang), or simply double (on recent Microsoft).
On the other hand, any potential future usage of long double is likely
for precision (when a platform offers extra precision) and not for range, since
the range anyway varies and is not as portable as IEEE 754 single/double
precision. In such cases, the implicit cast to a double is well defined
and isinf and isnan should work as intended.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:01:18 +0000 (17:01 -0500)]
avcodec/amr: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Daniil Cherednik [Fri, 13 Nov 2015 22:57:25 +0000 (01:57 +0300)]
avcodec/atrac1: fix decoder: QMF delay compensation should be 39 samples
This also adds a new fate test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Timothy Gu [Sat, 21 Nov 2015 05:29:34 +0000 (21:29 -0800)]
avformat/utils: Fix indentation
Andreas Cadhalpun [Fri, 20 Nov 2015 19:15:21 +0000 (20:15 +0100)]
aacsbr: don't call sbr_dequant twice without intermediate read_sbr_data
Doing that doesn't make sense, because the only purpose of sbr_dequant
is to process the data from read_sbr_data.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Paul B Mahol [Fri, 20 Nov 2015 19:51:22 +0000 (20:51 +0100)]
avformat/rsd: implement seeking
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Michael Niedermayer [Fri, 20 Nov 2015 02:10:11 +0000 (03:10 +0100)]
avformat/ffmdec: Only return EAGAIN if a server is attached
This should fix a infinite loop
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Fri, 20 Nov 2015 02:09:28 +0000 (03:09 +0100)]
ffserver: Use AVOption API to access ffm demuxer instead of direct access depending on ABI
server_attached is newly added so the demuxer knows if there is an attached server
that can update the write index. This is needed to fix a infinite loop
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Fri, 20 Nov 2015 02:08:34 +0000 (03:08 +0100)]
avformat/ffmdec: Add cleaner API for ffserver to interface without depending on internal ABI
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Rodger Combs [Mon, 2 Nov 2015 02:04:25 +0000 (20:04 -0600)]
ffmpeg: fix -copy_prior_start 0 with -copyts and input -ss
Also rearranged the relevant check to reduce code duplication
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Maksym Veremeyenko [Wed, 18 Nov 2015 21:44:08 +0000 (23:44 +0200)]
avformat/flvenc: Add aac_seq_header_detect and flvflags
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Maksym Veremeyenko [Wed, 18 Nov 2015 21:44:08 +0000 (23:44 +0200)]
ffmpeg: preserve profile for audio stream copy
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Clément Bœsch [Fri, 20 Nov 2015 13:38:22 +0000 (14:38 +0100)]
avformat/assdec: allow ASS files starting with empty lines
See https://github.com/mpv-player/mpv/issues/2506
Ganesh Ajjanagadde [Wed, 11 Nov 2015 03:26:25 +0000 (22:26 -0500)]
avfilter/af_dynaudnorm: use M_PI
The ad-hoc pi constant has a ludicrous number of digits that offer no
value whatsoever. M_PI is more consistent and readable across the
codebase.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:07:58 +0000 (17:07 -0500)]
tests/tiny_ssim: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:10:43 +0000 (17:10 -0500)]
avcodec/faanidct: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 22:14:22 +0000 (17:14 -0500)]
avcodec/resample2: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:42:40 +0000 (16:42 -0500)]
avcodec/lpc: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Ganesh Ajjanagadde [Mon, 16 Nov 2015 21:54:48 +0000 (16:54 -0500)]
avcodec/ac3: replace #define by typedef
See e.g https://stackoverflow.com/questions/
1666353/are-typedef-and-define-the-same-in-c
for rationale.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
wm4 [Fri, 20 Nov 2015 10:30:18 +0000 (11:30 +0100)]
avcodec/h264, videotoolbox: do not return invalid frames on failure
If videotoolbox_common_end_frame failed, then the AVFrame was returned
to the API user with the dummy buffer (in AVFrame.buf[0]) still set, and
the decode call indicating success.
These "half-set" AVFrames with dummy buffer are a videotoolbox specific
hack, because the decoder requires an allocated AVFrame for its internal
logic. Videotoolbox on the other hand allocates its frame itself
internally, and outputs it only on end_frame. At this point, the dummy
buffer is replaced with the real frame (unless decoding fails).
Anton Khirnov [Sat, 7 Nov 2015 19:50:41 +0000 (20:50 +0100)]
qsvenc: factor out common options
Anton Khirnov [Fri, 6 Nov 2015 12:29:34 +0000 (13:29 +0100)]
qsvenc: fix setting maxrate for VBR
Anton Khirnov [Fri, 6 Nov 2015 12:18:56 +0000 (13:18 +0100)]
qsvenc: print the actual video parameters used by MSDK
Anton Khirnov [Wed, 18 Nov 2015 09:37:16 +0000 (10:37 +0100)]
mpegvideo_enc: enable rtp_mode when multiple slices are used
Currently, multiple slices with just one thread produce corrupted
output.
Additionally, enable slice structured mode for h263(+)
Bug-Id: 912
CC: libav-stabl@libav.org
Anton Khirnov [Wed, 18 Nov 2015 09:32:34 +0000 (10:32 +0100)]
mpevideo_enc: disallow multiple slices for h261 and flv
They do not work and produce corrupted output.
CC: libav-stable@libav.org