]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agolavf/mov: Force HEVC codec_id for code-point dvh1 and an hvcC atom.
Carl Eugen Hoyos [Mon, 6 Aug 2018 22:33:40 +0000 (00:33 +0200)]
lavf/mov: Force HEVC codec_id for code-point dvh1 and an hvcC atom.

The mp4 registration authority accepted a code-point for Dolby Vision
HEVC that was already used as a fourcc for DVCPRO 100.

Fixes ticket #7347.

5 years agolibavformat/dashdec: Fix for un-free memory
Colin NG [Wed, 8 Aug 2018 17:27:07 +0000 (17:27 +0000)]
libavformat/dashdec: Fix for un-free memory

Fixes ticket #7338.

5 years agoMAINTAINERS: add myself to MIPS section
Shiyou Yin [Thu, 26 Jul 2018 03:46:23 +0000 (11:46 +0800)]
MAINTAINERS: add myself to MIPS section

Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffmpeg: simplify refcounting packets for the muxing queue
James Almer [Mon, 6 Aug 2018 00:34:14 +0000 (21:34 -0300)]
ffmpeg: simplify refcounting packets for the muxing queue

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavs2: correct avs2 description
hwren [Tue, 7 Aug 2018 10:39:34 +0000 (18:39 +0800)]
avs2: correct avs2 description

Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agolavc/libx264: Support monochrome encoding.
Carl Eugen Hoyos [Tue, 7 Aug 2018 18:41:02 +0000 (20:41 +0200)]
lavc/libx264: Support monochrome encoding.

5 years agolibavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_bac...
Sergey Lavrushkin [Sat, 28 Jul 2018 09:55:02 +0000 (12:55 +0300)]
libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter: Code style fixes for pointers in DNN module and sr filter.
Sergey Lavrushkin [Fri, 27 Jul 2018 16:34:02 +0000 (19:34 +0300)]
libavfilter: Code style fixes for pointers in DNN module and sr filter.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter: Adds on the fly generation of default DNN models for tensorflow backend...
Sergey Lavrushkin [Fri, 27 Jul 2018 16:31:55 +0000 (19:31 +0300)]
libavfilter: Adds on the fly generation of default DNN models for tensorflow backend instead of storing binary model.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoavformat/flvdec: add flv_full_metadata option into flvdec
Steven Liu [Tue, 7 Aug 2018 07:51:36 +0000 (15:51 +0800)]
avformat/flvdec: add flv_full_metadata option into flvdec

output all the metadata context when use this option.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/flvdec: reindent code for previous commit
Steven Liu [Tue, 7 Aug 2018 07:50:47 +0000 (15:50 +0800)]
avformat/flvdec: reindent code for previous commit

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/flvdec: add flv_ignore_prevtag option into flvdec
Steven Liu [Tue, 7 Aug 2018 07:48:23 +0000 (15:48 +0800)]
avformat/flvdec: add flv_ignore_prevtag option into flvdec

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: remove unused functions and process code
Steven Liu [Tue, 7 Aug 2018 04:37:02 +0000 (12:37 +0800)]
avformat/dashdec: remove unused functions and process code

Based on a patch for hls by Richard Shaffer

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: Fix memleak when resolve_content_path
Jacek Jendrzej [Tue, 7 Aug 2018 03:32:05 +0000 (11:32 +0800)]
avformat/dashdec: Fix memleak when resolve_content_path

Can be reproduced with:  valgrind  --leak-check=full  -v ffmpeg -i
http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: fix for ticket #7336
Jacek Jendrzej [Tue, 7 Aug 2018 03:30:04 +0000 (11:30 +0800)]
avformat/dashdec: fix for ticket #7336

fix for ticket #7336

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agofftools/qsv: add extra_hw_frames support
Zhong Li [Wed, 25 Jul 2018 08:05:38 +0000 (16:05 +0800)]
fftools/qsv: add extra_hw_frames support

Currently extra_hw_frames can't be applied to qsv since it
doesn't call function avcodec_get_hw_frames_parameters().

Give an option to fix ticket #7261 though it is not a perfect soultion
(allocate the minimum pool size internally and automatically).

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agolavc/qsvenc: expose qp of encoded frames
Zhong Li [Fri, 1 Jun 2018 10:21:28 +0000 (18:21 +0800)]
lavc/qsvenc: expose qp of encoded frames

Requirement from ticket #7254.
Currently only H264 supported by MSDK.

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agovf_tonemap: Update hdr metadata with the new peak value
Vittorio Giovara [Wed, 25 Jul 2018 15:45:46 +0000 (17:45 +0200)]
vf_tonemap: Update hdr metadata with the new peak value

Less effective than the approach in vf_tonemap_opencl because there
is no peak detection, but it's still a good idea to implement this.

5 years agovf_tonemap_opencl: Move update_metadata() to a shared file
Vittorio Giovara [Wed, 25 Jul 2018 15:02:45 +0000 (17:02 +0200)]
vf_tonemap_opencl: Move update_metadata() to a shared file

5 years agovf_tonemap[_opencl]: Move determine_signal_peak() to a shared file
Vittorio Giovara [Wed, 25 Jul 2018 14:44:50 +0000 (16:44 +0200)]
vf_tonemap[_opencl]: Move determine_signal_peak() to a shared file

The two functions are identical. Use the shared LumaCoeffients type too.

5 years agovf_tonemap: Fix logic for detecting the maximum peak of untagged sources
Vittorio Giovara [Wed, 25 Jul 2018 15:21:04 +0000 (17:21 +0200)]
vf_tonemap: Fix logic for detecting the maximum peak of untagged sources

When there is no metadata attached to a frame, take into account both
the PQ and HLG transfers, and change the HLG default value to 10:
the value of 12 is the maximum range in scene referred light, but
the reference OOTF maps this from 0 to 1000 cd/m² on the ideal HLG
monitor.

This matches what vf_tonemap_opencl does.

5 years agoavcodec/libaomenc: correct range for cpu-used
Gyan Doshi [Sun, 5 Aug 2018 06:03:45 +0000 (11:33 +0530)]
avcodec/libaomenc: correct range for cpu-used

Valid range is [0,8] as stated in aom.git:aom/aomcx.h

Fixes #7343

5 years agoavcodec/mediacodecdec: fix spurious newline in trace logging
Aman Gupta [Sun, 5 Aug 2018 19:31:07 +0000 (12:31 -0700)]
avcodec/mediacodecdec: fix spurious newline in trace logging

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agoavcodec/pnm_parser: Avoid reparsing failed data.
Michael Niedermayer [Sat, 28 Jul 2018 12:09:32 +0000 (14:09 +0200)]
avcodec/pnm_parser: Avoid reparsing failed data.

Alternatively the parser could be re implemented / redesigned so as to better
and more efficiently find frame boundaries

Fixes: Timeout
Fixes: 9210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4770771833454592
Fixes: 9214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5741633353023488
Fixes: 9219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-6249230237696000
Fixes: 9550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5312669836902400
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/simple_idct_template: Fix several integer overflows
Michael Niedermayer [Sat, 28 Jul 2018 10:18:05 +0000 (12:18 +0200)]
avcodec/simple_idct_template: Fix several integer overflows

Fixes: simple_idct_template.c:184:30: runtime error: signed integer overflow: -1065517056 - 1392182838 cannot be represented in type 'int'
Fixes: simple_idct_template.c:269:21: runtime error: signed integer overflow: 16384 * 259254 cannot be represented in type 'int'
Fixes: simple_idct_template.c:164:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int'
Fixes: simple_idct_template.c:167:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int'
Fixes: simple_idct_template.c:169:19: runtime error: signed integer overflow: 22725 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:171:19: runtime error: signed integer overflow: 19265 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:173:19: runtime error: signed integer overflow: 12873 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:28: runtime error: signed integer overflow: 1860878336 + 585177665 cannot be represented in type 'int'
Fixes: simple_idct_template.c:159:17: runtime error: signed integer overflow: 16384 * 189520 cannot be represented in type 'int'
Fixes: simple_idct_template.c:170:22: runtime error: signed integer overflow: 19265 * 130147 cannot be represented in type 'int'
Fixes: simple_idct_template.c:174:23: runtime error: signed integer overflow: -22725 * 130147 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:184:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:195:26: runtime error: signed integer overflow: 19265 * 150747 cannot be represented in type 'int'
Fixes: simple_idct_template.c:198:27: runtime error: signed integer overflow: -22725 * 150747 cannot be represented in type 'int'
Fixes: simple_idct_template.c:184:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int'
Fixes: simple_idct_template.c:192:27: runtime error: signed integer overflow: -12873 * 206341 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:30: runtime error: signed integer overflow: 1196441600 + 1703756981 cannot be represented in type 'int'
Fixes: simple_idct_template.c:176:23: runtime error: signed integer overflow: -12873 * 168461 cannot be represented in type 'int'
Fixes: simple_idct_template.c:191:27: runtime error: signed integer overflow: -22725 * -140062 cannot be represented in type 'int'
Fixes: simple_idct_template.c:197:26: runtime error: signed integer overflow: 19265 * -140062 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:28: runtime error: signed integer overflow: -816234496 - 2139878414 cannot be represented in type 'int'
Fixes: simple_idct_template.c:188:26: runtime error: signed integer overflow: 12873 * -239872 cannot be represented in type 'int'
Fixes: simple_idct_template.c:165:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int'
Fixes: simple_idct_template.c:166:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int'
Fixes: 9135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6324422955761664
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/aacdec_template: Check for duplicate elements
Michael Niedermayer [Sat, 28 Jul 2018 09:42:37 +0000 (11:42 +0200)]
avcodec/aacdec_template: Check for duplicate elements

Fixes: Timeout
Fixes: 9552/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6027842339995648
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/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()
Michael Niedermayer [Sat, 28 Jul 2018 08:59:09 +0000 (10:59 +0200)]
avcodec/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()

Fixes: signed integer overflow: -1813244069 + -1407981383 cannot be represented in type 'int'
Fixes: 8823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5643295618236416
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/flvenc: Check audio packet size
Michael Niedermayer [Sat, 28 Jul 2018 13:03:50 +0000 (15:03 +0200)]
avformat/flvenc: Check audio packet size

Fixes: Assertion failure
Fixes: assert_flvenc.c:941_1.swf
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mediacodecdec: fix SEGV on modern nvidia decoders
Aman Gupta [Tue, 31 Jul 2018 21:33:08 +0000 (14:33 -0700)]
avcodec/mediacodecdec: fix SEGV on modern nvidia decoders

This code came originally from gstreamer, where it was added in [1]
as a work-around for the Tegra 3. (The alignment was changed in [2]
as a response to [3], from 32-bit to 16-bit).

gstreamer only used this workaround in the case where the decoder
didn't return a slice-height property, but when the code was copied
into avcodec the conditional got lost. This commit restores the guard
and prefers the slice-height from the decoder when it is available.

This fixes segfaults decoding 1920x1080 h264 and mpeg2 videos on the
NVidia SHIELD after upgrading to Android Oreo.

[1] https://github.com/GStreamer/gst-plugins-bad/commit/a870e6a5c30dd85240fe75c7409cc1cf1b86541d
[2] https://github.com/GStreamer/gst-plugins-bad/commit/21ff3ae0b0127bd82951d278ca24f2d54133b7cd
[3] https://bugzilla.gnome.org/show_bug.cgi?id=748867

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agolavc/svq3: Fix regression decoding some files.
Nikolas Bowe [Tue, 31 Jul 2018 00:22:02 +0000 (17:22 -0700)]
lavc/svq3: Fix regression decoding some files.

Fixes some SVQ3 encoded files which fail to decode correctly after 6d6faa2a2d.
These files exhibit lots of artifacts and logs show "Media key encryption is not implemented".
However they decode without artifacts before 6d6faa2a2d.
The attatched patch allows these files to successfully decode, but also reject media key files.

Tested on the files in #6094 and http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mlp_parser: Check if synccode is within buffer
Michael Niedermayer [Sun, 29 Jul 2018 11:16:37 +0000 (13:16 +0200)]
avcodec/mlp_parser: Check if synccode is within buffer

Fixes: undefined shift
Fixes: 9216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-6281404575907840
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/qtrle: Check remaining bytestream in qtrle_decode_XYbpp()
Michael Niedermayer [Sun, 29 Jul 2018 10:40:48 +0000 (12:40 +0200)]
avcodec/qtrle: Check remaining bytestream in qtrle_decode_XYbpp()

Fixes: Timeout
Fixes: 9213/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5649753332252672
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/matroskaenc: filter and reorder AV1 OBUs
James Almer [Mon, 23 Jul 2018 15:33:55 +0000 (12:33 -0300)]
avformat/matroskaenc: filter and reorder AV1 OBUs

Make sure to not write forbidden OBUs to CodecPrivate, and do the same with
unnecessary OBUs for packets.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/av1: reorder OBUs before writting them in ff_isom_write_av1c()
James Almer [Mon, 30 Jul 2018 18:15:43 +0000 (15:15 -0300)]
avformat/av1: reorder OBUs before writting them in ff_isom_write_av1c()

Make sure Sequence Header is first, and only allow one of its kind.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/av1_parse: return size of the parsed OBU in parse_obu_header()
James Almer [Mon, 30 Jul 2018 18:14:24 +0000 (15:14 -0300)]
avcodec/av1_parse: return size of the parsed OBU in parse_obu_header()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/av1: return an error when no data is provided to ff_isom_write_av1c()
James Almer [Mon, 23 Jul 2018 16:15:06 +0000 (13:15 -0300)]
avformat/av1: return an error when no data is provided to ff_isom_write_av1c()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/av1_parse: check for OBU header overread
James Almer [Mon, 23 Jul 2018 16:12:43 +0000 (13:12 -0300)]
avcodec/av1_parse: check for OBU header overread

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/libaomdec: auto insert dump_extra bitstream filter
James Almer [Mon, 23 Jul 2018 15:32:47 +0000 (12:32 -0300)]
avcodec/libaomdec: auto insert dump_extra bitstream filter

Some containers, like Matroska, may propagate key frames with no Sequence
Header OBU since it's provided in extradata instead.
With this change, the Sequence Header will be appended to the packet data
before calling aom_codec_decode().

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/dump_extradata_bsf: don't allocate a new AVPacket per filtered packet
James Almer [Mon, 23 Jul 2018 22:16:30 +0000 (19:16 -0300)]
avcodec/dump_extradata_bsf: don't allocate a new AVPacket per filtered packet

~4x speedup in dump_extradata()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/avs: add descriptive name and url
Gyan Doshi [Thu, 2 Aug 2018 05:17:10 +0000 (10:47 +0530)]
avformat/avs: add descriptive name and url

AVS now more commonly refers to the Chinese AVS format. This demuxer
processes video files for Creature Shock game

5 years agox86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with them
James Almer [Wed, 1 Aug 2018 01:14:53 +0000 (22:14 -0300)]
x86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with them

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agox86/pixelutils: add missing preprocessor wrapper to the AVX2 functions
James Almer [Wed, 1 Aug 2018 01:03:22 +0000 (22:03 -0300)]
x86/pixelutils: add missing preprocessor wrapper to the AVX2 functions

Should fix compilation with old yasm/nasm

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agotools/qt-faststart: Allow free atoms after moov atom.
Carl Eugen Hoyos [Wed, 11 Jul 2018 23:24:39 +0000 (01:24 +0200)]
tools/qt-faststart: Allow free atoms after moov atom.

5 years agoavutil/pixelutils: sad_32x32 sse2/avx2 optimizations.
Jun Zhao [Mon, 9 Jul 2018 16:41:00 +0000 (00:41 +0800)]
avutil/pixelutils: sad_32x32 sse2/avx2 optimizations.

add ff_pixelutils_sad_32x32_sse2, ff_pixelutils_sad_{a,u}_32x32_sse2,
ff_pixelutils_sad_32x32_avx22, ff_pixelutils_sad_{a,u}_32x32_avx2

use perf record/report profiling, get instructions:u for avx2 sad_32x32:

  72.05%  pixelutils  pixelutils     [.] block_sad_32x32_c
  18.50%  pixelutils  pixelutils     [.] block_sad_16x16_c
   4.78%  pixelutils  pixelutils     [.] block_sad_8x8_c
   2.69%  pixelutils  pixelutils     [.] block_sad_4x4_c
   0.89%  pixelutils  pixelutils     [.] block_sad_2x2_c
   0.16%  pixelutils  pixelutils     [.] ff_pixelutils_sad_32x32_avx2
   0.16%  pixelutils  pixelutils     [.] ff_pixelutils_sad_u_32x32_avx2
   0.12%  pixelutils  pixelutils     [.] ff_pixelutils_sad_a_32x32_avx2

sse2 sad_32x32 instructions:u like:

  71.86%  pixelutils  pixelutils     [.] block_sad_32x32_c
  18.42%  pixelutils  pixelutils     [.] block_sad_16x16_c
   4.81%  pixelutils  pixelutils     [.] block_sad_8x8_c
   2.68%  pixelutils  pixelutils     [.] block_sad_4x4_c
   0.88%  pixelutils  pixelutils     [.] block_sad_2x2_c
   0.29%  pixelutils  pixelutils     [.] ff_pixelutils_sad_32x32_sse2
   0.26%  pixelutils  pixelutils     [.] ff_pixelutils_sad_u_32x32_sse2
   0.23%  pixelutils  pixelutils     [.] ff_pixelutils_sad_a_32x32_sse2

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavutil/pixelutils: add sad_32x32 in pixelutils API.
Jun Zhao [Mon, 9 Jul 2018 16:34:26 +0000 (00:34 +0800)]
lavutil/pixelutils: add sad_32x32 in pixelutils API.

add sad_32x32 in pixelutils API, and update the fate.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavcodec/h264_mp4toannexb_bsf: use enum constants for the NAL unit type values
James Almer [Sun, 29 Jul 2018 21:22:25 +0000 (18:22 -0300)]
avcodec/h264_mp4toannexb_bsf: use enum constants for the NAL unit type values

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agofate: add tests for audio channel up-/downmixing with pan filter
Tobias Rapp [Thu, 19 Jul 2018 11:59:37 +0000 (13:59 +0200)]
fate: add tests for audio channel up-/downmixing with pan filter

Add tests for upmixing and downmixing with audio channel counts that
have a corresponding default layout and also tests where there is no
default layout.

Update the existing "stereo4" test so it actually outputs stereo like
the other stereo tests. Rename the previous "stereo4" test into
"upmix1".

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
5 years agotests/audiogen: raise channel count limit to 12
Tobias Rapp [Thu, 19 Jul 2018 09:49:33 +0000 (11:49 +0200)]
tests/audiogen: raise channel count limit to 12

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
5 years agolibavformat/dashenc: Fix relative URI of HLS master playlist
Antonio Morell [Thu, 26 Jul 2018 13:22:21 +0000 (14:22 +0100)]
libavformat/dashenc: Fix relative URI of HLS master playlist

5 years agodoc/formats: Add documentation for skip_estimate_duration_from_pts
Michael Niedermayer [Tue, 24 Jul 2018 22:49:39 +0000 (00:49 +0200)]
doc/formats: Add documentation for skip_estimate_duration_from_pts

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agoconfigure: add missing aandcttables dependency to asv1 and asv2 encoders
James Almer [Mon, 30 Jul 2018 00:30:00 +0000 (21:30 -0300)]
configure: add missing aandcttables dependency to asv1 and asv2 encoders

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoconfigure: add missing aandcttables dependency to mpegvideoenc
James Almer [Mon, 30 Jul 2018 00:22:28 +0000 (21:22 -0300)]
configure: add missing aandcttables dependency to mpegvideoenc

Also remove the superfluous aandcttables dependency from all the modules
that only need it because of mpegvideoenc

Fixes ticket #7333

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavfi/nlmeans: fix aarch64 assembly with clang
Jan Ekström [Thu, 26 Jul 2018 20:45:01 +0000 (23:45 +0300)]
lavfi/nlmeans: fix aarch64 assembly with clang

Clang is more strict about some things.

5 years agocmdutils: print a more descriptive error message in show_help_bsf() when no bsf is...
James Almer [Sat, 28 Jul 2018 03:58:29 +0000 (00:58 -0300)]
cmdutils: print a more descriptive error message in show_help_bsf() when no bsf is specified

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() for NULL
James Almer [Sat, 28 Jul 2018 03:51:57 +0000 (00:51 -0300)]
avcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() for NULL

Fixes crashes like "ffmpeg -h bsf" caused by passing NULL to strcmp()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/diracdec: Check bytes count in else branch in decode_lowdelay() too
Michael Niedermayer [Sun, 22 Jul 2018 19:42:16 +0000 (21:42 +0200)]
avcodec/diracdec: Check bytes count in else branch in decode_lowdelay() too

Fixes: signed integer overflow: 8 * 340018243 cannot be represented in type 'int'
Fixes: 9441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5194665207791616
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/diracdec: Check slice numbers for overflows in relation to picture dimensions
Michael Niedermayer [Sun, 22 Jul 2018 19:26:24 +0000 (21:26 +0200)]
avcodec/diracdec: Check slice numbers for overflows in relation to picture dimensions

Fixes: signed integer overflow: 88 * 33685506 cannot be represented in type 'int'
Fixes: 9433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5725943535501312
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/diracdec: Change frame_number to 64bit as its a 32bit from the bitstream...
Michael Niedermayer [Sun, 22 Jul 2018 18:45:39 +0000 (20:45 +0200)]
avcodec/diracdec: Change frame_number to 64bit as its a 32bit from the bitstream and we also have a -1 special case

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 9291/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6324345860259840
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/dirac_dwt_template: Fix several integer overflows in horizontal_compose_daub97i()
Michael Niedermayer [Sun, 22 Jul 2018 17:11:04 +0000 (19:11 +0200)]
avcodec/dirac_dwt_template: Fix several integer overflows in horizontal_compose_daub97i()

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 8926/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6047609228623872
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/diracdec: Prevent integer overflow in intermediate in global_mv()
Michael Niedermayer [Sun, 22 Jul 2018 16:58:34 +0000 (18:58 +0200)]
avcodec/diracdec: Prevent integer overflow in intermediate in global_mv()

Fixes: signed integer overflow: -393471 * 5460 cannot be represented in type 'int'
Fixes: 8890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6299775379963904
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/librtmp: fix returning EOF from Read/Write
Timo Rothenpieler [Wed, 25 Jul 2018 22:37:35 +0000 (00:37 +0200)]
avformat/librtmp: fix returning EOF from Read/Write

Ticket #7052

5 years agofate: remove unnecessary reference file for fate-encryption-info
James Almer [Thu, 26 Jul 2018 03:38:01 +0000 (00:38 -0300)]
fate: remove unnecessary reference file for fate-encryption-info

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec: add missing files missed in previous commits
James Almer [Fri, 27 Jul 2018 13:59:38 +0000 (10:59 -0300)]
avcodec: add missing files missed in previous commits

Fixes compilation.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavc, doc, configure: add avs2 video decoder wrapper
hwren [Fri, 27 Jul 2018 03:50:19 +0000 (11:50 +0800)]
lavc, doc, configure: add avs2 video decoder wrapper

Tested-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavf: add avs2 fourcc
hwren [Fri, 27 Jul 2018 03:48:50 +0000 (11:48 +0800)]
lavf: add avs2 fourcc

Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavc: add AVS2/IEEE 1857.4 parser
hwren [Fri, 27 Jul 2018 03:44:59 +0000 (11:44 +0800)]
lavc: add AVS2/IEEE 1857.4 parser

Tested-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agodoc/protocols: documents tcp_mss
Jun Zhao [Sun, 6 May 2018 15:02:42 +0000 (23:02 +0800)]
doc/protocols: documents tcp_mss

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/tcp: add option to setting Maximum Segment Size
Jun Zhao [Sun, 6 May 2018 14:56:01 +0000 (22:56 +0800)]
lavf/tcp: add option to setting Maximum Segment Size

This can change the the MSS value announced to the other end in
the initial TCP packet, it's can be used when failed Path MTU
discovery.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoswresample/swresample: Fix input channel count in resample_first computation
Michael Niedermayer [Tue, 24 Jul 2018 20:44:12 +0000 (22:44 +0200)]
swresample/swresample: Fix input channel count in resample_first computation

Found-by: Marcin Gorzel <gorzel@google.com>
Reviewed-by: Marcin Gorzel <gorzel@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Check default_encrypted_sample before use in mov_read_sample_encryption...
Michael Niedermayer [Sat, 21 Jul 2018 15:20:44 +0000 (17:20 +0200)]
avformat/mov: Check default_encrypted_sample before use in mov_read_sample_encryption_info()

Fixes: 2018-0721-sample
Fixes: null pointer dereference
Found-by: Nikita Knyzhov (knnikita@yandex.ru)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoswresample: Use channel count in rematrix initialization
Marcin Gorzel [Tue, 24 Jul 2018 13:55:47 +0000 (14:55 +0100)]
swresample: Use channel count in rematrix initialization

Rematrixing supports up to 64 channels. However, there is only a limited number of channel layouts defined. Since the in/out channel count is currently obtained from the channel layout, for undefined layouts (e.g. for 9, 10, 11 channels etc.) the rematrixing fails.

This patch changes rematrix init methods to use in (used) and out channel count directly instead of computing it from channel layout.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: Force pie for Android.
Carl Eugen Hoyos [Wed, 25 Jul 2018 18:43:02 +0000 (20:43 +0200)]
configure: Force pie for Android.

Position-independent executables are required since Lollipop.

Reported-by: Mohammed Bey Ahmed Khernache
5 years agoavutil/hwcontext_d3d11va: fix type arguments passed to IDXGIAdapter2_GetDesc()
James Almer [Mon, 23 Jul 2018 23:42:08 +0000 (20:42 -0300)]
avutil/hwcontext_d3d11va: fix type arguments passed to IDXGIAdapter2_GetDesc()

libavutil/hwcontext_d3d11va.c: In function 'd3d11va_device_create':
libavutil/hwcontext_d3d11va.c:554:46: warning: passing argument 2 of 'pAdapter->lpVtbl->GetDesc' from incompatible pointer type [-Wincompatible-pointer-types]
         hr = IDXGIAdapter2_GetDesc(pAdapter, &desc);
                                              ^
libavutil/hwcontext_d3d11va.c:554:46: note: expected 'DXGI_ADAPTER_DESC * {aka struct DXGI_ADAPTER_DESC *}' but argument is of type 'DXGI_ADAPTER_DESC2 * {aka struct DXGI_ADAPTER_DESC2 *}'

Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavf/isom: Make auxiliary_offsets consistently uint64_t.
Carl Eugen Hoyos [Tue, 24 Jul 2018 20:32:59 +0000 (22:32 +0200)]
lavf/isom: Make auxiliary_offsets consistently uint64_t.

Fixes a compilation warning if size_t != uint64_t:
libavformat/mov.c: In function ‘mov_read_saio’:
libavformat/mov.c:6207:45: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
         encryption_index->auxiliary_offsets = auxiliary_offsets;
                                             ^

5 years agolavf/flvdec: Remove an outdated comment.
Carl Eugen Hoyos [Wed, 25 Jul 2018 13:08:43 +0000 (15:08 +0200)]
lavf/flvdec: Remove an outdated comment.

The buffer size was increased in b2fecce3 to prepare for 790a3cdf.

5 years agodoc/mailing-list-faq: user lists are subscribe only
Lou Logan [Tue, 24 Jul 2018 21:33:31 +0000 (13:33 -0800)]
doc/mailing-list-faq: user lists are subscribe only

Includes a few other minor changes and updates.

Signed-off-by: Lou Logan <lou@lrcd.com>
5 years agoavformat/mxfdec: drop invalid index table segments when sorting them
Marton Balint [Wed, 4 Jul 2018 21:42:56 +0000 (23:42 +0200)]
avformat/mxfdec: drop invalid index table segments when sorting them

This way if an index table segment is present multiple times, we can always use
the proper one instead of the invalid one.

Fixes seeking in the sample of ticket #5671.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavfilter: Add colorconstancy filter
Mina [Mon, 16 Jul 2018 08:20:02 +0000 (10:20 +0200)]
avfilter: Add colorconstancy filter

Signed-off-by: Mina <minasamy_@hotmail.com>
5 years agoavcodec/cdgraphics: Clear first frame only once
Michael Niedermayer [Sun, 15 Jul 2018 12:12:56 +0000 (14:12 +0200)]
avcodec/cdgraphics: Clear first frame only once

frame_number will not increase if nothing is output

Fixes: Timeout
Fixes: 9057/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-4844661498707968
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/tscc: Do not duplicate images
Michael Niedermayer [Sun, 15 Jul 2018 12:04:05 +0000 (14:04 +0200)]
avcodec/tscc: Do not duplicate images

This improves speed

Fixes: Timeout
Fixes: 9010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-6042614817095680
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/tscc: Move reading the side data palette before other checks
Michael Niedermayer [Sun, 15 Jul 2018 12:01:40 +0000 (14:01 +0200)]
avcodec/tscc: Move reading the side data palette before other checks

We do not want to loose the side data in case of errors

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/bink: set color range
Paul B Mahol [Sun, 22 Jul 2018 08:19:03 +0000 (10:19 +0200)]
avcodec/bink: set color range

5 years agoavcodec/bink: add 'k' version support
Paul B Mahol [Wed, 18 Jul 2018 19:17:29 +0000 (21:17 +0200)]
avcodec/bink: add 'k' version support

5 years agoavformat/bink: move code for skipping unknown fields to correct place
Paul B Mahol [Mon, 16 Jul 2018 10:54:47 +0000 (12:54 +0200)]
avformat/bink: move code for skipping unknown fields to correct place

5 years agoavcodec/parser: move parsers list and related API to its own file
James Almer [Sat, 21 Jul 2018 17:21:16 +0000 (14:21 -0300)]
avcodec/parser: move parsers list and related API to its own file

And add it to the CONFIGURABLE_COMPONENTS list in Makefile. This way, changes
to the new file will be tracked and the usual warning to suggest re-running
configure will be shown.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agodoc/filters: use radius instead of kernel in avgblur
Danil Iashchenko [Fri, 20 Jul 2018 16:31:19 +0000 (19:31 +0300)]
doc/filters: use radius instead of kernel in avgblur

5 years agolavc/fft_template: Do not define unneded functions with --enable-small.
Carl Eugen Hoyos [Sat, 21 Jul 2018 12:05:41 +0000 (14:05 +0200)]
lavc/fft_template: Do not define unneded functions with --enable-small.

Fixes the following warnings:
In file included from libavcodec/fft_fixed.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~
CC      libavcodec/ffv1.o
In file included from libavcodec/fft_float.c:21:0:
libavcodec/fft_template.c:528:6: warning: ‘pass_big’ defined but not used [-Wunused-function]
 PASS(pass_big)
      ^
libavcodec/fft_template.c:505:13: note: in definition of macro ‘PASS’
 static void name(FFTComplex *z, const FFTSample *wre, unsigned int n)\
             ^~~~

5 years agolibavcodec/ppc: Fix HEVC AltiVec routines with --enable-small
A. Wilcox [Sat, 21 Jul 2018 05:42:00 +0000 (00:42 -0500)]
libavcodec/ppc: Fix HEVC AltiVec routines with --enable-small

GCC requires the argument to vec_splat_u32 to be a literal.  The easiest
way to accomplish this is to change 'shift' to be const in scale (as it
is in the transform routine above), and convert both routines to be
inline.  This way, GCC can coerce the values to literals.

Tested on a 970 (Apple G5) and POWER9 (Talos II); passed fate and played
a clip of Big Buck Bunny correctly.

Fixes ticket #7048

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
5 years agoavcodec/extract_extradata_bsf: make sure a Sequence Header was found for av1
James Almer [Fri, 20 Jul 2018 23:43:40 +0000 (20:43 -0300)]
avcodec/extract_extradata_bsf: make sure a Sequence Header was found for av1

A packet may have Metadata OBUs but no Sequence Header OBU, which is
useless as extradata.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec: bump micro version after previous changes
James Almer [Fri, 20 Jul 2018 18:49:13 +0000 (15:49 -0300)]
avcodec: bump micro version after previous changes

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/movenc: add support for AV1 streams
James Almer [Sat, 7 Jul 2018 19:35:32 +0000 (16:35 -0300)]
avformat/movenc: add support for AV1 streams

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/mov: add support for AV1 streams
James Almer [Sat, 7 Jul 2018 19:33:41 +0000 (16:33 -0300)]
avformat/mov: add support for AV1 streams

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/libaomenc: export Sequence Header and Metadata OBUs as extradata
James Almer [Sat, 7 Jul 2018 19:33:16 +0000 (16:33 -0300)]
avcodec/libaomenc: export Sequence Header and Metadata OBUs as extradata

aom_codec_get_global_headers() is not implemented as of libaom 1.0.0 for AV1, so
we're forced to extract the relevant header OBUs from the first packet and propagate
them as packet side data.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/extract_extradata: add support for AV1
James Almer [Sat, 7 Jul 2018 19:32:52 +0000 (16:32 -0300)]
avcodec/extract_extradata: add support for AV1

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec: add AV1 packet split API
James Almer [Sat, 14 Apr 2018 20:29:31 +0000 (17:29 -0300)]
avcodec: add AV1 packet split API

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavutil/pixfmt: Document chroma plane size for odd resolutions
Michael Niedermayer [Wed, 18 Jul 2018 20:22:35 +0000 (22:22 +0200)]
avutil/pixfmt: Document chroma plane size for odd resolutions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/af_afir,af_aiir: Remove a variable that is always -1.
Carl Eugen Hoyos [Thu, 19 Jul 2018 00:28:25 +0000 (02:28 +0200)]
lavfi/af_afir,af_aiir: Remove a variable that is always -1.

Fixes two warnings:
libavfilter/af_afir.c:194:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
libavfilter/af_aiir.c:689:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~

5 years agolavu/x86/cpu: Fix aesni detection
alexander schmid [Mon, 16 Jul 2018 08:43:11 +0000 (10:43 +0200)]
lavu/x86/cpu: Fix aesni detection

5 years agoavcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0
Thomas Guillem [Wed, 4 Jul 2018 07:05:22 +0000 (09:05 +0200)]
avcodec/videotoolboxenc: fix undefined behavior with rc_max_rate=0

On macOS, a zero rc_max_rate cause an error from
VTSessionSetProperty(kVTCompressionPropertyKey_DataRateLimits).

on iOS (depending on device/version), a zero rc_max_rate cause invalid
arguments from the vtenc_output_callback after few frames and then a crash
within the VideoToolbox library.

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agoavcodec: parse options from AVCodec.bsfs
Aman Gupta [Wed, 18 Jul 2018 18:52:33 +0000 (11:52 -0700)]
avcodec: parse options from AVCodec.bsfs

Fixes a bug that would prevent using multiple comma-separated filters,
and allows options to be passed to each filter.

Based on similar loop in ffmpeg_opt.c's new_output_stream().

Signed-off-by: Aman Gupta <aman@tmm1.net>