summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* 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>
* qsvenc: Value '0' is not a valid value for parameter GopOptFlagHaihao Xiang2021-07-27
| | | | | | | | The accepted values for GopOptFlag are MFX_GOP_CLOSED (1) and MFX_GOP_STRICT (2). Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Zhong Li <zhongli_dev@126.com>
* avcodec/h264_sei: honor the Film Grain Characteristics cancel flagJames Almer2021-07-25
| | | | | | Film Grain persistence is cancelled when it's true. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_sei: parse and export Film Grain Characteristics SEI messagesJames Almer2021-07-23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* cbs_h264: add support for Film Grain Characteristics SEI messagesJames Almer2021-07-23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/tableprint_vlc: Fix building with hardcoded tablesAndreas Rheinhardt2021-07-23
| | | | | | | | | | | | This has been broken in 25c8507818d8559a6654a5b30a0f8aae11a48181, because the hacks for headers that are incompatible with building for the host in libavcodec/tableprint_vlc.h have not been adjusted. Moving AV_INPUT_BUFFER_PADDING_SIZE to defs.h which is valid for both the target as well as the host allowed to remove some of the hacks. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/g729postfilter.h: Include acelp_pitch_delay.hAndreas Rheinhardt2021-07-22
| | | | | | Needed for PITCH_DELAY_MAX. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Remove some unnecessary mpegvideo.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary mem.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove obsolete version.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | These have mostly been added because of FF_API_*; yet when these were removed, removing the header has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/internal, swresample/audioconvert: Remove cpu.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | | | | These inclusions are not necessary, as cpu.h is already included wherever it is needed (via direct inclusion or via the arch-specific headers). Also remove other unnecessary cpu.h inclusions from ordinary non-headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lossless_videodsp: Improve included headersAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt2021-07-22
| | | | | | | It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't include hwcontext.hAndreas Rheinhardt2021-07-22
| | | | | | | It is no longer used directly; but it is still indirectly included via codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't include errno.hAndreas Rheinhardt2021-07-22
| | | | | | | This inclusion has been added before libavutil/error.h was split off from avcodec.h (in 60c144f700e2e362047b00704abcb694d49e549c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm_data: Move tables only used by adpcm.c to itAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm_data: Fix type mismatch for ff_adpcm_afc_coeffsAndreas Rheinhardt2021-07-22
| | | | | | | | According to the header it is an array of int16_t, yet it is declared as uint16_t. Fix this by using int16_t troughout and convert the definition to use values in the range of int16_t. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm: Don't include disabled AVCodecsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm: Disable dead codeAndreas Rheinhardt2021-07-22
| | | | | | | This change ensures that the linker can drop adpcm_data.o if no decoder that actually uses anything from there is enabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm: Fix indentationAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcm: Use smaller scope for some variablesAndreas Rheinhardt2021-07-22
| | | | | | | | This is to avoid unused variables warnings after the code for the disabled encoders has been #if'ed away which will happen in a subsequent commit. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcmenc: Don't include disabled AVCodecsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcmenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-22
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcmenc: #if disabled code away, fix build without ADPCM_ARGOAndreas Rheinhardt2021-07-22
| | | | | | | | | | | | | The adpcm_argo encoder does not use the data from adpcm_data.c directly; instead it shares a function with the adpcm_argo decoder that is in adpcm.c. When all the ADPCM decoders and the adpcm_argo encoder are disabled, adpcm.c is not compiled; yet the code in adpcmenc.c calling said function from adpcm.c is still present, leading to link errors. Fix this by disabling the code belonging to disabled codecs in adpcmenc.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/adpcmenc: Use smaller scope for some variablesAndreas Rheinhardt2021-07-22
| | | | | | | | This is to avoid unused variables warnings if the code for disabled encoders is #if'ed away which will happen in a subsequent commit. In case of buf it also avoids shadowing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/argo: use bits_per_coded_sample instead of bits_per_raw_sampleZane van Iperen2021-07-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/dsd_tablegen: Merge header into dsd.cAndreas Rheinhardt2021-07-19
| | | | | | | | Since b492fbcc6e87094804fdf71308dc500976c6b165, the DSD tables are always initialized at runtime, so merge the dsd_tablegen.h header into dsd.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Avoid calling functions repeatedly via FFMINAndreas Rheinhardt2021-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libavcodec.v: Tighten export whitelistAndreas Rheinhardt2021-07-18
| | | | | | | | | | | | | | Currently every symbol (with external linkage) that starts with "av" is exported. Yet libaom-av1 has lots of functions that are not meant to be exported and start with "av1_" (I counted 1236); and libvpx has average_split_mvs. These functions are exported if one links these libraries statically into a shared libavcodec.so. Solve this by tightening the whitelist to "av_", "avcodec_", "avpriv_" and (as a special-case) "avsubtitle_free". Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/exr: Check uncompressed_size against max_pixelsMichael Niedermayer2021-07-17
| | | | | | | | | Fixes: Timeout Fixes: 35286/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6557139802914816 Fixes: 31253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-4901782326214656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libdav1d: parse sequence headers in extradata if availableJames Almer2021-07-14
| | | | | | | This allows the decoder context to be initialized with all stream parameters before a packet is parsed. Signed-off-by: James Almer <jamrial@gmail.com>
* {configure,avcodec/libx264}: remove separate x264_csp_bgr checkJan Ekström2021-07-12
| | | | | | We already require X264_BUILD >= 118, which includes an unconditional definition of X264_CSP_BGR in itself, thus making this check effectively always true.
* libavcodec/vorbisenc: Add missing initial_paddingGuangyu Sun2021-07-12
| | | | | | | | | | | Vorbis has priming samples at the beginning. If the initial_padding is not set in the encoder, the total sample count will be one frame fewer than it should be. The result is that we get a truncated version of encoding. initial_padding should be set to the frame_size used in vorbis_encode_frame(). Signed-off-by: Guangyu Sun <gsun@roblox.com>
* avcodec/qsvenc: clip global_quality for ICQ modes.Gyan Doshi2021-07-12
| | | | | | Allowed range is 1 to 51. Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html
* avcodec/libdav1d: don't repeatedly parse the same sequence headerJames Almer2021-07-09
| | | | | | | Look at the event flag that signals a new sequence header was found in the bitstream on supported libdav1d versions for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libdav1d: use ff_decode_frame_props() to fill frame propertiesJames Almer2021-07-09
| | | | | | | The main benefit comes from propagating container level metadata like hdr, which is more commonly used than the relevant Metadata OBUs. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aacdec_template: Avoid some invalid values to be set by ↵Michael Niedermayer2021-07-09
| | | | | | | | | | decode_audio_specific_config_gb() Fixes: NULL pointer dereference Fixes: decode_spectrum_and_dequant.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/textdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Deduplicate pix_fmts arraysAndreas Rheinhardt2021-07-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>