ffmpeg.git
2 years agolavfi: Add VAAPI deinterlacer
Mark Thompson [Sun, 19 Feb 2017 17:23:07 +0000 (17:23 +0000)]
lavfi: Add VAAPI deinterlacer

(cherry picked from commit ade370a4d7eab1866b6023c91c135d27c77ca465)
(cherry picked from commit 2d518aec4c781316092be65893b47922c8f71b67)

2 years agoavcodec/shorten: support decoding AIFF-C variant
Paul B Mahol [Thu, 23 Feb 2017 21:58:53 +0000 (22:58 +0100)]
avcodec/shorten: support decoding AIFF-C variant

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agodoc/filters: mention 'ffmpeg -filters' in timeline section
Lou Logan [Thu, 23 Feb 2017 19:44:11 +0000 (10:44 -0900)]
doc/filters: mention 'ffmpeg -filters' in timeline section

So users can see which filters support the 'enable' option.

Signed-off-by: Lou Logan <lou@lrcd.com>
2 years agoavcodec/scpr: improve check for out of range motion vectors
Paul B Mahol [Thu, 23 Feb 2017 18:45:12 +0000 (19:45 +0100)]
avcodec/scpr: improve check for out of range motion vectors

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/scpr: check that current row is in valid range
Paul B Mahol [Thu, 23 Feb 2017 17:46:24 +0000 (18:46 +0100)]
avcodec/scpr: check that current row is in valid range

Stops writing out of dst array.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/scpr: do not allow out of array access for 16bit case
Paul B Mahol [Thu, 23 Feb 2017 16:22:01 +0000 (17:22 +0100)]
avcodec/scpr: do not allow out of array access for 16bit case

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/qdrw: do better w/h parsing for direct bit packing
Paul B Mahol [Thu, 23 Feb 2017 14:20:24 +0000 (15:20 +0100)]
avcodec/qdrw: do better w/h parsing for direct bit packing

Apparently using 0x0001 opcode solely is not correct.
Try this instead.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavc/videotoolboxenc: check for dictionary key symbols
Rick Kern [Thu, 23 Feb 2017 05:05:01 +0000 (00:05 -0500)]
lavc/videotoolboxenc: check for dictionary key symbols

Fixes #6081. Some dictionary keys are not present on OS X 10.8.
This loads the symbols and uses a default value if not present.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agoavcodec/h264_ps: Check chroma_qp_index_offset
Michael Niedermayer [Wed, 22 Feb 2017 12:36:52 +0000 (13:36 +0100)]
avcodec/h264_ps: Check chroma_qp_index_offset

Fixes: 647/clusterfuzz-testcase-5195745823031296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: BBB
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mips/Makefile: corrected conditional build of version 1 of vc1dsp optimizatio...
Jacek Manko [Wed, 22 Feb 2017 14:48:35 +0000 (15:48 +0100)]
avcodec/mips/Makefile: corrected conditional build of version 1 of vc1dsp optimizations for loongson mmi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavd/opengl_enc: Fix a typo.
Carl Eugen Hoyos [Wed, 22 Feb 2017 23:11:43 +0000 (00:11 +0100)]
lavd/opengl_enc: Fix a typo.

2 years agoavcodec/wrapped_avframe: allocate a buffer with padding
Marton Balint [Tue, 21 Feb 2017 22:50:56 +0000 (23:50 +0100)]
avcodec/wrapped_avframe: allocate a buffer with padding

This ensures that the wrapped avframe will not get reallocated later, which
would invalidate internal references such as extended data.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec: add ScreenPressor decoder
Paul B Mahol [Thu, 16 Feb 2017 14:21:29 +0000 (15:21 +0100)]
avcodec: add ScreenPressor decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/h264idct_template: Fix several runtime error: signed integer overflow
Michael Niedermayer [Wed, 22 Feb 2017 21:07:35 +0000 (22:07 +0100)]
avcodec/h264idct_template: Fix several runtime error: signed integer overflow

Fixes: 652/clusterfuzz-testcase-6174944410992640

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: Check sprite_offset in addition to shifts
Michael Niedermayer [Wed, 22 Feb 2017 20:57:49 +0000 (21:57 +0100)]
avcodec/mpeg4videodec: Check sprite_offset in addition to shifts

Fixes: 651/clusterfuzz-testcase-5710668915277824

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/mpegaudiodec_template: Fix multiple runtime error: signed integer overflow
Michael Niedermayer [Wed, 22 Feb 2017 20:28:08 +0000 (21:28 +0100)]
avcodec/mpegaudiodec_template: Fix multiple runtime error: signed integer overflow

Fixes: 648/clusterfuzz-testcase-5337961317007360

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/qdrw: add support for 0x0001 code
Paul B Mahol [Wed, 22 Feb 2017 14:32:26 +0000 (15:32 +0100)]
avcodec/qdrw: add support for 0x0001 code

Fixes decoding of files which sets frame width/height this way.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/dnxhddec: fix decoding of DNxHR HQX 10-bit
Paul B Mahol [Wed, 22 Feb 2017 13:47:43 +0000 (14:47 +0100)]
avcodec/dnxhddec: fix decoding of DNxHR HQX 10-bit

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agodoc: drawtext options update
Mulvya [Sun, 19 Feb 2017 16:22:15 +0000 (21:52 +0530)]
doc: drawtext options update

Remove nonexistant "draw" option.
Add undocumented "tc24hmax" timecode wrap option.

Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2 years agoavcodec/cbrt_data: add missing header include
James Almer [Wed, 22 Feb 2017 17:36:26 +0000 (14:36 -0300)]
avcodec/cbrt_data: add missing header include

Fixes make checkheaders

2 years agoavcodec/mjpegenc_huffman: add missing header include
James Almer [Wed, 22 Feb 2017 17:36:11 +0000 (14:36 -0300)]
avcodec/mjpegenc_huffman: add missing header include

Fixes make checkheaders

2 years agoavcodec/flicvideo: update comment, 24bit support is implemented
Paul B Mahol [Wed, 22 Feb 2017 14:45:06 +0000 (15:45 +0100)]
avcodec/flicvideo: update comment, 24bit support is implemented

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoMAINTAINERS: Add ffmpeg-security alias members
Michael Niedermayer [Fri, 10 Feb 2017 19:55:26 +0000 (20:55 +0100)]
MAINTAINERS: Add ffmpeg-security alias members

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/rv34: Forward error from rv34_decode_mv()
Michael Niedermayer [Wed, 22 Feb 2017 00:42:59 +0000 (01:42 +0100)]
avcodec/rv34: Forward error from rv34_decode_mv()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpeg4video: Fix runtime error: left shift of negative value
Michael Niedermayer [Wed, 22 Feb 2017 00:22:24 +0000 (01:22 +0100)]
avcodec/mpeg4video: Fix runtime error: left shift of negative value

Fixes: 644/clusterfuzz-testcase-4726434209726464
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/dcadsp: Fix runtime error: signed integer overflow: 394625024 * 8 cannot...
Michael Niedermayer [Wed, 22 Feb 2017 00:11:11 +0000 (01:11 +0100)]
avcodec/dcadsp: Fix runtime error: signed integer overflow: 394625024 * 8 cannot be represented in type 'int'

Fixes: 643/clusterfuzz-testcase-5209078743695360

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: -2 + -2147483648 cannot...
Michael Niedermayer [Tue, 21 Feb 2017 23:42:23 +0000 (00:42 +0100)]
avcodec/rv34: Fix runtime error: signed integer overflow: -2 + -2147483648 cannot be represented in type 'int'

Fixes: 642/clusterfuzz-testcase-558358808074649

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 agoavformat/matroskaenc: don't write DisplayUnit with value Unknown on WebM files
James Almer [Wed, 22 Feb 2017 00:14:17 +0000 (21:14 -0300)]
avformat/matroskaenc: don't write DisplayUnit with value Unknown on WebM files

Value 4 (Unknown) is for the time being part of the Matroska spec but not
supported by WebM

Addresses ticket #6176

2 years agoavcodec/qdrw: don't overwrite bpp when checking its value
James Almer [Tue, 21 Feb 2017 23:21:52 +0000 (20:21 -0300)]
avcodec/qdrw: don't overwrite bpp when checking its value

Finishes fixing ticket #6171

2 years agoaacdec: When ignoring a PCE restore the previous config
Alex Converse [Thu, 16 Feb 2017 21:08:31 +0000 (13:08 -0800)]
aacdec: When ignoring a PCE restore the previous config

This is related to, but doesn't solve ticker 6152.

2 years agolavd/opengl_enc: Support BGR48.
Carl Eugen Hoyos [Tue, 21 Feb 2017 01:06:06 +0000 (02:06 +0100)]
lavd/opengl_enc: Support BGR48.

2 years agoavcodec/qdrw: add support for 2bpp and 4bpp packed pallette format
Paul B Mahol [Tue, 21 Feb 2017 18:45:44 +0000 (19:45 +0100)]
avcodec/qdrw: add support for 2bpp and 4bpp packed pallette format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/qdrw: fix writing past end of row
Paul B Mahol [Tue, 21 Feb 2017 18:16:35 +0000 (19:16 +0100)]
avcodec/qdrw: fix writing past end of row

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavcodec/ituh263dec: Fix runtime error: left shift of negative value -22
Michael Niedermayer [Tue, 21 Feb 2017 16:32:56 +0000 (17:32 +0100)]
avcodec/ituh263dec: Fix runtime error: left shift of negative value -22

Fixes: 639/clusterfuzz-testcase-5143866241974272

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/gsmdec_template: Fix runtime error: signed integer overflow: -22527 * 99113...
Michael Niedermayer [Tue, 21 Feb 2017 15:38:00 +0000 (16:38 +0100)]
avcodec/gsmdec_template: Fix runtime error: signed integer overflow: -22527 * 99113 cannot be represented in type 'int'

Fixes: 636/clusterfuzz-testcase-6520876646268928
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/bmp: Fix runtime error: negation of -2147483648 cannot be represented in...
Michael Niedermayer [Tue, 21 Feb 2017 15:22:47 +0000 (16:22 +0100)]
avcodec/bmp: Fix runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself

There is code checking height and width later, leaving an invalid value invalid
is thus fine.

Fixes: 635/clusterfuzz-testcase-6225161437052928
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 agoavformat/sierravmd: Support for Shivers 2 stereo tracks
Nicolas Roy-Renaud [Sat, 18 Feb 2017 03:50:11 +0000 (22:50 -0500)]
avformat/sierravmd: Support for Shivers 2 stereo tracks

Signed-off-by: Nicolas Roy-Renaud <nicolas.roy-renaud.1@ens.etsmtl.ca>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi/buffersrc: fix directly setting channel layout
Rostislav Pehlivanov [Tue, 21 Feb 2017 06:51:46 +0000 (06:51 +0000)]
lavfi/buffersrc: fix directly setting channel layout

When setting the channel layout directly using AVBufferSrcParameters
the channel layout was correctly set however the init function still
expected the old string format to set the number of channels (when it
hadn't already been specified).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavformat/hlsenc: fix cid 1401346 Dereferencing pointer error
Steven Liu [Tue, 21 Feb 2017 15:38:39 +0000 (23:38 +0800)]
avformat/hlsenc: fix cid 1401346  Dereferencing pointer error

check if proto is null before av_strcasecmp
CID:  1401346

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoavcodec/h264_ps: Check delta scale for validity
Michael Niedermayer [Tue, 21 Feb 2017 02:51:17 +0000 (03:51 +0100)]
avcodec/h264_ps: Check delta scale for validity

Fixes: signed integer overflow: 5 + 2147483646 cannot be represented in type 'int'
Fixes: 634/clusterfuzz-testcase-5285420445204480

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/simple_idct: Fix runtime error: left shift of negative value -6395
Michael Niedermayer [Tue, 21 Feb 2017 02:14:49 +0000 (03:14 +0100)]
avcodec/simple_idct: Fix runtime error: left shift of negative value -6395

Fixes: 633/clusterfuzz-testcase-4553133554401280

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/rv40: Fix runtime error: left shift of negative value
Michael Niedermayer [Tue, 21 Feb 2017 02:05:32 +0000 (03:05 +0100)]
avcodec/rv40: Fix runtime error: left shift of negative value

Fixes: 630/clusterfuzz-testcase-6608718928019456

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/qdrw: add support for decoding rgb555
Paul B Mahol [Tue, 21 Feb 2017 11:17:21 +0000 (12:17 +0100)]
avcodec/qdrw: add support for decoding rgb555

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agoavformat/mpl2dec: skip BOM when probing
Paul B Mahol [Sat, 11 Feb 2017 10:47:22 +0000 (11:47 +0100)]
avformat/mpl2dec: skip BOM when probing

Fixes #5442.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavf/mpeg: Initialize a stack variable used by memcmp().
Carl Eugen Hoyos [Sun, 19 Feb 2017 15:15:34 +0000 (16:15 +0100)]
lavf/mpeg: Initialize a stack variable used by memcmp().

Silence a valgrind warning.

Fixes ticket #6160.

2 years agoavcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768...
Michael Niedermayer [Mon, 20 Feb 2017 23:11:19 +0000 (00:11 +0100)]
avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768 cannot be represented in type 'int'

Fixes: 629/clusterfuzz-testcase-6697457381539840

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/flacdec: reduce limit for golomb so that the max value does not overflow
Michael Niedermayer [Mon, 20 Feb 2017 22:59:26 +0000 (23:59 +0100)]
avcodec/flacdec: reduce limit for golomb so that the max value does not overflow

Fixes: runtime error: left shift of 32 by 26 places cannot be represented in type 'int'

Fixes: 628/clusterfuzz-testcase-6187747641393152
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/dca_xll: signed integer overflow: 255251 * 32768 cannot be represented in...
Michael Niedermayer [Mon, 20 Feb 2017 19:22:26 +0000 (20:22 +0100)]
avcodec/dca_xll: signed integer overflow: 255251 * 32768 cannot be represented in type 'int'

Fixes: 627/clusterfuzz-testcase-5020897033322496
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 agoFactorize CHECK/SUINT code
Michael Niedermayer [Mon, 20 Feb 2017 18:34:54 +0000 (19:34 +0100)]
Factorize CHECK/SUINT code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agospeedhq: fix decoding artifacts
Steinar H. Gunderson [Sat, 18 Feb 2017 18:41:02 +0000 (19:41 +0100)]
speedhq: fix decoding artifacts

The quantization table is stored in the natural order, but when we
access it, we use an index that's in zigzag order, causing us to read
the wrong value. This causes artifacts, especially in areas with
horizontal or vertical edges. The artifacts look a lot like the
DCT ringing artifacts you'd expect to see from a low-bitrate file,
but when comparing to NewTek's own decoder, it's obvious they're not
supposed to be there.

Fix by simply storing the scaled quantization table in zigzag order.
Performance is unchanged.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agofate/source: Check for cases that could use av_clip_uintp2() and av_clip_intp2()
Michael Niedermayer [Fri, 17 Feb 2017 00:59:08 +0000 (01:59 +0100)]
fate/source: Check for cases that could use av_clip_uintp2() and av_clip_intp2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/nvenc: allow forcing keyframes by default
Timo Rothenpieler [Mon, 20 Feb 2017 21:38:39 +0000 (22:38 +0100)]
avcodec/nvenc: allow forcing keyframes by default

2 years agolavf/mov.c: Correct keyframe search in edit list to return the very first keyframe...
Sasi Inguva [Wed, 15 Feb 2017 20:07:55 +0000 (12:07 -0800)]
lavf/mov.c: Correct keyframe search in edit list to return the very first keyframe/frame with matching timestamp. Fixes ticket#5904

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpegaudiodec: Eliminate many undefined operations
Michael Niedermayer [Mon, 20 Feb 2017 12:42:33 +0000 (13:42 +0100)]
avcodec/mpegaudiodec: Eliminate many undefined operations

Fixes: 625/clusterfuzz-testcase-4574924406521856
Fixes: 626/clusterfuzz-testcase-4738718621499392

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/pictordec: Do not read more than nb_planes
Michael Niedermayer [Mon, 20 Feb 2017 11:31:43 +0000 (12:31 +0100)]
avcodec/pictordec: Do not read more than nb_planes

Fixes undefined behavior
Fixes: 622/clusterfuzz-testcase-5745722022428672

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_atempo: fix drift calculation, ticket #6157
Pavel Koshevoy [Mon, 20 Feb 2017 02:51:28 +0000 (10:51 +0800)]
avfilter/af_atempo: fix drift calculation, ticket #6157

ticket #6157

Reported-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Pavel Koshevoy <pkoshevoy@gmail.com>
2 years agoavcodec/ituh263dec: Check cbpy in ff_h263_decode_mb()
Michael Niedermayer [Sun, 19 Feb 2017 23:49:03 +0000 (00:49 +0100)]
avcodec/ituh263dec: Check cbpy in ff_h263_decode_mb()

Fixes: 618/clusterfuzz-testcase-6594990333493248

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/srtdec: Fix signed integer overflow: 1811992524 * 384 cannot be represented...
Michael Niedermayer [Sun, 19 Feb 2017 22:37:53 +0000 (23:37 +0100)]
avcodec/srtdec: Fix signed integer overflow: 1811992524 * 384 cannot be represented in type 'int'

Fixes: 617/clusterfuzz-testcase-6413875723370496

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_ps: Fix runtime error: signed integer overflow: -1094995528 * 2 cannot...
Michael Niedermayer [Sun, 19 Feb 2017 21:54:30 +0000 (22:54 +0100)]
avcodec/h264_ps: Fix runtime error: signed integer overflow: -1094995528 * 2 cannot be represented in type 'int'

Fixes: 615/clusterfuzz-testcase-5488002644049920
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_cabac: runtime error: signed integer overflow: 2147483647 + 14 cannot...
Michael Niedermayer [Sun, 19 Feb 2017 21:40:29 +0000 (22:40 +0100)]
avcodec/h264_cabac: runtime error: signed integer overflow: 2147483647 + 14 cannot be represented in type 'int'

Fixes: 614/clusterfuzz-testcase-4931860079575040

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: Fix runtime error: shift exponent -2 is negative
Michael Niedermayer [Sun, 19 Feb 2017 20:33:27 +0000 (21:33 +0100)]
avcodec/mpeg4videodec: Fix runtime error: shift exponent -2 is negative

Fixes: 612/clusterfuzz-testcase-4707817137111040

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/mjpegdec: Fix runtime error: left shift of negative value -507
Michael Niedermayer [Sun, 19 Feb 2017 19:39:13 +0000 (20:39 +0100)]
avcodec/mjpegdec: Fix runtime error: left shift of negative value -507

Fixes: 611/clusterfuzz-testcase-5613455820193792

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/eac3dec: Fix runtime error: left shift of negative value
Michael Niedermayer [Sun, 19 Feb 2017 19:32:48 +0000 (20:32 +0100)]
avcodec/eac3dec: Fix runtime error: left shift of negative value

Fixes: 610/clusterfuzz-testcase-4831030085156864

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 agoopus_pvq: fix PVQ search for K < 5 and low Ns
Rostislav Pehlivanov [Sun, 19 Feb 2017 18:20:39 +0000 (18:20 +0000)]
opus_pvq: fix PVQ search for K < 5 and low Ns

If the PVQ search picked a place to increment/decrement on the y[]
vector which had no pulse then it would cause a desync since it would
change the sum in the wrong direction. Fix this by not considering
places without pulses as viable.

This makes the PVQ search slightly worse at K < 5 which isn't all that
common. Still, this is a workaround to prevent making broken files until
I can think of a better way of fixing it.

Also add an assertion, which can be removed or moved to assert1/2 once
the PVQ search is stable.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/pngdec: Check bit depth for validity
Michael Niedermayer [Sun, 19 Feb 2017 18:12:25 +0000 (19:12 +0100)]
avcodec/pngdec: Check bit depth for validity

Fixes: runtime error: shift exponent 132 is too large for 32-bit type 'int'
Fixes: 609/clusterfuzz-testcase-4825202619842560

See 11.2.2 IHDR Image header

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/mpeg12dec: Fix runtime error: left shift of negative value
Michael Niedermayer [Sun, 19 Feb 2017 17:47:13 +0000 (18:47 +0100)]
avcodec/mpeg12dec: Fix runtime error: left shift of negative value

Fixes: 608/clusterfuzz-testcase-603978286392934

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/f_setcmd: fix null pointer dereference on using dash as interval
Marton Balint [Wed, 8 Feb 2017 23:03:21 +0000 (00:03 +0100)]
avfilter/f_setcmd: fix null pointer dereference on using dash as interval

Fixes Coverity CID 1396259.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavdevice/iec61883: free packet on buffer allocation error
Marton Balint [Wed, 8 Feb 2017 22:37:42 +0000 (23:37 +0100)]
avdevice/iec61883: free packet on buffer allocation error

Fixes Coverity CID 1396416.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/fifo: assert on disallowed message type and state combinations
Marton Balint [Wed, 8 Feb 2017 22:28:21 +0000 (23:28 +0100)]
avformat/fifo: assert on disallowed message type and state combinations

Fixes Coverity CID 1396277.

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavcodec/huffyuvencdsp: use an actual unsigned long constant
James Almer [Mon, 6 Feb 2017 22:57:53 +0000 (19:57 -0300)]
avcodec/huffyuvencdsp: use an actual unsigned long constant

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/huffyuvdsp: use an actual unsigned long constant
James Almer [Mon, 6 Feb 2017 22:57:30 +0000 (19:57 -0300)]
avcodec/huffyuvdsp: use an actual unsigned long constant

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/wavpacl: Fix runtime error: left shift of negative value -1
Michael Niedermayer [Sun, 19 Feb 2017 14:09:34 +0000 (15:09 +0100)]
avcodec/wavpacl: Fix runtime error: left shift of negative value -1

Fixes: 607/clusterfuzz-testcase-5108792465293312

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/flac: Fix several integer overflows
Michael Niedermayer [Sun, 19 Feb 2017 13:34:55 +0000 (14:34 +0100)]
avcodec/flac: Fix several integer overflows

Fixes: 686513-media
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoFactor CHECKED out of DEBUG so it can be set seperatly
Michael Niedermayer [Sun, 19 Feb 2017 11:49:45 +0000 (12:49 +0100)]
Factor CHECKED out of DEBUG so it can be set seperatly

Suggested-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/pngdec: Store metadata directly into AVFrame
Michael Niedermayer [Thu, 2 Feb 2017 20:48:05 +0000 (21:48 +0100)]
avcodec/pngdec: Store metadata directly into AVFrame

Fixes memleak
Fixes: 500/clusterfuzz-testcase-6315221727576064

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 agoavformat/utils: Also fill dts==RELATIVE_TS_BASE packets in update_initial_durations()
Michael Niedermayer [Sat, 18 Feb 2017 23:31:09 +0000 (00:31 +0100)]
avformat/utils: Also fill dts==RELATIVE_TS_BASE packets in update_initial_durations()

This dts value can end up in the list in the absence of durations and is in that
case semantically identical to AV_NOPTS_VALUE. We can alternatively prevent
storing RELATIVE_TS_BASE if there is no duration.

Fixes Ticket3640

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpeg12dec: Provide debug level log on skiped P/B frames
Michael Niedermayer [Sat, 18 Feb 2017 18:03:39 +0000 (19:03 +0100)]
avcodec/mpeg12dec: Provide debug level log on skiped P/B frames

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h264: sse2, avx h luma mbaff deblock/loop filter
James Darnley [Fri, 10 Feb 2017 22:17:57 +0000 (23:17 +0100)]
avcodec/h264: sse2, avx h luma mbaff deblock/loop filter

x86-64 only

Yorkfield:
- sse2: ~2.17x (434 vs. 200 cycles)

Nehalem:
- sse2: ~2.94x (409 vs. 139 cycles)

Skylake:
- sse2: ~3.10x (370 vs. 119 cycles)
- avx:  ~3.29x (370 vs. 112 cycles)

2 years agox86util: import MOVHL macro
James Darnley [Sat, 11 Feb 2017 12:25:09 +0000 (13:25 +0100)]
x86util: import MOVHL macro

Originally committed to x264 in 1637239a by Henrik Gramner who has
agreed to re-license it as LGPL.  Original commit message follows.

    x86: Avoid some bypass delays and false dependencies

    A bypass delay of 1-3 clock cycles may occur on some CPUs when transitioning
    between int and float domains, so try to avoid that if possible.

2 years agoavcodec/h264: add named parameters to x86 function
James Darnley [Fri, 10 Feb 2017 19:13:50 +0000 (20:13 +0100)]
avcodec/h264: add named parameters to x86 function

2 years agoavcodec/x86: deduplicate PASS8ROWS macro
James Darnley [Thu, 9 Feb 2017 21:06:17 +0000 (22:06 +0100)]
avcodec/x86: deduplicate PASS8ROWS macro

2 years agotests/fate/hevc: remove vsync drop from where it is not needed anymore
Michael Niedermayer [Sat, 18 Feb 2017 15:29:14 +0000 (16:29 +0100)]
tests/fate/hevc: remove vsync drop from where it is not needed anymore

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cuvid: add drop_second_field as input option
Miroslav Slugeň [Sun, 12 Feb 2017 20:22:46 +0000 (21:22 +0100)]
avcodec/cuvid: add drop_second_field as input option

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavcodec/cuvid: don't overwrite deinterlace at progressive input
Miroslav Slugeň [Sun, 12 Feb 2017 17:47:07 +0000 (18:47 +0100)]
avcodec/cuvid: don't overwrite deinterlace at progressive input

If there is progressive input it will disable deinterlacing in cuvid for
all future frames even those interlaced.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a...
Michael Niedermayer [Sat, 18 Feb 2017 02:31:14 +0000 (03:31 +0100)]
avformat/m4vdec: Detect raw mpeg4video with unidentified non mpeg headers with a very low score

Fixes Ticket 6018

This fixes a regression, and allows playback of files containing mpeg4video that are otherwise
not supported

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/hlsenc: set default http method to PUT when method is null
Steven Liu [Sat, 18 Feb 2017 01:42:51 +0000 (09:42 +0800)]
avformat/hlsenc: set default http method to PUT when method is null

When the http method is not set, the method will use POST for ts,
PUT for m3u8, it is not unify, now set it unify.
This ticket id: #5315

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2 years agoopusenc: initialize the emphasis coefficients on init
Rostislav Pehlivanov [Sat, 18 Feb 2017 01:11:58 +0000 (01:11 +0000)]
opusenc: initialize the emphasis coefficients on init

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agolavf/riff: Support decoding files with broken mediasubtype base guid.
Thierry Foucu [Thu, 16 Feb 2017 13:03:38 +0000 (14:03 +0100)]
lavf/riff: Support decoding files with broken mediasubtype base guid.

Fixes ticket #6100.

2 years agoavcodec/opus: Check count of ambisonic channels
Michael Niedermayer [Fri, 17 Feb 2017 10:18:30 +0000 (11:18 +0100)]
avcodec/opus: Check count of ambisonic channels

https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1
specifies the maximum as 227

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibopus: decode ambisonics with non-diegetic sources
Felicia [Mon, 6 Feb 2017 23:49:36 +0000 (15:49 -0800)]
libopus: decode ambisonics with non-diegetic sources

Channel mapping 2 additionally supports a non-diegetic stereo track
appended to the end of a full-order ambisonics signal, such that the
total channel count is either
  (n + 1) ^ 2, or
  (n + 1) ^ 2 + 2
where n is the ambisonics order

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/fmvc: fix decoding of odd size videos
Paul B Mahol [Fri, 17 Feb 2017 09:46:52 +0000 (10:46 +0100)]
avcodec/fmvc: fix decoding of odd size videos

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2 years agolavc/avpacket: Initialize a variable in error path.
Carl Eugen Hoyos [Thu, 16 Feb 2017 23:46:14 +0000 (00:46 +0100)]
lavc/avpacket: Initialize a variable in error path.

Fixes ticket #6153.

Tested-by: Tyson Smith
2 years agowmaprodec: fix leaking fdsp on init failure
Andreas Cadhalpun [Wed, 15 Feb 2017 23:54:31 +0000 (00:54 +0100)]
wmaprodec: fix leaking fdsp on init failure

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agompegaudiodec_template: fix leaking fdsp for mp3on4float
Andreas Cadhalpun [Wed, 15 Feb 2017 23:37:51 +0000 (00:37 +0100)]
mpegaudiodec_template: fix leaking fdsp for mp3on4float

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agovaapi_vp8: Use VP8_MAX_QUANT instead of magic number
Mark Thompson [Thu, 16 Feb 2017 20:40:55 +0000 (20:40 +0000)]
vaapi_vp8: Use VP8_MAX_QUANT instead of magic number

2 years agodoc: correct order of options for channelmap filter
Mulvya [Thu, 16 Feb 2017 18:57:32 +0000 (00:27 +0530)]
doc: correct order of options for channelmap filter

Signed-off-by: Mulvya <mulvya@gmail.com>
2 years agoChangelog: add entry for the native Opus encoder
Rostislav Pehlivanov [Thu, 16 Feb 2017 16:28:10 +0000 (16:28 +0000)]
Changelog: add entry for the native Opus encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2 years agoavcodec/opusenc: Add () protecting macro arguments
Michael Niedermayer [Thu, 16 Feb 2017 12:24:11 +0000 (13:24 +0100)]
avcodec/opusenc: Add () protecting macro arguments

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/error_resilience: Fix "assignment from incompatible pointer type" warning
Michael Niedermayer [Thu, 16 Feb 2017 11:28:42 +0000 (12:28 +0100)]
avcodec/error_resilience: Fix "assignment from incompatible pointer type" warning

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc/vda_h264_dec.c Fix NULL pointer dereference
Pavel Koshevoy [Fri, 10 Feb 2017 03:20:14 +0000 (20:20 -0700)]
lavc/vda_h264_dec.c Fix NULL pointer dereference

ps.sps_list entries may be NULL, so check before dereferencing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>