]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agolavc/h263dec: Remove a variable declaration that can lead to a warning.
Carl Eugen Hoyos [Wed, 11 Jul 2018 22:07:55 +0000 (00:07 +0200)]
lavc/h263dec: Remove a variable declaration that can lead to a warning.

5 years agolavfi/convolution_opencl: use CL_FAIL_ON_ERROR for error handling
Danil Iashchenko [Thu, 12 Jul 2018 22:20:18 +0000 (01:20 +0300)]
lavfi/convolution_opencl: use CL_FAIL_ON_ERROR for error handling

Switch to use CL_FAIL_ON_ERROR for error handling

5 years agolavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case
Zhong Li [Tue, 3 Jul 2018 08:01:30 +0000 (16:01 +0800)]
lavc/qsv: handle MFX_FRAMETYPE_UNKNOWN case

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agoavformat/mov: Eliminate variable buf_size from mov_estimate_video_delay()
Michael Niedermayer [Wed, 11 Jul 2018 00:17:56 +0000 (02:17 +0200)]
avformat/mov: Eliminate variable buf_size from mov_estimate_video_delay()

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: remove modulo operations from mov_estimate_video_delay()
Michael Niedermayer [Wed, 11 Jul 2018 00:17:55 +0000 (02:17 +0200)]
avformat/mov: remove modulo operations from mov_estimate_video_delay()

0.324 <-0.491 sec

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/avgblur_opencl: fix using uninitialized value
Danil Iashchenko [Mon, 9 Jul 2018 12:41:48 +0000 (15:41 +0300)]
lavfi/avgblur_opencl: fix using uninitialized value

Fixed using uninitialized value "global_work[0]" when calling "av_log".

Fixes CID #1437471.

5 years agolavfi/vf_avgblur_opencl: remove useless clFinish().
Ruiling Song [Tue, 3 Jul 2018 18:16:25 +0000 (02:16 +0800)]
lavfi/vf_avgblur_opencl: remove useless clFinish().

The very last clFinish() should be ok.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: Danil Iashchenko <danyaschenko@gmail.com>
5 years agolavfi/opencl: add macro for opencl error handling.
Ruiling Song [Tue, 3 Jul 2018 18:16:24 +0000 (02:16 +0800)]
lavfi/opencl: add macro for opencl error handling.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years agoavutil/pixelutils: correct the function name in comments
Jun Zhao [Sun, 8 Jul 2018 08:26:47 +0000 (16:26 +0800)]
avutil/pixelutils: correct the function name in comments

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavformat/hlsenc: improve compute after_init_list_dur
Steven Liu [Mon, 9 Jul 2018 09:05:30 +0000 (17:05 +0800)]
avformat/hlsenc: improve compute after_init_list_dur

fix ticket: 7305
vs->sequence - hls->start_sequence - vs->nb_entries is the
after_init_list_dur fragment numbers
fix the wrong compute way vs->sequence - vs->nb_entries

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agofate: allow temp files for passed test to be kept
Gyan Doshi [Fri, 6 Jul 2018 09:23:33 +0000 (14:53 +0530)]
fate: allow temp files for passed test to be kept

Set make variable KEEP to non-zero value to preserve temp files
when a test has passed.

Helpful in diagnosing failed tests when test outfile is some type of
single hash and does not reveal differences in processed output.

5 years agoavformat/movenc: Write version 2 of audio atom if channels is not known
Michael Niedermayer [Sat, 7 Jul 2018 22:16:42 +0000 (00:16 +0200)]
avformat/movenc: Write version 2 of audio atom if channels is not known

The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoaadec: add chapters and seeking
Karsten Otto [Sun, 8 Jul 2018 09:46:26 +0000 (11:46 +0200)]
aadec: add chapters and seeking

read_packet reads content in chunks. Thus seek must be clamped to valid
chunk positions in the file, which in turn are relative to chapter start
positions.

So in read_header, scan for chapter headers once by skipping through the
content. Set stream time_base based on bitrate in bytes/s, for easy
timestamp to position conversion.

Then in read_seek, find the chapter containing the seek position, calculate
the nearest chunk position, and reinit the read_seek state accordingly.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavcodec/mpegaudiodecheader.h : detect reserved mpeg id
Karsten Otto [Sun, 8 Jul 2018 10:26:10 +0000 (12:26 +0200)]
libavcodec/mpegaudiodecheader.h : detect reserved mpeg id

Check the MPEG version ID for the reserved bit pattern 01, and abort the
header check in that case. This reduces the chance of misinterpreting
arbitrary data as a valid header, and prevents resulting audio artifacts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/minterpolate: fix blending calc issue.
Jun Zhao [Wed, 27 Jun 2018 07:09:25 +0000 (15:09 +0800)]
lavfi/minterpolate: fix blending calc issue.

the right blending calc is:
(alpha * Frame_2 + (MAX - alpha) * Frame_1 + 512) >> 10

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoaadec: improve eof detection
Karsten Otto [Sat, 7 Jul 2018 17:41:27 +0000 (19:41 +0200)]
aadec: improve eof detection

Remember the end position of audio content in the file and check it during
read_packet. There always seems to be other data beyond it, which could be
misinterpreted as more audio. Also add some extra avio_read error checks,
to bail early in case of a broken/truncated file.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/movenc: Check input sample count
Michael Niedermayer [Fri, 6 Jul 2018 20:23:25 +0000 (22:23 +0200)]
avformat/movenc: Check input sample count

Fixes: division by 0
Fixes: fpe_movenc.c_199_1.wav
Fixes: fpe_movenc.c_199_2.wav
Fixes: fpe_movenc.c_199_3.wav
Fixes: fpe_movenc.c_199_4.wav
Fixes: fpe_movenc.c_199_5.wav
Fixes: fpe_movenc.c_199_6.wav
Fixes: fpe_movenc.c_199_7.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mjpegdec: Check for odd progressive RGB
Michael Niedermayer [Fri, 6 Jul 2018 14:28:14 +0000 (16:28 +0200)]
avcodec/mjpegdec: Check for odd progressive RGB

Fixes: out of array access
Fixes: 9225/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5684770334834688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/setpts: add FR shorthand for FRAME_RATE
Gyan Doshi [Thu, 5 Jul 2018 09:54:55 +0000 (15:24 +0530)]
avfilter/setpts: add FR shorthand for FRAME_RATE

5 years agolibavcodec/vp8: Do not compute line pointers per pixel in fade()
Michael Niedermayer [Sun, 24 Jun 2018 00:50:16 +0000 (02:50 +0200)]
libavcodec/vp8: Do not compute line pointers per pixel in fade()

72->60 seconds
Testcase: 8680/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5861504418054144

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotests/fate/demux: Add test for d25c945247979a88fac6bb3b7a26370262b96ef1
Michael Niedermayer [Tue, 26 Jun 2018 19:26:12 +0000 (21:26 +0200)]
tests/fate/demux: Add test for d25c945247979a88fac6bb3b7a26370262b96ef1

Sample provided by Thierry for fate

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/vp8_parser: Do not leave data/size uninitialized
Michael Niedermayer [Fri, 6 Jul 2018 10:01:46 +0000 (12:01 +0200)]
avcodec/vp8_parser: Do not leave data/size uninitialized

This is identical to what the VP9 parser does

Fixes: 9215/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-5768227253649408
Fixes: out of memory access
This may also fix oss fuzz issue 9212

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotools/target_dec_fuzzer: set parser codec id to avoid assertion failure
Michael Niedermayer [Fri, 6 Jul 2018 10:16:22 +0000 (12:16 +0200)]
tools/target_dec_fuzzer: set parser codec id to avoid assertion failure

Fixes: 9211/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GSM_fuzzer-5680396581732352
Fixes: assertion failure
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mms: Add missing chunksize check
Michael Niedermayer [Tue, 3 Jul 2018 18:33:04 +0000 (20:33 +0200)]
avformat/mms: Add missing chunksize check

Fixes: out of array read
Fixes: mms-crash-01b6c5d85f9d9f40f4e879896103e9f5b222816a
Found-by: Paul Ch <paulcher@icloud.com>
1st hunk by Paul Ch <paulcher@icloud.com>
Tested-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: toolchain-tsan does not need -fPIE.
Carl Eugen Hoyos [Tue, 3 Jul 2018 20:17:06 +0000 (22:17 +0200)]
configure: toolchain-tsan does not need -fPIE.

Fixes compilation with some kernel-gcc combinations:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67308

Reported and analyzed by Gonzalo Garramuño.

5 years agoavformat/pva: Check for EOF before retrying in read_part_of_packet()
Michael Niedermayer [Tue, 3 Jul 2018 20:14:42 +0000 (22:14 +0200)]
avformat/pva: Check for EOF before retrying in read_part_of_packet()

Fixes: Infinite loop
Fixes: pva-4b1835dbc2027bf3c567005dcc78e85199240d06
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/rmdec: Do not pass mime type in rm_read_multi() to ff_rm_read_mdpr_codecdata()
Michael Niedermayer [Tue, 3 Jul 2018 19:37:46 +0000 (21:37 +0200)]
avformat/rmdec: Do not pass mime type in rm_read_multi() to ff_rm_read_mdpr_codecdata()

Fixes: use after free()
Fixes: rmdec-crash-ffe85b4cab1597d1cfea6955705e53f1f5c8a362
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/asfdec_o: Check size_bmp more fully
Michael Niedermayer [Tue, 3 Jul 2018 19:01:23 +0000 (21:01 +0200)]
avformat/asfdec_o: Check size_bmp more fully

Fixes: integer overflow and out of array access
Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mxfdec: Fix av_log context
Michael Niedermayer [Tue, 3 Jul 2018 18:38:06 +0000 (20:38 +0200)]
avformat/mxfdec: Fix av_log context

Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: state negate filter's option
Gyan Doshi [Thu, 5 Jul 2018 14:06:32 +0000 (19:36 +0530)]
doc/filters: state negate filter's option

Also clarify that the negate_alpha option is a boolean

5 years agoavcodec/mpeg4videodec: Check for bitstream end in read_quant_matrix_ext()
Michael Niedermayer [Tue, 3 Jul 2018 20:48:32 +0000 (22:48 +0200)]
avcodec/mpeg4videodec: Check for bitstream end in read_quant_matrix_ext()

Fixes: out of array read
Fixes: asff-crash-0e53d0dc491dfdd507530b66562812fbd4c36678
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mxfdec: add support for opAtom without index
Marton Balint [Sun, 24 Jun 2018 20:08:22 +0000 (22:08 +0200)]
avformat/mxfdec: add support for opAtom without index

Clip wrapped code is capable of doing some magic for such files.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: guess constant byte count indexes based on track duration
Marton Balint [Sun, 24 Jun 2018 20:07:31 +0000 (22:07 +0200)]
avformat/mxfdec: guess constant byte count indexes based on track duration

For clip wrapped essences this should work. Also, since index_edit_rate can now
be different from track edit rate, remove overriding track edit rate.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: take into account index_edit_rate
Marton Balint [Wed, 30 May 2018 00:17:20 +0000 (02:17 +0200)]
avformat/mxfdec: take into account index_edit_rate

Fixes samples/ffmpeg-bugs/roundup/issue591/02785736.mxf
Fixes samples/ffmpeg-bugs/trac/ticket1916/pcm_s24le_to_pcm_s16le.mxf

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: fix indentation and rename mxf_read_packet_old
Marton Balint [Sun, 10 Jun 2018 10:00:06 +0000 (12:00 +0200)]
avformat/mxfdec: fix indentation and rename mxf_read_packet_old

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: add support for clip wrapped essences
Marton Balint [Thu, 10 May 2018 18:30:19 +0000 (20:30 +0200)]
avformat/mxfdec: add support for clip wrapped essences

Also use common code with opAtom.

Fixes ticket #2776.
Partially fixes ticket #5671.
Fixes ticket #5866.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/atrac9tab: add missing header include
James Almer [Wed, 4 Jul 2018 18:56:23 +0000 (15:56 -0300)]
avcodec/atrac9tab: add missing header include

Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavc/atrac9tab: Add inclusion guards.
Carl Eugen Hoyos [Wed, 4 Jul 2018 16:54:44 +0000 (18:54 +0200)]
lavc/atrac9tab: Add inclusion guards.

Fixes fate-source.

5 years agolavfi/weave: Refactor two near-identical clauses.
Shlomi Fish [Thu, 28 Jun 2018 08:42:45 +0000 (11:42 +0300)]
lavfi/weave: Refactor two near-identical clauses.

The changes contained in this patch are hereby placed under the Expat licence.

Reviewed-by: Paul B Mahol
5 years agoavcodec/indeo4: Check for end of bitstream in decode_mb_info()
Michael Niedermayer [Sun, 1 Jul 2018 23:26:44 +0000 (01:26 +0200)]
avcodec/indeo4: Check for end of bitstream in decode_mb_info()

Fixes: Timeout
Fixes: 8776/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5361788798369792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/truemotion2: Check len in tm2_read_stream()
Michael Niedermayer [Sun, 1 Jul 2018 19:19:57 +0000 (21:19 +0200)]
avcodec/truemotion2: Check len in tm2_read_stream()

Fixes: Timeout
Fixes: 8774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5942199639343104
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
5 years agoavcodec/ac3dec: Check channel_map index
Michael Niedermayer [Wed, 27 Jun 2018 13:56:18 +0000 (15:56 +0200)]
avcodec/ac3dec: Check channel_map index

Fixes: out of array read
Fixes: 8924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5851861780267008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as indicator...
Michael Niedermayer [Mon, 2 Jul 2018 22:27:04 +0000 (00:27 +0200)]
avcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as indicator of studio profile

The profile field is changed by code inside and outside the decoder,
its not a reliable indicator of the internal codec state.
Maintaining it consistency with studio_profile is messy.
Its easier to just avoid it and use only studio_profile

Fixes: assertion failure
Fixes: ffmpeg_crash_9.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Fix undefined addition in shorten_decode_frame()
Michael Niedermayer [Mon, 2 Jul 2018 17:11:46 +0000 (19:11 +0200)]
avcodec/shorten: Fix undefined addition in shorten_decode_frame()

Fixes: signed integer overflow: 1139785606 + 1454196085 cannot be represented in type 'int'
Fixes: 8937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-6202943597445120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Fix undefined integer overflow
Michael Niedermayer [Mon, 2 Jul 2018 17:08:54 +0000 (19:08 +0200)]
avcodec/shorten: Fix undefined integer overflow

Fixes: signed integer overflow: 8454144 * 256 cannot be represented in type 'int'
Fixes: 8788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5728205041303552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/jpeg2000dec: Fixes invalid shifts in jpeg2000_decode_packets_po_iteration()
Michael Niedermayer [Mon, 2 Jul 2018 16:57:05 +0000 (18:57 +0200)]
avcodec/jpeg2000dec: Fixes invalid shifts in jpeg2000_decode_packets_po_iteration()

Fixes: shift exponent 47 is too large for 32-bit type 'int'
Fixes: 9163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5661750182543360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/jpeg2000dec: Check that there are enough bytes for all tiles
Michael Niedermayer [Mon, 2 Jul 2018 16:40:08 +0000 (18:40 +0200)]
avcodec/jpeg2000dec: Check that there are enough bytes for all tiles

Fixes: OOM
Fixes: 8781/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5810709081358336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Expose encryption info to the app.
Jacob Trimble [Thu, 7 Dec 2017 00:17:54 +0000 (16:17 -0800)]
avformat/mov: Expose encryption info to the app.

This exposes encryption info from the container to the app.  This
includes key ID, IV, and subsample byte ranges.  The info is passed
using the new side-data AV_PKT_DATA_ENCRYPTION_DATA and
AV_PKT_DATA_ENCRYPTION_INIT_DATA.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoriff: add ATRAC9 guid
Rostislav Pehlivanov [Sat, 30 Jun 2018 07:32:05 +0000 (08:32 +0100)]
riff: add ATRAC9 guid

Enables demuxing of ATRAC9 files.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolavc: implement an ATRAC9 decoder
Rostislav Pehlivanov [Sat, 30 Jun 2018 07:31:31 +0000 (08:31 +0100)]
lavc: implement an ATRAC9 decoder

This commit implements a full ATRAC9 decoder, a simple low-delay codec
developed by Sony and used in most PSVita games, some PS3 games and some
PS4 games. Its similar to AAC in that it uses Huffman coded scalefactors
but instead of vector quantization it just Huffman codes the spectral
coefficients (in a way similar to how Opus splits band energy coding
into coarse and fine precision). It opts to write rather large Huffman
codes by packing several small coefficients into one Huffman coded
symbol, though I don't believe this increases efficiency at all.
Band extension implements SBC in a simple way, first it mirrors the
lower spectrum onto the higher frequencies and then it uses one of 5
filters to shape it. Noise substitution is implemented via 2 of them.
Unlike previous ATRAC codecs, there's no QMF, this is a standard MDCT
codec.

Based off of the reverse engineering work of Alex Barney.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoconfigure: add missing swscale to avfilter when sr filter is enabled
James Almer [Tue, 3 Jul 2018 01:18:47 +0000 (22:18 -0300)]
configure: add missing swscale to avfilter when sr filter is enabled

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavfi: add sobel, prewitt, roberts filters
Danil Iashchenko [Sat, 30 Jun 2018 00:46:24 +0000 (03:46 +0300)]
lavfi: add sobel, prewitt, roberts filters

Add opencl version of sobel, prewitt, roberts filters.

5 years agolibavfilter: vf_sr.c remove warnings
Pedro Arthur [Mon, 2 Jul 2018 16:45:38 +0000 (13:45 -0300)]
libavfilter: vf_sr.c remove warnings

5 years agoAdds ESPCN super resolution filter merged with SRCNN filter.
Sergey Lavrushkin [Wed, 13 Jun 2018 21:37:12 +0000 (00:37 +0300)]
Adds ESPCN super resolution filter merged with SRCNN filter.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoavcodec/dvdsubdec: Check for fully transparent rectangles earlier
Michael Niedermayer [Sat, 30 Jun 2018 21:34:14 +0000 (23:34 +0200)]
avcodec/dvdsubdec: Check for fully transparent rectangles earlier

Testcase with large transparent rectangles changes from 67 sec to 3 sec decode time

Fixes: Timeout
Fixes: 8728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5190088756559872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/apngdec: set pts to AV_NOPTS_VALUE
Marton Balint [Thu, 28 Jun 2018 19:07:30 +0000 (21:07 +0200)]
avformat/apngdec: set pts to AV_NOPTS_VALUE

And let the generic code figure out the proper PTS. This is needed because apng
does not provide seek functions, but after a generic seek (e.g. to file start)
timestamps are not reset which causes broken timestamps when looping apngs,
like in ticket #6121.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoffmpeg: fix -stream_loop with multiple inputs
Marton Balint [Wed, 27 Jun 2018 20:27:01 +0000 (22:27 +0200)]
ffmpeg: fix -stream_loop with multiple inputs

The input thread needs to be properly cleaned up and re-initalized before we
can start reading again in threaded mode. (Threaded input reading is used when
there is mode than one input file).

Fixes ticket #6121 and #7043.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoffmpeg: factorize input thread creation and destruction
Marton Balint [Wed, 27 Jun 2018 19:55:38 +0000 (21:55 +0200)]
ffmpeg: factorize input thread creation and destruction

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agotools/target_dec_fuzzer: Fix parser_avctx memleak on error path
Michael Niedermayer [Sat, 30 Jun 2018 13:48:58 +0000 (15:48 +0200)]
tools/target_dec_fuzzer: Fix parser_avctx memleak on error path

Fixes: oss-fuzz issue 9195
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/vc1_block: Fix mqaunt check for negative values
Michael Niedermayer [Thu, 28 Jun 2018 21:46:32 +0000 (23:46 +0200)]
avcodec/vc1_block: Fix mqaunt check for negative values

Fixes: out of array access
Fixes: ffmpeg_bof_4.avi
Fixes: ffmpeg_bof_5.avi
Fixes: ffmpeg_bof_6.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Reviewed-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavformat/yuv4mpeg: Add color range support for Y4M Add color_range support in...
Wang Cao [Thu, 28 Jun 2018 08:32:01 +0000 (16:32 +0800)]
libavformat/yuv4mpeg: Add color range support for Y4M Add color_range support in Y4M.

Set pixel format and color_range for YUVJ pixel formats. Also set
color_range based on AVFormatContext.

Signed-off-by: Wang Cao <wangcao@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoChangelog: Mention vc1 improvements by Jerome Borsboom.
Carl Eugen Hoyos [Thu, 28 Jun 2018 23:34:23 +0000 (01:34 +0200)]
Changelog: Mention vc1 improvements by Jerome Borsboom.

5 years agoavcodec/vc1: fix check for missing CBPTAB
Jerome Borsboom [Wed, 20 Jun 2018 13:17:34 +0000 (15:17 +0200)]
avcodec/vc1: fix check for missing CBPTAB

CBPTAB must be present in (non skipped) P and B pictures.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
5 years agoavcodec/vc1: fix overlap filter for frame interlaced pictures
Jerome Borsboom [Wed, 20 Jun 2018 11:11:07 +0000 (13:11 +0200)]
avcodec/vc1: fix overlap filter for frame interlaced pictures

The overlap filter is not correct for vertical edges in frame interlaced
I and P pictures. When filtering macroblocks with different FIELDTX values,
we have to match the lines at both sides of the vertical border. In addition,
we have to use the correct rounding values, depending on the line we are
filtering.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
5 years agoavcodec/vc1: change the internal ordering of blocks within a macroblock
Jerome Borsboom [Wed, 20 Jun 2018 11:11:03 +0000 (13:11 +0200)]
avcodec/vc1: change the internal ordering of blocks within a macroblock

The overlap filter needs to cover a full macroblock vertical edge when the
FIELDTX value for two neighbouring macroblocks is not equal. By changing
the internal ordering of the blocks from row major to column major, we do
not need to reinterlace a FIELDTX coded macroblock before running the overlap
filter.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
5 years agoavcodec/vc1: fix condition guarding overlap filter on I picture
Jerome Borsboom [Wed, 20 Jun 2018 11:10:58 +0000 (13:10 +0200)]
avcodec/vc1: fix condition guarding overlap filter on I picture

The overlap filter needs to run when PQUANT is 9 or higher, irrespective
of CONDOVER.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
5 years agohwcontext_opencl: remove an unused variable
Jun Zhao [Mon, 18 Jun 2018 12:19:39 +0000 (20:19 +0800)]
hwcontext_opencl: remove an unused variable

remove an unused variable

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agohwcontext_opencl: Remove the opencl_device_init in opencl_device_derive
Jun Zhao [Wed, 20 Jun 2018 03:13:59 +0000 (11:13 +0800)]
hwcontext_opencl: Remove the opencl_device_init in opencl_device_derive

In opencl device derived case, don't need to call opencl_device_init.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoconfigure: fix check for opencl_vaapi_intel_media.
Jun Zhao [Sat, 2 Jun 2018 03:06:50 +0000 (11:06 +0800)]
configure: fix check for opencl_vaapi_intel_media.

opencl_vaapi_intel_media doesn't depend on libmfx, OpenCL™ Drivers
and Runtimes for Intel® Architectureis is a standalone release, more
information can be found in the link:
https://software.intel.com/en-us/articles/opencl-drivers.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoh264_slice: Fix return of incomplete frames from decoder
John Stebbins [Wed, 27 Jun 2018 22:12:24 +0000 (15:12 -0700)]
h264_slice: Fix return of incomplete frames from decoder

When not using libavformat for demuxing, AVCodecContext.has_b_frames
gets set too late causing the recovery frame heuristic in h264_refs to
incorrectly flag an early frame as recovered.

This patch sets has_b_frames earlier to prevent improperly flagging the
frame as recovered.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/movenc: Use mov->fc consistently for av_log()
Michael Niedermayer [Wed, 27 Jun 2018 21:41:52 +0000 (23:41 +0200)]
avformat/movenc: Use mov->fc consistently for av_log()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotools/target_dec_fuzzer: Also optionally fuzz with a parser
Michael Niedermayer [Sat, 23 Jun 2018 11:35:17 +0000 (13:35 +0200)]
tools/target_dec_fuzzer: Also optionally fuzz with a parser

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg4videodec: Check read profile before setting it
Michael Niedermayer [Wed, 27 Jun 2018 17:37:09 +0000 (19:37 +0200)]
avcodec/mpeg4videodec: Check read profile before setting it

Fixes: null pointer dereference
Fixes: ffmpeg_crash_7.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample
Michael Niedermayer [Wed, 27 Jun 2018 15:27:50 +0000 (17:27 +0200)]
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample

Fixes: out of array read
Fixes: ffmpeg_crash_8.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ac3_parser: Check init_get_bits8() for failure
Michael Niedermayer [Wed, 27 Jun 2018 14:59:13 +0000 (16:59 +0200)]
avcodec/ac3_parser: Check init_get_bits8() for failure

Fixes: null pointer dereference
Fixes: ffmpeg_crash_6.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/movenc: Check that frame_types other than EAC3_FRAME_TYPE_INDEPENDENT have...
Michael Niedermayer [Wed, 27 Jun 2018 14:51:51 +0000 (16:51 +0200)]
avformat/movenc: Check that frame_types other than EAC3_FRAME_TYPE_INDEPENDENT have a supported substream id

Fixes: out of array access
Fixes: ffmpeg_bof_1.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/dpx: Check elements in 12bps planar path
Michael Niedermayer [Wed, 27 Jun 2018 14:12:39 +0000 (16:12 +0200)]
avcodec/dpx: Check elements in 12bps planar path

Fixes: null pointer dereference
Fixes: 8946/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DPX_fuzzer-5078915222601728
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/colorspace: Add namespace prefix to global functions
Mark Thompson [Sat, 23 Jun 2018 16:51:14 +0000 (17:51 +0100)]
lavfi/colorspace: Add namespace prefix to global functions

6 years agoffmpeg: make loglevel verbose for frame duration warning
Gyan Doshi [Thu, 28 Jun 2018 08:35:31 +0000 (14:05 +0530)]
ffmpeg: make loglevel verbose for frame duration warning

6 years agoavcodec/qsvenc: fix version detection on cygwin
Timo Rothenpieler [Fri, 15 Jun 2018 14:52:28 +0000 (16:52 +0200)]
avcodec/qsvenc: fix version detection on cygwin

6 years agoavcodec/escape124: Fix spelling errors in comment
Michael Niedermayer [Wed, 27 Jun 2018 11:00:28 +0000 (13:00 +0200)]
avcodec/escape124: Fix spelling errors in comment

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/dvbsubdec: Compute scoretab without iterating over pixels multiple times...
Michael Niedermayer [Thu, 21 Jun 2018 21:32:23 +0000 (23:32 +0200)]
avcodec/dvbsubdec: Compute scoretab without iterating over pixels multiple times in compute_default_clut()

Improves speed 102->2 sec
Testcase: 8655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVBSUB_fuzzer-6277869285146624
Fixes: Timeout
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/ra144: Fix integer overflow in ff_eval_refl()
Michael Niedermayer [Thu, 21 Jun 2018 21:08:32 +0000 (23:08 +0200)]
avcodec/ra144: Fix integer overflow in ff_eval_refl()

Fixes: signed integer overflow: -4096 * -524288 cannot be represented in type 'int'
Fixes: 8650/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-5734816036159488
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 agolibavutil/encryption_info: Add unit tests.
Jacob Trimble [Fri, 1 Jun 2018 18:38:05 +0000 (11:38 -0700)]
libavutil/encryption_info: Add unit tests.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavutil/gitignore: Ignore integer test binary.
Jacob Trimble [Tue, 26 Jun 2018 16:35:05 +0000 (09:35 -0700)]
avutil/gitignore: Ignore integer test binary.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavutil/encryption_info: Fix documentation problem.
Jacob Trimble [Tue, 26 Jun 2018 16:32:14 +0000 (09:32 -0700)]
avutil/encryption_info: Fix documentation problem.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agov4l2_m2m: decoder: fix memory leak
Lukas Rusak [Tue, 26 Jun 2018 21:36:46 +0000 (14:36 -0700)]
v4l2_m2m: decoder: fix memory leak

6 years agolavf/amr: Fix heuristic to avoid detection of repeated bytes.
Carl Eugen Hoyos [Mon, 25 Jun 2018 21:20:09 +0000 (23:20 +0200)]
lavf/amr: Fix heuristic to avoid detection of repeated bytes.

6 years agofftools/ffmpeg: check sseof value and clash with ss
Gyan Doshi [Fri, 22 Jun 2018 16:32:16 +0000 (22:02 +0530)]
fftools/ffmpeg: check sseof value and clash with ss

Prioritize -ss

6 years agolavc/libopenjpeg: Support GRAY10, GRAY12 and GRAY14.
Carl Eugen Hoyos [Thu, 21 Jun 2018 10:05:40 +0000 (12:05 +0200)]
lavc/libopenjpeg: Support GRAY10, GRAY12 and GRAY14.

6 years agoavcodec/cscd: Check output buffer size for lzo.
Michael Niedermayer [Thu, 21 Jun 2018 23:18:20 +0000 (01:18 +0200)]
avcodec/cscd: Check output buffer size for lzo.

Fixes: Timeout
Fixes: 8665/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-5768442610188288
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
6 years agoavcodec/ffv1dec: Check state transition table
Michael Niedermayer [Thu, 21 Jun 2018 20:10:23 +0000 (22:10 +0200)]
avcodec/ffv1dec: Check state transition table

Fixes: Timeout
Fixes: 8646/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5649968353247232
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/escape124: Check buf_size against num_superblocks
Michael Niedermayer [Sun, 24 Jun 2018 17:23:02 +0000 (19:23 +0200)]
avcodec/escape124: Check buf_size against num_superblocks

Fixes: Timeout
Fixes: 8722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-4843268402577408
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/mpjpegdec: Mark local variable static
Mark Thompson [Fri, 22 Jun 2018 14:52:58 +0000 (15:52 +0100)]
lavf/mpjpegdec: Mark local variable static

6 years agolavfi/vf_tonemap_opencl: Mark local tables static
Mark Thompson [Sat, 23 Jun 2018 16:52:08 +0000 (17:52 +0100)]
lavfi/vf_tonemap_opencl: Mark local tables static

6 years agoconfigure: bump minimum required version of libaom
James Almer [Mon, 25 Jun 2018 19:04:32 +0000 (16:04 -0300)]
configure: bump minimum required version of libaom

Version 1.0.0 is the first release after the bitstream freeze.

Signed-off-by: James Almer <jamrial@gmail.com>
6 years agofrom RTCTIME to N*23, step is 23
Steven Liu [Mon, 25 Jun 2018 06:06:45 +0000 (14:06 +0800)]
from RTCTIME to N*23, step is 23
fix ticket: 7225

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
6 years agoavcodec/h264_parser: Reduce needed history for parsing mb index
Michael Niedermayer [Fri, 22 Jun 2018 19:45:59 +0000 (21:45 +0200)]
avcodec/h264_parser: Reduce needed history for parsing mb index

This fixes a bug/regression with very small packets
Fixes: output_file
Regression since: 0782fb6bcb32fe3ab956a99af4cc472ff81da0c2

Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years agoavcodec/magicyuv: Check bits left in flags&1 branch
Michael Niedermayer [Sat, 23 Jun 2018 21:37:10 +0000 (23:37 +0200)]
avcodec/magicyuv: Check bits left in flags&1 branch

Fixes: Timeout
Fixes: 8690/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-6542020913922048
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 agoavformat/mxfdec: avoid index_table->nb_ptses overflow in mxf_compute_ptses_fake_index
Marton Balint [Tue, 12 Jun 2018 21:42:16 +0000 (23:42 +0200)]
avformat/mxfdec: avoid index_table->nb_ptses overflow in mxf_compute_ptses_fake_index

Signed-off-by: Marton Balint <cus@passwd.hu>