]> git.sesse.net Git - ffmpeg/log
ffmpeg
3 years agoavcodec/cfhd: properly handle midstream size changes for transform type 2
Paul B Mahol [Wed, 23 Dec 2020 11:34:14 +0000 (12:34 +0100)]
avcodec/cfhd: properly handle midstream size changes for transform type 2

3 years agolibswscale: avoid UB nullptr-with-offset.
Jeremy Leconte [Thu, 24 Dec 2020 04:27:19 +0000 (04:27 +0000)]
libswscale: avoid UB nullptr-with-offset.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/swfdec: Allocate output buffer after reading input
Michael Niedermayer [Wed, 18 Nov 2020 00:29:23 +0000 (01:29 +0100)]
avformat/swfdec: Allocate output buffer after reading input

Fixes: Timeout (>10sec -> 0.26sec)
Fixes: 27419/clusterfuzz-testcase-minimized-ffmpeg_dem_SWF_fuzzer-5678307361947648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/cafdec: clip sample rate
Michael Niedermayer [Tue, 17 Nov 2020 23:48:26 +0000 (00:48 +0100)]
avformat/cafdec: clip sample rate

Fixes: 1.21126e+111 is outside the range of representable values of type 'int'
Fixes: 27398/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5412960339755008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotools/target_dec_fuzzer: Adjust maxpixels for G2M
Michael Niedermayer [Mon, 16 Nov 2020 23:41:45 +0000 (00:41 +0100)]
tools/target_dec_fuzzer: Adjust maxpixels for G2M

Fixes: Timeout (50sec -> 3sec)
Fixes: 27383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5196953666977792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavf/img2dec: Increase score for very large jpeg images.
Carl Eugen Hoyos [Thu, 24 Dec 2020 12:16:44 +0000 (13:16 +0100)]
lavf/img2dec: Increase score for very large jpeg images.

Avoids a conflict with the raw mjpeg demuxer.

3 years agolavd/decklink_dec: Do not set codec_tags.
Carl Eugen Hoyos [Sun, 13 Dec 2020 10:01:02 +0000 (11:01 +0100)]
lavd/decklink_dec: Do not set codec_tags.

Only set the pix_fmt for rawvideo.

Fixes ticket #9005.

Reviewed-by: Marton Balint
3 years agoffmpeg: delay first stats
Gyan Doshi [Wed, 23 Dec 2020 04:53:30 +0000 (10:23 +0530)]
ffmpeg: delay first stats

Wait for all output files to be initialized before printing first stats.

Avoids breaking output file dump report.

3 years agoavformat/hlsenc: Add dependency on avc.o
Derek Buitenhuis [Tue, 22 Dec 2020 20:58:53 +0000 (15:58 -0500)]
avformat/hlsenc: Add dependency on avc.o

a2b1dd0ce301450a47c972745a6b33c4c273aa5d added a dependency
on ff_nal_unit_extract_rbsp.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoffmpeg: don't delay printing initial stats
Gyan Doshi [Mon, 21 Dec 2020 09:16:15 +0000 (14:46 +0530)]
ffmpeg: don't delay printing initial stats

The first stats is printed after the initial stats_period has elapsed. With a large period,
it may appear that ffmpeg has frozen at startup.

The initial stats is now printed after the first transcode_step.

3 years agoffmpeg: add option stats_period
Gyan Doshi [Mon, 21 Dec 2020 08:46:49 +0000 (14:16 +0530)]
ffmpeg: add option stats_period

At present, progress stats are updated at a hardcoded interval of
half a second. For long processes, this can lead to bloated
logs and progress reports.

Users can now set a custom period using option -stats_period
Default is kept at 0.5 seconds.

3 years agoavfilter/vf_decimate: fix overreads when using ppsrc
Paul B Mahol [Tue, 22 Dec 2020 12:19:12 +0000 (13:19 +0100)]
avfilter/vf_decimate: fix overreads when using ppsrc

Derive input parameters from correct inlink when using ppsrc.

Previously both input frames would use dimensions of first inlink,
causing crash if first inlink w/h was smaller than second one.

3 years agodnn: add NV12 pixel format support
Ting Fu [Fri, 18 Dec 2020 08:08:29 +0000 (16:08 +0800)]
dnn: add NV12 pixel format support

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
3 years agoavcodec/ffv1dec: Fix off by 1 error with quant tables
Michael Niedermayer [Fri, 18 Dec 2020 23:22:04 +0000 (00:22 +0100)]
avcodec/ffv1dec: Fix off by 1 error with quant tables

Fixes: assertion failure
Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144
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>
3 years agoavformat/mpegts: simplify nb_packets code
Michael Niedermayer [Fri, 18 Dec 2020 23:22:02 +0000 (00:22 +0100)]
avformat/mpegts: simplify nb_packets code

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mpegts: Increase pcr_incr width to 64bit
Michael Niedermayer [Fri, 18 Dec 2020 23:22:01 +0000 (00:22 +0100)]
avformat/mpegts: Increase pcr_incr width to 64bit

Fixes: division by zero
Fixes: 26459/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5666350112178176
Fixes: 28154/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5195728439476224
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_decimate: switch to activate
Paul B Mahol [Mon, 21 Dec 2020 22:09:58 +0000 (23:09 +0100)]
avfilter/vf_decimate: switch to activate

3 years agoavfilter/af_crystalizer: implement inverse filtering
Paul B Mahol [Mon, 21 Dec 2020 12:07:23 +0000 (13:07 +0100)]
avfilter/af_crystalizer: implement inverse filtering

3 years agoavfilter/af_crystalizer: use proper type for variable
Paul B Mahol [Mon, 21 Dec 2020 10:57:24 +0000 (11:57 +0100)]
avfilter/af_crystalizer: use proper type for variable

3 years agoavfilter/af_crystalizer: improve filter description
Paul B Mahol [Mon, 21 Dec 2020 10:34:40 +0000 (11:34 +0100)]
avfilter/af_crystalizer: improve filter description

3 years agoavformat/libamqp: parse vhost in uri
Andriy Gelman [Sun, 20 Dec 2020 03:32:04 +0000 (22:32 -0500)]
avformat/libamqp: parse vhost in uri

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavfilter: add shufflepixels video filter
Paul B Mahol [Wed, 19 Aug 2020 08:23:03 +0000 (10:23 +0200)]
avfilter: add shufflepixels video filter

3 years agodoc/codecs: add entries for export_side_data
Gyan Doshi [Sun, 20 Dec 2020 09:39:28 +0000 (15:09 +0530)]
doc/codecs: add entries for export_side_data

Document addition of venc_params and film_grain.

3 years agoavcodec/fastaudio: Fix invalid shift exponent
Michael Niedermayer [Tue, 8 Sep 2020 21:03:19 +0000 (23:03 +0200)]
avcodec/fastaudio: Fix invalid shift exponent

Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 25434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-6252363168612352
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_maskedthreshold: add support for commands
Paul B Mahol [Sat, 19 Dec 2020 22:05:36 +0000 (23:05 +0100)]
avfilter/vf_maskedthreshold: add support for commands

3 years agoavfilter/vf_maskedminmax: add support for commands
Paul B Mahol [Sat, 19 Dec 2020 19:41:51 +0000 (20:41 +0100)]
avfilter/vf_maskedminmax: add support for commands

3 years agoavfilter/vf_maskedclamp: add support for commands
Paul B Mahol [Sat, 19 Dec 2020 19:37:26 +0000 (20:37 +0100)]
avfilter/vf_maskedclamp: add support for commands

3 years agoavfilter/vf_bilateral: add support for commands
Paul B Mahol [Sat, 19 Dec 2020 19:32:09 +0000 (20:32 +0100)]
avfilter/vf_bilateral: add support for commands

3 years agodoc/filters: document that cas filter supports commands
Paul B Mahol [Sat, 19 Dec 2020 19:12:26 +0000 (20:12 +0100)]
doc/filters: document that cas filter supports commands

3 years agotools/target_dem_fuzzer: remove unused label
Michael Niedermayer [Fri, 23 Oct 2020 08:49:55 +0000 (10:49 +0200)]
tools/target_dem_fuzzer: remove unused label

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/utils: Check bitrate for overflow in get_bit_rate()
Michael Niedermayer [Sun, 25 Oct 2020 18:19:54 +0000 (19:19 +0100)]
avcodec/utils: Check bitrate for overflow in get_bit_rate()

Fixes: signed integer overflow: 617890810133996544 * 16 cannot be represented in type 'long'
Fixes: 26565/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5092054700654592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Check if hoov is at the end
Michael Niedermayer [Sun, 25 Oct 2020 17:39:45 +0000 (18:39 +0100)]
avformat/mov: Check if hoov is at the end

Fixes: Timeout, probably infinite loop
Fixes: 26559/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5391165484171264
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc_ps: Change scaling_list_dc_coef to 8 bit
Michael Niedermayer [Sat, 19 Dec 2020 14:17:24 +0000 (15:17 +0100)]
avcodec/hevc_ps: Change scaling_list_dc_coef to 8 bit

Suggested-by: James
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc_ps: check scaling_list_dc_coef
Michael Niedermayer [Fri, 18 Dec 2020 22:05:22 +0000 (23:05 +0100)]
avcodec/hevc_ps: check scaling_list_dc_coef

Fixes: signed integer overflow: 2147483640 + 8 cannot be represented in type 'int'
Fixes: 28449/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5686013259284480
Reviewed-by: James Almer <jamrial@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>
3 years agoavfilter/vf_fillborders: add fade mode
Paul B Mahol [Fri, 18 Dec 2020 22:06:56 +0000 (23:06 +0100)]
avfilter/vf_fillborders: add fade mode

3 years agofate/image: add missing ffprobe dependency to fate-dpx-probe
James Almer [Fri, 18 Dec 2020 21:43:35 +0000 (18:43 -0300)]
fate/image: add missing ffprobe dependency to fate-dpx-probe

And use the existing probeframes helper while at it.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agofate/image: update fate-dpx-probe reference file
James Almer [Fri, 18 Dec 2020 21:42:20 +0000 (18:42 -0300)]
fate/image: update fate-dpx-probe reference file

Regression since 20b09b20a942d4aad38f9fa1324b713168d3db9a

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/rtsp: set AV_OPT_FLAG_DEPRECATED on deprecated options
Andriy Gelman [Sun, 15 Nov 2020 18:20:02 +0000 (13:20 -0500)]
avformat/rtsp: set AV_OPT_FLAG_DEPRECATED on deprecated options

Reviewed-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoavfilter/vf_fillborders: add more fill modes
Paul B Mahol [Fri, 18 Dec 2020 18:03:17 +0000 (19:03 +0100)]
avfilter/vf_fillborders: add more fill modes

3 years agoavcodec/dpx: fix use of uninitialised value
James Almer [Fri, 18 Dec 2020 17:31:47 +0000 (14:31 -0300)]
avcodec/dpx: fix use of uninitialised value

Found by Valgrind.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/hevc_sei: return the correct error code on User Data Registered parsing failure
James Almer [Fri, 18 Dec 2020 15:44:27 +0000 (12:44 -0300)]
avcodec/hevc_sei: return the correct error code on User Data Registered parsing failure

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/hevc_sei: print a log message when a unsupported ITU-T T35 SEI messages is...
James Almer [Tue, 8 Dec 2020 19:34:32 +0000 (16:34 -0300)]
avcodec/hevc_sei: print a log message when a unsupported ITU-T T35 SEI messages is parsed

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/hevc_sei: refactor parsing User Data Registered ITU-T T35 SEI messages
James Almer [Tue, 8 Dec 2020 19:32:29 +0000 (16:32 -0300)]
avcodec/hevc_sei: refactor parsing User Data Registered ITU-T T35 SEI messages

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/h264_sei: print a log message when a unsupported ITU-T T35 SEI messages is...
James Almer [Tue, 8 Dec 2020 19:29:39 +0000 (16:29 -0300)]
avcodec/h264_sei: print a log message when a unsupported ITU-T T35 SEI messages is parsed

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/h264_sei: refactor parsing User Data Registered ITU-T T35 SEI messages
James Almer [Tue, 8 Dec 2020 18:48:32 +0000 (15:48 -0300)]
avcodec/h264_sei: refactor parsing User Data Registered ITU-T T35 SEI messages

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_asoftclip: add two more useful options for finer filtering
Paul B Mahol [Fri, 18 Dec 2020 12:09:44 +0000 (13:09 +0100)]
avfilter/af_asoftclip: add two more useful options for finer filtering

3 years agoavfilter/af_biquads: fix error in ro calculation
Paul B Mahol [Thu, 17 Dec 2020 14:12:40 +0000 (15:12 +0100)]
avfilter/af_biquads: fix error in ro calculation

3 years agoavcodec/dpx: Fix B&W film scans from Lasergraphics Inc
Harry Mallon [Mon, 7 Dec 2020 10:32:14 +0000 (10:32 +0000)]
avcodec/dpx: Fix B&W film scans from Lasergraphics Inc

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agoavcodec/dpx: Read color information from DPX header
Harry Mallon [Mon, 7 Dec 2020 10:32:13 +0000 (10:32 +0000)]
avcodec/dpx: Read color information from DPX header

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agoavcodec/dpx: Report color_range from DPX header
Harry Mallon [Mon, 7 Dec 2020 10:32:12 +0000 (10:32 +0000)]
avcodec/dpx: Report color_range from DPX header

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agoavcodec/dpx: Read SMPTE timecode from DPX
Harry Mallon [Mon, 7 Dec 2020 10:32:11 +0000 (10:32 +0000)]
avcodec/dpx: Read SMPTE timecode from DPX

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agoavcodec/dpx: Read alternative frame rate from television header
Harry Mallon [Mon, 7 Dec 2020 10:32:10 +0000 (10:32 +0000)]
avcodec/dpx: Read alternative frame rate from television header

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agofate: Add dpx-probe test
Harry Mallon [Mon, 7 Dec 2020 10:32:09 +0000 (10:32 +0000)]
fate: Add dpx-probe test

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
3 years agoavformat/url: Change () position in ff_make_absolute_url()
Michael Niedermayer [Wed, 16 Dec 2020 18:15:12 +0000 (19:15 +0100)]
avformat/url: Change () position in ff_make_absolute_url()

No testcase
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_biquads: add one-pole shelf filters by adding pole option
Paul B Mahol [Wed, 16 Dec 2020 17:36:56 +0000 (18:36 +0100)]
avfilter/af_biquads: add one-pole shelf filters by adding pole option

3 years agoavcodec/av1dec: support exporting Film Grain params as frame side data
James Almer [Wed, 25 Nov 2020 23:28:42 +0000 (20:28 -0300)]
avcodec/av1dec: support exporting Film Grain params as frame side data

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/vf_limiter: add support for commands
Paul B Mahol [Tue, 15 Dec 2020 19:31:25 +0000 (20:31 +0100)]
avfilter/vf_limiter: add support for commands

3 years agoavcodec/cuviddec: unref output frame on failure
James Almer [Sun, 13 Dec 2020 18:08:13 +0000 (15:08 -0300)]
avcodec/cuviddec: unref output frame on failure

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/cuviddec: check for av_buffer_ref() failure
James Almer [Sun, 13 Dec 2020 17:57:19 +0000 (14:57 -0300)]
avcodec/cuviddec: check for av_buffer_ref() failure

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/libdav1d: stop setting AVFrame->best_effort_timestamp
James Almer [Sun, 13 Dec 2020 01:20:43 +0000 (22:20 -0300)]
avcodec/libdav1d: stop setting AVFrame->best_effort_timestamp

It's now set by the generic decode code.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/mjpegdec: stop setting AVFrame->best_effort_timestamp
James Almer [Sun, 13 Dec 2020 01:20:27 +0000 (22:20 -0300)]
avcodec/mjpegdec: stop setting AVFrame->best_effort_timestamp

It's now set by the generic decode code.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/decode: set best_effort_timestamp on output frames for all decoders
James Almer [Sun, 13 Dec 2020 00:37:53 +0000 (21:37 -0300)]
avcodec/decode: set best_effort_timestamp on output frames for all decoders

Fixes a decoding regression introduced by e9a2a87773, and as a side effect also
fixes bogus values set to certain audio frames that had some samples discarded,
where the offsets added to pts, pkt_dts and pkt_duration were not reflected in
best_effort_timestamp.

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/af_afreqshift: add fltp sample format support
Paul B Mahol [Sun, 13 Dec 2020 10:11:49 +0000 (11:11 +0100)]
avfilter/af_afreqshift: add fltp sample format support

3 years agofate: fix fate-filter-hqx on big-endian arches
Andriy Gelman [Sat, 5 Dec 2020 02:26:11 +0000 (21:26 -0500)]
fate: fix fate-filter-hqx on big-endian arches

One of the inputs to the fate test has an rgba pixel format which needs
to be converted to rgb32 (argb on big-endian) for the hqx filter. Because auto
scaling in the fate test is disabled, this needs a separate scale
filter.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agoswscale/rgb2rgb_template: use shuffle macro on big-endian arches
Andriy Gelman [Mon, 30 Nov 2020 05:46:51 +0000 (00:46 -0500)]
swscale/rgb2rgb_template: use shuffle macro on big-endian arches

Fixes fate-qtrle-32bit on big-endian.

The macro does a simple byte swap on uint8 array without any casts, so
it's valid on big-endian arches.

The mentioned test was failing because the byteswap function
shuffle_bytes_3210_c() is used in the pixel format conversion
(argb->bgra).

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
3 years agolavfi/dnn: check the return value from sws_getContext
Jun Zhao [Wed, 9 Dec 2020 09:53:10 +0000 (17:53 +0800)]
lavfi/dnn: check the return value from sws_getContext

sws_getContext may be return NULL, and it's will be dereferenced,
so add the check.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 years agolavfi/dnn: used the format name in debug message
Jun Zhao [Wed, 9 Dec 2020 09:53:09 +0000 (17:53 +0800)]
lavfi/dnn: used the format name in debug message

Used the format name in debug message.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 years agoavformat/iff: Check data_size
Michael Niedermayer [Thu, 10 Dec 2020 23:49:23 +0000 (00:49 +0100)]
avformat/iff: Check data_size

Fixes: infinite loop
Fixes: 27834/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5694930919620608
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_fade: add timeline support
Paul B Mahol [Fri, 11 Dec 2020 21:59:43 +0000 (22:59 +0100)]
avfilter/vf_fade: add timeline support

3 years agoavfilter/af_afade: add support for commands to afade filter
Paul B Mahol [Fri, 11 Dec 2020 21:56:22 +0000 (22:56 +0100)]
avfilter/af_afade: add support for commands to afade filter

3 years agoavfilter/vf_convolution: add support for commands
Paul B Mahol [Fri, 11 Dec 2020 17:28:12 +0000 (18:28 +0100)]
avfilter/vf_convolution: add support for commands

3 years agoavfilter/vf_chromanr: add options for finer controls of filtering
Paul B Mahol [Fri, 11 Dec 2020 12:35:41 +0000 (13:35 +0100)]
avfilter/vf_chromanr: add options for finer controls of filtering

3 years agoavfilter: add asuperpass and asuperstop filter
Paul B Mahol [Sun, 6 Dec 2020 21:48:12 +0000 (22:48 +0100)]
avfilter: add asuperpass and asuperstop filter

3 years agoavcodec/speedhqenc: Call correct function
Andreas Rheinhardt [Thu, 10 Dec 2020 07:50:37 +0000 (08:50 +0100)]
avcodec/speedhqenc: Call correct function

Up until now, the SpeedHQ encoder called a wrong function for init:
void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256],
                        uint8_t *uni_ac_vlc_len);
Yet the first argument actually used is of type RLTable; the size of
said struct is less than 256 if the size of a pointer is four, leading
to an access beyond the end of the RLTable.

This commit fixes this by calling the actually intended function:
init_uni_ac_vlc() from mpeg12enc.c. It was intended to use this
function [1], yet doing so was forgotten when the patch was actually
applied.

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/266187.html

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavformat/utils: Improve ffio_limit logic
Andreas Rheinhardt [Fri, 11 Dec 2020 00:46:15 +0000 (01:46 +0100)]
avformat/utils: Improve ffio_limit logic

The earlier code would not complain if the remaining size was one byte
short of the desired size; and the way it performed the check could run
into signed integer overflow.

Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long'
Fixes: Timeout
Fixes: 26434/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-5752845451919360
Fixes: 26444/clusterfuzz-testcase-minimized-ffmpeg_dem_BINK_fuzzer-4697773380993024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agolavf/rawdec: Return a low score if the mjpeg probe function detected one frame.
Carl Eugen Hoyos [Wed, 9 Dec 2020 22:42:33 +0000 (23:42 +0100)]
lavf/rawdec: Return a low score if the mjpeg probe function detected one frame.

Fixes ticket #9026.

3 years agoavfilter/af_earwax: fix check that was left in previous commit
Paul B Mahol [Thu, 10 Dec 2020 22:39:49 +0000 (23:39 +0100)]
avfilter/af_earwax: fix check that was left in previous commit

Makes output exact with smaller number of samples per frame than taps.

3 years agoavformat/hashenc: Reuse hash_free() for framehash muxers
Andreas Rheinhardt [Sun, 6 Dec 2020 23:41:25 +0000 (00:41 +0100)]
avformat/hashenc: Reuse hash_free() for framehash muxers

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channels
Hendrik Leppkes [Sat, 5 Dec 2020 10:41:23 +0000 (11:41 +0100)]
avcodec: set AV_CODEC_CAP_CHANNEL_CONF on decoders which set their own channels

The decoders in this set either have a fixed channel count, or read it
from the bitstream, and thus do not require the channel count as
external information.

Fixes various regressions since
81503ac58a763a36b1f57264013b1e76acb62b68, which requires a valid channel
count for decoders which do not set this capability.

Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agotests/audiomatch: add free to make static analysis tools happy
Jun Zhao [Mon, 7 Dec 2020 07:47:09 +0000 (15:47 +0800)]
tests/audiomatch: add free to make static analysis tools happy

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
3 years agoavformat/mov: remove an always true condition
Zhao Zhili [Fri, 18 Sep 2020 14:33:38 +0000 (22:33 +0800)]
avformat/mov: remove an always true condition

3 years agosmvjpegdec: merge into mjpegdec
Anton Khirnov [Tue, 1 Dec 2020 18:32:00 +0000 (19:32 +0100)]
smvjpegdec: merge into mjpegdec

SMVJPEG stores frames as slices of a big JPEG image. The decoder is
implemented as a wrapper that instantiates a full internal MJPEG
decoder, then forwards the decoded frames with offset data pointers.
This is unnecessarily complex and fragile, not supporting useful decoder
capabilities like direct rendering.

Re-implement the decoder inside the MJPEG decoder, which is accomplished
by returning each decoded frame multiple times, setting cropping
information appropriately on each instance.

One peculiar aspect of the previous design is that since
- the smvjpeg decoder returns one frame per input packet
- there are multiple frames in each packets (the aformentioned slices)
the demuxer needs to return each packet multiple times.
This is now also eliminated - the demuxer now returns each packet
exactly once, with the duration set to the number of frames it decodes
to.

This also removes one of the last remaining internal uses of the old
video decoding API.

3 years agomjpegdec: convert to receive_frame()
Anton Khirnov [Tue, 1 Dec 2020 10:34:27 +0000 (11:34 +0100)]
mjpegdec: convert to receive_frame()

This will be useful in the following commit.

3 years agotests: stop using -vsync drop
Anton Khirnov [Mon, 30 Nov 2020 13:13:51 +0000 (14:13 +0100)]
tests: stop using -vsync drop

It depends on the muxer generating the timestamps, which is deprecated
and scheduled for removal on next bump.

A bunch of tests change timestamps, because of ffmpeg.c is not
generating them correctly. This should be fixed later.

3 years agoffmpeg: stop accessing deprecated stream-embedded codec context
Anton Khirnov [Sun, 29 Nov 2020 15:43:07 +0000 (16:43 +0100)]
ffmpeg: stop accessing deprecated stream-embedded codec context

3 years agolavf/mux: rewrite guessing the packet duration
Anton Khirnov [Sun, 29 Nov 2020 16:40:14 +0000 (17:40 +0100)]
lavf/mux: rewrite guessing the packet duration

Factor out the code into a separate muxing-specific function.
Stop accessing the deprecated AVStream-embedded codec context, use the
average framerate (if specified) instead.

3 years agotests: drop api-codec-param test
Anton Khirnov [Sun, 29 Nov 2020 16:12:34 +0000 (17:12 +0100)]
tests: drop api-codec-param test

It fundamentally depends on deprecated lavf internals.

3 years agolavd/caca: do not access deprecated codec context
Anton Khirnov [Sun, 29 Nov 2020 15:28:08 +0000 (16:28 +0100)]
lavd/caca: do not access deprecated codec context

Use the stream timebase instead.

3 years agocodec_desc: add SMVJPEG flags
Anton Khirnov [Tue, 1 Dec 2020 17:55:22 +0000 (18:55 +0100)]
codec_desc: add SMVJPEG flags

Same flags as MJPEG, as it's essentially the same codec.

3 years agoimg2dec: export avg_frame_rate
Anton Khirnov [Wed, 7 Oct 2020 11:02:39 +0000 (13:02 +0200)]
img2dec: export avg_frame_rate

3 years agoavcodec/hevcdec: dynamic allocate sList and HEVClcList
Nuo Mi [Sun, 29 Nov 2020 15:30:10 +0000 (23:30 +0800)]
avcodec/hevcdec: dynamic allocate sList and HEVClcList

following comandline will crash the ffmpeg
ffmpeg -threads 17 -thread_type slice -i WPP_A_ericsson_MAIN_2.bit out.yuv -y

the HEVCContext->sList size is MAX_NB_THREADS(16), any > 16 thread number will crash the application

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agoavcodec/snow: Use ff_thread_once() in ff_snow_common_init()
Andreas Rheinhardt [Tue, 1 Dec 2020 23:10:13 +0000 (00:10 +0100)]
avcodec/snow: Use ff_thread_once() in ff_snow_common_init()

ff_snow_common_init() currently initializes static data every time it is
invoked; given that both the Snow encoder and decoder have the
FF_CODEC_CAP_INIT_THREADSAFE flag set, this can lead to data races (and
therefore undefined behaviour) even though all threads write the same
values. This commit fixes this by using ff_thread_once() for the
initializations.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/idcinvideo: Mark decoder as init-threadsafe
Andreas Rheinhardt [Mon, 30 Nov 2020 17:24:37 +0000 (18:24 +0100)]
avcodec/idcinvideo: Mark decoder as init-threadsafe

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cinepak: Mark decoder as init-threadsafe
Andreas Rheinhardt [Mon, 30 Nov 2020 13:46:30 +0000 (14:46 +0100)]
avcodec/cinepak: Mark decoder as init-threadsafe

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavcodec/cinepakenc: Mark encoder as init-threadsafe
Andreas Rheinhardt [Mon, 30 Nov 2020 13:44:49 +0000 (14:44 +0100)]
avcodec/cinepakenc: Mark encoder as init-threadsafe

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
3 years agoavformat/matroskadec: Sanity check codec_id/track type
Michael Niedermayer [Sun, 6 Dec 2020 23:37:25 +0000 (00:37 +0100)]
avformat/matroskadec: Sanity check codec_id/track type

Fixes: memleak
Fixes: 27766/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-5198300814508032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/rpl: Check the number of streams
Michael Niedermayer [Tue, 8 Dec 2020 23:49:29 +0000 (00:49 +0100)]
avformat/rpl: Check the number of streams

Fixes: out of memory access
Fixes: 27787/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-4743666463408128.fuzz
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>
3 years agoavformat/vividas: Check sample_rate
Michael Niedermayer [Tue, 10 Nov 2020 21:36:25 +0000 (22:36 +0100)]
avformat/vividas: Check sample_rate

Fixes: Assertion c > 0 failed at libavutil/mathematics.c
Fixes: 27001/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5726041328582656
Fixes: 27453/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5716060384526336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/vividas: Make len signed
Michael Niedermayer [Sun, 22 Nov 2020 16:24:20 +0000 (17:24 +0100)]
avformat/vividas: Make len signed

Fixes: out of array access
Fixes: 27424/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5682070692823040
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/vaapi_av1: fill the remaining VAFilmGrainStructAV1 fields
James Almer [Mon, 30 Nov 2020 16:55:11 +0000 (13:55 -0300)]
avcodec/vaapi_av1: fill the remaining VAFilmGrainStructAV1 fields

Signed-off-by: James Almer <jamrial@gmail.com>