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

96618 Commits

Author SHA1 Message Date
Paul B Mahol
a15618d2c3 avformat/sccdec: use av_sscanf() instead 2020-02-04 20:39:46 +01:00
Paul B Mahol
fcc0424c93 avfilter/vf_ssim: improve precision
Use doubles for accumulating floats.
2020-02-04 18:28:04 +01:00
Paul B Mahol
c35382aaf4 avcodec/mlpenc: fix small memory leak 2020-02-04 11:35:02 +01:00
Jai Luthra
49cfbedb9d mlp: check huff_lsbs only when codebook is used
When no codebook is used, huff_lsbs can be more than 24 and still decode to
original values once filters are applied.

Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
d6cef144e2 mlpenc: fix some -fsanitize=integer errors
Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
ad26384734 mlpenc: clean up
Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
bc0ed17602 mlpenc: improve lpc filtering
* fix a possible memory leak (apply_filter returned before freeing)
* use apply_filters in process_major_frame
* revert back to checking bounds with 24 bitdepth, as huff offset takes
care of it

Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
ddeb58d58c mlpenc: prevent negative lsb_bits lshift
Fixes Coverity CID 1396239.

Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
990990ed5d mlpenc: fix huff offset calculation
huff offset wasn't always within the bounds before, which lead to
corrupt encoding that didn't always trigger lossless check failures

Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Jai Luthra
c1c3916cec mlpenc: fix lossless check error in number_sbits
we need two bits instead of one bit to represent -1 in bitstream

Signed-off-by: Jai Luthra <me@jailuthra.in>
2020-02-04 11:19:12 +01:00
Paul B Mahol
efee86fafa avfilter/vf_xfade: add circleopen & circleclose transition 2020-02-04 10:39:02 +01:00
Michael Niedermayer
fb3855342b avcodec/lagarith: Sanity check scale
A value of 24 and above can collaps the range to 0 which would not work.

Fixes: Timeout (75sec -> 21sec)
Fixes: 18707/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5708950892969984

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 23:59:07 +01:00
Michael Niedermayer
861183f2e6 avcodec/pngdec: Check amount decoded
Fixes: Timeout (70sec -> 243ms)
Fixes: 16097/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5664690889293824
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5170612070252544
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5706325622784000
Fixes: 18705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5650989302677504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 23:59:07 +01:00
Michael Niedermayer
eb64a5c6f9 avcodec/apedec: Fix integer overflows in predictor_decode_mono_3950()
Fixes: signed integer overflow: -2147407150 + -1871606 cannot be represented in type 'int'
Fixes: 18702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5679095417667584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 23:59:07 +01:00
Michael Kuron
beab188c61 doc: Fix typo for dvdsubdec
Signed-off-by: Michael Kuron <michael.kuron@gmail.com>
2020-02-03 23:25:36 +01:00
Marton Balint
3cdc71348e avformat/dashenc: use AV_OPT_TYPE_DICT for http_opts
This changes the separator character from comma to colon, but since this option
was only added recently I think it should be done for consistency with other
similar options.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-03 21:42:35 +01:00
Wonkap Jang
b93098253e avcodec/libvpxenc: add VP9 temporal scalability encoding option
This commit reuses the configuration options for VP8 that enables
temporal scalability for VP9. It also adds a way to enable three
preset temporal structures (refer to the documentation for more
detail) that can be used in offline encoding.

Signed-off-by: James Zern <jzern@google.com>
2020-02-03 12:37:28 -08:00
Paul B Mahol
c4e29d0ba3 avfilter/vf_xfade_opencl: move passthrough code before eof check 2020-02-03 09:40:46 +01:00
Paul B Mahol
6d5e9ed67c avfilter/vf_xfade: move passthrough code before eof check 2020-02-03 09:36:52 +01:00
Tomas Härdin
1c15111148 MAINTAINERS: Add myself as mxf* maintainer
I have more time for this these days
2020-02-03 08:22:29 +01:00
Michael Niedermayer
fd313d8cf8 avcodec/ralf: Fix integer overflow in apply_lpc()
Fixes: signed integer overflow: 2147482897 + 2048 cannot be represented in type 'int'
Fixes: 19240/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5743240326414336
Fixes: 19869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5150136636538880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
bfea054a75 avcodec/dca_lbr: Fix some error codes and error passing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
94ac2c7576 avcodec/8svx: Use av_assert1(0) instead of error message in unreachable code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
38d3758444 avcodec/wmavoice: Fix rounding and integer anomalies in calc_input_response()
Fixes: out of array access
Fixes: inf is outside the range of representable values of type 'int'
Fixes: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long'
Fixes: 19316/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5677369365102592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
6847e22c8c avcodec/wmavoice: sanity check block_align
This limit is roughly based on the bitreader limit, its likely a much tighter limit
could be used

Fixes: left shift of 1965039647 by 1 places cannot be represented in type 'int'
Fixes: 19545/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5695391899320320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
985d3666f6 avcodec/pcm: Fix invalid shift in pcm_decode_frame for LXF
Fixes: left shift of 32 by 28 places cannot be represented in type 'int'
Fixes: 19472/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_LXF_fuzzer-5704364320096256

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Michael Niedermayer
be54da2117 avcodec/snappy: Sanity check bytestream2_get_levarint()
Fixes: left shift of 79 by 28 places cannot be represented in type 'int'
Fixes: 20202/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5719004081815552
Fixes: 20219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5641738677125120
Fixes: 20389/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5680721517871104

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-03 00:11:18 +01:00
Marton Balint
53aa76686e avformat/udp: cancel pending IO on win32 manually
recvfrom() is not a cancellation point in pthreads-win32, see
https://sourceware.org/pthreads-win32/manual/pthread_cancel.html

In order to be able to cancel the reader thread on Win32 properly we first
shutdown the socket then call CancelIoEx to abort pending IO. Subsequent
recvfrom() calls will fail with WSAESHUTDOWN causing the thread to exit.

Fixes ticket #5717.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-02 19:04:42 +01:00
Marton Balint
c2b6493bf7 avformat/udp: remove setting cancel state from the TX thread
Write mode does not use cancellation.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-02 19:04:42 +01:00
Michael Niedermayer
fcc9f13717 avcodec/mlpdsp: Fix a invalid shift in ff_mlp_rematrix_channel()
Fixes: left shift of negative value -2
Fixes: 20305/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5677196618498048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Jai Luthra <me@jailuthra.in>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-02 17:09:14 +01:00
Zane van Iperen
b49404ea30 avcodec/adpcm_argo: simplify and move duplicated logic into a function
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-02 17:09:14 +01:00
Paul B Mahol
cd823dadf9 avfilter: add xfade opencl filter 2020-02-02 14:08:56 +01:00
Paul B Mahol
84286789e6 doc/filters: fix tonemap_vaapi filter name in documentation 2020-02-02 10:18:50 +01:00
Paul B Mahol
69477e10f0 doc/filters: make filters order more consistent 2020-02-02 10:18:50 +01:00
Andriy Gelman
d85c84eb38 avcodec/v4l2_m2m: Cosmetics
Change pointer symbol position.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-02-01 21:39:05 +00:00
Andriy Gelman
73e23b404c avcodec/v4l2_m2m: Use consistent logging context
Before this commit v4l2_m2m used two different logging contexts (from
V4L2m2mPriv and AVCodecContext). For consistency always use AVCodecContext.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-02-01 21:39:05 +00:00
Andriy Gelman
4c1a3e9166 avcodec/v4l2_m2m: Simplify capture buffer init check
Before this commit s->avctx == NULL was used to infer that an encoder is
being initialzed. Code readability has been improved by directly using
!av_codec_is_decoder() instead.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-02-01 21:39:05 +00:00
Andriy Gelman
3905ecbc06 avcodec:v4l2_context: Remove NULL initialization
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-02-01 21:39:05 +00:00
Paul B Mahol
e5e7289ea8 avfilter/vf_xfade: remove unused header 2020-02-01 22:06:11 +01:00
Paul B Mahol
5c9a4ff8c1 avfilter/vf_psnr: fix logic failure when comparing time bases 2020-02-01 21:10:25 +01:00
Paul B Mahol
89eee09739 avfilter/vf_ssim: fix logic failure when comparing time bases 2020-02-01 21:09:32 +01:00
leozhang
81d25e5bfc avcodec/utils: remove extra brackets
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-01 19:04:50 +01:00
OvchinnikovDmitrii
843c24a400 libavcodec/amfenc_hevc.c: Fix constant QP settings for I, P 2020-02-01 14:32:08 +00:00
Linjie Fu
f0287e120a lavc/h265_profile_level: Fix the default profile in ff_h265_guess_level
Default to using multiplication factors for Main profile.

Introduced since cd3578a8e4.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2020-02-01 13:38:34 +00:00
Marton Balint
73aab08d9d avformat/hlsenc: fix hls_ts_options with mpegts
Was broken since cdbf8847ea.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-31 22:49:55 +01:00
Marton Balint
c044ac2071 avfilter/vf_geq: use per-thread AVExpr for expression evaluation
There was no consensus about separating AVExprState from AVExpr so here is a
minimal patch using the existing AVExpr to fix ticket #7528.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-31 22:47:49 +01:00
Michael Niedermayer
b82825eba8 avcodec/avdct: Clear IDCTDSPContext context
Fixes use of uninitialized variable and segfault

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-31 22:17:09 +01:00
Michael Niedermayer
c2d4762922 MAINTAINERS: Add patchwork maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-31 22:17:09 +01:00
Alfred E. Heggestad
d550a28560 dashenc: check pts to prevent division by zero error
this usecase will cause a division by zero trap:

1. dashenc has received one frame
2. os->max_pts and os->start_pts have same value
3. delta between max_pts and start_pts is 0
4. av_rescale_q(0, x, y) returns 0
5. this value is used as denominator in division
6. Bang! -> segfault

this fix checks that max_pts > start_pts.
the fix has been tested and works.

Signed-off-by: Alfred E. Heggestad <alfred.heggestad@gmail.com>
Reviewed-by: Jeyapal, Karthick <kjeyapal@akamai.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-31 10:15:37 -03:00
Paul B Mahol
53b4128ea0 avfilter/vf_xfade: add smooth transitions 2020-01-31 13:14:13 +01:00