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

41117 Commits

Author SHA1 Message Date
Paul B Mahol
e483606d44 avcodec/g722dec: use init_get_bits8() 2018-12-23 21:01:17 +01:00
Paul B Mahol
f89919d4fb avcodec/fic: use init_get_bits8() 2018-12-23 20:49:19 +01:00
Michael Niedermayer
30a7a81cdc avcodec/fic: Fail on invalid slice size/off
Fixes: Timeout
Fixes: 11486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5677133863583744

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-23 20:24:47 +01:00
Michael Niedermayer
80cce5998c avcodec/ivi: Avoid mbs memleak
Fixes: 11696/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5740319635668992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-23 20:24:47 +01:00
Michael Niedermayer
fbf409cd91 avcodec/ilbcdec: fix integer overflow in energy
webrtc uses a int32_t like the existing code in ilbcdec

Fixes: signed integer overflow: 2080245063 + 257939661 cannot be represented in type 'int'
Fixes: 11037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ILBC_fuzzer-5682976612941824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-23 20:24:47 +01:00
Paul B Mahol
f52dd8a55a avcodec/g723_1dec: use init_get_bits8() 2018-12-23 15:40:47 +01:00
Paul B Mahol
3601eb0474 avcodec: add g732_1 parser 2018-12-23 15:30:13 +01:00
Mark Thompson
b97a4b6588 cbs_av1: Fix reading of overlong uvlc codes
The specification allows 2^32-1 to be encoded as any number of zeroes
greater than 31, followed by a one.  This previously failed because the
trace code would overflow the array containing the string representation
of the bits if there were more than 63 zeroes.  Fix that by splitting the
trace output into batches, and at the same time move it out of the default
path.

(While this seems likely to be a specification error, libaom does support
it so we probably should as well.)

From a test case by keval shah <skeval65@gmail.com>.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-22 18:17:03 +00:00
Carl Eugen Hoyos
6a87729e9d lavc/opus_rc: Cast a const pointer to uint8_t *.
Silences a warning with clang on arm:
libavcodec/opus_rc.c:170:17: warning: passing 'const uint8_t *' (aka 'const unsigned char *') to parameter of type 'void *' discards qualifiers
2018-12-22 00:15:16 +01:00
James Almer
064f9505f4 avcodec/cbs_av1: fix parsing delta_frame_id_minus1
delta_frame_id_minus1 is not a single value in the bitstream, and can
store values up to 17 bits wide.

Fixes parsing files with frame ids.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-12-20 17:57:10 -03:00
Paul B Mahol
1b4c01631b avcodec/vc1_parser: use init_get_bits8() 2018-12-20 21:19:56 +01:00
Jun Zhao
3f08ed3920 lavc/libkvazaar: indent the code
indent the code to follow FFmpeg's coding style

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-12-20 18:40:41 +08:00
Jun Zhao
59deae5d1c lavc/libkvazaar: Use avctx->frame_rate first for framerate setting
perfer avctx->frame_rate first than use avctx->time_base when setting
the frame rate to encoder.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-12-20 18:40:41 +08:00
Jun Zhao
90c4534206 lavc/options_table: Change some options location in opt table.
Change the some options location in avcodec_options to make code more
readable. And update the fate test with this change.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-12-20 18:40:41 +08:00
Michael Niedermayer
e63517e00a avcodec/rpza: Check that there is enough data for all the blocks
Fixes: Timeout
Fixes: 11547/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RPZA_fuzzer-5678435842654208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-19 20:09:03 +01:00
Michael Niedermayer
8a708aa99c avcodec/rpza: Move frame allocation to a later point
This will allow performing some fast checks before the slow allocation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-19 20:09:03 +01:00
Michael Niedermayer
68e011e410 avcodec/avcodec: Document the data type for AV_PKT_DATA_MPEGTS_STREAM_ID
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-19 20:09:03 +01:00
Helmut K. C. Tessarek
aaf9171574 libavcodec/libaomenc: fix breakage from upstream
commit https://aomedia.googlesource.com/aom/+/4667aa1a373566e9c124afcd58c71731ab0d7377
changed parts of the code that broke compilation of libavcodec/libaomenc.c

Signed-off-by: James Almer <jamrial@gmail.com>
2018-12-19 15:31:28 -03:00
Michael Niedermayer
ea30ac1e40 avcodec/mjpegdec: Fix indention of ljpeg_decode_yuv_scan()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-19 10:01:08 +01:00
Michael Niedermayer
dfb5046cf3 avcodec/mjpegdec: verify SOF len field validity
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-19 10:01:00 +01:00
Paul B Mahol
d283ee085f avcodec/g723_1dec: improve stereo support 2018-12-18 18:58:35 +01:00
Paul B Mahol
7a124138a7 avcodec/g723_1dec: reindent after last commit 2018-12-18 18:52:39 +01:00
Paul B Mahol
62dbcb7ddf avcodec/g723_1: add support for stereo files 2018-12-18 18:52:39 +01:00
Carl Eugen Hoyos
06a436a224 lavc/mjpegdec: Interpret three-component Adobe transform 0 also as RGB.
While there, make a comparison with "RGB" more readable.

Fixes ticket #7625.
2018-12-18 18:00:31 +01:00
Shiyou Yin
76952aa461 avcodec/mips: [loongson] enable MSA optimization for loongson platform.
Set initialization order of MSA after MMI to make it work on loongson platform(msa is supported by loongson2k、3a4000 etc.).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-18 11:59:51 +01:00
Zhong Li
978c935f2f lavc/qsv_hevc: correct QSV HEVC default plugin on Windows
1. Old logic meaned: everywhere, except Windows, ffmpeg has to use HW
acceleration, but on Windows ffmpeg has to use (unavailable) software
HEVC by default
2. Software HEVC is available only if you provide corresponding
software MediaSDK library, which isn't provided with ffmpeg. More
information could be found in
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-encode_linux.pdf
3. HW HEVC decoding/encoding are available on Windows in the driver by default

Note: Default case should be the most common case but this change still has potential risk
on windows if HW path is not supported(or doesn't work as expection).
(See the historical disscution: https://lists.libav.org/pipermail/libav-devel/2016-November/080419.html).
In such case, two options suggested:
1. Use the option "-load_plugin hevc_sw" to switch SW path manually.
2. Or report bug to Intel windows driver if your GPU can support HEVC HW codec.
  (HEVC decoding is supported since Braswell, and encoding supported since Skylake)

Patch started by Landgraph. Add similar change for hevc decoder and bump a new version.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
Signed-off-by: Landgraph <me@landgraph.ru>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-12-18 15:15:18 +08:00
Carl Eugen Hoyos
0b7269e62d lavc/cbs: Do not use format specifier "z" on Windows. 2018-12-17 14:39:41 +01:00
Paul B Mahol
de5e71fb1b avcodec/tiff: add support for 12bit grayscale images
Fixes #4688.
2018-12-16 22:06:08 +01:00
Michael Niedermayer
092cb17983 avcodec/rasc: Check that the number of moves is less than or equal the number of pixels
Fixes: OOM
Fixes: 10307/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5393974559244288

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>
2018-12-16 09:49:07 +01:00
Michael Niedermayer
b11b3d2585 avcodec/vp7: Check for end of input in vp78_decode_mv_mb_modes()
Fixes: Timeout
Fixes: 10313/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5637719389110272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-16 09:49:07 +01:00
Carl Eugen Hoyos
011c9112a0 lavc/g729dec: Cosmetics, fix indentation after last commit. 2018-12-15 00:55:18 +01:00
Carl Eugen Hoyos
641d52152f lavc/g729dec: Support stereo streams.
Fixes ticket #4553.
2018-12-15 00:32:31 +01:00
Michael Niedermayer
7aaab127be avcodec/clearvideo: Check remaining input bits in P macro block loop
Fixes: Timeout
Fixes: 11083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5657180351496192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-14 23:24:20 +01:00
Michael Niedermayer
35a603050d avcodec/dvdsubdec: discard accumulated buffer on error
Fixes: Timeout
Fixes: 10992/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5657495410835456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-14 23:24:20 +01:00
Michael Niedermayer
52ba824c65 avcodec/rasc: Check input space before reading chunk
Fixes: Timeout
Fixes: 11118/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5652564066959360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-14 23:24:20 +01:00
Andriy Gelman
5282db5929 avcodec/mpeg: Initialize quarter_sample parameter from previous thread.
Fixes #7410.
The value of sub-pixel precision for me/mc can change during an Intra frame. In multi-threaded decoding this change is not propagated to other frame threads causing decoding artifacts. This patch initializes the sub-pixel precision parameter from previous thread, which fixes the issue.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-12-14 19:09:11 +01:00
Fan Gang
c6e1966c1a avcodec/ass_split: fix a memory leak defect when realloc fails
Fixes #7019.
2018-12-14 14:19:50 +01:00
Paul B Mahol
6f058b5cef avformat/nut: add support for yuva444/422p12 pixel format 2018-12-14 11:26:30 +01:00
Paul B Mahol
8c9fff6183 avcodec/xfacedec: fix order of operations
Fixes #6745.
2018-12-13 23:44:39 +01:00
Paul B Mahol
0ed678a97a bump micro after recent gif changes 2018-12-13 19:30:39 +01:00
Paul B Mahol
ec8502f9cb avcodec/gif: use avctx->frame_number 2018-12-13 19:30:39 +01:00
Paul B Mahol
0aa5a7b2e9 avformat/gifdec: export duration, nb_frames and comment 2018-12-13 18:58:48 +01:00
Paul B Mahol
f2664a306f avcodec/codec_desc: extend gif description 2018-12-13 18:58:48 +01:00
Paul B Mahol
bb0984cc29 avcodec/gif: enable encoding single gif image per frame
Unbreaks gif image2 muxer.
2018-12-13 18:58:48 +01:00
Paul B Mahol
3f8cdd4ee3 avcodec/gif: add support for alpha
Based on patch by Bjorn Roche.

Fixes #6813.
2018-12-13 18:58:48 +01:00
Paul B Mahol
faca28c264 avcodec: rewrite gif muxing and encoding
Now "-c copy" works.
Update FATE files.

Demuxer only split file into packets, no data is trimmed.
Encoder & muxer currently expect completely another format
where muxer writes stuff like disposal method which should
be really encoder job.
With this patch muxer only modifies delay between two packets.
Codec copy need to have same behavior between demuxer and
muxer to work correctly.

Fixes #6640.
2018-12-13 18:58:48 +01:00
Rostislav Pehlivanov
83db1efd42 opusenc: fix infinite loop if flushing encoder upon init
The issue is that the afq still has samples as on init it counts
the overlap used as a delay to adjust the PTS it generates, hence
we can't rely on it right after init.
So just check to see if any frames have been encoded. frame_number
can't be anything but 0 right after init and can only be set by lavc.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-12-12 20:05:33 +00:00
James Almer
0e833f615b avcodec/libdav1d: add support for 12bit streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-12-12 00:07:13 -03:00
Carl Hetherington
6190f873eb lavc/tiff: Fix leak of yuv_line in TiffContext.
Signed-off-by: Carl Hetherington <cth@carlh.net>
2018-12-11 00:57:01 +01:00
Paul B Mahol
03beac5b97 avcodec/xpmdec: define constants 2018-12-10 21:38:08 +01:00