]> git.sesse.net Git - ffmpeg/log
ffmpeg
6 years agoavio: add a destructor for AVIOContext
Anton Khirnov [Sun, 27 Aug 2017 16:26:58 +0000 (13:26 -0300)]
avio: add a destructor for AVIOContext

Before this commit, AVIOContext is to be freed with a plain av_free(),
which prevents us from adding any deeper structure to it.

(cherry picked from commit 99684f3ae752fc8bfb44a2dd1482f8d7a3d8536d)
Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavformat/dash: move reused API to common file and header file
Steven Liu [Fri, 1 Sep 2017 02:20:56 +0000 (10:20 +0800)]
avformat/dash: move reused API to common file and header file

move from dashenc, move DASHTmplId and dash_fill_tmpl_params to
dash.c, they will be used by dash demuxer and dash muxer.

v2 fixed:
1. rename common file from dashcomm.* to dash.*
Suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
v3 fixed:
1. rename header file pre defined
2. add ff_ prefix for the internal API
Suggested-by: James Almer <jamrial@gmail.com>
Suggested-by: Timo Rothenpieler <timo@rothenpieler.org>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
6 years agoavformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()

Fixes: 20170829B.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()

Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.
孙浩(晓黑) [Tue, 29 Aug 2017 21:59:21 +0000 (23:59 +0200)]
avformat/nsvdec: Fix DoS due to lack of eof check in nsvs_file_offset loop.

Fixes: 20170829.nsv
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavocdec/libopus: fix typo
pkviet [Thu, 31 Aug 2017 22:44:11 +0000 (00:44 +0200)]
avocdec/libopus: fix typo

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mov: prevent duplication of first fragment's ctts_data
Daniel Glöckner [Sun, 6 Aug 2017 01:04:53 +0000 (03:04 +0200)]
avformat/mov: prevent duplication of first fragment's ctts_data

MP4 files with fragments might have the first moof box that is mentioned
in a fragment index before the first mdat box. Since it is then already
parsed by mov_read_header, we have to make sure that mov_switch_root
will not parse it again when seeking by setting the headers_read flag in
the index. Parsing it a second time would cause the ctts_data array to
receive a second copy of the information from the trun box, leading to
wrong PTS values for the second and following fragments in presence of
B-frames.

Fixes ticket 6560.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/mov: Bail when invalid sample data is present.
Dale Curtis [Mon, 31 Jul 2017 20:44:22 +0000 (13:44 -0700)]
avformat/mov: Bail when invalid sample data is present.

ctts data in ffmpeg relies on the index entries array to be 1:1
with samples... yet sc->sample_count can be read directly from
the 'stsz' box and index entries are only generated if a chunk
count has been read from 'stco' box.

Ensure that if sc->sample_count > 0, sc->chunk_count is too as
a basic sanity check. Additionally we need to check that after
the index is built we have the right number of entries, so we
also check in mov_read_trun() that sc->sample_count ==
st->nb_index_entries.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/concatdec: add fallback for calculating file duration
Justin Ruggles [Tue, 29 Aug 2017 02:45:20 +0000 (22:45 -0400)]
avformat/concatdec: add fallback for calculating file duration

If a file does not have a known duration, this leads to the timestamps
starting over for the next file, causing non-monotonic timestamps.
To prevent this, track the duration during demuxing and use it to
determine the current file duration before opening the next file.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agoavcodec/fits: add missing header includes
James Almer [Thu, 31 Aug 2017 14:26:36 +0000 (11:26 -0300)]
avcodec/fits: add missing header includes

Fixes checkheaders.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofate: add tests for some video source filters
Tobias Rapp [Thu, 17 Aug 2017 12:40:40 +0000 (14:40 +0200)]
fate: add tests for some video source filters

Adds FATE tests for the previously untested allrgb, allyuv, rgbtestsrc,
smptebars, smptehdbars and yuvtestsrc filters.

Also adds a test for testsrc2 filter with rgb+alpha.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
6 years agofate/flvenc: set bitexact output format flag explicitly
James Almer [Thu, 31 Aug 2017 02:21:41 +0000 (23:21 -0300)]
fate/flvenc: set bitexact output format flag explicitly

Using the encoder flags to set the muxer in bitexact mode is deprecated.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoffmpeg_opt: add proper deprecation guards to lowres code
James Almer [Thu, 31 Aug 2017 01:31:35 +0000 (22:31 -0300)]
ffmpeg_opt: add proper deprecation guards to lowres code

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofate/pixlet : add test for rgb
Martin Vignali [Sun, 2 Apr 2017 21:25:33 +0000 (23:25 +0200)]
fate/pixlet : add test for rgb

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavfilter/vf_mcdeint: remove usage of deprecated AVCodecContext.me_method
James Almer [Mon, 28 Aug 2017 16:40:06 +0000 (13:40 -0300)]
avfilter/vf_mcdeint: remove usage of deprecated AVCodecContext.me_method

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavfilter/af_adelay: remove requirement that at least one delay should be provided
Paul B Mahol [Wed, 30 Aug 2017 16:14:10 +0000 (18:14 +0200)]
avfilter/af_adelay: remove requirement that at least one delay should be provided

Such requirement is not necessary and code works without it just fine.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agopostproc: remove usage of deprecated QP_STORE_T define
James Almer [Wed, 30 Aug 2017 17:43:22 +0000 (14:43 -0300)]
postproc: remove usage of deprecated QP_STORE_T define

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavfilter/vf_mcdeint: free the AVCodecContext struct properly
James Almer [Wed, 30 Aug 2017 17:34:04 +0000 (14:34 -0300)]
avfilter/vf_mcdeint: free the AVCodecContext struct properly

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofate: stop using deprecated filter syntax in hls tests
James Almer [Wed, 30 Aug 2017 17:14:54 +0000 (14:14 -0300)]
fate: stop using deprecated filter syntax in hls tests

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofate: remove usage of deprecated AVCodecContext.me_method in vsynth snow tests
James Almer [Wed, 30 Aug 2017 17:06:49 +0000 (14:06 -0300)]
fate: remove usage of deprecated AVCodecContext.me_method in vsynth snow tests

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoconfigure: require pkg-config for libvmaf
Ashish Singh [Tue, 1 Aug 2017 15:14:18 +0000 (20:44 +0530)]
configure: require pkg-config for libvmaf

This patch makes the libvmaf filter use pkg-config to detect
and link to libvmaf.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agoavfilter/vf_libvmaf: fix pre convert to framesync2 bugs
Ashish Singh [Thu, 3 Aug 2017 05:34:01 +0000 (11:04 +0530)]
avfilter/vf_libvmaf: fix pre convert to framesync2 bugs

Hi, it fixes the errors while converting to framesync2.
libvmaf was changed recently, double *score variable is removed in the new
version since it's not used anywhere. This patch fixes all the warnings and
segmentation faults.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agoavcodec/codec_desc: make FITS description longer
Paul B Mahol [Wed, 30 Aug 2017 10:18:22 +0000 (12:18 +0200)]
avcodec/codec_desc: make FITS description longer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_lut2: add framesync options
Paul B Mahol [Wed, 30 Aug 2017 10:06:47 +0000 (12:06 +0200)]
avfilter/vf_lut2: add framesync options

Also stop leaking memory.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoFATE: Add FITS tests
Paras Chadha [Tue, 29 Aug 2017 17:36:42 +0000 (23:06 +0530)]
FATE: Add FITS tests

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
6 years agoAdd FITS Muxer
Paras Chadha [Tue, 29 Aug 2017 17:20:33 +0000 (22:50 +0530)]
Add FITS Muxer

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
6 years agoAdd FITS Encoder
Paras Chadha [Tue, 29 Aug 2017 17:19:30 +0000 (22:49 +0530)]
Add FITS Encoder

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
6 years agoAdd FITS Demuxer
Paras Chadha [Tue, 29 Aug 2017 17:12:26 +0000 (22:42 +0530)]
Add FITS Demuxer

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
6 years agoAdd FITS Decoder
Paras Chadha [Tue, 29 Aug 2017 17:16:44 +0000 (22:46 +0530)]
Add FITS Decoder

Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
6 years agocompat/cuda/ptx2c: strip CR from each line
Ricardo Constantino [Tue, 29 Aug 2017 00:46:13 +0000 (01:46 +0100)]
compat/cuda/ptx2c: strip CR from each line

Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which
need to be stripped to work with gcc.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoconfigure: add support for libnpp* from cuda sdk 9
Timo Rothenpieler [Tue, 29 Aug 2017 11:30:29 +0000 (13:30 +0200)]
configure: add support for libnpp* from cuda sdk 9

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoavformat/mxfenc: Replace literal numbers by named enum values.
Michael Niedermayer [Tue, 29 Aug 2017 00:13:21 +0000 (02:13 +0200)]
avformat/mxfenc: Replace literal numbers by named enum values.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()
Michael Niedermayer [Sun, 27 Aug 2017 22:30:33 +0000 (00:30 +0200)]
avcodec/snowdec: Fix integer overflow in decode_subband_slice_buffered()

Fixes: runtime error: signed integer overflow: 267 * 8388608 cannot be represented in type 'int'
Fixes: 2743/clusterfuzz-testcase-minimized-5820652076400640
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 undefined shift in pcm code
Michael Niedermayer [Sun, 27 Aug 2017 21:59:09 +0000 (23:59 +0200)]
avcodec/hevc_ps: Fix undefined shift in pcm code

Fixes: runtime error: shift exponent -1 is negative
Fixes: 3091/clusterfuzz-testcase-minimized-6229767969832960
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_idct8_add()
Michael Niedermayer [Wed, 16 Aug 2017 23:06:14 +0000 (01:06 +0200)]
avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_add()

Fixes: 2891/clusterfuzz-testcase-minimized-5881795457318912
Fixes: runtime error: signed integer overflow: 1551827968 - -775913984 cannot be represented in type 'int'
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/mxfenc: Check that the video codec in D-10 is MPEG-2
Michael Niedermayer [Tue, 29 Aug 2017 00:13:20 +0000 (02:13 +0200)]
avformat/mxfenc: Check that the video codec in D-10 is MPEG-2

Others do not work, but nothing rejects them prior to this patch if the
parameters otherwise match

Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavfi: bump minor version after change in options.
Nicolas George [Tue, 29 Aug 2017 13:46:36 +0000 (15:46 +0200)]
lavfi: bump minor version after change in options.

6 years agodoc/filters: document framesync options.
Nicolas George [Thu, 10 Aug 2017 11:32:19 +0000 (13:32 +0200)]
doc/filters: document framesync options.

6 years agolavfi: remove dualinput.
Nicolas George [Mon, 31 Jul 2017 11:38:22 +0000 (13:38 +0200)]
lavfi: remove dualinput.

6 years agovf_ssim: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 11:37:06 +0000 (13:37 +0200)]
vf_ssim: convert to framesync2.

6 years agolavfi/vf_psnr: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 10:44:13 +0000 (12:44 +0200)]
lavfi/vf_psnr: convert to framesync2.

6 years agolavfi/vf_paletteuse: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 10:27:58 +0000 (12:27 +0200)]
lavfi/vf_paletteuse: convert to framesync2.

6 years agolavfi/vf_lut3d: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 10:03:03 +0000 (12:03 +0200)]
lavfi/vf_lut3d: convert to framesync2.

6 years agolavfi/vf_libvmaf: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 09:40:25 +0000 (11:40 +0200)]
lavfi/vf_libvmaf: convert to framesync2.

After this commit, the code compiles, but on my setup it
segfaults before and after. It also prints the very worrying
warning:

src/libavfilter/vf_libvmaf.c:161:66: warning: passing argument 4 of ‘compute_vmaf’ from incompatible pointer type [-Wincompatible-pointer-types]
/tmp/i/include/libvmaf.h:26:8: note: expected ‘int (*)(float *, float *, float *, int,  void *)’ but argument is of type ‘int (*)(float *, float *, float *, int,  double *, void *)’

==12116== Thread 6:
==12116== Conditional jump or move depends on uninitialised value(s)
==12116==    at 0x526D432: cons_ (ocval.h:1188)
==12116==    by 0x526D432: GenericIT (ocval.h:1119)
==12116==    by 0x526D432: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:92)
==12116==    by 0x5211F5D: loads (pickleloader.h:566)
==12116==    by 0x5211F5D: LoadValFromArray (chooseser.h:290)
==12116==    by 0x5211F5D: LoadValFromFile (chooseser.h:405)
==12116==    by 0x5211F5D: _read_and_assert_model(char const*, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&) (vmaf.cpp:77)
==12116==    by 0x5212B0F: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:149)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)
==12116==
==12116== Conditional jump or move depends on uninitialised value(s)
==12116==    at 0x526D432: cons_ (ocval.h:1188)
==12116==    by 0x526D432: GenericIT (ocval.h:1119)
==12116==    by 0x526D432: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:92)
==12116==    by 0x526D50D: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:94)
==12116==    by 0x5211F5D: loads (pickleloader.h:566)
==12116==    by 0x5211F5D: LoadValFromArray (chooseser.h:290)
==12116==    by 0x5211F5D: LoadValFromFile (chooseser.h:405)
==12116==    by 0x5211F5D: _read_and_assert_model(char const*, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&) (vmaf.cpp:77)
==12116==    by 0x5212B0F: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:149)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)
==12116==
==12116== Conditional jump or move depends on uninitialised value(s)
==12116==    at 0x526D432: cons_ (ocval.h:1188)
==12116==    by 0x526D432: GenericIT (ocval.h:1119)
==12116==    by 0x526D432: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:92)
==12116==    by 0x526D50D: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:94)
==12116==    by 0x526D50D: OC::TranslateForNumPyClassesToArray(OC::Val&) (pickleloader.h:94)
==12116==    by 0x5211F5D: loads (pickleloader.h:566)
==12116==    by 0x5211F5D: LoadValFromArray (chooseser.h:290)
==12116==    by 0x5211F5D: LoadValFromFile (chooseser.h:405)
==12116==    by 0x5211F5D: _read_and_assert_model(char const*, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&, OC::Val&) (vmaf.cpp:77)
==12116==    by 0x5212B0F: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:149)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)
==12116==
==12116== Use of uninitialised value of size 8
==12116==    at 0x518AC79: read_frame_8bit (vf_libvmaf.c:147)
==12116==    by 0x52AB5E8: combo (combo.c:149)
==12116==    by 0x5212E95: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:278)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)
==12116==
==12116== Invalid read of size 4
==12116==    at 0x518AC79: read_frame_8bit (vf_libvmaf.c:147)
==12116==    by 0x52AB5E8: combo (combo.c:149)
==12116==    by 0x5212E95: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:278)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)
==12116==  Address 0x40 is not stack'd, malloc'd or (recently) free'd
==12116==
==12116==
==12116== Process terminating with default action of signal 11 (SIGSEGV)
==12116==  Access not within mapped region at address 0x40
==12116==    at 0x518AC79: read_frame_8bit (vf_libvmaf.c:147)
==12116==    by 0x52AB5E8: combo (combo.c:149)
==12116==    by 0x5212E95: VmafRunner::run(Asset, int (*)(float*, float*, float*, int, void*), void*, bool, bool, bool, bool, bool) (vmaf.cpp:278)
==12116==    by 0x52165B6: RunVmaf(char const*, int, int, int (*)(float*, float*, float*, int, void*), void*, char const*, char const*, char const*, bool, bool, bool, bool, bool, char const*) (vmaf.cpp:645)
==12116==    by 0x518AFFF: compute_vmaf_score (vf_libvmaf.c:161)
==12116==    by 0x518AFFF: call_vmaf (vf_libvmaf.c:170)
==12116==    by 0x7967493: start_thread (pthread_create.c:333)
==12116==    by 0x7F69A8E: clone (clone.S:97)

6 years agolavfi/vf_blend: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 09:02:14 +0000 (11:02 +0200)]
lavfi/vf_blend: convert to framesync2.

6 years agolavfi/vf_overlay: use framesync2 options.
Nicolas George [Sun, 30 Jul 2017 15:00:00 +0000 (17:00 +0200)]
lavfi/vf_overlay: use framesync2 options.

6 years agolavfi/framesync2: add common options.
Nicolas George [Sun, 30 Jul 2017 14:58:49 +0000 (16:58 +0200)]
lavfi/framesync2: add common options.

Also add functions and macros to help filters chaining these
options to their own.

6 years agolavfi: search options on child objects.
Nicolas George [Sun, 30 Jul 2017 14:57:12 +0000 (16:57 +0200)]
lavfi: search options on child objects.

The child objects must be allocated and inited in the
preinit() callback.

6 years agolavfi: add a preinit callback to filters.
Nicolas George [Sun, 30 Jul 2017 22:29:01 +0000 (00:29 +0200)]
lavfi: add a preinit callback to filters.

It is necessary for filters with child objects, to set the class
and default options values.

6 years agolavfi/vf_overlay: move to framesync2.
Nicolas George [Mon, 17 Jul 2017 18:46:31 +0000 (20:46 +0200)]
lavfi/vf_overlay: move to framesync2.

6 years agolavfi/framesync2: add dualinput helper functions.
Nicolas George [Mon, 17 Jul 2017 18:45:52 +0000 (20:45 +0200)]
lavfi/framesync2: add dualinput helper functions.

6 years agolavfi/f_streamselect: convert to framesync2.
Nicolas George [Mon, 31 Jul 2017 11:47:34 +0000 (13:47 +0200)]
lavfi/f_streamselect: convert to framesync2.

6 years agoavcodec/snowenc: fix setting motion_est option
James Almer [Sat, 26 Aug 2017 00:03:00 +0000 (21:03 -0300)]
avcodec/snowenc: fix setting motion_est option

Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly.
Based on code from svq1enc.c

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavf/dump: Remove superfluous cast.
Carl Eugen Hoyos [Mon, 28 Aug 2017 23:33:47 +0000 (01:33 +0200)]
lavf/dump: Remove superfluous cast.

6 years agohevc: Add names for reserved NAL unit types
Mark Thompson [Sun, 14 May 2017 14:47:36 +0000 (15:47 +0100)]
hevc: Add names for reserved NAL unit types

While not yet used, these NAL units do already have some defined
semantics and are referred to elsewhere.

(cherry picked from commit 3daaa4417317ca732fb00476fdb3308d784f87e4)

6 years agolavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.
Jun Zhao [Thu, 24 Aug 2017 01:13:01 +0000 (09:13 +0800)]
lavc/vaapi_encode: Change the slice/parameter buffers to dynamic alloc.

Change the slice/parameter buffers to be allocated dynamically.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
6 years agolavc/vaapi_encode_h265: Enable VBR mode
Jun Zhao [Fri, 25 Aug 2017 07:56:51 +0000 (15:56 +0800)]
lavc/vaapi_encode_h265: Enable VBR mode

Follow vaapi_h264 style, enable the VBR mode.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
6 years agolibavutil/opencl: fix potential null dereference
Timo Rothenpieler [Sun, 11 Jun 2017 14:05:45 +0000 (16:05 +0200)]
libavutil/opencl: fix potential null dereference

Fixes CID 1396840

Reviewed-by: Wei Gao <highgod0401@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
6 years agoavfilter/vf_zoompan: remove AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Michael Niedermayer [Sun, 27 Aug 2017 18:41:56 +0000 (20:41 +0200)]
avfilter/vf_zoompan: remove AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC

Suggested-by: <durandal_1707>
Fixes: assertion failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()
Michael Niedermayer [Sat, 26 Aug 2017 12:08:51 +0000 (14:08 +0200)]
avcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()

Fixes runtime error: signed integer overflow: 1997494407 + 613252359 cannot be represented in type 'int'
Fixes: 2014/clusterfuzz-testcase-minimized-5186337030275072
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/sbrdsp_fixed: Fix undefined overflows in autocorrelate()
Michael Niedermayer [Sat, 26 Aug 2017 12:00:55 +0000 (14:00 +0200)]
avcodec/sbrdsp_fixed: Fix undefined overflows in autocorrelate()

Fixes: runtime error: signed integer overflow: 8903997421129740175 + 354481484684609529 cannot be represented in type 'long'
Fixes: 2045/clusterfuzz-testcase-minimized-6751255865065472
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/mvdec: Fix DoS due to lack of eof check
Michael Niedermayer [Thu, 24 Aug 2017 23:15:30 +0000 (01:15 +0200)]
avformat/mvdec: Fix DoS due to lack of eof check

Fixes: loop.mv
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/rl2: Fix DoS due to lack of eof check
孙浩 and 张洪亮(望初) [Thu, 24 Aug 2017 23:15:29 +0000 (01:15 +0200)]
avformat/rl2: Fix DoS due to lack of eof check

Fixes: loop.rl2
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/rmdec: Fix DoS due to lack of eof check
孙浩 and 张洪亮(望初) [Thu, 24 Aug 2017 23:15:28 +0000 (01:15 +0200)]
avformat/rmdec: Fix DoS due to lack of eof check

Fixes: loop.ivr
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/cinedec: Fix DoS due to lack of eof check
孙浩 and 张洪亮(望初) [Thu, 24 Aug 2017 23:15:27 +0000 (01:15 +0200)]
avformat/cinedec: Fix DoS due to lack of eof check

Fixes: loop.cine
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/asfdec: Fix DoS due to lack of eof check
孙浩 and 张洪亮(望初) [Fri, 25 Aug 2017 10:37:25 +0000 (12:37 +0200)]
avformat/asfdec: Fix DoS due to lack of eof check

Fixes: loop.asf
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavformat/hls: Fix DoS due to infinite loop
Michael Niedermayer [Fri, 25 Aug 2017 23:26:58 +0000 (01:26 +0200)]
avformat/hls: Fix DoS due to infinite loop

Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agolavd: implement NewTek NDI input/output device support
Maksym Veremeyenko [Fri, 18 Aug 2017 13:34:06 +0000 (09:34 -0400)]
lavd: implement NewTek NDI input/output device support

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavdevice/decklink_enc: enable 16 output channel
pkviet [Sun, 2 Jul 2017 21:50:56 +0000 (23:50 +0200)]
avdevice/decklink_enc: enable 16 output channel

Decklink devices can output 2, 8 or 16 audio channels along video.
The code was limited to 2 or 8 channels. The commit enables 16 audio
channels (relevant for SDI outputs).

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavdevice/decklink_dec: fix signed and unsigned comparison warning
Marton Balint [Sun, 27 Aug 2017 15:55:02 +0000 (17:55 +0200)]
avdevice/decklink_dec: fix signed and unsigned comparison warning

Signed-off-by: Marton Balint <cus@passwd.hu>
6 years agoavfilter/vf_zoompan: parse zoom,x and y expression during initialization
Paul B Mahol [Sun, 27 Aug 2017 15:11:40 +0000 (17:11 +0200)]
avfilter/vf_zoompan: parse zoom,x and y expression during initialization

Fixes #6127.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_zoompan: switch to activate
Paul B Mahol [Sun, 27 Aug 2017 14:51:24 +0000 (16:51 +0200)]
avfilter/vf_zoompan: switch to activate

Fixes #5182.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_amix: do not request samples if inlink reached EOF
Paul B Mahol [Sun, 27 Aug 2017 06:49:58 +0000 (08:49 +0200)]
avfilter/af_amix: do not request samples if inlink reached EOF

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavcoec/snowenc: silence some deprecation warnings
James Almer [Sun, 27 Aug 2017 01:08:47 +0000 (22:08 -0300)]
avcoec/snowenc: silence some deprecation warnings

6 years agoconfigure: add avx2 enabled log
Martin Vignali [Sat, 26 Aug 2017 19:26:00 +0000 (21:26 +0200)]
configure: add avx2 enabled log

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavfilter/af_amix: simplify const entries for duration in amix_options[]
Paul B Mahol [Sat, 26 Aug 2017 19:17:27 +0000 (21:17 +0200)]
avfilter/af_amix: simplify const entries for duration in amix_options[]

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_amix: switch to activate
Paul B Mahol [Sat, 26 Aug 2017 15:47:56 +0000 (17:47 +0200)]
avfilter/af_amix: switch to activate

Really fixes hangs and infinite loops.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agodoc/filters: improve pseudocolor example
Paul B Mahol [Sat, 26 Aug 2017 13:18:33 +0000 (15:18 +0200)]
doc/filters: improve pseudocolor example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agolavc/sinewin_tablegen: Fix compilation with --enable-hardcoded-tables.
Carl Eugen Hoyos [Sat, 26 Aug 2017 10:48:43 +0000 (12:48 +0200)]
lavc/sinewin_tablegen: Fix compilation with --enable-hardcoded-tables.

Reported by irc user JCount_.

6 years agolavc/utils: Calculate frame duration for little-endian G.726.
Carl Eugen Hoyos [Sat, 26 Aug 2017 09:59:34 +0000 (11:59 +0200)]
lavc/utils: Calculate frame duration for little-endian G.726.

6 years agolavf/rawenc: Add little- and big-endian G.726 muxers.
Carl Eugen Hoyos [Sat, 26 Aug 2017 09:43:09 +0000 (11:43 +0200)]
lavf/rawenc: Add little- and big-endian G.726 muxers.

6 years agoavfilter/af_surround: make volume configurable for front center and lfe channel
Paul B Mahol [Sat, 26 Aug 2017 09:26:48 +0000 (11:26 +0200)]
avfilter/af_surround: make volume configurable for front center and lfe channel

6 years agoffmpeg options: Enable trailing ? for map_channel
pkviet [Tue, 22 Aug 2017 09:30:45 +0000 (11:30 +0200)]
ffmpeg options: Enable trailing ? for map_channel

The -map option allows for a trailing ? so that an error is not thrown if
the input stream does not exist.
This capability is extended to the map_channel option.
This allows a ffmpeg command not to break if an input channel does not
exist, which can be of use (for instance, scripts processing audio
channels with sources having unset number of audio channels).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dvbsubdec: Check for duplicate regions in dvbsub_parse_page_segment()
Michael Niedermayer [Tue, 22 Aug 2017 01:31:49 +0000 (03:31 +0200)]
avcodec/dvbsubdec: Check for duplicate regions in dvbsub_parse_page_segment()

Fixes: OOM
Fixes: 3051/clusterfuzz-testcase-minimized-5745818336231424
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: add missing FF_API_DEBUG_MV wrappers
James Almer [Fri, 25 Aug 2017 16:44:52 +0000 (13:44 -0300)]
avcodec: add missing FF_API_DEBUG_MV wrappers

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agoavcodec: make the avcodec_get_chroma_sub_sample deprecation effective
James Almer [Fri, 25 Aug 2017 15:09:26 +0000 (12:09 -0300)]
avcodec: make the avcodec_get_chroma_sub_sample deprecation effective

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
6 years agoutils: Do not expand a macro with 'defined' in it
Derek Buitenhuis [Thu, 24 Aug 2017 20:00:01 +0000 (21:00 +0100)]
utils: Do not expand a macro with 'defined' in it

Fixes:

    libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
    #if USE_MMAP
        ^
    libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
    #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
                                                    ^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agomjpeg: Add support for ICC side data
Derek Buitenhuis [Wed, 23 Aug 2017 16:08:44 +0000 (17:08 +0100)]
mjpeg: Add support for ICC side data

JPEGs store embedded profiles under the APP2 marker, signified
with a "ICC_PROFILE" null-terminated string header, and can be
split across multiple APP2 markers, out of order.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
6 years agodoc/filters: add pseudocolor example
Paul B Mahol [Fri, 25 Aug 2017 12:27:21 +0000 (14:27 +0200)]
doc/filters: add pseudocolor example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_firequalizer: fix minval on cepstrum calculation
Muhammad Faiz [Fri, 25 Aug 2017 10:36:04 +0000 (17:36 +0700)]
avfilter/af_firequalizer: fix minval on cepstrum calculation

The impulse response is scaled with 2/rdft_len.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
6 years agoavfilter/src_movie: check ff_insert_outpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:29:50 +0000 (10:29 +0200)]
avfilter/src_movie: check ff_insert_outpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/split: check ff_insert_outpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:27:19 +0000 (10:27 +0200)]
avfilter/split: check ff_insert_outpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_decimate: check ff_insert_inpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:23:21 +0000 (10:23 +0200)]
avfilter/vf_decimate: check ff_insert_inpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_fieldmatch: check ff_insert_inpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:20:13 +0000 (10:20 +0200)]
avfilter/vf_fieldmatch: check ff_insert_inpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/avf_concat: check ff_insert_pad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:13:48 +0000 (10:13 +0200)]
avfilter/avf_concat: check ff_insert_pad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/f_select: check ff_insert_outpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:04:28 +0000 (10:04 +0200)]
avfilter/f_select: check ff_insert_outpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_channelsplit: check ff_insert_outpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 08:01:52 +0000 (10:01 +0200)]
avfilter/af_channelsplit: check ff_insert_outpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/vf_extractplanes: check ff_insert_outpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 07:57:53 +0000 (09:57 +0200)]
avfilter/vf_extractplanes: check ff_insert_outpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/f_interleave: check ff_insert_inpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 07:53:46 +0000 (09:53 +0200)]
avfilter/f_interleave: check ff_insert_inpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
6 years agoavfilter/af_merge: check ff_insert_inpad() for failure
Paul B Mahol [Fri, 25 Aug 2017 07:50:57 +0000 (09:50 +0200)]
avfilter/af_merge: check ff_insert_inpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>