Commit Graph

77134 Commits

Author SHA1 Message Date
Michael Niedermayer 98626a1a4c avfilter/avf_showvolume: Fix "warning: comparison of unsigned expression < 0 is always false"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-29 15:47:42 +01:00
Hendrik Leppkes 81b73f1f97 Merge commit '59e3f4e598ae381600ef54e1f6e6a8a5270ac245'
* commit '59e3f4e598ae381600ef54e1f6e6a8a5270ac245':
  sgienc: Use a local RLE encoding function

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:45:47 +01:00
Hendrik Leppkes e9675ed13a Merge commit '62cc8f4d79dad119e8efeaae080a58a8dcb1e89d'
* commit '62cc8f4d79dad119e8efeaae080a58a8dcb1e89d':
  sgienc: Port to bytestream2

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:44:44 +01:00
Hendrik Leppkes ba32a22c86 Merge commit '99f40fd02f1870c2dee70977b672da9cb198f0be'
* commit '99f40fd02f1870c2dee70977b672da9cb198f0be':
  sgienc: Do not end RLE lines with 0s

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:42:33 +01:00
Hendrik Leppkes 6dce615ee2 Merge commit '4d05e9392f84702e3c833efa86e84c7f1cf5f612'
* commit '4d05e9392f84702e3c833efa86e84c7f1cf5f612':
  libvpxenc: remove some unused ctrl id mappings

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:35:11 +01:00
Hendrik Leppkes 7c4d405d40 Merge commit '6b7df14251c49331ae7efd4811ec21f4415ccdb5'
* commit '6b7df14251c49331ae7efd4811ec21f4415ccdb5':
  doc: Document better how to use MSYS2

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:33:52 +01:00
Hendrik Leppkes bf67ae3cfa Merge commit '8375dc1dd101d51baa430f34c0bcadfa37873896'
* commit '8375dc1dd101d51baa430f34c0bcadfa37873896':
  asfdec: handle the case when the stream index has an invalid value better

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:32:39 +01:00
Hendrik Leppkes b7855daffe Merge commit 'c12c085be7e86880924249e5cb3f898e45dee134'
* commit 'c12c085be7e86880924249e5cb3f898e45dee134':
  dcadec: Do not check for overreads in auxiliary data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:32:27 +01:00
Hendrik Leppkes 4aa900acbd Merge commit 'c8fa647811371885be421a84a2388529857fed23'
* commit 'c8fa647811371885be421a84a2388529857fed23':
  oggparsespeex: Fix unchecked malloc

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:29:41 +01:00
Hendrik Leppkes bbfdeec020 Merge commit 'afdff8008149515afebf9992eae84be7d76e6b1e'
* commit 'afdff8008149515afebf9992eae84be7d76e6b1e':
  configure: Clearly state that MSYS native builds are discouraged

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:28:53 +01:00
Hendrik Leppkes 93fb4a4629 Merge commit '462a54e2291e1fa18e1f1254d09739dfbb795617'
* commit '462a54e2291e1fa18e1f1254d09739dfbb795617':
  lavc: Deprecate avctx.rtp_callback field

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:26:51 +01:00
Hendrik Leppkes da7cfef7f0 Merge commit '8a9de5c52401aa1e87bdb147524831c640d1ec53'
* commit '8a9de5c52401aa1e87bdb147524831c640d1ec53':
  doc/encoders: document the QSV option mappings

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:24:29 +01:00
Hendrik Leppkes 5bc9c7a6db Merge commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8'
* commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8':
  qsvenc: expose additional encoding options

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:22:53 +01:00
Hendrik Leppkes 24563c20f1 Merge commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a'
* commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a':
  qsvenc: support more RC methods

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:18:08 +01:00
Paul B Mahol 7a9b4427b5 avfilter/avf_showvolume: fix several issues
Fix color fading: previously color could fade to red when
volume level for red color was actually never reached.
Display volume value on right side.
Use red color only if clipping is needed.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-29 13:02:40 +01:00
Hendrik Leppkes 2ea38a946d avformat/mlpdec: consider all valid mlp access units when probing
Fixes probing of truehd/mlp files with a lot of frames in between the
major sync frames. The spec allows a distance of up to 128 frames in
between major sync frames, which leads to the probing code not reaching
the desired score.
2015-11-29 10:41:51 +01:00
Michael Niedermayer aa427537b5 avcodec/h264_refs: Check that long references match before use
Fixes out of array read
Fixes: 59bb925e90201fa0f87f0a31945d43b5/asan_heap-oob_4a52e5_3388_66027f11e3d072f1e02401ecc6193361.jvt

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-29 03:27:28 +01:00
Michael Niedermayer abee0a1c60 avcodec/utils: Clear dimensions in ff_get_buffer() on failure
Fixes out of array access
Fixes: 482d8f2fd17c9f532b586458a33f267c/asan_heap-oob_4a52b6_7417_1d08d477736d66cdadd833d146bb8bae.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-28 20:10:51 +01:00
Michael Niedermayer 4f03bebc79 avcodec/utils: Use 64bit for aspect ratio calculation in avcodec_string()
Fixes integer overflow
Fixes: 3a45b2ae02f2cf12b7bd99543cdcdae5/asan_heap-oob_1dff502_8022_899f75e1e81046ebd7b6c2394a1419f4.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-28 20:10:51 +01:00
Paul B Mahol 13696c3789 doc/filters: extend agate documentation
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-28 18:19:18 +01:00
Paul B Mahol 1685a781cd avfilter: add audio compressor filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-28 17:56:40 +01:00
Paul B Mahol 3f895dcb0d avfilter: add compensation delay line filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-28 17:56:40 +01:00
Luca Barbato a0fa6d06b8 matroska: Warn when metadata references a non-existent element
Avoid some confusion when the information is not present.

Bug-Id: 902
2015-11-28 17:02:15 +01:00
Luca Barbato f7986239f4 dvenc: Validate the frame size before copying it 2015-11-28 17:02:15 +01:00
Michael Niedermayer dad354f38d avcodec/hevc: Check max ctb addresses for WPP
Fixes out of array read
Fixes: 2f95ddd996db8a6281d2e18c184595a7/asan_heap-oob_192fe91_3330_58e4441181e30a66c19f743dcb392347.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-28 15:48:55 +01:00
Ganesh Ajjanagadde 79abf2d0de avcodec/aac_tablegen: get rid of hardcoded tables entirely
Commit 96786a12f6 makes runtime
initialization cheap.

Tested with FATE, with/without --enable-hardcoded-tables.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-28 09:41:15 -05:00
Michael Niedermayer 861f2b2a53 avcodec/vp3: Fix several memleaks
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_4460_b209bd1e7cebe458b53072a44191316d.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-28 01:01:41 +01:00
Michael Niedermayer 6105b7219a avcodec/vp3: Clear context on reinitialization failure
Fixes null pointer dereference
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_2039_8d1797aeb823ea43858d0fa45c9eb899.ogv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-28 00:25:08 +01:00
Michael Niedermayer d85aa76115 avcodec/hevc: allocate entries unconditionally
Fixes out of array access
Fixes: 08664a2a7921ef48172f26495c7455be/asan_heap-oob_23036c6_3301_523388ef84285a0270caf67a43247b59.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 23:37:42 +01:00
Michael Niedermayer 36205501ba avcodec/pthread_slice: Allow calling ff_alloc_entries() multiple times to readjust the entry count
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 23:37:42 +01:00
Michael Niedermayer d5028f61e4 avcodec/hevc_cabac: Fix multiple integer overflows
Fixes: 04ec80eefa77aecd7a49a442cc02baea/asan_heap-oob_19544fa_3303_1905796cd9d8e15f86d664332caabc00.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 23:37:42 +01:00
Rostislav Pehlivanov 6b40755158 aacenc: fix broken build with hardcoded tables
ff_aac_tableinit is a macro in the case of hardcoded tables, so wrap
that up in a function (similar to how the decoder template does it) and
use that as the argument for ff_thread_once().

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-27 21:24:42 +00:00
Michael Niedermayer feb3f39614 avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 21:02:13 +01:00
Michael Niedermayer 75422280fb avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_decode*()
Fixes out of array access
Fixes: 01859c9a9ac6cd60a008274123275574/asan_heap-oob_1dff571_8250_50d3d1611e294c3519fd1fa82198b69b.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 20:59:26 +01:00
Ganesh Ajjanagadde 8453095f3e avcodec/aac_tablegen: make exp2_lut static
Suggested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-27 13:23:35 -05:00
Michael Niedermayer ef9f7bbfa4 avcodec/hevc: Check entry_point_offsets
Fixes out of array read
Fixes: 007c4a36608ebdf27ee260ad60a81184/asan_heap-oob_32076b4_2243_116b1cb29d91cc4974d6680e3d10bd91.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 18:53:21 +01:00
Rostislav Pehlivanov ec0719264c aac: temporarily un-share aac_table_init AVOnce variable
AAC-Fixed decoder segfaulted. This commit makes the aac encoder
and decoder init the table twice in case of transcoding again.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-27 17:51:42 +00:00
Rostislav Pehlivanov 591fbd629e aactab.h: fix comment
Previous commit broke it.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-27 15:36:57 +00:00
Rostislav Pehlivanov 222545cc7e aactab.h: update and correct comment
Tables in that file have been used by both for a long time now.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-27 15:00:13 +00:00
Rostislav Pehlivanov 3d62e7a30f aacenc: make threadsafe
Since the ff_aac_tableinit() can be called by both the encoder and
the decoder (in case of transcoding) this commit shares the AVOnce
variable to prevent this.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-27 14:52:35 +00:00
Michael Niedermayer 8000d484b8 avcodec/cabac: Check initial cabac decoder state
Fixes integer overflows
Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Found-by: xiedingbao (Ticket4727)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 13:52:47 +01:00
Michael Niedermayer a1f6b05f52 avcodec/cabac_functions: Fix "left shift of negative value -31767"
Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Found-by: xiedingbao (Ticket4727)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-27 13:52:47 +01:00
Ganesh Ajjanagadde 96786a12f6 avcodec/aac_tablegen: speed up table initialization
This speeds up aac_tablegen to a ludicruous degree (~97%), i.e to the point
where it can be argued that runtime initialization can always be done instead of
hard-coded tables. The only cost is essentially a trivial increase in
the stack size.

Even if one does not care about this, the patch also improves accuracy
as detailed below.

Performance:
Benchmark obtained by looping 10^4 times over ff_aac_tableinit.

Sample benchmark (x86-64, Haswell, GNU/Linux):
old:
1295292 decicycles in ff_aac_tableinit,     512 runs,      0 skips
1275981 decicycles in ff_aac_tableinit,    1024 runs,      0 skips
1272932 decicycles in ff_aac_tableinit,    2048 runs,      0 skips
1262164 decicycles in ff_aac_tableinit,    4096 runs,      0 skips
1256720 decicycles in ff_aac_tableinit,    8192 runs,      0 skips

new:
21112 decicycles in ff_aac_tableinit,     511 runs,      1 skips
21269 decicycles in ff_aac_tableinit,    1023 runs,      1 skips
21352 decicycles in ff_aac_tableinit,    2043 runs,      5 skips
21386 decicycles in ff_aac_tableinit,    4080 runs,     16 skips
21299 decicycles in ff_aac_tableinit,    8173 runs,     19 skips

Accuracy:
The previous code was resulting in needless loss of
accuracy due to the pow being called in succession. As an illustration
of this:
ff_aac_pow34sf_tab[3]
old : 0.000000000007598092294225
new : 0.000000000007598091426864
real: 0.000000000007598091778545

truncated to float
old : 0.000000000007598092294225
new : 0.000000000007598091426864
real: 0.000000000007598091426864

showing that the old value was not correctly rounded. This affects a
large number of elements of the array.

Patch tested with FATE.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-27 06:38:06 -05:00
Matthieu Bouron 72eaf72623 lavf/utils: avoid decoding a frame to get the codec parameters
Avoid decoding a frame to get the codec parameters while the codec
supports FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM. This is particulary useful
to avoid decoding twice images (once in avformat_find_stream_info and
once when the actual decode is made).
2015-11-26 21:50:55 +01:00
Rostislav Pehlivanov f5b7a29ae8 aac_ltp: actually signal LTP as off during EIGHT_SHORT windows
This hugely reduces the echo which was introduced with the previous
commit (though likely because previously everything was broken).
Makes LTP actually worthwhile now.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-11-26 18:20:42 +00:00
Rostislav Pehlivanov 1e5dbb3409 aac_ltp: split, reorder and improve prediction algorithm
This commit attempts to mirror what the decoder does more closely
in addition to fixing some shortcomings.
2015-11-26 17:40:04 +00:00
Ganesh Ajjanagadde a239ce7074 avcodec/faandct: remove L suffixes for floating point literal
Should fix issues with ppc, tested by bug reporter.

Reported-by: John Warburton <john@johnwarburton.net>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-26 11:19:03 -05:00
Matthieu Bouron 39290f2715 fate: add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM tests 2015-11-26 17:05:54 +01:00
Ganesh Ajjanagadde 74b79dcf51 avfilter/vsrc_mptestsrc: use hypot()
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-26 09:20:46 -05:00
Ganesh Ajjanagadde 352bd18dff 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>
2015-11-26 09:20:46 -05:00