Michael Niedermayer
d92034a06a
avcodec/dxtory: Check slice sizes before allocating image
...
Fixes: Timeout (26sec -> 2sec)
Fixes: 13612/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5676845977042944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:29 +01:00
Michael Niedermayer
1223696c72
avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()
...
Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int'
Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:29 +01:00
James Almer
699d0c2a30
avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
...
The first frame contains the sequence header, which is needed to parse every
following frame.
This fixes parsing streams with broken extradata but correct packet data.
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-24 18:26:49 -03:00
Michael Niedermayer
013f71497b
avcodec/tiff: do not allow bpp 40 with undefined pixel formats
...
Fixes: Out of array access, assertion failure
Fixes: 13851/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5754570929602560
Fixes: 13869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5695998313103360
Fixes: 13873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5077273645940736
Fixes: 13874/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5756396757319680
Fixes: 13877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5741026750234624
Fixes: 13880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5649148809838592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-24 10:35:47 +01:00
hwrenx
5252d594a1
lavc/libdavs2: fix frame dumping error description
...
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwrenx <hwrenx@126.com>
2019-03-23 14:08:00 +08:00
hwrenx
bf05f621d5
lavc/libdavs2: add davs2_flush
...
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwrenx <hwrenx@126.com>
2019-03-23 14:07:16 +08:00
James Almer
47e12966b7
Merge commit ' 0676de935b'
...
* commit '0676de935b ':
arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
Merged-by: James Almer <jamrial@gmail.com>
2019-03-22 16:06:04 -03:00
Martin Storsjö
0676de935b
arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
...
Previously, the 420 version was used even for 422.
This fixes occasional checkasm failures.
Signed-off-by: Martin Storsjö <martin@martin.st>
2019-03-21 22:03:46 +02:00
James Almer
70c8c8a818
avcodec/hevcdec: decode at most one slice reporting being the first in the picture
...
Fixes deadlocks when decoding packets containing more than one of the aforementioned
slices when using frame threads.
Tested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-20 19:53:12 -03:00
Michael Niedermayer
9d20901b92
avcodec/arbc: Check nb_segments before allocating and copying frame
...
Fixes: Timeout (30sec -> 2sec)
Fixes: 13578/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5685625527730176
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-20 21:12:45 +01:00
Michael Niedermayer
8f63fa4c2e
avcodec/scpr: Perform frame copy later
...
Optimization found while looking at 13442/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5758293933293568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-20 21:12:45 +01:00
Carl Eugen Hoyos
4602456c4f
lavc/arbc: Use AV_WB24() where applicable.
2019-03-20 17:53:34 +01:00
Carl Eugen Hoyos
82fd7866a3
lavc/tiff: Allow decoding of cmyka (five components).
...
Fixes ticket #7675 .
2019-03-20 17:50:25 +01:00
Carl Eugen Hoyos
801d78f0d8
lavc/truehd_core: Initialize the last bytes of the output buffer.
...
Avoids undeterministic output.
2019-03-20 17:23:00 +01:00
Carl Eugen Hoyos
ba0a56e0b0
lavc/qtrle: Avoid an unaligned 64-bit write.
...
pixel_ptr can be increased by 4.
Fixes a crash on sparc64.
2019-03-20 17:16:02 +01:00
Carl Eugen Hoyos
6fcf7adc01
lavc/tiff: Support decoding 16bit cmyk.
2019-03-20 17:04:55 +01:00
Rodger Combs
ce6301a46f
avcodec/vt_hevc: fix crash if vps_list[0] or sps_list[0] are null
...
Instead of assuming id 0 is used, use the same logic as used for PPS,
where all available entries in the list are emitted.
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-03-19 14:56:21 -07:00
Derek Buitenhuis
90b85ab21f
h2645_parse: Fix loglevel for NAL header parsing
...
We don't treat this as an error.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-03-19 19:56:19 +00:00
James Almer
9e62e1a110
avcodec/libdav1d: use a reference to the allocated buffer instead of wrapping the Dav1dPicture
...
Removes an av_malloc() per frame.
Reviewed-by: BBB
Reviewed-by: nevcairiel
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19 14:04:08 -03:00
James Almer
5cd60b6f2e
avcodec/libdav1d: reset pool size on allocation failure
...
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19 14:03:39 -03:00
Michael Niedermayer
14eea7c47a
avcodec/pnm: Optimize reading loop in pnm_get()
...
Fixes: Timeout 13149 (5sec -> 3sec), 13166 (11sec -> 7sec), 13430 (5sec -> 3sec)
Fixes: 13149/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-5760833622114304
Fixes: 13166/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5763216322330624
Fixes: 13430/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5758658334425088
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-17 11:35:00 +01:00
Michael Niedermayer
f20760fadb
avcodec/dfa: Check the chunk header is not truncated
...
Fixes: Timeout (11sec -> 3sec)
Fixes: 13218/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DFA_fuzzer-5661074316066816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-17 11:35:00 +01:00
Michael Niedermayer
41f93f9411
avcodec/clearvideo: Check remaining data in P frames
...
Fixes: Timeout (19sec -> 419msec)
Fixes: 13411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5733153811988480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-17 11:35:00 +01:00
Michael Niedermayer
dd2a2a51fe
avcodec/diracdec: Count truncated parts as errors in decode_component()
...
Fixes: Timeout (29sec -> 4sec)
Fixes: 13150/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5690185671507968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-17 11:35:00 +01:00
Michael Niedermayer
efe4aef90f
avcodec/ffv1dec_template: Optimize golomb run mode
...
Fixes: Timeout (34sec -> 12sec)
Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-17 11:35:00 +01:00
Mathieu Duponchelle
6cfa173303
mpeg12enc: Use Closed Captions if available
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-16 00:02:23 +01:00
Carl Eugen Hoyos
dbecf03f69
lavc/qtrle: Do not use aligned writes for 24bit frames.
...
pixel_ptr is 3 and leads to aligned access on odd memory addresses.
Fixes crashes on systems that do not allow unaligned access like sparc32.
2019-03-15 01:09:02 +01:00
James Almer
92219ef4ac
Merge commit ' 186bd30aa3'
...
* commit '186bd30aa3 ':
h264/arm64: implement missing 4:2:2 chroma loop filter neon functions
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:29:41 -03:00
James Almer
5c363d3e59
Merge commit ' 7e42d5f0ab'
...
* commit '7e42d5f0ab ':
aarch64: vp8: Optimize vp8_idct_add_neon for aarch64
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:22:29 -03:00
James Almer
409e684e79
Merge commit ' 49f9c4272c'
...
* commit '49f9c4272c ':
aarch64: vp8: Skip saturating in shrn in ff_vp8_idct_add_neon
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:21:46 -03:00
James Almer
fbd607dd56
Merge commit ' 37394ef01b'
...
* commit '37394ef01b ':
aarch64: vp8: Optimize put_epel16_h6v6 with vp8_epel8_v6_y2
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:20:05 -03:00
James Almer
d6b62ce1ac
Merge commit ' cef914e083'
...
* commit 'cef914e083 ':
arm: vp8: Optimize put_epel16_h6v6 with vp8_epel8_v6_y2
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:19:41 -03:00
James Almer
34a0a9746b
Merge commit ' e39a9212ab'
...
* commit 'e39a9212ab ':
aarch64: vp8: Port bilin functions from arm version
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:18:42 -03:00
James Almer
2ac399d7fa
Merge commit ' 58d1549227'
...
* commit '58d1549227 ':
aarch64: vp8: Port epel4 functions from arm version
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:17:33 -03:00
James Almer
c6892f59eb
Merge commit ' cc7ba00c35'
...
* commit 'cc7ba00c35 ':
aarch64: vp8: Port missing epel8 functions from arm version
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:16:43 -03:00
James Almer
79025da3f2
Merge commit ' 52c9b0a6c0'
...
* commit '52c9b0a6c0 ':
aarch64: vp8: Port vp8_luma_dc_wht and vp8_idct_dc_add4uv from arm version
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:14:40 -03:00
James Almer
39278ff0de
Merge commit ' c513fcd7d2'
...
* commit 'c513fcd7d2 ':
aarch64: vp8: Fix a typo in a comment
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:13:32 -03:00
James Almer
4f9a8d3fe2
Merge commit ' f1011ea28a'
...
* commit 'f1011ea28a ':
aarch64: vp8: Reorder the function pointer inits to match the arm original
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:09:11 -03:00
James Almer
398000abcf
Merge commit ' 85bfaa4949'
...
* commit '85bfaa4949 ':
aarch64: vp8: Use the proper aarch64 form for conditional branches
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:06:43 -03:00
James Almer
a2ae381b5a
Merge commit ' 0801853e64'
...
* commit '0801853e64 ':
libavcodec: vp8 neon optimizations for aarch64
See 833fed5253
Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:05:52 -03:00
Michael Niedermayer
a8c5ae4511
avcodec/dvbsubdec: Check object position
...
Reference: ETSI EN 300 743 V1.2.1 7.2.2 Region composition segment
Fixes: Timeout
Fixes: 13325/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVBSUB_fuzzer-5143979392237568
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-14 16:24:35 +01:00
Michael Niedermayer
9a9f0e239c
avcodec/cdgraphics: Use ff_set_dimensions()
...
Fixes: Timeout (17 sec -> 65 milli sec)
Fixes: 13264/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-5711167941509120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-14 16:24:35 +01:00
Matthew Fearnley
0321370601
libavcodec/zmbvenc: Add support for RGB formats
...
This consists mostly of the following changes:
- add newly supported pixel formats (RGB555LE, RGB565LE, BGR0)
- select the ZMBV format (c->fmt) and bytes per pixel (c->bypp) based on
avctx->pix_fmt
- multiply widths/x-values by c->bypp, in places where bytes, not pixels, are
expected
- disable palette-writing code for non-palette pix_fmts
- make a note about histogram[]'s datatype (it could need increasing if
ZMBV_BLOCK is increased)
- adjust the c->score_tab length to take up to (and including) 4 times the
number of pixels in a block
- initialise c->score_tab up to c->bypp * the number of pixels
Note: the ZmbvFormat enum allows for additional bit depths:
- 1,2,4-bit (palette)
- 24-bit (RGB)
At time of writing the specifics of these (e.g. channel order, bit alignment)
are not currently defined, and DOSBox only implements support for 8/15/16/32
bpp.
One might expect the 24-bit format - if implemented - to be BGR24, to have the
same channel order as BGR0.
However, the decoder in zmbv.c has been guessed to use RGB24, so I have chosen
to not contradict this, and omitted specific support for this format.
2019-03-14 11:04:47 +01:00
James Almer
f6803cfbd2
avcodec/libdav1d: unref the frame on failure
...
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:45:10 -03:00
Vittorio Giovara
38a4132132
libdav1d: Add support for reading hdr10 metadata
...
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:36:30 -03:00
James Almer
36bb2cc200
avcodec/libdav1d: consistently use AVERROR return values
...
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:18:14 -03:00
James Almer
28746a0e20
avcodec/libdav1d: use a custom picture allocator
...
Replaces the libdav1d internal allocator. It uses an AVBufferPool to reduce the
amount of allocated buffers.
About 5% speed up when decoding 720p or higher streams.
Reviewed-by: "Vittorio Giovara <vittorio.giovara@gmail.com>"
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:17:45 -03:00
James Almer
2a31bf2a35
avcodec/libdav1d: move the pix_fmt enum array up in the file
...
This is in preparation for the following commit.
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:09:43 -03:00
James Almer
dcf64b599d
avcodec/libdav1d: route dav1d internal logs through av_log()
...
Bump the minimum required version to the first one with the logger API callback.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:07:50 -03:00
Michael Niedermayer
d227ed5d59
avcodec/mpeg4videodec: Check idx in mpeg4_decode_studio_block()
...
Fixes: Out of array access
Fixes: 13500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5769760178962432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-12 00:48:56 +01:00