summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/smc: report error codes instead of silently ignoring themPaul B Mahol2021-08-13
|
* avcodec/smc: 0xF0 opcode operates like 0xE0 opcodePaul B Mahol2021-08-13
|
* Fix for bug #9231: B-frames parameter is ignored in videotoolboxencAnselm Busse2021-08-13
| | | | | | | | | This commit fixes the bug as report in https://trac.ffmpeg.org/ticket/9231 by removing the line that overwrites the user settings for max_b_frames. Signed-off-by: Anselm Busse <anselm.busse@outlook.com> Signed-off-by: Rick Kern <kernrj@gmail.com>
* lavc/qsvenc: allows the SDK runtime to choose LowPower/non-LowPower modesHaihao Xiang2021-08-12
| | | | | | | | | | | | | The SDK supports LowPower and non-LowPower modes, but some features are available only under one of the two modes. Currently non-LowPower mode is always chosen in FFmpeg if the mode is not set to LowPower explicitly. User will experience some SDK errors if a LowPower related feature is specified but the mode is not set to LowPower. With this patch, the mode is set to unknown by default in FFmpeg, the SDK is able to choose a workable mode for the specified features. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* qsvdec: add support for HW_DEVICE_CTX methodHaihao Xiang2021-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows user set hw_device_ctx instead of hw_frames_ctx for QSV decoders, hence we may remove the ad-hoc libmfx setup code from FFmpeg. "-hwaccel_output_format format" is applied to QSV decoders after removing the ad-hoc libmfx code. In order to keep compatibility with old commandlines, the default format is set to AV_PIX_FMT_QSV, but this behavior will be removed in the future. Please set "-hwaccel_output_format qsv" explicitly if AV_PIX_FMT_QSV is expected. The normal device stuff works for QSV decoders now, user may use "-init_hw_device args" to initialise device and "-hwaccel_device devicename" to select a device for QSV decoders. "-qsv_device device" which was added for workarounding device selection in the ad-hoc libmfx code still works For example: $> ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=/dev/dri/card0 -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - /dev/dri/renderD128 is actually open for h264_qsv decoder in the above command without this patch. After applying this patch, /dev/dri/card0 is used. $> ffmpeg -init_hw_device vaapi=va:/dev/dri/card0 -init_hw_device qsv=hw@va -hwaccel_device hw -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - device hw of type qsv is not usable in the above command without this patch. After applying this patch, this command works as expected. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/qsvence: Use QSV encoder defaults as ffmpeg defaultsSoft Works2021-08-11
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* avcodec/h264_slice: use ff_h264_replace_picture when syncing thread contextsJames Almer2021-08-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_picture: add ff_h264_replace_picture()James Almer2021-08-10
| | | | | | | Will remove unnecessary allocations when both src and dst picture contain references to the same buffers. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_picture: split copying H264Picture some fields into a separate ↵James Almer2021-08-10
| | | | | | function Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_slice: clear old slice POC values on parsing failureJames Almer2021-08-10
| | | | | | | | If a slice header fails to parse, and the next one uses different Sequence and Picture parameter sets, certain values may not be read if they are not coded, resulting in the previous slice values being used. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/faxcompr: Check for end of input in cmode == 1 in ↵Michael Niedermayer2021-08-10
| | | | | | | | | | decode_group3_2d_line() Fixes: Infinite loop Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Disable error concealment for *IMAGEMichael Niedermayer2021-08-10
| | | | | | | | | | | | | | The existing error concealment makes no sense for the image formats, they use transformed source images which is different from keyframe + MC+difference for which the error concealment is designed. Of course feel free to re-enable this if you have a case where it works and improves vissual results Fixes: Timeout Fixes: 36234/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-6300306743885824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sbrdsp_fixed: Fix negation overflow in sbr_neg_odd_64_c()Michael Niedermayer2021-08-10
| | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 35593/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5182217725804544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/argo: Check for even dimensionsMichael Niedermayer2021-08-10
| | | | | | | | Fixes: reading over the end Fixes: 36346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5366943107383296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvenc: always set qp cr/cb offsetsTimo Rothenpieler2021-08-09
|
* aarch64: h264dsp: Fix indentation of some functions to match the restMartin Storsjö2021-08-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: h264dsp: Remove unnecessary sign extensionsMartin Storsjö2021-08-08
| | | | | | | | | | These became unnecessary when the stride arguments were changed from int to ptrdiff_t in bc26fe89275c267d169b468356c82ee59874407d (0576ef466d8a631326d1d0a5ec2e4c4c81d25353) and d5d699ab6e6f8a8290748d107416fd5c19757a1b (aa844dc46f93182a63ec0b53267d19e7342c79b9). Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/mpeg12dec: report error when picture type is unknown and err_detect ↵Marton Balint2021-08-08
| | | | | | | | is EXPLODE Also split error message to error and warning. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/qsv: Remove unused ff_qsv_level_to_mfx()Andreas Rheinhardt2021-08-08
| | | | | | Unused since 00d0a4aa9eda8553113e51556123c46648a5f31b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dsp, h264idct: Fix lengths of array parametersAndreas Rheinhardt2021-08-08
| | | | | | Fixes many -Warray-parameter warnings from GCC 11. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacps: Fix length of array in function definitionAndreas Rheinhardt2021-08-08
| | | | | | | | | | hybrid2_re() has a parameter declared as "const INTFLOAT filter[8]", although the actual argument for said parameter only has seven elements; the code itself only uses seven elements, so change the parameter. Fixes a -Wstringop-overread warning with GCC 11. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/nvenc: make aware of SDK 11.1 driver requirementsTimo Rothenpieler2021-08-08
|
* avcodec/nvenc: add chroma qp offset supportRicardo Monteiro2021-08-08
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/ass_split: Rename ff_ass_split_dialog2->ff_ass_split_dialogAndreas Rheinhardt2021-08-08
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ass_split: Remove unused ff_ass_split_dialogue()Andreas Rheinhardt2021-08-07
| | | | | | | Unused since 1f63665ca567fbc49fa80166d468a822c2999efa. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/acelp_vectors: Add missing bracketsAndreas Rheinhardt2021-08-07
| | | | | | | | | | | | | | Before 3793caa5e2d1d16ed45771574b2ffc932497cfcf the code was "if (...) do { ... } while (...);". After said commit this became "if (...) av_assert0(...); do { ... } while (...);", i.e. the loop is always executed. This commit changes the logic to what it was before said commit. Notice that the condition is always true in FATE, so no changes are necessary there. This fixes a -Wmisleading-indentation warning from GCC 11. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/utils: don't return negative values in av_get_audio_frame_duration()James Almer2021-08-06
| | | | | | | | | | | In some extrme cases, like with adpcm_ms samples with an extremely high channel count, get_audio_frame_duration() may return a negative frame duration value. Don't propagate it, and instead return 0, signaling that a duration could not be determined. Fixes ticket #9312 Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exr: Check ac_countMichael Niedermayer2021-08-06
| | | | | | | | Fixes: signed integer overflow: -9223372036854775808 * 2 cannot be represented in type 'long long' Fixes: 36244/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6090656186499072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_sei: parse and export Film Grain Characteristics SEI messagesJames Almer2021-08-06
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* cbs_h265: add support for Film Grain Characteristics SEI messageJames Almer2021-08-06
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mfenc: remove usage of avctx->pkt_timebaseJames Almer2021-08-06
| | | | | | The field is documented to be for decoding only. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/internal: Move MAKE_ACCESSORS to its only userAndreas Rheinhardt2021-08-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Move ff_tlog() from lavc/internal.h to lavu/internal.hAndreas Rheinhardt2021-08-05
| | | | | | | It is also used by libavfilter and it is only natural to define it alongside ff_dlog(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/huffman: Use logcontext instead of AVCodecContextAndreas Rheinhardt2021-08-05
| | | | | | | Said AVCodecContext is only used for logging; it furthermore avoids an avcodec.h inclusion. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/fft-internal: Make it a standalone headerAndreas Rheinhardt2021-08-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove the FFT_FIXED_32 defineAndreas Rheinhardt2021-08-05
| | | | | | | | Since the removal of the 16-bit FFT said define is unnecessary as FFT_FIXED_32 is always !FFT_FLOAT. But one wouldn't believe it when looking at the code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/fft-internal: Remove unused macrosAndreas Rheinhardt2021-08-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mips/constants: Include intfloat.h in constants.hAndreas Rheinhardt2021-08-05
| | | | | | Don't rely on the user including it (mostly indirectly). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/qsvenc: pass the color properties to the SDKHaihao Xiang2021-08-04
| | | | | | | | | Otherwise the color properties won't be encoded into the bitstream header Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/qsvdec: update color properties in codec contextHaihao Xiang2021-08-04
| | | | | | | | User may get color properties from the SDK via VIDEO_SIGNAL_INFO extbuf Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dnxhddec: check and propagate function return valuemaryam ebr2021-08-03
| | | | | | | | Similar to CVE-2013-0868, here return value check for 'init_vlc' is needed. crafted DNxHD data can cause unspecified impact. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* packet: initialize time_base field to (0, 1) instead of (0, 0)Lynne2021-08-02
| | | | Forget rational or irrational numbers, division by zero is undefined.
* avpacket: ABI bump additionsLynne2021-08-02
| | | | | This commit adds a long-requested by API users opaque fields for AVPacket, as well as a time_base field.
* libavcodec/libx265: add user data unregistered SEI encodingBrad Hards2021-08-01
| | | | | | | | | | | | | MISB ST 0604 and ST 2101 require user data unregistered SEI messages (precision timestamps and sensor identifiers) to be included. That currently isn't supported for libx265. This patch adds support for user data unregistered SEI messages in accordance with ISO/IEC 23008-2:2020 Section D.2.7 The design is based on nvenc, with support finished up at 57de80673cb Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/aaccoder: Add minimal bias in search_for_ms()Michael Niedermayer2021-07-31
| | | | | | | Fixes: floating point division by 0 Fixes: Ticket8218 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/noise_bsf: restore dropamount for backwards compatibilityGyan Doshi2021-07-30
|
* avcodec/noise_bsf: add expr supportGyan Doshi2021-07-29
|
* avcodec/mips: cabac.h provide fallback for wsbh instructionJiaxun Yang2021-07-28
| | | | | | | | | wsbh is only avilable for MIPS R2+. Provide a fallback for older processors. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mips: Use MMI marcos to replace Loongson3 instructionsJiaxun Yang2021-07-28
| | | | | | | | | | | | | | | Loongson3's extention instructions (prefixed with gs) are widely used in our MMI codebase. However, these instructions are not avilable on Loongson-2E/F while MMI code should work on these processors. Previously we introduced mmiutils marcos to provide backward compactbility but newly commited code didn't follow that. In this patch I revised the codebase and converted all these instructions into MMI marcos to get Loongson2 supproted again. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/mpeg12dec.c: Switch to init_get_bits8 and checks return valueThierry Foucu2021-07-28
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>