]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agospeedhq: add FATE tests
Steinar H. Gunderson [Thu, 3 Aug 2017 07:31:30 +0000 (09:31 +0200)]
speedhq: add FATE tests

Also add simple FATE tests, based on output produced by the NDI SDK.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agospeedhq: fix behavior of single-field decoding
Steinar H. Gunderson [Thu, 3 Aug 2017 07:22:57 +0000 (09:22 +0200)]
speedhq: fix behavior of single-field decoding

The height convention for decoding frames with only a single field made sense
for compatibility with legacy decoders, but doesn't really match the convention
used by NDI, which is the primary (only?) user. Thus, change it to simply
assuming that if the two fields overlap, the frame is meant to be a single
field and the frame height matches the field height.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/hevc_cabac: Check for ff_init_cabac_decoder() failure in cabac_reinit()
Michael Niedermayer [Tue, 1 Aug 2017 22:46:49 +0000 (00:46 +0200)]
avcodec/hevc_cabac: Check for ff_init_cabac_decoder() failure in cabac_reinit()

Fixes: runtime error: left shift of negative value -967831544
Fixes: 2815/clusterfuzz-testcase-minimized-6062914471460864
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/h264idct_template: Fix integer overflow in ff_h264_idct_add()
Michael Niedermayer [Tue, 1 Aug 2017 17:56:07 +0000 (19:56 +0200)]
avcodec/h264idct_template: Fix integer overflow in ff_h264_idct_add()

Fixes: runtime error: signed integer overflow: 26215360 + 2121330944 cannot be represented in type 'int'
Fixes: 2809/clusterfuzz-testcase-minimized-4785181833560064
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
6 years agoavformat/riff: remove useless tag correlation 'mpg2'->MPEG1VIDEO.
Aleksandr Slobodeniuk [Tue, 1 Aug 2017 11:48:39 +0000 (14:48 +0300)]
avformat/riff: remove useless tag correlation 'mpg2'->MPEG1VIDEO.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/riff.h : remove unused function parameter "const AVCodecTag *tags" of "void...
Aleksandr Slobodeniuk [Fri, 14 Jul 2017 11:03:20 +0000 (14:03 +0300)]
avformat/riff.h : remove unused function parameter "const AVCodecTag *tags" of "void ff_put_bmp_header()"

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter: add unpremultiply filter
Paul B Mahol [Tue, 1 Aug 2017 09:32:22 +0000 (11:32 +0200)]
avfilter: add unpremultiply filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavc/htmlsubtitles: reindent after previous commits
Clément Bœsch [Sat, 29 Jul 2017 19:24:34 +0000 (21:24 +0200)]
lavc/htmlsubtitles: reindent after previous commits

6 years agolavc/htmlsubtitles: handle colors starting with many '#'
Clément Bœsch [Sat, 29 Jul 2017 19:22:17 +0000 (21:22 +0200)]
lavc/htmlsubtitles: handle colors starting with many '#'

6 years agolavc/htmlsubtitles: improve line breaks handling
Clément Bœsch [Sat, 29 Jul 2017 19:09:54 +0000 (21:09 +0200)]
lavc/htmlsubtitles: improve line breaks handling

6 years agolavc/tests: add htmlsubtitles
Clément Bœsch [Sat, 29 Jul 2017 18:56:55 +0000 (20:56 +0200)]
lavc/tests: add htmlsubtitles

6 years agolavc/htmlsubtitles: improve handling broken garbage
Clément Bœsch [Sat, 29 Jul 2017 18:56:25 +0000 (20:56 +0200)]
lavc/htmlsubtitles: improve handling broken garbage

This commit switches off forced correct nesting of tags and only keeps
it for font tags. See long explanations in the code for the rationale.

This results in various FATE changes which I'll explain here:

- various swapping in font attributes, this is mostly noise due to the
  old reverse stack way of printing them. The new one is more correct as
  the last attribute takes over the previous ones.

- unrecognized tags disappears

- invalid tags that were previously displayed aren't anymore (instead,
  we have a warning). This is better for the end user

The main benefit of this commit is to be more tolerant to error, leading
to a better handling of badly nested tags or random wrong formatting for
the end user.

6 years agoavcodec/diracdsp: fix integer overflow
Michael Niedermayer [Sat, 29 Jul 2017 13:55:36 +0000 (15:55 +0200)]
avcodec/diracdsp: fix integer overflow

Fixes: runtime error: signed integer overflow: 11 * 225726413 cannot be represented in type 'int'
Fixes: 2764/clusterfuzz-testcase-minimized-5382561922547712
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/diracdec: Check weight_log2denom
Michael Niedermayer [Sat, 29 Jul 2017 13:46:50 +0000 (15:46 +0200)]
avcodec/diracdec: Check weight_log2denom

Fixes: runtime error: shift exponent -1 is negative
Fixes: 2742/clusterfuzz-testcase-minimized-5724322402402304
Fixes: 2744/clusterfuzz-testcase-minimized-4672435653705728
Fixes: 2749/clusterfuzz-testcase-minimized-5298741273690112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dirac_vlc: Fix invalid shift
Michael Niedermayer [Fri, 28 Jul 2017 00:23:25 +0000 (02:23 +0200)]
avcodec/dirac_vlc: Fix invalid shift

Fixes: runtime error: shift exponent 65 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2737/clusterfuzz-testcase-minimized-4968639147016192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensation
James Almer [Thu, 20 Jul 2017 18:37:36 +0000 (15:37 -0300)]
avcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensation

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agodoc/filters.texi: add another lut2 example
Paul B Mahol [Mon, 31 Jul 2017 12:07:27 +0000 (14:07 +0200)]
doc/filters.texi: add another lut2 example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agosws/tests/pixdesc_query: fix use of free() instead of av_free()
Clément Bœsch [Sun, 30 Jul 2017 18:48:04 +0000 (20:48 +0200)]
sws/tests/pixdesc_query: fix use of free() instead of av_free()

Fix CID 1415949

6 years agosws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic names
Clément Bœsch [Thu, 23 Mar 2017 23:51:32 +0000 (00:51 +0100)]
sws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic names

Fixes ticket #6554

6 years agosws/tests/pixdesc_query: sort pixel formats
Clément Bœsch [Thu, 23 Mar 2017 22:32:35 +0000 (23:32 +0100)]
sws/tests/pixdesc_query: sort pixel formats

6 years agosws/tests/pixdesc_query: save every pix fmts in a list
Clément Bœsch [Thu, 23 Mar 2017 22:21:07 +0000 (23:21 +0100)]
sws/tests/pixdesc_query: save every pix fmts in a list

This will be required for the next commit.

6 years agoavdevice/decklink_dec: set field order via codecpar
Marton Balint [Mon, 24 Jul 2017 21:07:05 +0000 (23:07 +0200)]
avdevice/decklink_dec: set field order via codecpar

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agolavfi/vf_displace: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 15:00:23 +0000 (17:00 +0200)]
lavfi/vf_displace: move to "activate" design.

6 years agolavfi/vf_hysteresis: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:54:23 +0000 (16:54 +0200)]
lavfi/vf_hysteresis: move to "activate" design.

6 years agolavfi/vf_lut2: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:45:17 +0000 (16:45 +0200)]
lavfi/vf_lut2: move to "activate" design.

6 years agolavfi/vf_maskedclamp: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:42:14 +0000 (16:42 +0200)]
lavfi/vf_maskedclamp: move to "activate" design.

6 years agolavfi/vf_mergeplanes: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:40:28 +0000 (16:40 +0200)]
lavfi/vf_mergeplanes: move to "activate" design.

6 years agolavfi/vf_maskedmerge: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:38:18 +0000 (16:38 +0200)]
lavfi/vf_maskedmerge: move to "activate" design.

6 years agolavfi/vf_midequalizer: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:36:20 +0000 (16:36 +0200)]
lavfi/vf_midequalizer: move to "activate" design.

6 years agolavfi/vf_premultiply: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:33:20 +0000 (16:33 +0200)]
lavfi/vf_premultiply: move to "activate" design.

6 years agolavfi/vf_remap: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:31:44 +0000 (16:31 +0200)]
lavfi/vf_remap: move to "activate" design.

6 years agolavfi/vf_threshold: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 14:29:35 +0000 (16:29 +0200)]
lavfi/vf_threshold: move to "activate" design.

Also fix missing dependency.

6 years agolavfi/vf_stack: move to "activate" design.
Nicolas George [Mon, 17 Jul 2017 12:37:00 +0000 (14:37 +0200)]
lavfi/vf_stack: move to "activate" design.

6 years agolavfi/framesync2: implement "activate" design.
Nicolas George [Mon, 17 Jul 2017 12:36:42 +0000 (14:36 +0200)]
lavfi/framesync2: implement "activate" design.

With this helper API, filters that used the first framesync
helper API can easily be changed to use the new and more
extensible design for filters with a single activate() callback.

6 years agolavfi: add outlink helper functions.
Nicolas George [Mon, 17 Jul 2017 12:34:41 +0000 (14:34 +0200)]
lavfi: add outlink helper functions.

These wrappers cost nothing, they make the namespace more
consistent and they will be useful if/when locking becomes
necessary.

6 years agolavfi: make FFERROR_NOT_READY available to filters.
Nicolas George [Mon, 17 Jul 2017 12:33:11 +0000 (14:33 +0200)]
lavfi: make FFERROR_NOT_READY available to filters.

I am not entirely sure that this return code is useful,
but having and using it makes no harm.

6 years agolavfi/framesync2: rename all conflicting symbols.
Nicolas George [Sun, 16 Jul 2017 15:26:48 +0000 (17:26 +0200)]
lavfi/framesync2: rename all conflicting symbols.

6 years agolavfi: copy framesync into framesync2.
Nicolas George [Sun, 16 Jul 2017 15:17:00 +0000 (17:17 +0200)]
lavfi: copy framesync into framesync2.

framesync2 will be the base for the version using activate.
Most of the logic will be the same, but the code cannot be shared.
Copying the file initially without change will make the diff
easier to read.

6 years agoRevert "Revert "lavfi/buffersrc: push the frame deeper if requested.""
Nicolas George [Sun, 16 Jul 2017 15:03:50 +0000 (17:03 +0200)]
Revert "Revert "lavfi/buffersrc: push the frame deeper if requested.""

This reverts commit 04aa09c4bcf2d5a634a35da3a3ae3fc1abe30ef8
and reintroduces 0ff5567a30be6d7c804e95997ae282d6bacd76c3 that
was temporarily reverted due to minor regressions.

It also reverts e5bce8b4ce7b1f3a83998febdfa86a3771df96ce that fixed FATE refs.
The fate-ffm change is caused by field_order now being set
on the output format because the first frame arrives earlier.
The fate-mxf change is assumed to be the same.

6 years agomdct15: add inverse transform postrotation SIMD
Rostislav Pehlivanov [Sat, 29 Jul 2017 20:27:01 +0000 (21:27 +0100)]
mdct15: add inverse transform postrotation SIMD

2.5ms frames:
Before   (c):  2638 decicycles in postrotate, 2097040 runs,    112 skips
After (sse3):  1467 decicycles in postrotate, 2097083 runs,     69 skips
After (avx2):  1244 decicycles in postrotate, 2097085 runs,     67 skips

5ms frames:
Before   (c):  4987 decicycles in postrotate, 1048371 runs,    205 skips
After (sse3):  2644 decicycles in postrotate, 1048509 runs,     67 skips
After (avx2):  2031 decicycles in postrotate, 1048523 runs,     53 skips

10ms frames:
Before   (c):  9153 decicycles in postrotate,  523575 runs,    713 skips
After (sse3):  5110 decicycles in postrotate,  523726 runs,    562 skips
After (avx2):  3738 decicycles in postrotate,  524223 runs,     65 skips

20ms frames:
Before   (c): 17857 decicycles in postrotate,  261866 runs,    278 skips
After (sse3): 10041 decicycles in postrotate,  261746 runs,    398 skips
After (avx2):  7050 decicycles in postrotate,  262116 runs,     28 skips

Improves total decoding performance for real world content by 9% with avx2.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agolavc/makefile: Add missing file dependencies.
Matt Oliver [Sat, 29 Jul 2017 11:09:19 +0000 (21:09 +1000)]
lavc/makefile: Add missing file dependencies.

ac3dsp.c uses tables from ac3.c
ac3.c uses tables from ac3tab.c
hevc_ps uses tables from hevc_data.c
intrax8.c uses tables from msmpeg4data.c

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
6 years agolavf/os_support: Use existing WinRT config value.
Matt Oliver [Wed, 12 Jul 2017 10:02:58 +0000 (20:02 +1000)]
lavf/os_support: Use existing WinRT config value.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
6 years agowin32_dlfcn: Support WinRT/UWP.
Matt Oliver [Sat, 1 Jul 2017 13:16:42 +0000 (23:16 +1000)]
win32_dlfcn: Support WinRT/UWP.

This only enables dlls that are packaged with the application to be
loaded. Due to the limitations of WinRT/UWP it is not allowed to load
external/system dlls so this cannot be used as a complete replacement
for normal win32 dll loading.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
6 years agoexamples/hw_decode: Add a HWAccel decoding example.
Jun Zhao [Thu, 20 Jul 2017 04:58:56 +0000 (00:58 -0400)]
examples/hw_decode: Add a HWAccel decoding example.

Works with VAAPI, VDPAU, DXVA2 and D3D11VA.

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
6 years agoavcodec/dirac_dwt: Fix multiple integer overflows in COMPOSE_DD97iH0()
Michael Niedermayer [Fri, 28 Jul 2017 01:22:40 +0000 (03:22 +0200)]
avcodec/dirac_dwt: Fix multiple integer overflows in COMPOSE_DD97iH0()

Fixes: runtime error: signed integer overflow: 9 * 335544320 cannot be represented in type 'int'
Fixes: 2739/clusterfuzz-testcase-minimized-6737297955356672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/diracdec: Fix integer overflow in divide3()
Michael Niedermayer [Thu, 27 Jul 2017 21:49:27 +0000 (23:49 +0200)]
avcodec/diracdec: Fix integer overflow in divide3()

Fixes: runtime error: signed integer overflow: -1073746548 * 21845 cannot be represented in type 'int'
Fixes: 2729/clusterfuzz-testcase-minimized-5902915464069120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/takdec: Fix integer overflow in decode_subframe()
Michael Niedermayer [Thu, 27 Jul 2017 21:49:26 +0000 (23:49 +0200)]
avcodec/takdec: Fix integer overflow in decode_subframe()

Fixes: runtime error: signed integer overflow: -536870912 - 1972191120 cannot be represented in type 'int'
Fixes: 2711/clusterfuzz-testcase-minimized-4975142398590976
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2
Michael Niedermayer [Fri, 28 Jul 2017 12:37:26 +0000 (14:37 +0200)]
avformat/rtmppkt: Convert ff_amf_get_field_value() to bytestream2

Fixes: out of array accesses
Found-by: JunDong Xie of Ant-financial Light-Year Security Lab
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/rtmppkt: Convert ff_amf_tag_size() to bytestream2
Michael Niedermayer [Fri, 28 Jul 2017 11:41:59 +0000 (13:41 +0200)]
avformat/rtmppkt: Convert ff_amf_tag_size() to bytestream2

Fixes: out of array accesses
Fixes: crash-9238fa9e8d4fde3beda1f279626f53812cb001cb-SEGV
Found-by: JunDong Xie of Ant-financial Light-Year Security Lab
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibavcodec/mips: Improve avc dequant-idct luma dc msa function
Kaustubh Raste [Fri, 28 Jul 2017 08:42:06 +0000 (14:12 +0530)]
libavcodec/mips: Improve avc dequant-idct luma dc msa function

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/diracdec: Fix integer overflow in signed multiplication in UNPACK_ARITH()
Michael Niedermayer [Wed, 26 Jul 2017 18:26:43 +0000 (20:26 +0200)]
avcodec/diracdec: Fix integer overflow in signed multiplication in UNPACK_ARITH()

Fixes: runtime error: signed integer overflow: 1073741823 * 4 cannot be represented in type 'int'
Fixes: 2729/clusterfuzz-testcase-minimized-5902915464069120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/pixlet: Simplify nbits computation
Michael Niedermayer [Wed, 26 Jul 2017 18:10:28 +0000 (20:10 +0200)]
avcodec/pixlet: Simplify nbits computation

Fixes multiple integer overflows
Fixes: runtime error: signed integer overflow: 1 + 2147483647 cannot be represented in type 'int'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agopthread_frame: revert 2e664b9c1e73c80aab91070c1eb7676f04bdd12d.
Wan-Teh Chang [Tue, 18 Jul 2017 16:11:09 +0000 (09:11 -0700)]
pthread_frame: revert 2e664b9c1e73c80aab91070c1eb7676f04bdd12d.

The patch does not fix the tsan warning it was intended to fix.
Reverting the patch moves the av_log() back to the outside of the lock.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agoavcodec/h264_slice: don't sync default_ref[] between threads.
Wan-Teh Chang [Tue, 18 Jul 2017 23:34:40 +0000 (16:34 -0700)]
avcodec/h264_slice: don't sync default_ref[] between threads.

default_ref[] is unconditionally initialized in h264_initialise_ref_list()
(called from ff_h264_build_ref_list(), called from h264_slice_init()).

This fixes the following tsan warning when running fate-h264:

WARNING: ThreadSanitizer: data race (pid=31070)
  Write of size 8 at 0x7bbc000082a8 by thread T1 (mutexes: write M1628):
    #0 memcpy /work/release-test/final/llvm.src/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:655:5
(ffmpeg+0x10de9d)
    #1 h264_initialise_ref_list ffmpeg/libavcodec/h264_refs.c:214:29 (ffmpeg+0x1186b3f)
    #2 ff_h264_build_ref_list ffmpeg/libavcodec/h264_refs.c:306 (ffmpeg+0x1186b3f)
    #3 h264_slice_init ffmpeg/libavcodec/h264_slice.c:1900:11 (ffmpeg+0x1191149)
[..]
  Previous read of size 8 at 0x7bbc000082a8 by main thread (mutexes:
write M1630):
    #0 memcpy /work/release-test/final/llvm.src/projects/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:655:5
(ffmpeg+0x10de9d)
    #1 ff_h264_update_thread_context ffmpeg/libavcodec/h264_slice.c:411:5 (ffmpeg+0x118b7dc)

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agodoc/APIChanges: add missing entry for ICC Profile side data type.
James Almer [Thu, 27 Jul 2017 17:21:41 +0000 (14:21 -0300)]
doc/APIChanges: add missing entry for ICC Profile side data type.

6 years agoavcodec/dnxhdenc: enable frame threading
Paul B Mahol [Mon, 26 Jun 2017 07:22:58 +0000 (09:22 +0200)]
avcodec/dnxhdenc: enable frame threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agofate: update pixfmt_best test to check for endianness
Tobias Rapp [Tue, 25 Jul 2017 07:42:21 +0000 (09:42 +0200)]
fate: update pixfmt_best test to check for endianness

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
6 years agoavcodec/dnxhddec: Move mb height check out of non hr branch
Michael Niedermayer [Wed, 26 Jul 2017 01:26:59 +0000 (03:26 +0200)]
avcodec/dnxhddec: Move mb height check out of non hr branch

Fixes: out of array access
Fixes: poc.dnxhd
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agopngdec: fix potential memory leak
Rostislav Pehlivanov [Wed, 26 Jul 2017 22:54:14 +0000 (23:54 +0100)]
pngdec: fix potential memory leak

Fixes CID1412026.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agoavcodec/jpeg2000dec: Fix h/vden typo
Michael Niedermayer [Wed, 26 Jul 2017 18:22:49 +0000 (20:22 +0200)]
avcodec/jpeg2000dec: Fix h/vden typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/s337m: fix potentially undefined pointer arithmetic
foo86 [Sat, 22 Jul 2017 14:27:28 +0000 (17:27 +0300)]
avformat/s337m: fix potentially undefined pointer arithmetic

Use integer position instead of pointer for loop variable. Also only
skip header fields after header has been fully validated.

6 years agoavcodec/dolby_e: fix potentially undefined pointer arithmetic
foo86 [Sat, 22 Jul 2017 14:19:25 +0000 (17:19 +0300)]
avcodec/dolby_e: fix potentially undefined pointer arithmetic

Avoid undefined behavior in skip_input() by checking that enough data is
available before incrementing input pointer.

Check return values of parse_key() and skip_input() and exit early with
error if there is not enough data.

6 years agoavcodec/dolby_e: add AV_CODEC_CAP_CHANNEL_CONF capability
foo86 [Sat, 22 Jul 2017 14:18:47 +0000 (17:18 +0300)]
avcodec/dolby_e: add AV_CODEC_CAP_CHANNEL_CONF capability

6 years agoavcodec/dolby_e: add 'f' suffixes to floating point literals
foo86 [Sat, 22 Jul 2017 14:13:04 +0000 (17:13 +0300)]
avcodec/dolby_e: add 'f' suffixes to floating point literals

6 years agolavc/htmlsubtitles: simplify 1-char tags case insensitive test
Clément Bœsch [Wed, 26 Jul 2017 17:56:28 +0000 (19:56 +0200)]
lavc/htmlsubtitles: simplify 1-char tags case insensitive test

6 years agoavcodec/jpeg2000dec: Fix division by zero in jp2_find_codestream()
Michael Niedermayer [Mon, 24 Jul 2017 14:43:24 +0000 (16:43 +0200)]
avcodec/jpeg2000dec: Fix division by zero in jp2_find_codestream()

Fixes: 2707/clusterfuzz-testcase-minimized-5179636394754048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2
Michael Niedermayer [Mon, 24 Jul 2017 13:48:37 +0000 (15:48 +0200)]
avcodec/hevc_ps: fix integer overflow in log2_parallel_merge_level_minus2

Fixes: runtime error: signed integer overflow: -2147483647 - 2 cannot be represented in type 'int'
Fixes: 2702/clusterfuzz-testcase-minimized-4511932591636480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/webp: add support for ICCP chunks
James Almer [Wed, 26 Jul 2017 04:28:35 +0000 (01:28 -0300)]
avcodec/webp: add support for ICCP chunks

Export the raw data as ICC Profile frame side data.

Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoffprobe: add support for ICC Profile frame side data
James Almer [Wed, 26 Jul 2017 03:42:51 +0000 (00:42 -0300)]
ffprobe: add support for ICC Profile frame side data

Print the name metadata entry and the buffer size.

Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavutil/frame: add ICC Profile to av_frame_side_data_name
James Almer [Wed, 26 Jul 2017 03:38:22 +0000 (00:38 -0300)]
avutil/frame: add ICC Profile to av_frame_side_data_name

Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec/rdft: reorder calculation
Muhammad Faiz [Fri, 21 Jul 2017 23:52:45 +0000 (06:52 +0700)]
avcodec/rdft: reorder calculation

old:
 165188 decicycles in  rdft,   65536 runs,      0 skips
 165865 decicycles in irdft,   65536 runs,      0 skips
new:
 142487 decicycles in  rdft,   65536 runs,      0 skips
 141498 decicycles in irdft,   65536 runs,      0 skips

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
6 years agoavformat/oggparsecelt: Do not re-allocate os->private
Michael Niedermayer [Tue, 25 Jul 2017 01:19:07 +0000 (03:19 +0200)]
avformat/oggparsecelt: Do not re-allocate os->private

Fixes: double free
Fixes: clusterfuzz-testcase-minimized-5080550145785856
Found-by: ClusterFuzz
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibavcodec/mips: Optimize avc idct 4x4 for msa
Kaustubh Raste [Mon, 24 Jul 2017 12:41:53 +0000 (18:11 +0530)]
libavcodec/mips: Optimize avc idct 4x4 for msa

Removed memset call and improved performance.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agomdct15: simplify prereindexing and forward transform postrotation
Rostislav Pehlivanov [Tue, 25 Jul 2017 03:31:48 +0000 (04:31 +0100)]
mdct15: simplify prereindexing and forward transform postrotation

Equivalent.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agopngdec: decode and expose iCCP chunks as side data
Rostislav Pehlivanov [Thu, 20 Jul 2017 20:46:22 +0000 (21:46 +0100)]
pngdec: decode and expose iCCP chunks as side data

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agolavu/frame: add new side data type for ICC profiles
Rostislav Pehlivanov [Thu, 20 Jul 2017 20:46:21 +0000 (21:46 +0100)]
lavu/frame: add new side data type for ICC profiles

Many image formats support embedding of ICC profiles directly in
their bitstreams. Add a new side data type to allow exposing them to
API users.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
6 years agolavfi/testsrc2: fix completely transparent alpha.
Nicolas George [Thu, 20 Jul 2017 15:35:44 +0000 (17:35 +0200)]
lavfi/testsrc2: fix completely transparent alpha.

6 years agoavcodec/mpegvideo_enc: fix mixed declarations and code warning
James Almer [Tue, 25 Jul 2017 03:58:16 +0000 (00:58 -0300)]
avcodec/mpegvideo_enc: fix mixed declarations and code warning

6 years agoavformat/hlsenc: improve hls encrypt get key file operation
Steven Liu [Tue, 25 Jul 2017 02:31:29 +0000 (10:31 +0800)]
avformat/hlsenc: improve hls encrypt get key file operation

get key file only once time is ok, no need more times.
Ticket-id: #6545

Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agoavcodec/ylc: Fix shift overflow
Michael Niedermayer [Sat, 22 Jul 2017 00:57:12 +0000 (02:57 +0200)]
avcodec/ylc: Fix shift overflow

Fixes: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 2698/clusterfuzz-testcase-minimized-4713541443518464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/aacps: Fix multiple integer overflow in map_val_34_to_20()
Michael Niedermayer [Fri, 21 Jul 2017 22:44:14 +0000 (00:44 +0200)]
avcodec/aacps: Fix multiple integer overflow in map_val_34_to_20()

Fixes: avcodec/aacps.c:511:40: runtime error: signed integer overflow: 1509077651 + 758068176 cannot be represented in type 'int'
Fixes: 2678/clusterfuzz-testcase-minimized-4702787684270080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavf/movenc: support GPMF track (gpmd) remuxing
Clément Bœsch [Fri, 21 Jul 2017 08:30:19 +0000 (10:30 +0200)]
lavf/movenc: support GPMF track (gpmd) remuxing

See https://github.com/gopro/gpmf-parser for more information on the
data stream itself.

6 years agoavformat/hlsenc: fix hls fmp4 extention name bug
Steven Liu [Mon, 24 Jul 2017 11:55:19 +0000 (19:55 +0800)]
avformat/hlsenc: fix hls fmp4 extention name bug

ticket-id: #6541
when use hls fmp4 muxer, the extention name is not .m4s, this
code can fix it.

Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agoavcodec/mpegvideo_enc: Use intra/inter scantable matching mb type in quantization
Michael Niedermayer [Mon, 19 Jun 2017 22:37:41 +0000 (00:37 +0200)]
avcodec/mpegvideo_enc: Use intra/inter scantable matching mb type in quantization

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/aacdec_fixed: fix: left shift of negative value -1
Michael Niedermayer [Sun, 23 Jul 2017 14:52:47 +0000 (16:52 +0200)]
avcodec/aacdec_fixed: fix: left shift of negative value -1

Fixes: 2699/clusterfuzz-testcase-minimized-5631303862976512
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dirac_vlc: Fix undefined shift
Michael Niedermayer [Tue, 18 Jul 2017 23:43:24 +0000 (01:43 +0200)]
avcodec/dirac_vlc: Fix undefined shift

Fixes: runtime error: shift exponent 64 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2674/clusterfuzz-testcase-minimized-4999700518273024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/w3fdif: do not write to line before start line
Muhammad Faiz [Sat, 22 Jul 2017 11:46:07 +0000 (18:46 +0700)]
avfilter/w3fdif: do not write to line before start line

That line has been written by previous job.
Fix tsan warning.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
6 years agodoc/filters: typo in frei0r
Brice Waegeneire [Fri, 21 Jul 2017 22:09:29 +0000 (00:09 +0200)]
doc/filters: typo in frei0r

Signed-off-by: Brice Waegeneire <brice.wge@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/cfhd: Fix decoding regression due to height check
Vodyannikov Aleksandr [Fri, 21 Jul 2017 09:49:45 +0000 (11:49 +0200)]
avcodec/cfhd: Fix decoding regression due to height check

Fixes: Ticket6546
Regression since: 54aaadf648073149f1ac34f56cbde4e6c5aa22ef

Reviewed-by: Muhammad Faiz <mfcc64@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dcaadpcm: fix use of uninitialized variable
foo86 [Sat, 22 Jul 2017 15:20:04 +0000 (18:20 +0300)]
avcodec/dcaadpcm: fix use of uninitialized variable

Fixes CID 1409924.

6 years agoavcodec/dcaadpcm: check for av_malloc() failure
foo86 [Sat, 22 Jul 2017 15:16:13 +0000 (18:16 +0300)]
avcodec/dcaadpcm: check for av_malloc() failure

Fixes CID 1409915.

6 years agopixdesc: Reindent after previous commit
Mark Thompson [Sat, 22 Jul 2017 20:51:41 +0000 (21:51 +0100)]
pixdesc: Reindent after previous commit

6 years agopixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2()
Mark Thompson [Sat, 22 Jul 2017 20:49:46 +0000 (21:49 +0100)]
pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2()

6 years agoffprobe: Print color properties from show_frames
Vittorio Giovara [Thu, 20 Jul 2017 12:37:44 +0000 (14:37 +0200)]
ffprobe: Print color properties from show_frames

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
6 years agohevc: Make sure to update the current frame transfer characteristic
Vittorio Giovara [Thu, 20 Jul 2017 12:39:22 +0000 (14:39 +0200)]
hevc: Make sure to update the current frame transfer characteristic

Otherwise the first decoded frame will still be tagged with the
original transfer instead of the alternative one.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
6 years agozscale: Factor out graph building
Vittorio Giovara [Thu, 6 Jul 2017 18:29:16 +0000 (14:29 -0400)]
zscale: Factor out graph building

6 years agozscale: Factor out format initialization
Vittorio Giovara [Thu, 6 Jul 2017 17:27:37 +0000 (13:27 -0400)]
zscale: Factor out format initialization

6 years agoavcodec/diracdec: Check dimensions which are closer to what is allocated in alloc_seq...
Michael Niedermayer [Tue, 18 Jul 2017 22:59:21 +0000 (00:59 +0200)]
avcodec/diracdec: Check dimensions which are closer to what is allocated in alloc_sequence_buffers()

Fixes OOM
Fixes: 2674/clusterfuzz-testcase-minimized-4999700518273024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agodoc: Add initial documentation explaining undefined behavior and SUINT
Michael Niedermayer [Sat, 15 Jul 2017 16:32:08 +0000 (18:32 +0200)]
doc: Add initial documentation explaining undefined behavior and SUINT

Requested-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolibavutil/mips: Updated msa generic macros
Kaustubh Raste [Fri, 21 Jul 2017 06:24:29 +0000 (11:54 +0530)]
libavutil/mips: Updated msa generic macros

Reduced msa load-store code.
Removed inline asm of GP load-store for 64 bit.
Updated variable names in GP load-store macros for naming consistency.
Corrected macro descriptions.

Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>