1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

95885 Commits

Author SHA1 Message Date
Steven Liu
afee801276 avformat/hls: correct grammatical errors of m3u8_hold_counters option
Suggested-by: Gyan <ffmpeg@gyani.pro>
Suggested-by: Rodney Baker <rodney.baker@iinet.net.au>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-11-27 19:04:00 +08:00
Carl Eugen Hoyos
a2fbdc6898 lavc/qsvenc: Fix compilation for some build environments.
Reported and tested by Sean Darcy.
2019-11-27 00:03:33 +01:00
Oleg Dobkin
32ba563cfc avutil/hwcontext_cuda: allow using primary CUDA device context
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-11-26 16:24:40 +01:00
Steven Liu
59d264b0a1 avformat/hlsenc: set strict_std_compliance from the parent AVFormatContext
fix ticket: 8388

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-11-26 11:32:03 +08:00
Limin Wang
d07d1c1dd0 avcodec/v210dec: add support for frame and slice threading
1, Test server configure:
[root@localhost ~]# cat /proc/cpuinfo  |grep "model name"
 model name      : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
 model name      : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
 ...

[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
              Mem:           102G        1.1G        100G         16M        657M        100G
              Swap:          4.0G          0B        4.0G

2, Test result:
encode the v210 input data for testing:
./ffmpeg -y -i 4k_422.ts  -c:v v210 -vframes 10 test.avi

master:
./ffmpeg -y -threads 1 -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 60 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=13.7x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=101.869s stime=66.181s rtime=167.996s
bench: maxrss=186552kB

patch applied:
./ffmpeg -y -threads 2 -thread_type slice -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 72 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=16.5x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=103.562s stime=74.858s rtime=139.599s
bench: maxrss=188616kB

./ffmpeg -y -threads 2 -thread_type frame -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 85 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=19.6x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=114.310s stime=92.685s rtime=117.693s
bench: maxrss=231896kB

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 09:54:27 +01:00
Limin Wang
f0dbeb5eaa avcodec/v410dec: add support for frame and slice threading
1, Test server configure:
[root@localhost ~]# cat /proc/cpuinfo  |grep "model name"
model name	: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
model name	: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
...

[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
              Mem:           102G        1.1G        100G         16M        657M        100G
              Swap:          4.0G          0B        4.0G

2, Test result:
encode the v410 input data for testing:
 ./ffmpeg -y -i 4k_422.ts  -c:v v410 -vframes 10 test.avi

master:
./ffmpeg -y -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 37 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed= 8.6x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=166.016s stime=102.192s rtime=268.120s
bench: maxrss=273400kB

patch applied:
./ffmpeg -y -threads 2 -thread_type slice -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 53 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=12.3x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=165.135s stime=100.456s rtime=187.994s
bench: maxrss=275476kB

./ffmpeg -y -threads 2 -thread_type frame -stream_loop 1000 -i ./test.avi -benchmark -f null -
frame=10010 fps= 61 q=-0.0 Lsize=N/A time=00:38:26.30 bitrate=N/A speed=14.1x
video:5240kB audio:432432kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=171.386s stime=122.102s rtime=163.637s
bench: maxrss=340308kB

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 09:54:27 +01:00
Steven Liu
d5e3d8e2f7 avformat/hls: add option for the m3u8 list load max times
set max times for load m3u8 when the m3u8 list refresh do not with new
segments any times.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-11-25 11:12:20 +08:00
Michael Niedermayer
1ca978d636 avcodec/nuv: Use ff_set_dimensions()
Fixes: OOM
Fixes: 18956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5766505644163072

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>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
d83002179f avformat/vividas: Error out on audio packets in the absence of audio streams
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
3e5a528bbe avformat/vividas: Check and require 1 video stream
The decoder hardcodes that audio is stream_id = 1 so it does not
currently work with more or less than 1 video stream at st=0

Fixes: assertion failure
Fixes: 18602/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6259277199310848

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
d82ab96e76 avcodec/ffwavesynth: Fix integer overflow with pink_ts_cur/next
Fixes: signed integer overflow: 6175076100092079360 - -5034989061050195840 cannot be represented in type 'long'
Fixes: 18614/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFWAVESYNTH_fuzzer-5704508847423488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
721624c2f6 avcodec/ralf: Fix integer overflows with the filter coefficient in decode_channel()
Fixes: signed integer overflow: 1145975808 - -1146173210 cannot be represented in type 'int'
Fixes: 18616/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5121296757424128

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
bf9c4a1275 avcodec/g729dec: Use 64bit and clip in scalar product
The G729 reference decoder clips after each individual operation and keeps track if overflow
occurred (in the fixed point implementation), this here is
simpler and faster but not 1:1 the same what the reference does.

Non fuzzed samples which trigger any such overflow are welcome, so
the need and impact of different clipping solutions can be evaluated.

Fixes: signed integer overflow: 1271483721 + 1073676289 cannot be represented in type 'int'
Fixes: 18617/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5137705679978496

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
75b64e5aa3 avcodec/mxpegdec: Check for multiple SOF
Fixes: Timeout (14sec -> 9ms)
Fixes: 18598/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5726095261564928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
1138cdecbe avcodec/nuv: Move comptype check up
Fixes: Timeout (23sec -> 5ms)
Fixes: 18517/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-5753135536013312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-25 00:07:07 +01:00
Michael Niedermayer
cf323f4d38 avcodec/wmavoice: Fix integer overflow in synth_frame()
Fixes: left shift of negative value -3
Fixes: 18518/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-6560514359951360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 23:00:25 +01:00
Michael Niedermayer
5634e20525 avcodec/rawdec: Check bits_per_coded_sample more pedantically for 16bit cases
Fixes: shift exponent -14 is negative
Fixes: 18335/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RAWVIDEO_fuzzer-5723267192586240

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 23:00:01 +01:00
Michael Niedermayer
6014bcf1b7 avutil/lfg: Correct index increment type to avoid undefined behavior
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzzer-5668481831272448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 22:58:59 +01:00
Michael Niedermayer
327a968817 avcodec/cngdec: Remove AV_CODEC_CAP_DELAY
As is the decoder will never stop, it will cause an infinite loop. The RFC seems only
to speak of non empty packets so endlessly generating noise from the last empty flush
packets seems wrong.

Fixes: infinite loop
Fixes: 18333/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COMFORTNOISE_fuzzer-5668481831272448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 22:57:02 +01:00
Michael Niedermayer
e21ec54fdf tools/target_dec_fuzzer: Adjust threshold for VP9
The threshold is chosen so that the worse frames would together not take
excessive time.
A better solution is welcome!

Fixes: Timeout (308sec ->102ms)
Fixes: 18314/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5701689176227840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 22:56:32 +01:00
Andreas Rheinhardt
6eb88daed1 avformat/matroskaenc: Remove outdated comment
This comment does not account for the fact that the limits on cluster
size and duration are configurable by the user since 98308bd4.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 16:01:56 +01:00
Andreas Rheinhardt
4470ab1e0e avformat/matroskaenc: Fix potential leak of cached packet
If mkv_write_trailer() is not called, the cached audio packet might
leak; so unref it in mkv_deinit().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-24 16:01:56 +01:00
Baptiste Coudurier
d65aaf8ea9 avformat/mxfenc: simplify d-10 ul handling 2019-11-23 11:02:04 -08:00
Baptiste Coudurier
635a5c11a6 avformat/mxfenc: simplify dv ul handling 2019-11-23 11:02:04 -08:00
Baptiste Coudurier
eafa8e8592 avformat/dvenc: support muxing dvcprohd 2019-11-23 11:02:04 -08:00
Paul B Mahol
93414ce831 avfilter: add axcorrelate filter 2019-11-23 11:54:20 +01:00
Paul B Mahol
aaac48fb50 avfilter/vf_normalize: add support for commands 2019-11-23 11:07:02 +01:00
Paul B Mahol
89aa1342b1 avfilter/af_aiir: normalize biquads only if divisor is big enough 2019-11-22 21:10:43 +01:00
Paul B Mahol
f46b04c4c3 avfilter/af_biquads: add new normalize/n option 2019-11-22 21:10:43 +01:00
Andriy Gelman
e759fbfbc4 avcodec/v4l2_context: Fix indentation
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-11-22 12:06:28 -08:00
Andriy Gelman
ccc83ff11e avcodec/v4l2_m2m_dec: Fix decoding on Odroid XU4
c0c7946196 unintentianally changed the initialization flow of the
decoder: It caused the capture buffers to be initialized on
v4l2_m2m.c:180 in v4l2_configure_contexts(). This breaks h264 decoding
on the Odroid XU4 (RPI4 was not affected).

This commit postpones capture buffer initialization
as before c0c7946196 to fix the issue.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-11-22 12:06:28 -08:00
Paul B Mahol
f2a01b4c8b avfilter/af_aiir: fix biquads normalization 2019-11-22 20:24:29 +01:00
Paul B Mahol
eecc45cea5 avfilter/af_aiir: add missing normalization of biquads gains 2019-11-22 17:42:04 +01:00
Paul B Mahol
2f5fb9e60f avfilter/af_aiir: make a/b coefficients array 2019-11-22 16:13:06 +01:00
Paul B Mahol
e169d3756e avfilter/af_aiir: factor out response calculation 2019-11-22 16:07:03 +01:00
Paul B Mahol
c36e72ed27 avfilter/af_aiir: check for stability 2019-11-22 16:07:02 +01:00
Gyan Doshi
1b78da449e doc/filters: complete and correct vmafmotion section 2019-11-22 19:55:35 +05:30
Andreas Rheinhardt
27c6c92534 avformat/av1: Fix leak of dynamic buffer in case of parsing failure
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-22 00:09:05 -03:00
Paul B Mahol
9cd56bb94c avfilter/af_aiir: fix array length when selecting conjugate poles 2019-11-21 23:27:34 +01:00
Zhao Zhili
bbb68be0cc avfilter/graphdump: fix use of uninitialized variables
In case of av_bprint_finalize failed.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-21 21:26:12 +01:00
leozhang
4a3aa77d74 avfilter/avfilter: fix indentation
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-21 21:26:12 +01:00
Paul B Mahol
55ca21d54e avfilter/vf_amplify: add timeline support 2019-11-21 18:34:07 +01:00
Paul B Mahol
103effebc1 avfilter/vf_datascope: add support for commands in oscilloscope 2019-11-21 18:08:48 +01:00
Paul B Mahol
c98d8b2bf5 avfilter/vsrc_sierpinski: change seed option type 2019-11-21 17:38:48 +01:00
Paul B Mahol
d83304d539 avfilter/vsrc_sierpinski: fix another typos 2019-11-21 17:35:35 +01:00
Paul B Mahol
09fd1b18f0 avfilter/vsrc_testsrc: simplify color filter commands parsing 2019-11-21 17:32:04 +01:00
Paul B Mahol
94c0b27397 avfilter/vf_chromakey: add support for commands 2019-11-21 17:19:40 +01:00
Paul B Mahol
ae6c4168e6 avfilter/vf_lumakey: add support for commands 2019-11-21 16:59:39 +01:00
Paul B Mahol
6b9862f614 avfilter/vf_lumakey: change options to doubles, so that values are automatically scaled 2019-11-21 16:52:48 +01:00
Paul B Mahol
08f7968fc4 avfilter/vf_lumakey: add support for 12bit yuva formats 2019-11-21 16:40:17 +01:00