summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/libzvbi-teletextdec: allow -1 subtitle duration and make it the defaultMarton Balint2018-05-06
| | | | | | | Most decoders (pgssubdec, ccaption_dec) are using -1 or UINT32_MAX for a subtitle event which should be cleared at the next event. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/jpeg2000dec: Fix undefined shift in the ↵Michael Niedermayer2018-05-06
| | | | | | | | | | jpeg2000_decode_packets_po_iteration() CPRL case Fixes: shift exponent 47 is too large for 32-bit type 'int' Fixes: 7955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6016721977606144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Skip init for component in CPRL if nothing is to be doneMichael Niedermayer2018-05-06
| | | | | | | | Fixes: assertion failure Fixes: 7949/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-4819602782552064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Reduce the number of tile parts allocatedMichael Niedermayer2018-05-06
| | | | | | | | | | | | | | This is large enough for all jpeg2000 files i tested. If some need more then this should be changed to dynamic allocation. Dynamic allocation would need to be done carefully as these are many relatively small arrays so repeatly reallocating them would not be good. The decrease is a clean and simple solution assuming it works for all files. Fixes: OOM Fixes: 6534/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-4821490731057152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/g2meet: Change order of operations to avoid undefined behaviorMichael Niedermayer2018-05-06
| | | | | | | | Fixes: signed integer overflow: 65280 * 196032 cannot be represented in type 'int' Fixes: 7279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5977332473921536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add gray14 supportPaul B Mahol2018-05-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* mpegvideo: add deprecated flags to the rc_strategy optionRostislav Pehlivanov2018-05-05
| | | | | | Forgotten with the commit which removed support for libxvid_rc. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* dcaenc: fix segfault when attempting to encode with invalid samplerateRostislav Pehlivanov2018-05-05
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* mpegvideo: remove support for libxvid's RC systemRostislav Pehlivanov2018-05-05
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/flac_parser: Fix infinite loopMichael Niedermayer2018-05-05
| | | | | | | | Fixes: crbug/827204 Reported-by: Frank Liberato <liberato@google.com> Reviewed-by: Frank Liberato <liberato@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: fix kVTCouldNotFindVideoDecoderErr trying to decode ↵Aman Gupta2018-05-04
| | | | | | | | | | HEVC on iOS Older iOS devices don't have a hardware HEVC decoder, but the software decoder offered by VideoToolbox is well-optimized and performs much better than the ffmpeg decoder. Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/videotoolbox: improve logging of decoder errorsAman Gupta2018-05-04
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/nvenc: move reconfig_encoder call inside of push/pop ctxTimo Rothenpieler2018-05-04
| | | | Also make it void, it must not fail the encode anyway.
* avcodec/nvenc: add A53CC supportRoman Arzumanyan2018-05-04
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: support dynamic bitrate changespkviet2018-05-04
| | | | | | | | | The patch enables dynamic bitrate through ReconfigureEncoder method from nvenc API. This is useful for live streaming in case of network congestion. Signed-off-by: pkviet <pkv.stream@gmail.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: support dynamic aspect ratio changeMiroslav Slugeň2018-05-04
| | | | | | | | If there is input like DVB-T streams it can change aspect ratio on-the-fly, so nvenc should respect this change and change aspect ratio in encoder. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: make hw_frames_ctx fully optionalTimo Rothenpieler2018-05-04
|
* avcodec/mediacodecdec: add workaround for buggy amlogic mpeg2 decoderAman Gupta2018-05-04
| | | | | | | | | | | | | | | | | | I tested the previous mediacodec changes on seven different Android TV devices, with both mpeg2 and h264 content. All except one worked as expected. The exception was the MiBox3 running Android 6.0.1, where playback would freeze on a frame every few seconds. I tested two other AMLogic devices with newer Android versions that did not show the same problem. H264 decoding on the MiBox3 was also not affected, so this workaround applies only to OMX.amlogic.mpeg2.decoder.awesome on Android API22. There is a rumor that Xiaomi is planning to release Android Oreo for the MiBox3, so I will revisit in a few months to confirm whether this is specific to os/driver version or the chipset used in that device. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* avcodec/mediacodecdec: wait on first frame after input buffers are fullAman Gupta2018-05-04
| | | | | | | | | | | The output_buffer_count==0 special case is no longer required, and can cause spurious EAGAIN to surface to the user when input buffers are filled up. Since the caller now knows if the decoder is accepting new input (via current_input_buffer>=0), let the wait parameter control whether we block or not. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* avcodec/mediacodecdec: restructure mediacodec_receive_frameAman Gupta2018-05-04
| | | | | | | | | | | | | The new logic follows a recommendation by @rcombs to use dequeueInputBuffer with a timeout of 0 as a way to detect whether the codec wants more data. The dequeued buffer index is kept in MediaCodecDecContext until it can be used next. A similar technique is also used by the Google's official media player Exoplayer: see MediaCodecRenderer.feedInputBuffer(). Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* avcodec/mediacodec_wrapper: add helper to fetch SDK_INTAman Gupta2018-05-04
| | | | | Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Aman Gupta <aman@tmm1.net>
* avcodec/h263dec: Document padding_bug_score heuristic used for wrong stuffingMichael Niedermayer2018-05-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vaapi_encode_h264: Take VAAPIEncodeH264Context::sei_needed as an ORed valueHaihao Xiang2018-05-03
| | | | | | We may check priv->sei_needed only when writing SEI messages. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/mpeg4videodec: Split decode_studio_vol_header() out of ↵Michael Niedermayer2018-05-03
| | | | | | decode_studiovisualobject() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the ↵Michael Niedermayer2018-05-03
| | | | | | | | | | branch for visual object parsing Fixes: runtime error: shift exponent -1 is negative Fixes: 7510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5024523356209152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc: Add VP9 metadata bitstream filterMark Thompson2018-05-02
| | | | Can adjust the colour information.
* lavc: Add coded bitstream read/write support for VP9Mark Thompson2018-05-02
|
* cbs: Add support for array subscripts in trace outputMark Thompson2018-05-02
| | | | This makes the trace output for arrays significantly nicer.
* cbs_h2645: Simplify representation of fixed valuesMark Thompson2018-05-01
|
* cbs: Fragment/unit data is always reference countedMark Thompson2018-05-01
| | | | | Make this clear in the documentation and add some asserts to ensure that it is always true.
* avcodec/cbs_h2645: create a reference to the existing buffer when ↵James Almer2018-04-30
| | | | | | | decomposing slice units Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_mpeg2: create a reference to the existing buffer when ↵James Almer2018-04-30
| | | | | | | decomposing slice units Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was ↵Marton Balint2018-04-30
| | | | | | | | | | used Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and avfiltergraph.c pick_format() until a paletted pixel format without alpha is introduced. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8Marton Balint2018-04-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/hnm4video: fix palette alphaMarton Balint2018-04-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/anm: fix palette alphaMarton Balint2018-04-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/mpeg4video_parser: Avoid litteral 0x1B6, use named constant insteadMichael Niedermayer2018-04-30
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio framesMichael Niedermayer2018-04-30
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix integer overflow in DEC_MED() / INC_MED()Michael Niedermayer2018-04-29
| | | | | | | | Fixes: runtime error: signed integer overflow: 2147483637 + 128 cannot be represented in type 'int' Fixes: 6701/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5358324934508544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix integer overflow in wv_unpack_stereo()Michael Niedermayer2018-04-29
| | | | | | | | Fixes: runtime error: signed integer overflow: 2147483531 + 16384 cannot be represented in type 'int' Fixes: 6615/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5165715515506688 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: fix mquant calculationJerome Borsboom2018-04-29
| | | | | | | | | | | | In vc1_decode_i_blocks_adv mquant needs to be reset to its default value for each macroblock, instead of once at the beginning of the slice. DQPROFILE specifies which macroblocks can have an alternative quantizer step size. When DQPROFILE specifies edges, the selection is applicable to the edges of the picture. Slice edges are not selected by DQPROFILE. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/proresdec2: add missing frame color metadataPaul B Mahol2018-04-28
| | | | | | Stolen from removed decoder. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/proresdec2: make long name more descriptivePaul B Mahol2018-04-28
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: remove duplicate prores decoderPaul B Mahol2018-04-28
| | | | | | Removed slower one, couldn't figure out why it is slower. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/cbs_mpeg2: use existing buffer reference when splitting fragmentsJames Almer2018-04-26
| | | | | Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs: create reference counted fragments in ff_cbs_read_extradata()James Almer2018-04-26
| | | | | | | | | This way, every CodedBitstreamType->split_fragment() function can safely assume the fragment passed to them will be reference counted, potentially simplifying code. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/vc1: fix out of bounds access of overlap filterJerome Borsboom2018-04-26
| | | | | | | Overlap filtering of the first row and first column must be guarded for out of bounds access of v->over_flags_plane. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* avcodec/error_resilience: Fix integer overflow in filter181()Michael Niedermayer2018-04-25
| | | | | | | | Fixes: runtime error: signed integer overflow: 197710 * 10923 cannot be represented in type 'int' Fixes: 7010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5667127596941312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h263dec: Check slice_ret in mspeg4 slice loopMichael Niedermayer2018-04-25
| | | | | | | | | Fixes infinite loop Fixes: 6858/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_MSMPEG4V3_fuzzer-4681563766784000 Fixes: 6890/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-4756103142309888 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h2645_parse: Replace RNXYA by RNXY in ff_h2645_extract_rbsp()Michael Niedermayer2018-04-25
| | | | | | Fixes misaligned accesses Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>