summaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/arm/mlpdsp: add missing dependency for truehdAman Gupta2019-11-111-0/+3
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/dvdec: Don't use restrict directly to fix build on MSVCAndreas Rheinhardt2019-11-111-1/+1
| | | | | | | | | | 004ebd4b added a function with a parameter that was declared as restrict and not av_restrict. This is not supported by MSVC as several FATE-boxes that now fail to build show. So use av_restrict. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Tested-by: Matthias Troffaes <matthias.troffaes@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/librav1e: free the RaPacket after using itJames Almer2019-11-101-2/+1
| | | | | | | Fixes leaks. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Add librav1e encoderDerek Buitenhuis2019-11-104-1/+597
| | | | | | Port to the new send/receive API by: James Almer <jamrial@gmail.com>. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/wmaprodec: get frame during frame decodeMichael Niedermayer2019-11-091-4/+6
| | | | | | | | | Fixes: memleak Fixes: 17615/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5681306024804352 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>
* avcodec/interplayacm: Fix overflow of last unused valueMichael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: signed integer overflow: -2147450880 - 65535 cannot be represented in type 'int' Fixes: 18393/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5667520110919680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/adpcm: Fix undefined behavior with negative predictions in IMA OKIMichael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: left shift of negative value -30 Fixes: 18392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_OKI_fuzzer-5631771831435264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cook: Move up and extend block_align checkMichael Niedermayer2019-11-091-4/+3
| | | | | | | | Fixes: signed integer overflow: 2046820356 * 8 cannot be represented in type 'int' Fixes: 18391/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5631674666188800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sbcdec: Fix integer overflows in sbc_synthesize_four()Michael Niedermayer2019-11-091-14/+14
| | | | | | | | Fixes: signed integer overflow: 1494495519 + 1494495519 cannot be represented in type 'int' Fixes: 18347/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SBC_fuzzer-5711714661695488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/twinvq: Check block_alignMichael Niedermayer2019-11-091-7/+10
| | | | | | | | Fixes: signed integer overflow: 538976288 * 8 cannot be represented in type 'int' Fixes: 18348/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_METASOUND_fuzzer-6681325716635648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cook: Enlarge gain tableMichael Niedermayer2019-11-091-4/+4
| | | | | | | | Fixes: index 25 out of bounds for type 'float [23]' Fixes: 18355/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5641398941908992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cook: Check samples_per_channel earlierMichael Niedermayer2019-11-091-8/+9
| | | | | | | | Fixes: division by zero Fixes: 18362/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5653727679086592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/atrac3plus: Check split point in fill mode 3Michael Niedermayer2019-11-091-0/+4
| | | | | | | | Fixes: index 32 out of bounds for type 'int [32]' Fixes: 18350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC3P_fuzzer-5643794862571520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmavoice: Check sample_rateMichael Niedermayer2019-11-091-0/+3
| | | | | | | | Fixes: left shift of 538976288 by 8 places cannot be represented in type 'int' Fixes: 18376/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAVOICE_fuzzer-5741645391200256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/xsubdec: fix overflow in alpha handlingMichael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 18368/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XSUB_fuzzer-5702665442426880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/iff: Check available space before entering loop in ↵Michael Niedermayer2019-11-091-0/+6
| | | | | | | | | | decode_long_vertical_delta2() / decode_long_vertical_delta() Fixes: Timeout (31sec -> 41ms) Fixes: 18380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5645210121404416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix integer overflow in filter_3800()Michael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: signed integer overflow: 2117181180 + 60483298 cannot be represented in type 'int' Fixes: 18344/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5685327791915008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/atrac3plusdec: add FF_CODEC_CAP_INIT_CLEANUPMichael Niedermayer2019-11-091-1/+2
| | | | | | | | Fixes: memleaks Fixes: 18332/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC3P_fuzzer-5655654374572032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/decode: Also consider channels in max_samples checkMichael Niedermayer2019-11-091-1/+1
| | | | | | | | Fixes: Timeout (109sec -> 0.6sec) Fixes: 18309/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-6226598168100864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rasc: Check input size in decode_fint()Michael Niedermayer2019-11-091-0/+2
| | | | | | | | Fixes: Timeout (11sec -> 42ms) Fixes: 18287/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5637866331308032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Use a different error message for the slice level CRCMichael Niedermayer2019-11-091-1/+1
| | | | | | This way they can be told apart easily Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()Michael Niedermayer2019-11-091-1/+2
| | | | | | | | Fixes: signed integer overflow: -1094995529 * 2 cannot be represented in type 'int' Fixes: 18281/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5692589180715008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dstdec: Check that AC probabilities are within rangeMichael Niedermayer2019-11-091-0/+4
| | | | | | | | | | | ISO/IEC 14496-3:2005(E): "Each entry of P_one[ ][ ] is in the range of 1 to 128, corresponding to a probability of 1/256 to 128/256 of the next error bit (bit E, See Figure 10.5)..." Fixes: Timeout (42sec ->1sec) Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dstdec: Check read_table() for failureMichael Niedermayer2019-11-091-2/+6
| | | | | | | | Fixes: Timeout (too long -> 42sec) Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1_block: Check input in the block decode loopsMichael Niedermayer2019-11-091-0/+17
| | | | | | | | Fixes: Timeout (196sec -> 2sec) Fixes: 18026/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5640941108461568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1_block: Check for end of bitstream at the top of ↵Michael Niedermayer2019-11-091-2/+6
| | | | | | | | | | vc1_decode_i_blocks_adv() Fixes: Timeout (147sec -> 2sec) Fixes: 17704/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5723851098423296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hqx: Check the input data against the image sizeMichael Niedermayer2019-11-091-0/+8
| | | | | | | | | Fixes: Timeout (22 -> 100 ms) Fixes: 15173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5662556846292992 Fixes: 17896/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5679312077848576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pafvideo: Only clear frame when it was written toMichael Niedermayer2019-11-091-2/+8
| | | | | | | | | | | This avoids unneeded operations and makes the code faster. Fixes: Timeout Fixes: 15724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5750842205929472 (12sec -> 9sec) Fixes: 17625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5640515311108096 (16sec -> 4sec) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snowenc: Set mb_num to avoid ratecontrol floating point divisions by 0.0Michael Niedermayer2019-11-091-0/+1
| | | | | | Fixes: Ticket7990 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snowenc: Fix 2 undefined shiftsMichael Niedermayer2019-11-091-2/+2
| | | | | | Fixes: Ticket7990 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libvpxenc,cosmetics: fix a typoJames Zern2019-11-081-1/+1
| | | | predicition -> prediction
* avcodec/libvpxdec.c,cosmetics: bpp -> bpcJames Zern2019-11-081-1/+1
| | | | Signed-off-by: James Zern <jzern@google.com>
* avcodec/extract_extradata_bsf: fix typo in commentsleozhang2019-11-061-2/+2
| | | | | | Signed-off-by: leozhang <leozhang@qiyi.com> Reviewed-by: Gyan <ffmpeg@gyani.pro> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/Makefile: add missing msmpeg4* dependencies to wmv1 encoderLou Logan2019-11-061-1/+1
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* avcodec/Makefile: add missing h263data dependency to snow encoderLou Logan2019-11-061-1/+1
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* avcodec/Makefile: add missing vorbis_data dependency to opus encoderLou Logan2019-11-061-1/+1
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* avcodec/dvdec: correctly decode bottom mb row in 1080i field modeBaptiste Coudurier2019-11-062-20/+72
|
* avcodec/dvdec: correctly set interlaced and tffBaptiste Coudurier2019-11-061-3/+10
|
* avcodec/libvpxdec: reject video and alpha dimension mismatchesMarton Balint2019-11-051-0/+11
| | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libvpxdec: decode to custom framebuffers for vp9Marton Balint2019-11-051-5/+68
| | | | | | | This avoids copying the full frame after decoding. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libvpxdec: pass decoder instances to vpx_init directlyMarton Balint2019-11-051-13/+13
| | | | | | | | If the alpha decoder init failed we presented the error message from the normal decoder. This change should prevent such mistakes. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libvpxdec: make sure BlockAdditional side data size >= 8Marton Balint2019-11-051-1/+1
| | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libvpxenc: only allocate alpha U/V planes on size changesMarton Balint2019-11-051-24/+35
| | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/libvpxenc: fix alpha strideMarton Balint2019-11-051-1/+1
| | | | | Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: James Zern <jzern@google.com>
* avcodec/Makefile: add missing ass dependency to ccaption decoderLou Logan2019-11-041-1/+1
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* lavc/qsvenc: add the missing vp9 filezhongli_dev@126.com2019-11-041-0/+113
| | | | | | It is missed in commit 3358380 Signed-off-by: Zhong Li <zhongli_dev@126.com>
* lavc/qsvenc: enable vp9 encoderZhong Li2019-11-034-1/+69
| | | | | | | | | | 1. must enable low_power mode since just VDENC can be supported by iHD driver right now 2. Coding option1 and extra_data are not supported by MSDK 3. IVF header will be inserted in MSDK by default, but it is not needed for FFmpeg, so disable it. Signed-off-by: Zhong Li <zhongli_dev@126.com>
* lavc/qsvenc: Fix bitrate_limit to allow AVC encode in limited bitrateLinjie Fu2019-11-031-19/+19
| | | | | | | | | | | | | | | | MFXVideoENCODE_Query calls CheckVideoParamQueryLike in MSDK and will determine whether to set param.mfx.TargetKbps to the allowed minTargetKbps according to the bitrate_limit in extco2 buffer. Thus q->param.ExtParam must be set before MFXVideoENCODE_Query in case minTargetKbps is written to TargetKbps by default. 1080P AVC encoding with option "-bitrate_limit 0 -b:v 100k": Before patch: 902 kbps After patch: 156 kbps Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* avcodec/v4l2_m2m: Fix indentationAndriy Gelman2019-11-011-1/+1
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/v4l2_buffers: Fix infinite loopAndriy Gelman2019-11-011-5/+3
| | | | | | | | | | | | This part of the code counts the number of planes returned by the v4l2 device for each queried capture/output buffer. When testing the GPU h264 encoder on Nvidia's Jetson Nano, this caused an infinite loop because avbuf->buf.length included some empty buffers (i.e. where avbuf->buf.m.planes[i].length = 0), meaning that the counter was never incremented and break was never reached. This is fixed in the commit by using a well defined iteration range. Signed-off-by: Aman Gupta <aman@tmm1.net>
OpenPOWER on IntegriCloud