]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agoMerge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
James Almer [Thu, 2 May 2019 16:01:36 +0000 (13:01 -0300)]
Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'

* commit '1e56173515826aa4d680d3b216d80a3879ed1c68':
  rtsp: add pkt_size option

Merged-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/wavpackenc: use ff_clz()
Paul B Mahol [Thu, 2 May 2019 13:35:09 +0000 (15:35 +0200)]
avcodec/wavpackenc: use ff_clz()

5 years agoavcodec/cinepak: Add missing const
Michael Niedermayer [Thu, 2 May 2019 06:00:46 +0000 (08:00 +0200)]
avcodec/cinepak: Add missing const

Found-by: <mkver>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_tonemap: add slice threading
Paul B Mahol [Tue, 30 Apr 2019 09:59:51 +0000 (11:59 +0200)]
avfilter/vf_tonemap: add slice threading

5 years agoavfilter/avf_abitscope: switch to activate
Paul B Mahol [Wed, 1 May 2019 19:17:55 +0000 (21:17 +0200)]
avfilter/avf_abitscope: switch to activate

5 years agoavfilter/af_biquads: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:55:34 +0000 (12:55 +0200)]
avfilter/af_biquads: add timeline support

5 years agoavfilter/af_stereowiden: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:40:25 +0000 (12:40 +0200)]
avfilter/af_stereowiden: add timeline support

5 years agoavfilter/af_extrastereo: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:33:56 +0000 (12:33 +0200)]
avfilter/af_extrastereo: add timeline support

5 years agoavfilter/af_crossfeed: add timeline support
Paul B Mahol [Wed, 1 May 2019 10:31:52 +0000 (12:31 +0200)]
avfilter/af_crossfeed: add timeline support

5 years agoavcodec/agm: Check output size before allocation
Michael Niedermayer [Wed, 24 Apr 2019 15:41:13 +0000 (17:41 +0200)]
avcodec/agm: Check output size before allocation

Fixes: OOM
Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776
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: Fix 2 integer overflows in tm2_update_block()
Michael Niedermayer [Fri, 19 Apr 2019 23:05:44 +0000 (01:05 +0200)]
avcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()

Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int'
Fixes: 14107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5694078680825856
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/cinepak: Check slice_size before allocating image
Michael Niedermayer [Sat, 27 Apr 2019 21:37:26 +0000 (23:37 +0200)]
avcodec/cinepak: Check slice_size before allocating image

Fixes: Timeout (16sec -> 125msec)
Fixes: 14283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5742851457024000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/avf_showspectrum: convert some doubles to floats
Paul B Mahol [Tue, 30 Apr 2019 18:33:14 +0000 (20:33 +0200)]
avfilter/avf_showspectrum: convert some doubles to floats

5 years agoswscale/ppc: VSX-optimize hscale_fast
Lauri Kasanen [Tue, 23 Apr 2019 11:54:46 +0000 (14:54 +0300)]
swscale/ppc: VSX-optimize hscale_fast

./ffmpeg -f lavfi -i yuvtestsrc=duration=1:size=1200x1440 -sws_flags fast_bilinear \
        -s 2400x720 -f rawvideo -vframes 5 -pix_fmt abgr -nostats test.raw

4.27 speedup for hyscale_fast:
  24796 UNITS in hyscale_fast,    4096 runs,      0 skips
   5797 UNITS in hyscale_fast,    4096 runs,      0 skips

4.48 speedup for hcscale_fast:
  19911 UNITS in hcscale_fast,    4095 runs,      1 skips
   4437 UNITS in hcscale_fast,    4096 runs,      0 skips

5 years agolavu/hwcontext_qsv: Fix the realign check for hwupload
Linjie Fu [Mon, 15 Apr 2019 13:23:40 +0000 (21:23 +0800)]
lavu/hwcontext_qsv: Fix the realign check for hwupload

Fix the aligned check in hwupload, input surface should be 16 aligned
too.

Partly fix #7830.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agoavfilter/af_asoftclip: add timeline support
Paul B Mahol [Tue, 30 Apr 2019 09:02:36 +0000 (11:02 +0200)]
avfilter/af_asoftclip: add timeline support

5 years agoavfilter/af_dynaudnorm: add timeline support
Paul B Mahol [Tue, 30 Apr 2019 08:54:45 +0000 (10:54 +0200)]
avfilter/af_dynaudnorm: add timeline support

5 years agoavfilter/af_dynaudnorm: always update delay when flushing
Paul B Mahol [Tue, 30 Apr 2019 08:05:23 +0000 (10:05 +0200)]
avfilter/af_dynaudnorm: always update delay when flushing

5 years agoavfilter/vf_normalize: add timeline support
Paul B Mahol [Mon, 29 Apr 2019 21:28:40 +0000 (23:28 +0200)]
avfilter/vf_normalize: add timeline support

5 years agoavfilter/af_adeclick: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 20:19:15 +0000 (22:19 +0200)]
avfilter/af_adeclick: switch to activate

5 years agoavfilter/af_rubberband: make use of initial input timestamp
Paul B Mahol [Mon, 29 Apr 2019 19:11:46 +0000 (21:11 +0200)]
avfilter/af_rubberband: make use of initial input timestamp

5 years agoavfilter/avf_showwaves: Add draw mode also to showwavespic filter
Martin Vobruba [Fri, 26 Apr 2019 06:17:11 +0000 (08:17 +0200)]
avfilter/avf_showwaves: Add draw mode also to showwavespic filter

See commit a8c2d375ca68b7f001564ced14d8ac0757f53a29

5 years agoavfilter/f_ebur128: use correct type for chl
Paul B Mahol [Mon, 29 Apr 2019 14:46:42 +0000 (16:46 +0200)]
avfilter/f_ebur128: use correct type for chl

5 years agoavfilter/af_dynaudnorm: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:53:26 +0000 (14:53 +0200)]
avfilter/af_dynaudnorm: switch to activate

5 years agoavfilter/af_rubberband: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 12:22:13 +0000 (14:22 +0200)]
avfilter/af_rubberband: switch to activate

5 years agoavfilter/af_rubberband: check if rbs is valid
Paul B Mahol [Mon, 29 Apr 2019 11:47:46 +0000 (13:47 +0200)]
avfilter/af_rubberband: check if rbs is valid

5 years agoavfilter/af_sofalizer: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 11:35:04 +0000 (13:35 +0200)]
avfilter/af_sofalizer: switch to activate

5 years agoavfilter/avf_avectorscope: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:52:50 +0000 (12:52 +0200)]
avfilter/avf_avectorscope: switch to activate

5 years agoavfilter/avf_ahistogram: switch to activate
Paul B Mahol [Mon, 29 Apr 2019 10:43:18 +0000 (12:43 +0200)]
avfilter/avf_ahistogram: switch to activate

5 years agoavfilter/avf_ahistogram: properly name pads
Paul B Mahol [Mon, 29 Apr 2019 10:28:38 +0000 (12:28 +0200)]
avfilter/avf_ahistogram: properly name pads

5 years agoavfilter/avf_showspectrum: add log scale for frequency plot
Paul B Mahol [Sun, 28 Apr 2019 18:15:17 +0000 (20:15 +0200)]
avfilter/avf_showspectrum: add log scale for frequency plot

5 years agoavfilter/af_astats: fix msvc compile error
Matthias Troffaes [Mon, 29 Apr 2019 09:03:52 +0000 (11:03 +0200)]
avfilter/af_astats: fix msvc compile error

MSVC requires an explicit cast from void * to void when applying the
ternary conditional operator to switch between methods that return
void.

5 years agoavcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit
James Almer [Wed, 17 Apr 2019 02:00:49 +0000 (23:00 -0300)]
avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bit

This follows the spec definition, and removes a field from the relevant
structs.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/cbs_h2645: add macros to read and write fields with no custom range of values
James Almer [Wed, 17 Apr 2019 01:32:05 +0000 (22:32 -0300)]
avcodec/cbs_h2645: add macros to read and write fields with no custom range of values

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU
James Almer [Wed, 17 Apr 2019 04:23:36 +0000 (01:23 -0300)]
avcodec/cbs_av1: add missing value range constrains to timecode Metadata OBU

Also infer the value time_offset_length as 0 when it's not present.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/mxfdec: fix and enhance RIP KLV length checks
Marton Balint [Thu, 4 Apr 2019 21:08:42 +0000 (23:08 +0200)]
avformat/mxfdec: fix and enhance RIP KLV length checks

KLV length is BER encoded (variable size), but the code assumed the encoding to
always use 4 bytes.

Fixes parsing Random Index Pack in samples/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: take into account run-in in find_partition_by_offset
Marton Balint [Tue, 2 Apr 2019 23:46:59 +0000 (01:46 +0200)]
avformat/mxfdec: take into account run-in in find_partition_by_offset

Also rename the function to find_partition_by_absolute_offset to make it clear
offset is absolute.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid
Marton Balint [Sun, 7 Apr 2019 00:27:49 +0000 (02:27 +0200)]
avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sid

This affects the following samples:

samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf
samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf
samples/ffmpeg-bugs/trac/ticket5016/r0.mxf
samples/ffmpeg-bugs/trac/ticket5016/r1.mxf
samples/ffmpeg-bugs/trac/ticket5316/hq.MXF
samples/ffmpeg-bugs/trac/ticket5316/hqx.MXF

Some AVPacket->pos values are changed because for frame wrapped tracks we point
to the KLV offset and not the data.

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavformat/mxfdec: rework mxf_essence_container_end
Marton Balint [Sun, 7 Apr 2019 00:06:35 +0000 (02:06 +0200)]
avformat/mxfdec: rework mxf_essence_container_end

We find the last essence container much faster if we go through the partitions
backwards...

Signed-off-by: Marton Balint <cus@passwd.hu>
5 years agoavcodec/scpr: avoid using uninitialized value
Paul B Mahol [Sun, 28 Apr 2019 09:06:36 +0000 (11:06 +0200)]
avcodec/scpr: avoid using uninitialized value

Fixes #7872.

5 years agoavfilter/vf_lut3d: increase MAX_LEVEL
Paul B Mahol [Sun, 28 Apr 2019 08:52:21 +0000 (10:52 +0200)]
avfilter/vf_lut3d: increase MAX_LEVEL

5 years agoavfilter/vf_lut3d: fix range domain processing for .cube format
Paul B Mahol [Thu, 25 Apr 2019 12:53:53 +0000 (14:53 +0200)]
avfilter/vf_lut3d: fix range domain processing for .cube format

The ranges are for input, not for output.

5 years agoavcodec/pnm_parser: Remember the length already scanned for ascii images
Michael Niedermayer [Sat, 27 Apr 2019 12:08:07 +0000 (14:08 +0200)]
avcodec/pnm_parser: Remember the length already scanned for ascii images

Fixes: speed regression with xmap_samsung_gear_2560x1280.pgm
Found-by: Michael Koch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/pnm_parser: Remember the size of the image and do not reparse the header
Michael Niedermayer [Wed, 24 Apr 2019 19:14:19 +0000 (21:14 +0200)]
avcodec/pnm_parser: Remember the size of the image and do not reparse the header

Fixes: Timeout (11sec -> 60ms)
Fixes: 14270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5734809634078720
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>
5 years agoavcodec/scpr3: add missing check for decode_value3() return value
James Almer [Fri, 26 Apr 2019 15:31:19 +0000 (12:31 -0300)]
avcodec/scpr3: add missing check for decode_value3() return value

Fixes ticket #7866.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/microdvddec: skip empty lines
Paul B Mahol [Sat, 27 Apr 2019 10:47:39 +0000 (12:47 +0200)]
avformat/microdvddec: skip empty lines

5 years agoavformat/subtitles: ignore extra '\r' at line endings
Paul B Mahol [Thu, 25 Apr 2019 21:21:38 +0000 (23:21 +0200)]
avformat/subtitles: ignore extra '\r' at line endings

5 years agoavcodec/nvenc: fix indentation
Timo Rothenpieler [Wed, 24 Apr 2019 20:47:24 +0000 (22:47 +0200)]
avcodec/nvenc: fix indentation

5 years agoavcodec/nvenc: only unregister input resources when absolutely needed
Timo Rothenpieler [Wed, 24 Apr 2019 17:00:25 +0000 (19:00 +0200)]
avcodec/nvenc: only unregister input resources when absolutely needed

This reverts nvenc to old behaviour, which in some super rare edge cases
performs better.
The implication of this is that any potential API user who relies on
nvenc cleaning up every frames device resources after it's done using
them will have to change their usage pattern.

That should not be a problem, since pretty much every normal usage
pattern automatically implies that surfaces are reused from a common
pool, since constant re-allocation is also very expensive.

5 years agolavf/hls: Remove HLSContext.strict_std_compliance field
Jun Zhao [Tue, 16 Apr 2019 04:54:58 +0000 (12:54 +0800)]
lavf/hls: Remove HLSContext.strict_std_compliance field

After the commit 9f61abc8111, we can use AVFormatContext.strict_std_compliance
instead of HLSContext.strict_std_compliance to avoid the code redundancy.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agox86/opusdsp: replace loads with shuffles
Lynne [Wed, 24 Apr 2019 11:19:48 +0000 (12:19 +0100)]
x86/opusdsp: replace loads with shuffles

Has a slight speedup.
Can't be carried over to aarch64, since it has no shufps-like instruction.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter: add audio soft clip filter
Paul B Mahol [Tue, 16 Apr 2019 17:55:27 +0000 (19:55 +0200)]
avfilter: add audio soft clip filter

5 years agoavfilter/vf_stack: use time_base from framesync
Paul B Mahol [Thu, 25 Apr 2019 19:14:48 +0000 (21:14 +0200)]
avfilter/vf_stack: use time_base from framesync

Fixes non-monotonous timestamps.

5 years agoavcodec/gdv: Check input palette size before rescale()
Michael Niedermayer [Thu, 25 Apr 2019 17:18:08 +0000 (19:18 +0200)]
avcodec/gdv: Check input palette size before rescale()

Fixes: Timeout (22sec -> 11sec)
Fixes: 13576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5681024577568768
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>
5 years agoavfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too
Paul B Mahol [Mon, 22 Apr 2019 09:47:04 +0000 (11:47 +0200)]
avfilter/af_astats: count number of NaNs/Infs/denormals for floating-point audio too

5 years agolavfi/opencl: add more opencl helper macro
Ruiling Song [Fri, 12 Apr 2019 08:27:54 +0000 (16:27 +0800)]
lavfi/opencl: add more opencl helper macro

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
5 years agoavcodec/jpeg2000dec: Fix return type of get_plt()
Michael Niedermayer [Thu, 25 Apr 2019 16:57:26 +0000 (18:57 +0200)]
avcodec/jpeg2000dec: Fix return type of get_plt()

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/jpeg2000dec: Check PLT data somewhat
Michael Niedermayer [Tue, 16 Apr 2019 13:30:50 +0000 (15:30 +0200)]
avcodec/jpeg2000dec: Check PLT data somewhat

Fixes: Timeout (21sec -> 0.6sec)
Fixes: 14134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5768371078955008
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: Replace the step_x/y assert by a check in the CPRL case as with...
Michael Niedermayer [Mon, 15 Apr 2019 22:54:09 +0000 (00:54 +0200)]
avcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case as with the PCRL case

Fixes: assertion failure
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944
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/jpeg2000: Check stepsize before using it
Michael Niedermayer [Mon, 15 Apr 2019 22:41:54 +0000 (00:41 +0200)]
avcodec/jpeg2000: Check stepsize before using it

Fixes: value 1.87633e+10 is outside the range of representable values of type 'int'
Fixes: Undefined behavior
Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944
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 how much of the chunk is available before decoding
Michael Niedermayer [Tue, 2 Apr 2019 00:18:34 +0000 (02:18 +0200)]
avcodec/qtrle: Check how much of the chunk is available before decoding

Fixes: Timeout (10sec -> 2sec)
Fixes: 13979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5635157718990848
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_fixed: Fix undefined shift in noise_scale()
Michael Niedermayer [Fri, 29 Mar 2019 07:58:49 +0000 (08:58 +0100)]
avcodec/aacdec_fixed: Fix undefined shift in noise_scale()

Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352
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/bintext: Add error message when resolution is too small for font.
Nikolas Bowe [Mon, 8 Apr 2019 22:22:10 +0000 (15:22 -0700)]
avcodec/bintext: Add error message when resolution is too small for font.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/zmbv: optimize motion compensation with memcpy()
Michael Niedermayer [Mon, 22 Apr 2019 19:33:55 +0000 (21:33 +0200)]
avcodec/zmbv: optimize motion compensation with memcpy()

Fixes: Timeout (16 sec - 7 sec)
Fixes: 14237/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5693453897302016
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/frei0r: Fix a union member type and remove an unneeded cast.
Carl Eugen Hoyos [Tue, 23 Apr 2019 21:09:01 +0000 (23:09 +0200)]
lavfi/frei0r: Fix a union member type and remove an unneeded cast.

5 years agoavcodec/h264_ps: use get_se_golomb_long() to parse some sps fields
James Almer [Wed, 24 Apr 2019 21:29:59 +0000 (18:29 -0300)]
avcodec/h264_ps: use get_se_golomb_long() to parse some sps fields

All three may be up to 32 bits wide.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/h264_ps: fix storage size for offset_for_ref_frame
James Almer [Wed, 10 Apr 2019 18:26:30 +0000 (15:26 -0300)]
avcodec/h264_ps: fix storage size for offset_for_ref_frame

The spec defines the valid range of values to be INT32_MIN + 1 to INT32_MAX, inclusive.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavfilter/af_surround: improve rear channels separation
Paul B Mahol [Wed, 24 Apr 2019 17:12:15 +0000 (19:12 +0200)]
avfilter/af_surround: improve rear channels separation

5 years agoavfilter/af_surround: check for invalid magnitude and phase difference
Paul B Mahol [Wed, 24 Apr 2019 12:36:59 +0000 (14:36 +0200)]
avfilter/af_surround: check for invalid magnitude and phase difference

5 years agoavfilter/af_surround: add angle option
Paul B Mahol [Wed, 24 Apr 2019 11:55:46 +0000 (13:55 +0200)]
avfilter/af_surround: add angle option

5 years agoavfilter/af_surround: fix typo
Paul B Mahol [Wed, 24 Apr 2019 09:23:57 +0000 (11:23 +0200)]
avfilter/af_surround: fix typo

5 years agoavcodec/arbc: Try to correct keyframe/frame type
Michael Niedermayer [Sun, 14 Apr 2019 09:11:42 +0000 (11:11 +0200)]
avcodec/arbc: Try to correct keyframe/frame type

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/arbc: Skip unchanged frames
Michael Niedermayer [Sun, 14 Apr 2019 09:03:06 +0000 (11:03 +0200)]
avcodec/arbc: Skip unchanged frames

Fixes: Timeout (16sec -> 5sec)
Fixes: 14128/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5767365721063424
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 agoavutil/avstring: Fix bug and undefined behavior in av_strncasecmp()
Michael Niedermayer [Mon, 15 Apr 2019 22:09:38 +0000 (00:09 +0200)]
avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()

The function in case of n=0 would read more bytes than 0.
The end pointer could be beyond the allocated space, which
is undefined.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Skip stsd adjustment without chunks
Michael Niedermayer [Tue, 16 Apr 2019 20:15:14 +0000 (22:15 +0200)]
avformat/mov: Skip stsd adjustment without chunks

Fixes: Assertion failure
Fixes: clusterfuzz-testcase-minimized-media_pipeline_integration_fuzzer-5683096400822272
Found-by: Clusterfuzz
Reported-by: Dan Sanders <sandersd@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/aadec: Check for scanf() failure
Michael Niedermayer [Tue, 16 Apr 2019 21:56:43 +0000 (23:56 +0200)]
avformat/aadec: Check for scanf() failure

Fixes: use of uninitialized variables
Fixes: blank.aa
Found-by: Chamal De Silva <chamal.desilva@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()
Michael Niedermayer [Sun, 14 Apr 2019 18:23:24 +0000 (20:23 +0200)]
avcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()

Fixes: Timeout (33sec -> 16 milli sec)
Fixes: 14181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5681840708386816
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/dsicinvideo: check the amount decoded by cin_decode_huffman()
Michael Niedermayer [Mon, 15 Apr 2019 00:01:56 +0000 (02:01 +0200)]
avcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()

Fixes: Timeout (158sec -> 36sec)
Fixes: 14214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5633569034076160
This is untested with valid cin files as none of the files i found cover the changed
codepath

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/agm: Check that there is available input in read_code()
Michael Niedermayer [Tue, 2 Apr 2019 18:27:13 +0000 (20:27 +0200)]
avcodec/agm: Check that there is available input in read_code()

Fixes: Timeout (46sec -> 7ms)
Fixes: 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600
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 agotests/fate-run: New variable hostexecsuf for local fate tools.
Carl Eugen Hoyos [Fri, 19 Apr 2019 16:04:33 +0000 (18:04 +0200)]
tests/fate-run: New variable hostexecsuf for local fate tools.

Allows running fate in-tree on wsl with msvc.

5 years agocompat/windows/makedef: Allow building shared libs with MSVC under WSL
Cyber Sinh [Fri, 29 Dec 2017 01:59:08 +0000 (02:59 +0100)]
compat/windows/makedef: Allow building shared libs with MSVC under WSL

A similar patch was posted by Gilles Khouzam in his blog.

5 years agoavdevice/alsa: fix indefinite stop on closing PCM capture
Takayuki 'January June' Suwa [Thu, 18 Apr 2019 01:56:40 +0000 (10:56 +0900)]
avdevice/alsa: fix indefinite stop on closing PCM capture

Fixes: https://bugs.archlinux.org/task/58619
Found-by: Elias (Bleuzen) https://bugs.archlinux.org/user/26956
Signed-off-by: Nicolas George <george@nsup.org>
5 years agolibavformat/mov: limit nb_frames_for_fps to INT_MAX
Dan Sanders [Mon, 22 Apr 2019 18:05:00 +0000 (11:05 -0700)]
libavformat/mov: limit nb_frames_for_fps to INT_MAX

It's this or add overflow detection in mov_read_header().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/af_surround: export more channel's in/out gains
Paul B Mahol [Tue, 23 Apr 2019 15:48:10 +0000 (17:48 +0200)]
avfilter/af_surround: export more channel's in/out gains

5 years agoavfilter/af_surround: switch to activate
Paul B Mahol [Tue, 23 Apr 2019 10:40:04 +0000 (12:40 +0200)]
avfilter/af_surround: switch to activate

5 years agoavfilter/af_surround: expose window size to user
Paul B Mahol [Tue, 23 Apr 2019 09:52:56 +0000 (11:52 +0200)]
avfilter/af_surround: expose window size to user

5 years agoavfilter/af_surround: add 6.1/6.0 upmix from stereo
Paul B Mahol [Tue, 23 Apr 2019 08:17:58 +0000 (10:17 +0200)]
avfilter/af_surround: add 6.1/6.0 upmix from stereo

5 years agoavcodec/cuviddec: improve progressive frame detection
Sergey Svechnikov [Mon, 22 Apr 2019 17:26:24 +0000 (22:26 +0500)]
avcodec/cuviddec: improve progressive frame detection

There are 2 types of problems when using adaptive deinterlace with cuvid:

1. Sometimes, in the middle of transcoding, cuvid outputs frames with visible horizontal lines (as though weave deinterlace method was chosen);
2. Occasionally, on scene changes, cuvid outputs a wrong frame, which should have been shown several seconds before (as if the frame was assigned some wrong PTS value).

The reason is that sometimes CUVIDPARSERDISPINFO has property progressive_frame equal to 1 with interlaced videos.
In order to fix the problem we should check if the video is interlaced or progressive in the beginning of a video sequence (cuvid_handle_video_sequence).
And then we just use this information instead of the property progressive_frame in CUVIDPARSERDISPINFO (which is unreliable).

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
5 years agoexamples/avio_reading: Use avio_context_free() to free AVIOContext
Jun Zhao [Sun, 21 Apr 2019 02:59:53 +0000 (10:59 +0800)]
examples/avio_reading: Use avio_context_free() to free AVIOContext

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agoavfilter/af_surround: make channel spread from stereo image user configurable
Paul B Mahol [Mon, 22 Apr 2019 18:44:35 +0000 (20:44 +0200)]
avfilter/af_surround: make channel spread from stereo image user configurable

5 years agoavfilter/af_surround: add lfe_mode option
Paul B Mahol [Mon, 22 Apr 2019 15:11:01 +0000 (17:11 +0200)]
avfilter/af_surround: add lfe_mode option

5 years agoavfilter/af_surround: avoid divisions with very small numbers
Paul B Mahol [Mon, 22 Apr 2019 13:18:58 +0000 (15:18 +0200)]
avfilter/af_surround: avoid divisions with very small numbers

5 years agoavformat/mpegenc - reject unsupported audio streams
Gyan Doshi [Tue, 20 Feb 2018 15:12:21 +0000 (20:42 +0530)]
avformat/mpegenc - reject unsupported audio streams

Only MP1, MP2, MP3, 16-bit PCM_DVD, PCM S16BE,
AC3 and DTS audio codecs are supported by the muxer.

5 years agolavf/oggparsevorbis: Fix change the case of metadata keys issue
Jun Zhao [Sun, 14 Apr 2019 15:22:25 +0000 (23:22 +0800)]
lavf/oggparsevorbis: Fix change the case of metadata keys issue

The spec in https://xiph.org/vorbis/doc/v-comment.html states that
the metadata keys are case-insensitive, so don't change the case
and update the fate test case.

Fix #7784

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
5 years agoavformat/dashenc: Fix a bug with writing "final" manifest
Karthick J [Wed, 17 Apr 2019 05:56:07 +0000 (11:26 +0530)]
avformat/dashenc: Fix a bug with writing "final" manifest

This bug was introduced in the commit 951561b64ee6c11f01daedd9dcf73276cc1e765b

5 years agoavformat/dashdec: add ProgramInformation parser
Steven Liu [Mon, 15 Apr 2019 11:18:30 +0000 (19:18 +0800)]
avformat/dashdec: add ProgramInformation parser

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavcodec/agm: remove ;;
Michael Niedermayer [Sun, 21 Apr 2019 09:05:19 +0000 (11:05 +0200)]
avcodec/agm: remove ;;

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/agm: Check for too many too short codes in make_new_tree()
Michael Niedermayer [Sun, 21 Apr 2019 09:05:18 +0000 (11:05 +0200)]
avcodec/agm: Check for too many too short codes in make_new_tree()

Fixes: SEGV on unknown address
Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776
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>
5 years agoavcodec/agm: Do not crash on invalid codes
Michael Niedermayer [Sun, 21 Apr 2019 09:05:17 +0000 (11:05 +0200)]
avcodec/agm: Do not crash on invalid codes

I do not know if such vlc trees are allowed in agm, I have no specification
So i do not know if these should be treated as error, or not.
But the code does contain a check for idx < 0 already ...

Fixes: Stack-buffer-overflow in get_tree_codes
Fixes: 14189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5745747003179008
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>
5 years agoavcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside
Michael Niedermayer [Sat, 20 Apr 2019 16:11:42 +0000 (18:11 +0200)]
avcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading from outside

Fixes: index 20 out of bounds for type 'const char *[4][128]'
Fixes: 14367/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5718819672162304
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>