summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* lavu/hwcontext_qsv: Make sure hardware vendor is Intel for qsv on d3d11vaHaihao Xiang2023-12-07
| | | | | | | | | When multiple hardwares are available, the default one might not be Intel Hardware. We can use option vendor_id to choose the required vendor. Tested-by: Artem Galin <artem.galin@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavu/hwcontext_d3d11va: Add option vendor_idArtem Galin2023-12-07
| | | | | | | | User may choose the hardware via option vendor_id when multiple hardwares are available. Signed-off-by: Artem Galin <artem.galin@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavu/hwcontext_qsv: use mfxImplDescription instead of mfxExtendedDeviceId on ↵Haihao Xiang2023-12-05
| | | | | | | | | | | | | Linux mfxExtendedDeviceId mightn't be supported in certain configurations of oneVPL on Linux, so we can't ensure a property filter for mfxExtendedDeviceId.DeviceID or mfxExtendedDeviceId.VendorID works as expected. This fixed the issue mentioned in [1] [1] http://ffmpeg.org/pipermail/ffmpeg-user/2023-October/056983.html Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavu/hwcontext_vaapi: ignore nonexistent device in default DRM device selectionHaihao Xiang2023-12-05
| | | | | | | | | | It is possible that renderD128 doesn't exist but renderD129 is available in a system (see [1]). This change can make sure the default DRM device selection works even if renderD128 doesn't exist. [1] https://github.com/intel/intel-device-plugins-for-kubernetes/blob/main/cmd/gpu_plugin/README.md#issues-with-media-workloads-on-multi-gpu-setups Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavu/fixed_dsp: R-V V fmul_window_scaledRémi Denis-Courmont2023-11-23
| | | | | vector_fmul_window_scaled_fixed_c: 4393.7 vector_fmul_window_scaled_fixed_rvv_i64: 1642.7
* lavu/float_dsp: optimise R-V V fmul_reverse & fmul_windowRémi Denis-Courmont2023-11-23
| | | | | | | | | | | | | | | | Roll the loop to avoid slow gathers. Before: vector_fmul_reverse_c: 1561.7 vector_fmul_reverse_rvv_f32: 2410.2 vector_fmul_window_c: 2068.2 vector_fmul_window_rvv_f32: 1879.5 After: vector_fmul_reverse_c: 1561.7 vector_fmul_reverse_rvv_f32: 916.2 vector_fmul_window_c: 2068.2 vector_fmul_window_rvv_f32: 1202.5
* lavu/fixed_dsp: optimise R-V V fmul_reverseRémi Denis-Courmont2023-11-23
| | | | | | | | | | | | | | | | | Gathers are (unsurprisingly) a notable exception to the rule that R-V V gets faster with larger group multipliers. So roll the function to speed it up. Before: vector_fmul_reverse_fixed_c: 2840.7 vector_fmul_reverse_fixed_rvv_i32: 2430.2 After: vector_fmul_reverse_fixed_c: 2841.0 vector_fmul_reverse_fixed_rvv_i32: 962.2 It might be possible to further optimise the function by moving the reverse-subtract out of the loop and adding ad-hoc tail handling.
* riscv: fix builds without Zbb supportRémi Denis-Courmont2023-11-18
|
* apply spelling fixesDiederik de Haas via ffmpeg-devel2023-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix spelling issue as reported by Debian's lintian tool: accomodate -> accommodate addtional -> additional auxillary -> auxiliary bellow -> below betweeen -> between Calulate -> Calculate coefficents -> coefficients Defalt -> Default defaul -> default higer -> higher neccesary -> necessary orignal -> original ouput -> output precison -> precision processsing -> processing substract -> subtract Transfered -> Transferred upto -> up to Also add several of them to the 'common typos' check in patcheck. Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
* lavu/log: do not assume AVClass.item_name is always setAnton Khirnov2023-11-09
|
* avutil/hwcontext_vulkan: get VkFormatFeatureFlagBits2Víctor Manuel Jáquez Leal2023-11-09
| | | | | | Rather than the VkFormatFeatureFlagBits enum Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
* avutil/hwcontext_vulkan: fix run on macOSZhao Zhili2023-11-09
| | | | | | | | VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME is required on macOS, and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag should be set. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil: bump minor version after recent commitsJames Almer2023-11-08
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 9.1.4 channel layoutJames Almer2023-11-08
| | | | | | | Mapping to ITU-R BS.2051-3 "Sound System G" and ITU-R BS.1196-8 "Channel Configuration 20". Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 7.2.3 channel layoutJames Almer2023-11-08
| | | | | | | Mapping to ITU-R BS.2051-3 "Sound System F" and ITU-R BS.1196-8 "Channel Configuration 15". Signed-off-by: James Almer <jamrial@gmail.com>
* x86inc: Add REPX macro to repeat instructions/operationsHenrik Gramner2023-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When operating on large blocks of data it's common to repeatedly use an instruction on multiple registers. Using the REPX macro makes it easy to quickly write dense code to achieve this without having to explicitly duplicate the same instruction over and over. For example, REPX {paddw x, m4}, m0, m1, m2, m3 REPX {mova [r0+16*x], m5}, 0, 1, 2, 3 will expand to paddw m0, m4 paddw m1, m4 paddw m2, m4 paddw m3, m4 mova [r0+16*0], m5 mova [r0+16*1], m5 mova [r0+16*2], m5 mova [r0+16*3], m5 Commit taken from x264: https://code.videolan.org/videolan/x264/-/commit/6d10612ab0007f8f60dd2399182efd696da3ffe4 Signed-off-by: Frank Plowman <post@frankplowman.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/x86/pixelutils: Empty MMX state in ff_pixelutils_sad_8x8_mmxextAndreas Rheinhardt2023-11-04
| | | | | | | | | | | | | | | | | | | | | | | | We currently mostly do not empty the MMX state in our MMX DSP functions; instead we only do so before code that might be using x87 code. This is a violation of the System V i386 ABI (and maybe of other ABIs, too): "The CPU shall be in x87 mode upon entry to a function. Therefore, every function that uses the MMX registers is required to issue an emms or femms instruction after using MMX registers, before returning or calling another function." (See 2.2.1 in [1]) This patch does not intend to change all these functions to abide by the ABI; it only does so for ff_pixelutils_sad_8x8_mmxext, as this function can by called by external users, because it is exported via the pixelutils API. Without this, the following fragment will assert (on x86/x64): uint8_t src1[8 * 8], src2[8 * 8]; av_pixelutils_sad_fn fn = av_pixelutils_get_sad_fn(3, 3, 0, NULL); fn(src1, 8, src2, 8); av_assert0_fpu(); [1]: https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/intel386-psABI-1.1.pdf Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavutil/log.c: only include valgrind header when used.Reimar Döffinger2023-11-02
| | | | | | | | This is cleaner, but it is also a workaround for when the header exists, but cannot be compiled. This will happen when the compiler has no inline asm support. Possibly the configure check should be improved as well.
* libavutil/aarch64/cpu.c: HWCAPS requires inline asm support.Reimar Döffinger2023-11-02
| | | | | Fixes compilation with tcc, which does not have aarch64 inline asm support.
* avutil/pixdesc: simplify xyz pixfmt checkNiklas Haas2023-10-31
|
* avutil/pixdesc: add AV_PIX_FMT_FLAG_XYZNiklas Haas2023-10-31
| | | | | | | | | There are already several places in the codebase that match desc->name against "xyz", and many downstream clients replicate this behavior. I have no idea why this is not just a flag. Motivated by my desire to add yet another check for XYZ to the codebase, and I'd rather not keep copy/pasting a string comparison hack.
* aarch64: Simplify the linux runtime cpu detection codeMartin Storsjö2023-10-31
| | | | | | | Skip doing the whole getauxval(AT_HWCAP) if HWCAP_CPUID isn't defined. Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/video_enc_params: fix doxy for av_video_enc_params_block()James Almer2023-10-30
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/riscv: fix typoRémi Denis-Courmont2023-10-29
|
* Bump versions after 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump versions prior to 6.1Michael Niedermayer2023-10-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/hwcontext_vaapi: return ENOSYS for unsupported operationZhao Zhili2023-10-29
| | | | | | | | av_hwframe_transfer_data try with src_ctx first. If the operation failed with AVERROR(ENOSYS), it will try again with dst_ctx. Return AVERROR(EINVAL) makes the second step being skipped. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/hwcontext_vulkan: cuda doesn't belong to valid_sw_formatsZhao Zhili2023-10-29
| | | | | | Move it to transfer_get_formats. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avutil/hwcontext_vulkan: fix memleak when device_create is skippedZhao Zhili2023-10-29
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* vulkan: return VK_NOT_READY when no queries are availableLynne2023-10-28
| | | | | | | | | Fixes a validation issue. The issue is that the function gets called before we've sumitted a frame for decoding to that context. However, we cannot run queries before they've been reset, which happens at submission time. As we'd need to otherwise run a command queue at init-time, just check if submissions have happened.
* avutil/channel_layout: simplify 22.2 layout bitmask defineJames Almer2023-10-28
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tx_template: fix integer ovberflwo in fft3()Michael Niedermayer2023-10-27
| | | | | | | | | Fixes: signed integer overflow: -1028966111 + -1314089526 cannot be represented in type 'int' Fixes: 63174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5853273711837184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: bump minor version after recent commitsJames Almer2023-10-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 3.1.2 channel layoutJames Almer2023-10-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 7.1.4 channel layoutWill Wolcott2023-10-27
| | | | | | | | Mapping to ITU-R BS.2051-3 "Sound System J" and ITU-R BS.1196-8 "Channel Configuration 19". Signed-off-by: Will Wolcott <wwolcott@netflix.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 7.1.2 channel layoutJames Almer2023-10-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add a 5.1.4 channel layoutJames Almer2023-10-27
| | | | | | | Mapping to ITU-R BS.2051-3 "Sound System D" and ITU-R BS.1196-8 "Channel Configuration 16". Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: rename 7.1(top) channel layout to 5.1.2James Almer2023-10-27
| | | | | | | | | | This layout maps to ITU-R BS.2051-3 "Sound System C" and ITU-R BS.1196-8 "Channel Configuration 14", and it being the first layout with top layer channels, it's best to use a different scheme to properly convey the presence and amount of said channels. The new name will also be a better fit for the additions in the following commits. Signed-off-by: James Almer <jamrial@gmail.com>
* aarch64: Only enable extensions in the intended files/regionsMartin Storsjö2023-10-24
| | | | | | | | This eases actual development of the assembly functions, by only allowing extension instructions within the sections that explicitly enable them, instead of having all extensions enabled everywhere. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Stop using asm/hwcap.h for the HWCAP_* detectionMartin Storsjö2023-10-24
| | | | | | | Including sys/auxv.h should be enough (it pulls in bits/hwcap.h, which provides the same defines). Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext_vulkan: improve queue family init codeLynne2023-10-24
| | | | | | | | When users zero-init'd the struct, or left it as-is, the encode queue family matched the graphics queue family, which led it to be incorrectly logged as being used for encode. This just improves the logging so this isn't printed anymore.
* aarch64: Manually tweak vertical alignment/indentation in tx_float_neon.SMartin Storsjö2023-10-21
| | | | | | | | | | | Favour left aligned columns over right aligned columns. In principle either style should be ok, but some of the cases easily lead to incorrect indentation in the surrounding code (see a couple of cases fixed up in the preceding patch), and show up in automatic indentation correction attempts. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Make the indentation more consistentMartin Storsjö2023-10-21
| | | | | | | | | | | Some functions have slightly different indentation styles; try to match the surrounding code. libavcodec/aarch64/vc1dsp_neon.S is skipped here, as it intentionally uses a layered indentation style to visually show how different unrolled/interleaved phases fit together. Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: Consistently use lowercase for vector element specifiersMartin Storsjö2023-10-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libavutil/ppc/cpu.c: check that AT_HWCAP2 is definedSean McGovern2023-10-19
| | | | | | It was not introduced until glibc 2.18. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavu/fixed_dsp: R-V V vector_fmul_windowRémi Denis-Courmont2023-10-09
|
* lavu/fixed_dsp: R-V V vector_fmulRémi Denis-Courmont2023-10-09
| | | | | vector_fmul_fixed_c: 4.0 vector_fmul_fixed_rvv_i64: 0.5
* lavu/fixed_dsp: R-V V vector_fmul_reverseRémi Denis-Courmont2023-10-09
|
* lavu/fixed_dsp: R-V V vector_fmul_addRémi Denis-Courmont2023-10-09
| | | | | vector_fmul_add_fixed_c: 2.2 vector_fmul_add_fixed_rvv_i64: 0.5
* lavu/float_dsp: adjust multipler in R-V V fmul_windowRémi Denis-Courmont2023-10-09
| | | | | | The gather index vector is only used as double-length (due to register pressure), so no need to initialise it for quad-length. Basically this matches the multiplier in the prologue to the the multipler in the loop.