summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/h264_redundant_pps_bsf: implement a AVBSFContext.flush() callbackJames Almer2018-08-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpeg4_unpack_bframes_bsf: implement a AVBSFContext.flush() callbackJames Almer2018-08-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vp9_superframe_bsf: implement a AVBSFContext.flush() callbackJames Almer2018-08-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vp9_superframe_split_bsf: implement a AVBSFContext.flush() callbackJames Almer2018-08-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callbackJames Almer2018-08-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/bsf: add a flushing mechanism to AVBSFContextJames Almer2018-08-16
| | | | | | Meant to reset the internal bsf state without the need to reinitialize it. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/frame_thread_encoder: fix memory leak that occurs when close ↵lee ju2018-08-16
| | | | | | encoder without sending eof and receiving to end Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr: Check for min > max in decompress_p()Michael Niedermayer2018-08-16
| | | | | | | | Fixes: Timeout Fixes: 9342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4795990841229312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/shorten: Fix signed 32bit overflow in shift in shorten_decode_frame()Michael Niedermayer2018-08-16
| | | | | | | | Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 9480/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-6647324284551168 -rss_limit_mb=2000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/shorten: Fix integer overflow in residual/LPC combinationMichael Niedermayer2018-08-16
| | | | | | | | Fixes: signed integer overflow: -540538872 + -2012739576 cannot be represented in type 'int' Fixes: 9255/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5758630052757504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/shorten: Check verbatim lengthMichael Niedermayer2018-08-16
| | | | | | | | Fixes: Timeout Fixes: 9252/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5780720709533696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/videotoolboxenc: Fix compilation on osx 10.10.5 YosemiteThilo Borgmann2018-08-14
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/mpegaudio_parser: Initialize poutbuf*Michael Niedermayer2018-08-12
| | | | | | | | | | Possibly fixes: null pointer dereference Possibly fixes: 9352/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5146068961460224 Fixes: Heap-use-after-free Fixes: 9453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5137954375729152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Factor width dereference out of the loops in ivi_output_plane()Michael Niedermayer2018-08-12
| | | | | | 396078 -> 268468 dezicycles Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Only clip samples when needed in ivi_output_plane()Michael Niedermayer2018-08-12
| | | | | | 435740 -> 396078 dezicycles Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/indeo5: require initial valid intra/gop headers not just laterMichael Niedermayer2018-08-12
| | | | | | | | Fixes: Timeout Fixes: 9308/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5284853581873152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/microdvddec: limit style characters in parsingMichael Niedermayer2018-08-12
| | | | | | | | Fixes: Timeout Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.Jun Zhao2018-08-10
| | | | | | | add ONLY_IF_THREADS_ENABLED where it is missing. Signed-off-by: Jun Zhao <mypopydev@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com>
* avs2: correct avs2 descriptionhwren2018-08-08
| | | | | Signed-off-by: hwren <hwrenx@126.com> Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
* lavc/libx264: Support monochrome encoding.Carl Eugen Hoyos2018-08-07
|
* lavc/qsvenc: expose qp of encoded framesZhong Li2018-08-07
| | | | | | | Requirement from ticket #7254. Currently only H264 supported by MSDK. Signed-off-by: Zhong Li <zhong.li@intel.com>
* avcodec/libaomenc: correct range for cpu-usedGyan Doshi2018-08-06
| | | | | | Valid range is [0,8] as stated in aom.git:aom/aomcx.h Fixes #7343
* avcodec/mediacodecdec: fix spurious newline in trace loggingAman Gupta2018-08-05
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/pnm_parser: Avoid reparsing failed data.Michael Niedermayer2018-08-04
| | | | | | | | | | | | | | Alternatively the parser could be re implemented / redesigned so as to better and more efficiently find frame boundaries Fixes: Timeout Fixes: 9210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4770771833454592 Fixes: 9214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5741633353023488 Fixes: 9219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-6249230237696000 Fixes: 9550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5312669836902400 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/simple_idct_template: Fix several integer overflowsMichael Niedermayer2018-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: simple_idct_template.c:184:30: runtime error: signed integer overflow: -1065517056 - 1392182838 cannot be represented in type 'int' Fixes: simple_idct_template.c:269:21: runtime error: signed integer overflow: 16384 * 259254 cannot be represented in type 'int' Fixes: simple_idct_template.c:164:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int' Fixes: simple_idct_template.c:167:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int' Fixes: simple_idct_template.c:169:19: runtime error: signed integer overflow: 22725 * 259190 cannot be represented in type 'int' Fixes: simple_idct_template.c:171:19: runtime error: signed integer overflow: 19265 * 259190 cannot be represented in type 'int' Fixes: simple_idct_template.c:173:19: runtime error: signed integer overflow: 12873 * 259190 cannot be represented in type 'int' Fixes: simple_idct_template.c:183:28: runtime error: signed integer overflow: 1860878336 + 585177665 cannot be represented in type 'int' Fixes: simple_idct_template.c:159:17: runtime error: signed integer overflow: 16384 * 189520 cannot be represented in type 'int' Fixes: simple_idct_template.c:170:22: runtime error: signed integer overflow: 19265 * 130147 cannot be represented in type 'int' Fixes: simple_idct_template.c:174:23: runtime error: signed integer overflow: -22725 * 130147 cannot be represented in type 'int' Fixes: simple_idct_template.c:183:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int' Fixes: simple_idct_template.c:184:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int' Fixes: simple_idct_template.c:185:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int' Fixes: simple_idct_template.c:186:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int' Fixes: simple_idct_template.c:195:26: runtime error: signed integer overflow: 19265 * 150747 cannot be represented in type 'int' Fixes: simple_idct_template.c:198:27: runtime error: signed integer overflow: -22725 * 150747 cannot be represented in type 'int' Fixes: simple_idct_template.c:184:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int' Fixes: simple_idct_template.c:185:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int' Fixes: simple_idct_template.c:192:27: runtime error: signed integer overflow: -12873 * 206341 cannot be represented in type 'int' Fixes: simple_idct_template.c:185:30: runtime error: signed integer overflow: 1196441600 + 1703756981 cannot be represented in type 'int' Fixes: simple_idct_template.c:176:23: runtime error: signed integer overflow: -12873 * 168461 cannot be represented in type 'int' Fixes: simple_idct_template.c:191:27: runtime error: signed integer overflow: -22725 * -140062 cannot be represented in type 'int' Fixes: simple_idct_template.c:197:26: runtime error: signed integer overflow: 19265 * -140062 cannot be represented in type 'int' Fixes: simple_idct_template.c:183:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int' Fixes: simple_idct_template.c:186:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int' Fixes: simple_idct_template.c:186:28: runtime error: signed integer overflow: -816234496 - 2139878414 cannot be represented in type 'int' Fixes: simple_idct_template.c:188:26: runtime error: signed integer overflow: 12873 * -239872 cannot be represented in type 'int' Fixes: simple_idct_template.c:165:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int' Fixes: simple_idct_template.c:166:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int' Fixes: 9135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6324422955761664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec_template: Check for duplicate elementsMichael Niedermayer2018-08-04
| | | | | | | | Fixes: Timeout Fixes: 9552/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6027842339995648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()Michael Niedermayer2018-08-04
| | | | | | | | Fixes: signed integer overflow: -1813244069 + -1407981383 cannot be represented in type 'int' Fixes: 8823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5643295618236416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mediacodecdec: fix SEGV on modern nvidia decodersAman Gupta2018-08-03
| | | | | | | | | | | | | | | | | | | | This code came originally from gstreamer, where it was added in [1] as a work-around for the Tegra 3. (The alignment was changed in [2] as a response to [3], from 32-bit to 16-bit). gstreamer only used this workaround in the case where the decoder didn't return a slice-height property, but when the code was copied into avcodec the conditional got lost. This commit restores the guard and prefers the slice-height from the decoder when it is available. This fixes segfaults decoding 1920x1080 h264 and mpeg2 videos on the NVidia SHIELD after upgrading to Android Oreo. [1] https://github.com/GStreamer/gst-plugins-bad/commit/a870e6a5c30dd85240fe75c7409cc1cf1b86541d [2] https://github.com/GStreamer/gst-plugins-bad/commit/21ff3ae0b0127bd82951d278ca24f2d54133b7cd [3] https://bugzilla.gnome.org/show_bug.cgi?id=748867 Signed-off-by: Aman Gupta <aman@tmm1.net>
* lavc/svq3: Fix regression decoding some files.Nikolas Bowe2018-08-03
| | | | | | | | | | | Fixes some SVQ3 encoded files which fail to decode correctly after 6d6faa2a2d. These files exhibit lots of artifacts and logs show "Media key encryption is not implemented". However they decode without artifacts before 6d6faa2a2d. The attatched patch allows these files to successfully decode, but also reject media key files. Tested on the files in #6094 and http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mlp_parser: Check if synccode is within bufferMichael Niedermayer2018-08-03
| | | | | | | | Fixes: undefined shift Fixes: 9216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-6281404575907840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qtrle: Check remaining bytestream in qtrle_decode_XYbpp()Michael Niedermayer2018-08-03
| | | | | | | | Fixes: Timeout Fixes: 9213/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5649753332252672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/av1_parse: return size of the parsed OBU in parse_obu_header()James Almer2018-08-02
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1_parse: check for OBU header overreadJames Almer2018-08-02
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libaomdec: auto insert dump_extra bitstream filterJames Almer2018-08-02
| | | | | | | | | Some containers, like Matroska, may propagate key frames with no Sequence Header OBU since it's provided in extradata instead. With this change, the Sequence Header will be appended to the packet data before calling aom_codec_decode(). Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dump_extradata_bsf: don't allocate a new AVPacket per filtered packetJames Almer2018-08-02
| | | | | | ~4x speedup in dump_extradata() Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_mp4toannexb_bsf: use enum constants for the NAL unit type valuesJames Almer2018-07-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() ↵James Almer2018-07-28
| | | | | | | | for NULL Fixes crashes like "ffmpeg -h bsf" caused by passing NULL to strcmp() Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/diracdec: Check bytes count in else branch in decode_lowdelay() tooMichael Niedermayer2018-07-28
| | | | | | | | Fixes: signed integer overflow: 8 * 340018243 cannot be represented in type 'int' Fixes: 9441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5194665207791616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Check slice numbers for overflows in relation to picture ↵Michael Niedermayer2018-07-28
| | | | | | | | | | dimensions Fixes: signed integer overflow: 88 * 33685506 cannot be represented in type 'int' Fixes: 9433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5725943535501312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Change frame_number to 64bit as its a 32bit from the ↵Michael Niedermayer2018-07-28
| | | | | | | | | | bitstream and we also have a -1 special case Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 9291/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6324345860259840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dirac_dwt_template: Fix several integer overflows in ↵Michael Niedermayer2018-07-28
| | | | | | | | | | horizontal_compose_daub97i() Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 8926/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6047609228623872 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Prevent integer overflow in intermediate in global_mv()Michael Niedermayer2018-07-28
| | | | | | | | Fixes: signed integer overflow: -393471 * 5460 cannot be represented in type 'int' Fixes: 8890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6299775379963904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add missing files missed in previous commitsJames Almer2018-07-27
| | | | | | Fixes compilation. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc, doc, configure: add avs2 video decoder wrapperhwren2018-07-27
| | | | | | Tested-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: hwren <hwrenx@126.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavc: add AVS2/IEEE 1857.4 parserhwren2018-07-27
| | | | | | Tested-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: hwren <hwrenx@126.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avcodec/cdgraphics: Clear first frame only onceMichael Niedermayer2018-07-23
| | | | | | | | | | frame_number will not increase if nothing is output Fixes: Timeout Fixes: 9057/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDGRAPHICS_fuzzer-4844661498707968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tscc: Do not duplicate imagesMichael Niedermayer2018-07-23
| | | | | | | | | | This improves speed Fixes: Timeout Fixes: 9010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TSCC_fuzzer-6042614817095680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tscc: Move reading the side data palette before other checksMichael Niedermayer2018-07-23
| | | | | | We do not want to loose the side data in case of errors Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/bink: set color rangePaul B Mahol2018-07-22
|
* avcodec/bink: add 'k' version supportPaul B Mahol2018-07-22
|