summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/x86/h264dsp_init: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/mpegvideoencdsp: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/me_cmp: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/h264_intrapred: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/cavsdsp: Remove obsolete MMX(EXT), 3dnow functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/rv40dsp_init: Remove obsolete MMX(EXT), 3dnow functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevcdsp_init: Remove obsolete MMXEXT functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/fdct: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/mpegvideoenc: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/diracdsp: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/audiodsp_init: Remove obsolete MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/ac3dsp_init: Remove obsolete 3dnow, MMX(EXT), SSE functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/vc1dsp_init: Remove obsolete 3dnow, MMX(EXT) functionsAndreas Rheinhardt2022-06-22
| | | | | | | | | | | x64 always has MMX, MMXEXT, SSE and SSE2 and this means that some functions for MMX, MMXEXT and 3dnow are always overridden by other functions (unless one e.g. explicitly disables SSE2) for x64. So given that the only systems that benefit from these functions are truely ancient 32bit x86s they are removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/dovi_rpu: Fix UB for possible left shift of negative valuesMichael Goulet2022-06-21
| | | | It is undefined to left-shift a negative value.
* compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with ↵Nil Admirari2022-06-21
| | | | | | LoadLibraryExW Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/v210dec: add support for strideless v210 as in BOXX filesMarton Balint2022-06-20
| | | | | | Fixes ticket #1838. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: add support for invalid paddings up to 16 bytesMarton Balint2022-06-20
| | | | | | Fixes ticket #1528. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: do not use accelerated code for the last pixels of a rowMarton Balint2022-06-20
| | | | | | | ASM code tends to overwrite the buffers by 2-4 bytes and it can cause issues with slice threads. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: disallow negative custom strideMarton Balint2022-06-20
| | | | | | | | Also make sure a big custom stride does not overflow size check. Avoids segfaults. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: factorize row decodingMarton Balint2022-06-20
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/v210dec: properly support odd widthsMarton Balint2022-06-20
| | | | | | Fixes ticket #5195. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/mfenc: set variable frame size flag.Gyan Doshi2022-06-20
| | | | | | | | | Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802
* lavc/libx264.c: Fix possible UB by NULL pointer LHSMichael Goulet2022-06-20
| | | | It is UB to attempt to do pointer arithmetic on NULL pointer LHS, even if that pointer arithmetic ends up being "+= 0" (i.e. !!p == 0 if p == NULL).
* avcodec/x86/lpc, vp8dsp_init: Remove redundant checksAndreas Rheinhardt2022-06-18
| | | | | | EXTERNAL_SSE2_SLOW is now more encompassing than EXTERNAL_SSE2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt2022-06-17
| | | | | | | | | | | | | | | | | | In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec/qsvenc: add ROI support to qsv encoderWenbin Chen2022-06-17
| | | | | | | | | Use The mfxEncoderCtrl parameter to enable ROI. Get side data "AVRegionOfInterest" and use it to configure "mfxExtEncoderROI" which is the MediaSDK's ROI configuration. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/mace: fix some style issuesPaul B Mahol2022-06-16
|
* avcodec/exif: Move tag_list out of headerAndreas Rheinhardt2022-06-15
| | | | | | | | | It is only used by exif.c (and e.g. EXIF_TAG_NAME_LENGTH is an implementation detail anyway). Also remove the sentinel, as it is used in conjunction with FF_ARRAY_ELEMS. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-15
| | | | | | | | | | | | | | | | | | This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/binkaudio: Clear state on EAGAINMichael Niedermayer2022-06-14
| | | | | | | | | | | Its not supported to maintain a frame as receive_frame() argument over multiple calls Fixes: store to null pointer of type 'FFTSample' (aka 'float') Fixes: 46231/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINKAUDIO_DCT_fuzzer-6276566037954560 Fixes: ACDC.smo Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/x86/h264_qpel_8bit: Remove unused functionAndreas Rheinhardt2022-06-11
| | | | | | | | | Namely ff_avg_h264_qpel8or16_hv1_lowpass_op_mmxext. It seems to exist since 610e00b3594bf0f2a75713f20e9c4edf0d03a818 (a function like this already existed before that commit, but it was static and av_always_inline and was therefore not present in the actual binaries). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/rv34dsp: Remove unused ff_rv34_idct_dc_mmxextAndreas Rheinhardt2022-06-11
| | | | | | Forgotten in 9ba9c3402499d90e54f8aa111b62c278206d11af. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/fpel: Remove unused ff_avg_pixels4_mmxAndreas Rheinhardt2022-06-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/videodsp: Make ff_emulated_edge_mc_16 staticAndreas Rheinhardt2022-06-11
| | | | | | | Only ff_emulated_edge_mc_8() is used outside of lavc/videodsp.c. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinitAndreas Rheinhardt2022-06-11
| | | | | | Unused since df701ed0b582a6b5c763310b4225446089cbcfb1. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/hevcdec: Make ff_hevc_pel_weight staticAndreas Rheinhardt2022-06-11
| | | | | | Only used here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/hevcdsp_init: Remove unnecessary inclusion of get_bits.hAndreas Rheinhardt2022-06-11
| | | | | | | This file does not use anything from get_bits.h at all; furthermore hevcdsp.h now includes get_bits.h itself. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/x86/qpeldsp: Remove unused ff_put_no_rnd_pixels16_l2_3dnowAndreas Rheinhardt2022-06-11
| | | | | | qpeldsp does not use 3dnow, it is MMXEXT-only. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libx264: Set min build version to 158 for msvcMatt Oliver2022-06-11
| | | | | | | | | | | | | | | | | | | | | | | Was "[PATCH] libx264: Do not explicitly set X264_API_IMPORTS" Setting X264_API_IMPORTS only affects msvc builds and it breaks linking to static builds (although is required for shared builds). This flag is set by x264 in its pkgconfig as required since build 158 (a615f027ed172e2dd5380e736d487aa858a0c4ff) from July 2019. So this patch updates configure to require a newer x264 build that correctly sets the imports flag. The min version requirement of 158 is applied for msvc builds only. This is also removing the check for 'libx264 without pkg-config' which was left for compatibility reasons about 7 years ago when the pkg-config check was introduced by commit e06263ef1e0e172b2c76070b3dc739411af08e82. Co-authored-by: softworkz <softworkz@hotmail.com> Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Matt Oliver <protogonoi@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* libavcodec/jpeg2000_parser: Localize m->bytes_readTomas Härdin2022-06-10
| | | | Another 6%
* libavcodec/jpeg2000_parser: ReindentTomas Härdin2022-06-10
|
* libavcodec/jpeg2000_parser: Rearrange ifsTomas Härdin2022-06-10
| | | | A modest 8% improvement
* libavcodec/jpeg2000_parser: LUTify info_marker()Tomas Härdin2022-06-10
| | | | This speeds find_frame_end() up by 39% according to valgrind
* libavcodec/jpeg2000_parser: next_state is just a temporaryTomas Härdin2022-06-10
|
* libavcodec/jpeg2000_parser: Simplify, fix reset_context()Tomas Härdin2022-06-10
|
* libavcodec/jpeg2000_parser: Speed up long skipsTomas Härdin2022-06-10
|
* avcodec/wmalosslessdec: Check channels after setting themMichael Niedermayer2022-06-09
| | | | | | | | | | Fixes: 46194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-580292873827123 Fixes: stack-buffer-overflow on address 0x7ffc0ce69b30 at pc 0x00000062fb03 bp 0x7ffc0ce69af0 sp 0x7ffc0ce69ae8 Fixes: 46205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5354894996930560 Fixes: 47861/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4817404984688640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/texturedspenc: Fix indexing in color distribution determinationMichael Niedermayer2022-06-09
| | | | | | | | | | Fixes CID1396405 MSE and PSNR is slightly improved, and some noticable corruptions disappear as well. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/dvdsubdec, dvbsubdec: remove bitmap dumping in DEBUG buildssoftworkz2022-06-08
| | | | | | | | | It's been a regular annoyance and often undesired. There will be a subtitle filter which allows to dump individual subtitle bitmaps. Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* libavcodec/qsvenc: Add min/max QP control options for I/P/B frameYue Heng2022-06-06
| | | | | | | | | To do more accurate QP control, add min/max QP control on I/P/B frame separately to qsv encoder. qmax and qmin still work but newly-added options have higher priority. Signed-off-by: Yue Heng <yue.heng@intel.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>