ffmpeg.git
2 years agoMerge commit '562ef82d6a7f96f6b9da1219a5aaf7d9d7056f1b'
Clément Bœsch [Fri, 19 May 2017 10:01:04 +0000 (12:01 +0200)]
Merge commit '562ef82d6a7f96f6b9da1219a5aaf7d9d7056f1b'

* commit '562ef82d6a7f96f6b9da1219a5aaf7d9d7056f1b':
  fifo: Return the correct AVERROR value

This commit is a noop, see 2e81bb5e92351cc88d88a1c55d21b13532131524

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '9bf262f4c6e14f43f291cdb745ed372884ee2a7f'
Clément Bœsch [Fri, 19 May 2017 09:59:35 +0000 (11:59 +0200)]
Merge commit '9bf262f4c6e14f43f291cdb745ed372884ee2a7f'

* commit '9bf262f4c6e14f43f291cdb745ed372884ee2a7f':
  configure: Use proper compiler-specific speed flags for hostcc

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'bf38959a30ecba4e4ee95d4f2a80ba7ece4f34be'
Clément Bœsch [Fri, 19 May 2017 09:54:30 +0000 (11:54 +0200)]
Merge commit 'bf38959a30ecba4e4ee95d4f2a80ba7ece4f34be'

* commit 'bf38959a30ecba4e4ee95d4f2a80ba7ece4f34be':
  configure: Move optflags checks to a more sensible place

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '381a4e31a6b801a046e38b0e2b08fb61499157a7'
Clément Bœsch [Fri, 19 May 2017 09:52:13 +0000 (11:52 +0200)]
Merge commit '381a4e31a6b801a046e38b0e2b08fb61499157a7'

* commit '381a4e31a6b801a046e38b0e2b08fb61499157a7':
  tak: Convert to the new bitstream reader
  magicyuv: Convert to the new bitstream reader
  truemotion2rt: Convert to the new bitstream reader
  wavpack: Convert to the new bitstream reader
  mpc: Convert to the new bitstream reader

This merge is a noop, see
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'b83aea73404f6f9314e72fe5d6238deaffa12b2c'
Clément Bœsch [Fri, 19 May 2017 09:47:36 +0000 (11:47 +0200)]
Merge commit 'b83aea73404f6f9314e72fe5d6238deaffa12b2c'

* commit 'b83aea73404f6f9314e72fe5d6238deaffa12b2c':
  des-test: Pass the proper types to av_des_*() functions

See 183c3fa48acaf4561d5269ab9a766d13ae70140c

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '5c0e2b13eb79b455b15355d64f7993b0f66ea9ec'
Clément Bœsch [Fri, 19 May 2017 09:23:07 +0000 (11:23 +0200)]
Merge commit '5c0e2b13eb79b455b15355d64f7993b0f66ea9ec'

* commit '5c0e2b13eb79b455b15355d64f7993b0f66ea9ec':
  swscale-test: const correctness for pointer variable

This commit is a noop, see b36745339df026264007b6baaee50584a8a95c22

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '7ff018c1cb43a5fe5ee2049d325cdd785852067a'
Clément Bœsch [Fri, 19 May 2017 09:21:41 +0000 (11:21 +0200)]
Merge commit '7ff018c1cb43a5fe5ee2049d325cdd785852067a'

* commit '7ff018c1cb43a5fe5ee2049d325cdd785852067a':
  OS/2: Try to commit memory above 1GB

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'fd8de7f2d8c31195d309247cb129c0ad787ef76e'
Clément Bœsch [Fri, 19 May 2017 09:19:29 +0000 (11:19 +0200)]
Merge commit 'fd8de7f2d8c31195d309247cb129c0ad787ef76e'

* commit 'fd8de7f2d8c31195d309247cb129c0ad787ef76e':
  dxtory: Convert to the new bitstream reader
  apedec: Convert to the new bitstream reader

This commit is a noop, see
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

Merged-by: Clément Bœsch <u@pkh.me>
2 years agolavc/mpegvideoenc: reformat inv_zigzag_direct16 so the zigzag pattern is visible
Clément Bœsch [Fri, 19 May 2017 09:17:58 +0000 (11:17 +0200)]
lavc/mpegvideoenc: reformat inv_zigzag_direct16 so the zigzag pattern is visible

2 years agoMerge commit 'b4a911c189962e563a09fb0efaf6fa9ab56263a4'
Clément Bœsch [Fri, 19 May 2017 09:15:16 +0000 (11:15 +0200)]
Merge commit 'b4a911c189962e563a09fb0efaf6fa9ab56263a4'

* commit 'b4a911c189962e563a09fb0efaf6fa9ab56263a4':
  mpegvideoenc: make a table const

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '296eff4d9dc53d441b672319524a051d04f4a8cf'
Clément Bœsch [Fri, 19 May 2017 09:12:24 +0000 (11:12 +0200)]
Merge commit '296eff4d9dc53d441b672319524a051d04f4a8cf'

* commit '296eff4d9dc53d441b672319524a051d04f4a8cf':
  zmbvenc: get rid of a global table

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '00b775dda2b3f78ae60ff3278d3b3d6545883a83'
Clément Bœsch [Fri, 19 May 2017 09:09:20 +0000 (11:09 +0200)]
Merge commit '00b775dda2b3f78ae60ff3278d3b3d6545883a83'

* commit '00b775dda2b3f78ae60ff3278d3b3d6545883a83':
  hevc: Mark as having threadsafe init

This commit is a noop, see 14b9060160e453398d01ca767c0f8ace9fb4b5e3

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '54dcd2288546e135986338107ea87db1fcedd633'
Clément Bœsch [Fri, 19 May 2017 09:07:46 +0000 (11:07 +0200)]
Merge commit '54dcd2288546e135986338107ea87db1fcedd633'

* commit '54dcd2288546e135986338107ea87db1fcedd633':
  als: Convert to the new bitstream reader

This commit is a noop, see
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit 'fb59f87ce72035b940c3f5045884098b9324e1b2'
Clément Bœsch [Fri, 19 May 2017 09:07:03 +0000 (11:07 +0200)]
Merge commit 'fb59f87ce72035b940c3f5045884098b9324e1b2'

* commit 'fb59f87ce72035b940c3f5045884098b9324e1b2':
  nvenc: Explicitly push the cuda context on encoding

This commit is a noop, see be74ba648cf4063c9805ebe95ee83fd7299f7fd5

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '4795e4f61f993940c5384044caff56cc15078698'
Clément Bœsch [Fri, 19 May 2017 09:00:02 +0000 (11:00 +0200)]
Merge commit '4795e4f61f993940c5384044caff56cc15078698'

* commit '4795e4f61f993940c5384044caff56cc15078698':
  alac: Convert to the new bitstream reader
  rtp: Convert to the new bitstream reader
  mov: Convert to the new bitstream reader

This merge is a noop, see
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209609.html

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoMerge commit '44129e38047b6a27291e487c2084894958c6f399'
Clément Bœsch [Fri, 19 May 2017 08:57:30 +0000 (10:57 +0200)]
Merge commit '44129e38047b6a27291e487c2084894958c6f399'

* commit '44129e38047b6a27291e487c2084894958c6f399':
  avconv: Do not pass NULL to avio_tell

This commit is a noop. The FFmpeg code handle cases where total_size is
an AVERROR (which avio_tell(NULL) will return) later in the function.

Note: the original commit refers to the null *muxer*. `ffmpeg -lavfi
testsrc -f null -` can be used as a test case.

Merged-by: Clément Bœsch <u@pkh.me>
2 years agoavcodec/hevc_parser: add missing call to ff_hevc_reset_sei()
James Almer [Thu, 18 May 2017 22:54:09 +0000 (19:54 -0300)]
avcodec/hevc_parser: add missing call to ff_hevc_reset_sei()

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/af_sofalizer: make lfe gain user configurable
Paul B Mahol [Thu, 18 May 2017 21:13:52 +0000 (23:13 +0200)]
avfilter/af_sofalizer: make lfe gain user configurable

Default settings have it too low.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_sofalizer: avoid casting
Paul B Mahol [Thu, 18 May 2017 20:49:04 +0000 (22:49 +0200)]
avfilter/af_sofalizer: avoid casting

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/mimic: Use ff_set_dimensions() to set the dimensions
Michael Niedermayer [Thu, 18 May 2017 15:46:56 +0000 (17:46 +0200)]
avcodec/mimic: Use ff_set_dimensions() to set the dimensions

Fixes: OOM
Fixes: 1671/clusterfuzz-testcase-minimized-4759078033162240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/fic: Fix multiple runtime error: signed integer overflow: 5793 * 419752 canno...
Michael Niedermayer [Thu, 18 May 2017 15:13:18 +0000 (17:13 +0200)]
avcodec/fic: Fix multiple runtime error: signed integer overflow: 5793 * 419752 cannot be represented in type 'int'

Fixes: 1669/clusterfuzz-testcase-minimized-5287529198649344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/pixlet: Fix reading invalid numbers of bits
Michael Niedermayer [Thu, 18 May 2017 14:51:08 +0000 (16:51 +0200)]
avcodec/pixlet: Fix reading invalid numbers of bits

Fixes: asertion failure
Fixes: 1664/clusterfuzz-testcase-minimized-6587801187385344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/filters: add more ladspa examples
Paul B Mahol [Thu, 18 May 2017 15:38:18 +0000 (17:38 +0200)]
doc/filters: add more ladspa examples

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/mlpdec: Fix: runtime error: left shift of negative value -8
Michael Niedermayer [Thu, 18 May 2017 00:07:17 +0000 (02:07 +0200)]
avcodec/mlpdec: Fix: runtime error: left shift of negative value -8

Fixes: 1658/clusterfuzz-testcase-minimized-4889937130291200

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dfa: Fix: runtime error: signed integer overflow: -14202 * 196877 cannot...
Michael Niedermayer [Wed, 17 May 2017 23:54:43 +0000 (01:54 +0200)]
avcodec/dfa: Fix: runtime error: signed integer overflow: -14202 * 196877 cannot be represented in type 'int'

Fixes: 1657/clusterfuzz-testcase-minimized-4710000079405056

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agobuild: remove --enable-raise-major configure option
James Almer [Sat, 6 May 2017 21:50:09 +0000 (18:50 -0300)]
build: remove --enable-raise-major configure option

It's not used by anything, has dubious usefulness, the reasons for which
it was introduced are no longer valid, and only serves to add complexity
to the build system.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/movenc: remove experimental check for VP9 streams
James Almer [Wed, 17 May 2017 23:37:39 +0000 (20:37 -0300)]
avformat/movenc: remove experimental check for VP9 streams

The muxer has been updated and is now complaint with the v1.0 of the spec.

2 years agoavfilter/af_afade: fix fading very long durations
Paul B Mahol [Wed, 17 May 2017 20:59:11 +0000 (22:59 +0200)]
avfilter/af_afade: fix fading very long durations

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoMerge commit 'f8f7ad758d0e1f36915467567f4d75541d98c12f'
Mark Thompson [Wed, 17 May 2017 18:24:36 +0000 (19:24 +0100)]
Merge commit 'f8f7ad758d0e1f36915467567f4d75541d98c12f'

* commit 'f8f7ad758d0e1f36915467567f4d75541d98c12f':
  qsv: Set the correct range for la_depth

This commit is a noop.  There is a separate parameter to enable
lookahead, so overloading the depth is unnecessary.

Merged-by: Mark Thompson <sw@jkqxz.net>
2 years agoavfilter: add audio crossfeed filter
Paul B Mahol [Sun, 14 May 2017 16:30:12 +0000 (18:30 +0200)]
avfilter: add audio crossfeed filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/aacdec: Fix runtime error: signed integer overflow: 2147483520 + 255 cannot...
Michael Niedermayer [Wed, 17 May 2017 14:45:46 +0000 (16:45 +0200)]
avcodec/aacdec: Fix runtime error: signed integer overflow: 2147483520 + 255 cannot be represented in type 'int'

Fixes: 1656/clusterfuzz-testcase-minimized-5900404925661184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/rv34: Fix runtime error: signed integer overflow: 768 * 4126720 cannot be...
Michael Niedermayer [Wed, 17 May 2017 14:33:16 +0000 (16:33 +0200)]
avcodec/rv34: Fix runtime error: signed integer overflow: 768 * 4126720 cannot be represented in type 'int'

Fixes: 1655/clusterfuzz-testcase-minimized-5587079276789760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/aacdec_template: Fix fixed point scale in decode_cce()
Michael Niedermayer [Wed, 17 May 2017 13:51:46 +0000 (15:51 +0200)]
avcodec/aacdec_template: Fix fixed point scale in decode_cce()

Fixes: runtime error: shift exponent 1073741824 is too large for 32-bit type 'int'
Fixes: 1654/clusterfuzz-testcase-minimized-5151903795118080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoMAINTAINERS: Remove Tomas Härdin from mxfdec.c
James Almer [Wed, 17 May 2017 04:52:53 +0000 (01:52 -0300)]
MAINTAINERS: Remove Tomas Härdin from mxfdec.c

See https://ffmpeg.org/pipermail/ffmpeg-devel/2017-May/211404.html

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/fmvc: Fix off by 1 error
Michael Niedermayer [Wed, 17 May 2017 00:17:13 +0000 (02:17 +0200)]
avcodec/fmvc: Fix off by 1 error

Fixes: out of array access
Fixes: 1643/clusterfuzz-testcase-minimized-6117573403869184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h264_cavlc: Fix runtime error: index -1 out of bounds for type 'VLC [6]'
Michael Niedermayer [Wed, 17 May 2017 00:06:49 +0000 (02:06 +0200)]
avcodec/h264_cavlc: Fix runtime error: index -1 out of bounds for type 'VLC [6]'

Fixes: 1639/clusterfuzz-testcase-minimized-5693801463021568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/flicvideo: Check frame_size before decrementing
Michael Niedermayer [Tue, 16 May 2017 23:12:55 +0000 (01:12 +0200)]
avcodec/flicvideo: Check frame_size before decrementing

Fixes: runtime error: signed integer overflow: -2147483627 - 22 cannot be represented in type 'int'
Fixes: 1637/clusterfuzz-testcase-minimized-5376582493405184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mlpdec: Fix runtime error: left shift of negative value -1
Michael Niedermayer [Tue, 16 May 2017 22:53:32 +0000 (00:53 +0200)]
avcodec/mlpdec: Fix runtime error: left shift of negative value -1

Fixes: 1636/clusterfuzz-testcase-minimized-5310494757879808

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/takdec: Fix runtime error: left shift of negative value -42
Michael Niedermayer [Tue, 16 May 2017 22:44:36 +0000 (00:44 +0200)]
avcodec/takdec: Fix  runtime error: left shift of negative value -42

Fixes: 1635/clusterfuzz-testcase-minimized-4992749856096256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hq_hqa: Fix: runtime error: signed integer overflow: -255 * 10180917 cannot...
Michael Niedermayer [Tue, 16 May 2017 21:44:24 +0000 (23:44 +0200)]
avcodec/hq_hqa: Fix: runtime error: signed integer overflow: -255 * 10180917 cannot be represented in type 'int'

Fixes: 1626/clusterfuzz-testcase-minimized-6416580571299840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/scpr: mask bits to prevent out of array read
Michael Niedermayer [Tue, 16 May 2017 00:22:37 +0000 (02:22 +0200)]
avcodec/scpr: mask bits to prevent out of array read

Fixes: 1615/clusterfuzz-testcase-minimized-6625214647500800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/filters: Added line to the af_bs2b filter docs mentioning --enable-libbs2b
Leo Izen [Mon, 15 May 2017 23:38:36 +0000 (19:38 -0400)]
doc/filters: Added line to the af_bs2b filter docs mentioning --enable-libbs2b

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/truemotion1: Fix multiple runtime error: signed integer overflow: 1246906962...
Michael Niedermayer [Tue, 16 May 2017 01:04:26 +0000 (03:04 +0200)]
avcodec/truemotion1: Fix multiple runtime error: signed integer overflow: 1246906962 * 2 cannot be represented in type 'int'

Fixes: 1616/clusterfuzz-testcase-minimized-5119196578971648

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objects
Aaron Levinson [Tue, 16 May 2017 12:04:36 +0000 (05:04 -0700)]
avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objects

Add dxva2_pool_release_dummy() and use it in call to
av_buffer_create() in dxva2_pool_alloc().

Prior to this change, av_buffer_create() was called with NULL for the
third argument, which indicates that av_buffer_default_free() should
be used to free the buffer's data.  Eventually, it gets to
buffer_pool_free() and calls buf->free() on a surface object (which is
av_buffer_default_free()).

This can result in a crash when the debug version of the C-runtime is
used on Windows.  While it doesn't appear to result in a crash when
the release version of the C-runtime is used on Windows, it likely
results in memory corruption, since av_free() is being called on
memory that was allocated using
IDirectXVideoAccelerationService::CreateSurface().

Signed-off-by: Aaron Levinson <alevinsn@aracnet.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
2 years agoavcodec/allcodecs: move librsvg_decoder to the external library section
James Almer [Tue, 16 May 2017 17:45:20 +0000 (14:45 -0300)]
avcodec/allcodecs: move librsvg_decoder to the external library section

2 years agoavfilter/af_bs2b: add missing flag for options
Paul B Mahol [Tue, 16 May 2017 17:16:50 +0000 (19:16 +0200)]
avfilter/af_bs2b: add missing flag for options

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoimg2dec: use standard way to probe for svg/svgz files
Rostislav Pehlivanov [Tue, 16 May 2017 11:45:14 +0000 (12:45 +0100)]
img2dec: use standard way to probe for svg/svgz files

2 years agolibrsvgdec: Fix pix_fmt on big-endian hardware.
Carl Eugen Hoyos [Tue, 16 May 2017 10:51:52 +0000 (12:51 +0200)]
librsvgdec: Fix pix_fmt on big-endian hardware.

2 years agolavc: add a librsvg rasterization library wrapper
Rostislav Pehlivanov [Mon, 8 May 2017 04:02:19 +0000 (05:02 +0100)]
lavc: add a librsvg rasterization library wrapper

Enables rendering of SVG images. This is possible since SVG images
still contain and specify the dimensions in pixels to which they've
been drawn to and thus enable browsers to display them without any
external data. Users can still override and generate images with
arbitrary resolutions.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoimg2dec: add support for piped SVG demuxing
Rostislav Pehlivanov [Mon, 8 May 2017 04:00:41 +0000 (05:00 +0100)]
img2dec: add support for piped SVG demuxing

Only checks the extension and MIME type, since determining whether
a file is SVG is difficult since they're just XML files.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agolavc: add codec ID and description for SVG
Rostislav Pehlivanov [Mon, 8 May 2017 03:59:40 +0000 (04:59 +0100)]
lavc: add codec ID and description for SVG

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/dcaenc: Do not abort process in case of bitrate deficit
Daniil Cherednik [Thu, 11 May 2017 21:12:07 +0000 (21:12 +0000)]
avcodec/dcaenc: Do not abort process in case of bitrate deficit

Old behaviour - abort if at least one subband has 1bit quantizer
and consumed_bits still greater than frame_bits size. It was
a bit strange - we still could reduce bits consumption by reducing
SNR for other subbands. Same strange logic with upper threshold -
stop bits allocation if at least one subband reach 26bits.

New behaviour - if consumed_bits greater than frame_bits and all
subbands has 1 bit quantizer we restart bits allocation and allow
zero subbands.

2 years agoopus_pvq: port to allow for SIMD functions
Rostislav Pehlivanov [Wed, 10 May 2017 05:47:44 +0000 (06:47 +0100)]
opus_pvq: port to allow for SIMD functions

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoopusenc: initialize PVQ prng seed
Rostislav Pehlivanov [Wed, 10 May 2017 05:07:46 +0000 (06:07 +0100)]
opusenc: initialize PVQ prng seed

Fixes valgrind warnings, didn't affect anything since it was only used
for resynthesis.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoconfigure: jni no longer requires -ldl
Aman Gupta [Fri, 12 May 2017 18:34:24 +0000 (11:34 -0700)]
configure: jni no longer requires -ldl

This dependency was removed in 33d69a90085d30af8a292d9364b835a26565d6b9.

2 years agoavcodec/svq3: Fix runtime error: left shift of negative value -6
Michael Niedermayer [Mon, 15 May 2017 19:21:20 +0000 (21:21 +0200)]
avcodec/svq3: Fix runtime error: left shift of negative value -6

Fixes: 1604/clusterfuzz-testcase-minimized-5312060206350336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/tiff: reset sampling[] if its invalid
Michael Niedermayer [Mon, 15 May 2017 19:19:06 +0000 (21:19 +0200)]
avcodec/tiff: reset sampling[] if its invalid

Fixes divission by 0
Fixes: clusterfuzz-testcase-minimized-5592896440893440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agomovenc/isom: update vpcC box to version 1.0 of the specification
Hendrik Leppkes [Fri, 21 Apr 2017 23:25:40 +0000 (01:25 +0200)]
movenc/isom: update vpcC box to version 1.0 of the specification

This brings our generation of the vpcC box up to date to version 1.0
of the VP Codec ISO Media File Format Binding.

Specifically, color/transfer properties are now written with values
based on ISO/IEC 23001-8, which is the same reference specification the
AVColor* enumerations are based on.

2 years agoavfilter/vf_deflicker: add bypass option
Paul B Mahol [Mon, 15 May 2017 19:32:44 +0000 (21:32 +0200)]
avfilter/vf_deflicker: add bypass option

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_stereotools: introduce different balance modes
Paul B Mahol [Mon, 15 May 2017 17:56:55 +0000 (19:56 +0200)]
avfilter/af_stereotools: introduce different balance modes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agocompat/cuda/ptx2c: remove bashism and harden against arbitrary input
Timo Rothenpieler [Mon, 15 May 2017 16:05:10 +0000 (18:05 +0200)]
compat/cuda/ptx2c: remove bashism and harden against arbitrary input

2 years agohwcontext_videotoolbox: fix fate-source
wm4 [Mon, 15 May 2017 16:50:04 +0000 (18:50 +0200)]
hwcontext_videotoolbox: fix fate-source

Thanks to James Darnley for figuring out what the hell it wanted.

2 years agoavcodec/Makefile: fix dnxhd parser dependencies
James Almer [Mon, 15 May 2017 16:33:29 +0000 (13:33 -0300)]
avcodec/Makefile: fix dnxhd parser dependencies

Fixes ticket #6391

2 years agoavcodec/h264: add sse2 versions of previous idct functions
James Darnley [Wed, 5 Apr 2017 19:07:47 +0000 (21:07 +0200)]
avcodec/h264: add sse2 versions of previous idct functions

Kaby Lake Pentium:
 - ff_h264_idct_add_8_sse2:    ~1.18x faster than mmxext
 - ff_h264_idct_dc_add_8_sse2: ~1.07x faster than mmxext

2 years agoavcodec/h264: add avx 8-bit h264_idct_dc_add
James Darnley [Thu, 16 Mar 2017 14:07:11 +0000 (15:07 +0100)]
avcodec/h264: add avx 8-bit h264_idct_dc_add

Haswell:
 - 1.02x faster (405±0.7 vs. 397±0.8 decicycles) compared with mmxext

Skylake-U:
 - 1.06x faster (498±1.8 vs. 470±1.3 decicycles) compared with mmxext

2 years agoavcodec/h264: add avx 8-bit h264_idct_add
James Darnley [Thu, 16 Mar 2017 13:59:48 +0000 (14:59 +0100)]
avcodec/h264: add avx 8-bit h264_idct_add

Haswell:
 - 1.11x faster (522±0.4 vs. 469±1.8 decicycles) compared with mmxext

Skylake-U:
 - 1.21x faster (671±5.5 vs. 555±1.4 decicycles) compared with mmxext

2 years agoavcodec/h264: use some 3 operand forms
James Darnley [Thu, 2 Mar 2017 00:48:16 +0000 (01:48 +0100)]
avcodec/h264: use some 3 operand forms

2 years agoavcodec/h264: change RETs into REP_RETs where appropriate
James Darnley [Mon, 27 Feb 2017 20:03:08 +0000 (20:03 +0000)]
avcodec/h264: change RETs into REP_RETs where appropriate

2 years agoavfilter/af_compand: change default attack to 0
Paul B Mahol [Mon, 15 May 2017 12:05:43 +0000 (14:05 +0200)]
avfilter/af_compand: change default attack to 0

Fixes many distortions.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/af_silenceremove: set output timestamps
Paul B Mahol [Mon, 15 May 2017 12:05:17 +0000 (14:05 +0200)]
avfilter/af_silenceremove: set output timestamps

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavfilter/scale_cuda: add CUDA scale filter
Yogender Gupta [Wed, 10 May 2017 17:18:16 +0000 (22:48 +0530)]
avfilter/scale_cuda: add CUDA scale filter

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agobuild: add support for building .cu files via nvcc
Timo Rothenpieler [Thu, 11 May 2017 20:53:41 +0000 (22:53 +0200)]
build: add support for building .cu files via nvcc

Original work by Yogender Gupta <ygupta@nvidia.com>

2 years agoconfigure: add cuda-sdk for things requiring full CUDA sdk
Timo Rothenpieler [Thu, 11 May 2017 20:51:31 +0000 (22:51 +0200)]
configure: add cuda-sdk for things requiring full CUDA sdk

2 years agovideotoolbox: add hwcontext support
wm4 [Mon, 15 May 2017 09:27:24 +0000 (11:27 +0200)]
videotoolbox: add hwcontext support

This adds tons of code for no other benefit than making VideoToolbox
support conform with the new hwaccel API (using hw_device_ctx and
hw_frames_ctx).

Since VideoToolbox decoding does not actually require the user to
allocate frames, the new code does mostly nothing.

One benefit is that ffmpeg_videotoolbox.c can be dropped once generic
hwaccel support for ffmpeg.c is merged from Libav.

Does not consider VDA or VideoToolbox encoding.

Fun fact: the frame transfer functions are copied from vaapi, as the
mapping makes copying generic boilerplate. Mapping itself is not
exported by the VT code, because I don't know how to test.

2 years agolibavcodec/exr : simplify reorder_pixels
Martin Vignali [Fri, 5 May 2017 20:20:58 +0000 (22:20 +0200)]
libavcodec/exr : simplify reorder_pixels

reorder_pixels is call by rle_uncompress and zip_uncompress
with size == uncompress_size

uncompress_size is a multiple of 2 (because exr store data
in half, float, or uint32)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/pixlet: Fixes: runtime error: signed integer overflow: 9203954323419769657...
Michael Niedermayer [Sun, 14 May 2017 15:02:49 +0000 (17:02 +0200)]
avcodec/pixlet: Fixes: runtime error: signed integer overflow: 9203954323419769657 + 29897660706736950 cannot be represented in type 'long'

Fixes: 1569/clusterfuzz-testcase-minimized-6328690508038144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpeg4videodec: Clear sprite wraping on unsupported cases in VOP decode
Michael Niedermayer [Sun, 14 May 2017 14:47:13 +0000 (16:47 +0200)]
avcodec/mpeg4videodec: Clear sprite wraping on unsupported cases in VOP decode

Fixes: Integer overflow
Fixes: 1572/clusterfuzz-testcase-minimized-4578773729017856

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ac3dec: Fix: runtime error: index -1 out of bounds for type 'INTFLOAT [2]'
Michael Niedermayer [Sun, 14 May 2017 12:42:45 +0000 (14:42 +0200)]
avcodec/ac3dec: Fix: runtime error: index -1 out of bounds for type 'INTFLOAT [2]'

It seems dual mono with a LFE channel is not forbidden

Fixes: 1570/clusterfuzz-testcase-minimized-6455337349545984

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hqxdsp: Fix runtime error: signed integer overflow: -196264 * 11585 cannot...
Michael Niedermayer [Sun, 14 May 2017 12:06:56 +0000 (14:06 +0200)]
avcodec/hqxdsp: Fix runtime error: signed integer overflow: -196264 * 11585 cannot be represented in type 'int'

Fixes: 1568/clusterfuzz-testcase-minimized-5944868608147456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/g723_1dec: Fix LCG type
Michael Niedermayer [Sun, 14 May 2017 12:00:42 +0000 (14:00 +0200)]
avcodec/g723_1dec: Fix LCG type

Fixes: 1567/clusterfuzz-testcase-minimized-5693653555085312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/af_compand: fix default companding to avoid clipping
Paul B Mahol [Sun, 14 May 2017 09:59:04 +0000 (11:59 +0200)]
avfilter/af_compand: fix default companding to avoid clipping

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/ffv1dec: Fix runtime error: signed integer overflow: 1550964438 + 1550964438...
Michael Niedermayer [Sat, 13 May 2017 21:24:04 +0000 (23:24 +0200)]
avcodec/ffv1dec: Fix runtime error: signed integer overflow: 1550964438 + 1550964438 cannot be represented in type 'int'

Fixes: 1559/clusterfuzz-testcase-minimized-5048096079740928
Fixes: 1560/clusterfuzz-testcase-minimized-6011037813833728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/webp: Fix signedness in prefix_code check
Michael Niedermayer [Sat, 13 May 2017 21:21:24 +0000 (23:21 +0200)]
avcodec/webp: Fix signedness in prefix_code check

Fixes: out of array read
Fixes: 1557/clusterfuzz-testcase-minimized-6535013757616128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/svq3: Fix runtime error: signed integer overflow: 169 * 12717677 cannot be...
Michael Niedermayer [Sat, 13 May 2017 21:16:44 +0000 (23:16 +0200)]
avcodec/svq3: Fix runtime error: signed integer overflow: 169 * 12717677 cannot be represented in type 'int'

Fixes: 1556/clusterfuzz-testcase-minimized-5027865978470400

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mlpdec: Check that there is enough data for headers
Michael Niedermayer [Sat, 13 May 2017 21:13:38 +0000 (23:13 +0200)]
avcodec/mlpdec: Check that there is enough data for headers

Fixes: out of array access
Fixes: 1541/clusterfuzz-testcase-minimized-6403410590957568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ac3dec: Keep track of band structure
Michael Niedermayer [Sat, 13 May 2017 17:28:01 +0000 (19:28 +0200)]
avcodec/ac3dec: Keep track of band structure

It is needed in some corner cases that seem not to be forbidden
Fixes: out of array index
Fixes: 1538/clusterfuzz-testcase-minimized-4696904925446144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/webp: Add missing input padding
Michael Niedermayer [Sat, 13 May 2017 16:27:27 +0000 (18:27 +0200)]
avcodec/webp: Add missing input padding

Fixes: 1536/clusterfuzz-testcase-minimized-5973925404082176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/aacdec_fixed: Fix runtime error: left shift of negative value -1
Michael Niedermayer [Sat, 13 May 2017 16:13:48 +0000 (18:13 +0200)]
avcodec/aacdec_fixed: Fix runtime error: left shift of negative value -1

Fixes: 1535/clusterfuzz-testcase-minimized-5826695535788032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/aacsbr_template: Do not change bs_num_env before its checked
Michael Niedermayer [Fri, 12 May 2017 02:12:15 +0000 (04:12 +0200)]
avcodec/aacsbr_template: Do not change bs_num_env before its checked

Fixes: 1489/clusterfuzz-testcase-minimized-5075102901207040
Fixes: out of array access

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/wavpack: Fix runtime error: signed integer overflow: 2147483642 + 512 cannot...
Michael Niedermayer [Wed, 10 May 2017 21:28:21 +0000 (23:28 +0200)]
avcodec/wavpack: Fix runtime error: signed integer overflow: 2147483642 + 512 cannot be represented in type 'int'

Fixed: 1453/clusterfuzz-testcase-minimized-5024976874766336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned...
Michael Niedermayer [Sat, 13 May 2017 13:39:32 +0000 (15:39 +0200)]
avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]'

Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h264_cavlc: Fix runtime error: index -1 out of bounds for type 'VLC [15]
Michael Niedermayer [Sat, 13 May 2017 13:30:28 +0000 (15:30 +0200)]
avcodec/h264_cavlc: Fix runtime error: index -1 out of bounds for type 'VLC [15]

Fixes: 1513/clusterfuzz-testcase-minimized-6246484833992704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mlp: Fix multiple runtime error: left shift of negative value -1
Michael Niedermayer [Sat, 13 May 2017 12:39:26 +0000 (14:39 +0200)]
avcodec/mlp: Fix multiple runtime error: left shift of negative value -1

Fixes: 1512/clusterfuzz-testcase-minimized-4713846423945216

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter: don't anonymously typedef structs
Paul B Mahol [Fri, 12 May 2017 18:00:49 +0000 (20:00 +0200)]
avfilter: don't anonymously typedef structs

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agox86/float_dsp: remove usage of integer instructions
James Almer [Sat, 13 May 2017 02:31:30 +0000 (23:31 -0300)]
x86/float_dsp: remove usage of integer instructions

2 years agoavcodec/rangecoder: Fix range coder corner case handling
Michael Niedermayer [Fri, 12 May 2017 23:45:29 +0000 (01:45 +0200)]
avcodec/rangecoder: Fix range coder corner case handling

Fixes: 1511/clusterfuzz-testcase-minimized-5906663800307712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dds: Fix runtime error: left shift of 210 by 24 places cannot be represented...
Michael Niedermayer [Fri, 12 May 2017 23:35:56 +0000 (01:35 +0200)]
avcodec/dds: Fix runtime error: left shift of 210 by 24 places cannot be represented in type 'int'

Fixes: 1510/clusterfuzz-testcase-minimized-5826231746428928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/rscc: Check pixel_size for overflow
Michael Niedermayer [Fri, 12 May 2017 23:31:19 +0000 (01:31 +0200)]
avcodec/rscc: Check pixel_size for overflow

Fixes: 1509/clusterfuzz-testcase-minimized-5129419876204544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/fmvc: Check nb_blocks
Michael Niedermayer [Fri, 12 May 2017 23:22:27 +0000 (01:22 +0200)]
avcodec/fmvc: Check nb_blocks

Fixes: out of array read
Fixes: 1508/clusterfuzz-testcase-minimized-5011336327069696

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/hq_hqadsp: Fix runtime error: signed integer overflow: 80359 * 30274 cannot...
Michael Niedermayer [Fri, 12 May 2017 23:12:35 +0000 (01:12 +0200)]
avcodec/hq_hqadsp: Fix runtime error: signed integer overflow: 80359 * 30274 cannot be represented in type 'int'

Fixes: 1507/clusterfuzz-testcase-minimized-4955228300378112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>