ffmpeg-cvslog
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
November 2025
- 1 participants
- 206 discussions
[ffmpeg] branch master updated. 932a872dbc hwcontext_vulkan: fix VkImageToMemoryCopyEXT.sType
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 932a872dbc1a300a45b085cd0195ce6ab8e0b3fa (commit)
from 17456c553ebefb15e52ff1a11234098d173cda64 (commit)
- Log -----------------------------------------------------------------
commit 932a872dbc1a300a45b085cd0195ce6ab8e0b3fa
Author: Lynne <dev(a)lynne.ee>
AuthorDate: Sun Nov 30 23:10:31 2025 +0100
Commit: Lynne <dev(a)lynne.ee>
CommitDate: Sun Nov 30 23:11:46 2025 +0100
hwcontext_vulkan: fix VkImageToMemoryCopyEXT.sType
It was copy pasted from the upload path.
Somehow, it was missed, despite god knows how many validation layer runs.
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index aac7768033..c3322bafbd 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -4458,7 +4458,7 @@ static int vulkan_transfer_host(AVHWFramesContext *hwfc, AVFrame *hwf,
}
} else {
VkImageToMemoryCopyEXT region_info = {
- .sType = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT,
+ .sType = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT,
.imageSubresource = {
.layerCount = 1,
},
-----------------------------------------------------------------------
Summary of changes:
libavutil/hwcontext_vulkan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 17456c553e tests/checkasm: fix check for 32-bit Windows build
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 17456c553ebefb15e52ff1a11234098d173cda64 (commit)
from 3beaa2d70f99e6ec28c0120385ccd2abc922be25 (commit)
- Log -----------------------------------------------------------------
commit 17456c553ebefb15e52ff1a11234098d173cda64
Author: Kacper Michajłow <kasper93(a)gmail.com>
AuthorDate: Sun Nov 30 07:38:31 2025 +0100
Commit: Kacper Michajłow <kasper93(a)gmail.com>
CommitDate: Sun Nov 30 22:07:39 2025 +0000
tests/checkasm: fix check for 32-bit Windows build
With --disable-asm, ARCH_X86_32 is set to 0, but we still build the
checkasm binary. Update the check so it is config.h agnostic.
Signed-off-by: Kacper Michajłow <kasper93(a)gmail.com>
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index bd33aba263..05f74ca16b 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -44,7 +44,7 @@
#ifdef _WIN32
#include <windows.h>
-#if ARCH_X86_32
+#if defined(__i386__) || defined(_M_IX86)
#include <setjmp.h>
typedef jmp_buf checkasm_context;
#define checkasm_save_context() checkasm_handle_signal(setjmp(checkasm_context_buf))
-----------------------------------------------------------------------
Summary of changes:
tests/checkasm/checkasm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 3beaa2d70f hwcontext_vulkan: remove VK_HOST_IMAGE_COPY_MEMCPY flag
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 3beaa2d70f99e6ec28c0120385ccd2abc922be25 (commit)
from 59d75bf9e46938c694729dabf7db17646f1116ba (commit)
- Log -----------------------------------------------------------------
commit 3beaa2d70f99e6ec28c0120385ccd2abc922be25
Author: Russell Greene <russellgreene8(a)gmail.com>
AuthorDate: Sat Nov 29 12:42:13 2025 -0700
Commit: Lynne <dev(a)lynne.ee>
CommitDate: Sun Nov 30 21:47:12 2025 +0000
hwcontext_vulkan: remove VK_HOST_IMAGE_COPY_MEMCPY flag
Reading the spec for what this flag means, it copies the data verbatim, including any swizzling/tiling, this has two issues
1. the format may not be what ffmpeg expects elsewhere, as it is expecing normal pitch linear host memeory in `swf`
2. the size of the copied data may not match the size of buffer provided, causing heap buffer overflow
It seems like addition of this flag is an oversight as it seems to be for caching/backups of image data, just to be used with copying back to the GPU with the MEMCPY flag, which is *not* how its used in ffmpeg.
Additionally, set memoryRowLength as if it isn't set, it assumes pitch = width_in_bytes, which I don't think is necessarily the case
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index a2caaa0959..aac7768033 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -4440,7 +4440,6 @@ static int vulkan_transfer_host(AVHWFramesContext *hwfc, AVFrame *hwf,
};
VkCopyMemoryToImageInfoEXT copy_info = {
.sType = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT,
- .flags = VK_HOST_IMAGE_COPY_MEMCPY_EXT,
.regionCount = 1,
.pRegions = ®ion_info,
};
@@ -4466,7 +4465,6 @@ static int vulkan_transfer_host(AVHWFramesContext *hwfc, AVFrame *hwf,
};
VkCopyImageToMemoryInfoEXT copy_info = {
.sType = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT,
- .flags = VK_HOST_IMAGE_COPY_MEMCPY_EXT,
.regionCount = 1,
.pRegions = ®ion_info,
};
@@ -4476,6 +4474,7 @@ static int vulkan_transfer_host(AVHWFramesContext *hwfc, AVFrame *hwf,
get_plane_wh(&p_w, &p_h, swf->format, swf->width, swf->height, i);
region_info.pHostPointer = swf->data[i];
+ region_info.memoryRowLength = swf->linesize[i];
region_info.imageSubresource.aspectMask = ff_vk_aspect_flag(hwf, i);
region_info.imageExtent = (VkExtent3D){ p_w, p_h, 1 };
copy_info.srcImage = hwf_vk->img[img_idx];
-----------------------------------------------------------------------
Summary of changes:
libavutil/hwcontext_vulkan.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 59d75bf9e4 avutil/x86/Makefile: Only compile ASM init files when X86ASM is enabled
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 59d75bf9e46938c694729dabf7db17646f1116ba (commit)
via d5a47bf2b30afceff58a624dcc4142c18d70cbf9 (commit)
via 7356981bec3a55e62b6ccc1b82ff036cebb9c108 (commit)
via eccf130fdbcf719566d3ffb5e780d89776b77c23 (commit)
via ba94177242806ddf48e305ac52eee09a337a4a3b (commit)
via 65b4feb782ed5a8ba196d25564720f4f14c076a9 (commit)
from 1d1643b42a62af07fcb77ad6c9992dd41f4e04af (commit)
- Log -----------------------------------------------------------------
commit 59d75bf9e46938c694729dabf7db17646f1116ba
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 21:26:31 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
avutil/x86/Makefile: Only compile ASM init files when X86ASM is enabled
To do so, simply add these init files to X86ASM-OBJS instead of OBJS
in the Makefile. The former is already used for the actual assembly
files, but using them for the C init files just works, because the build
system uses file extensions to derive whether it is a C or a NASM file.
This avoids compiling unused function stubs and also reduces our
reliance on DCE: We don't add %if checks to the asm files except
for AVX, AVX2, FMA3, FMA4, XOP and AVX512, so all the MMX-SSE4
functions will be available. It also allows to remove HAVE_X86ASM checks
in these init files.
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavutil/aes.c b/libavutil/aes.c
index 80f8a2253d..de7144fab8 100644
--- a/libavutil/aes.c
+++ b/libavutil/aes.c
@@ -237,7 +237,7 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt)
a->rounds = rounds;
a->crypt = decrypt ? aes_decrypt : aes_encrypt;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_init_aes_x86(a, decrypt);
#endif
diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 95f0eb2595..74cefdb145 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -165,7 +165,7 @@ AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
#if ARCH_RISCV
ff_fixed_dsp_init_riscv(fdsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_fixed_dsp_init_x86(fdsp);
#endif
diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c
index f38ad565cf..5bfa1008d1 100644
--- a/libavutil/float_dsp.c
+++ b/libavutil/float_dsp.c
@@ -159,7 +159,7 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact)
ff_float_dsp_init_ppc(fdsp, bit_exact);
#elif ARCH_RISCV
ff_float_dsp_init_riscv(fdsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_float_dsp_init_x86(fdsp);
#elif ARCH_MIPS
ff_float_dsp_init_mips(fdsp);
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 7b88738e2d..681482dc08 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -362,7 +362,7 @@ void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize,
{
int ret = -1;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ret = ff_image_copy_plane_uc_from_x86(dst, dst_linesize, src, src_linesize,
bytewidth, height);
#endif
diff --git a/libavutil/lls.c b/libavutil/lls.c
index fe8f55976d..27168009c5 100644
--- a/libavutil/lls.c
+++ b/libavutil/lls.c
@@ -114,7 +114,7 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count)
m->evaluate_lls = evaluate_lls;
#if ARCH_RISCV
ff_init_lls_riscv(m);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_init_lls_x86(m);
#endif
}
diff --git a/libavutil/pixelutils.c b/libavutil/pixelutils.c
index 820889a143..8e91f0a2cc 100644
--- a/libavutil/pixelutils.c
+++ b/libavutil/pixelutils.c
@@ -86,7 +86,7 @@ av_pixelutils_sad_fn av_pixelutils_get_sad_fn(int w_bits, int h_bits, int aligne
if (w_bits != h_bits) // only squared sad for now
return NULL;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_pixelutils_sad_init_x86(sad, aligned);
#endif
diff --git a/libavutil/x86/Makefile b/libavutil/x86/Makefile
index 8cfd646108..4e1b4b1176 100644
--- a/libavutil/x86/Makefile
+++ b/libavutil/x86/Makefile
@@ -1,23 +1,14 @@
-OBJS += x86/aes_init.o \
- x86/cpu.o \
- x86/fixed_dsp_init.o \
- x86/float_dsp_init.o \
- x86/imgutils_init.o \
- x86/lls_init.o \
-
-OBJS-$(HAVE_X86ASM) += x86/tx_float_init.o \
-
-OBJS-$(CONFIG_PIXELUTILS) += x86/pixelutils_init.o \
+OBJS += x86/cpu.o \
EMMS_OBJS_$(HAVE_MMX_INLINE)_$(HAVE_MMX_EXTERNAL)_$(HAVE_MM_EMPTY) = x86/emms.o
-X86ASM-OBJS += x86/aes.o \
- x86/cpuid.o \
- $(EMMS_OBJS__yes_) \
- x86/fixed_dsp.o \
- x86/float_dsp.o \
- x86/imgutils.o \
- x86/lls.o \
- x86/tx_float.o \
+X86ASM-OBJS += x86/aes.o x86/aes_init.o \
+ x86/cpuid.o \
+ $(EMMS_OBJS__yes_) \
+ x86/fixed_dsp.o x86/fixed_dsp_init.o \
+ x86/float_dsp.o x86/float_dsp_init.o \
+ x86/imgutils.o x86/imgutils_init.o \
+ x86/lls.o x86/lls_init.o \
+ x86/tx_float.o x86/tx_float_init.o \
-X86ASM-OBJS-$(CONFIG_PIXELUTILS) += x86/pixelutils.o \
+X86ASM-OBJS-$(CONFIG_PIXELUTILS) += x86/pixelutils.o x86/pixelutils_init.o
commit d5a47bf2b30afceff58a624dcc4142c18d70cbf9
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 21:04:33 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
swresample/x86/Makefile: Only compile ASM init files when X86ASM is enabled
To do so, simply add these init files to X86ASM-OBJS instead of OBJS
in the Makefile. The former is already used for the actual assembly
files, but using them for the C init files just works, because the build
system uses file extensions to derive whether it is a C or a NASM file.
This avoids compiling unused function stubs and also reduces our
reliance on DCE: We don't add %if checks to the asm files except
for AVX, AVX2, FMA3, FMA4, XOP and AVX512, so all the MMX-SSE4
functions will be available. It also allows to remove HAVE_X86ASM checks
in these init files.
(x86/ops.c has already been put in X86ASM-OBJS.)
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libswresample/resample_dsp.c b/libswresample/resample_dsp.c
index 611f44373f..96f567fe32 100644
--- a/libswresample/resample_dsp.c
+++ b/libswresample/resample_dsp.c
@@ -68,7 +68,7 @@ void swri_resample_dsp_init(ResampleContext *c)
break;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
swri_resample_dsp_x86_init(c);
#elif ARCH_ARM
swri_resample_dsp_arm_init(c);
diff --git a/libswresample/x86/Makefile b/libswresample/x86/Makefile
index fa0641f03f..c0655bb8a8 100644
--- a/libswresample/x86/Makefile
+++ b/libswresample/x86/Makefile
@@ -1,9 +1,8 @@
-X86ASM-OBJS += x86/audio_convert.o\
- x86/rematrix.o\
- x86/resample.o\
-
-OBJS += x86/audio_convert_init.o\
- x86/rematrix_init.o\
- x86/resample_init.o\
+X86ASM-OBJS += x86/audio_convert.o \
+ x86/audio_convert_init.o \
+ x86/rematrix.o \
+ x86/rematrix_init.o \
+ x86/resample.o \
+ x86/resample_init.o \
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
diff --git a/libswresample/x86/rematrix_init.c b/libswresample/x86/rematrix_init.c
index 89ec362d62..88f27f5e93 100644
--- a/libswresample/x86/rematrix_init.c
+++ b/libswresample/x86/rematrix_init.c
@@ -32,7 +32,6 @@ D(float, avx)
D(int16, sse2)
av_cold int swri_rematrix_init_x86(struct SwrContext *s){
-#if HAVE_X86ASM
int mm_flags = av_get_cpu_flags();
int nb_in = s->used_ch_layout.nb_channels;
int nb_out = s->out.ch_count;
@@ -79,7 +78,6 @@ av_cold int swri_rematrix_init_x86(struct SwrContext *s){
memcpy(s->native_simd_matrix, s->native_matrix, num * sizeof(float));
s->native_simd_one.f = s->native_one.f;
}
-#endif
return 0;
}
commit 7356981bec3a55e62b6ccc1b82ff036cebb9c108
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 20:51:13 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
avfilter/x86/Makefile: Only compile ASM init files when X86ASM is enabled
To do so, simply add these init files to X86ASM-OBJS instead of OBJS
in the Makefile. The former is already used for the actual assembly
files, but using them for the C init files just works, because the build
system uses file extensions to derive whether it is a C or a NASM file.
This avoids compiling unused function stubs and also reduces our
reliance on DCE: We don't add %if checks to the asm files except
for AVX, AVX2, FMA3, FMA4, XOP and AVX512, so all the MMX-SSE4
functions will be available. It also allows to remove HAVE_X86ASM checks
in these init files.
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavfilter/af_afirdsp.h b/libavfilter/af_afirdsp.h
index ac68447323..4ca859dfd2 100644
--- a/libavfilter/af_afirdsp.h
+++ b/libavfilter/af_afirdsp.h
@@ -77,7 +77,7 @@ av_unused static void ff_afir_init(AudioFIRDSPContext *dsp)
#if ARCH_RISCV
ff_afir_init_riscv(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_afir_init_x86(dsp);
#endif
}
diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c
index b1944fb2d7..ce91eb1cfd 100644
--- a/libavfilter/af_anlmdn.c
+++ b/libavfilter/af_anlmdn.c
@@ -116,7 +116,7 @@ void ff_anlmdn_init(AudioNLMDNDSPContext *dsp)
dsp->compute_distance_ssd = compute_distance_ssd_c;
dsp->compute_cache = compute_cache_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_anlmdn_init_x86(dsp);
#endif
}
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index 471bffeceb..603b92f4af 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -236,7 +236,7 @@ static av_cold void volume_init(VolumeContext *vol)
break;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_volume_init_x86(vol);
#endif
}
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index abfae1f8fb..428e8bff65 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -1415,7 +1415,7 @@ static int config_output(AVFilterLink *outlink)
s->update_sono = update_sono_yuv;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_showcqt_init_x86(s);
#endif
diff --git a/libavfilter/bwdifdsp.c b/libavfilter/bwdifdsp.c
index e87fe414e0..58e18f0a92 100644
--- a/libavfilter/bwdifdsp.c
+++ b/libavfilter/bwdifdsp.c
@@ -218,7 +218,7 @@ av_cold void ff_bwdif_init_filter_line(BWDIFDSPContext *s, int bit_depth)
s->filter_edge = ff_bwdif_filter_edge_c;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_bwdif_init_x86(s, bit_depth);
#elif ARCH_AARCH64
ff_bwdif_init_aarch64(s, bit_depth);
diff --git a/libavfilter/colorspacedsp.c b/libavfilter/colorspacedsp.c
index 72207ffaf3..9c51385ded 100644
--- a/libavfilter/colorspacedsp.c
+++ b/libavfilter/colorspacedsp.c
@@ -143,7 +143,7 @@ void ff_colorspacedsp_init(ColorSpaceDSPContext *dsp)
dsp->multiply3x3 = multiply3x3_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_colorspacedsp_x86_init(dsp);
#endif
}
diff --git a/libavfilter/convolution.h b/libavfilter/convolution.h
index 1196c1fcdf..f88b708fab 100644
--- a/libavfilter/convolution.h
+++ b/libavfilter/convolution.h
@@ -132,7 +132,7 @@ static inline void ff_sobel_init(ConvolutionContext *s, int depth, int nb_planes
if (s->depth > 8)
for (int i = 0; i < 4; i++)
s->filter[i] = filter16_sobel;
-#if ARCH_X86_64
+#if ARCH_X86_64 && HAVE_X86ASM
ff_sobel_init_x86(s, depth, nb_planes);
#endif
}
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 84d8e44035..fa6f1375a3 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -502,7 +502,7 @@ static int config_audio_output(AVFilterLink *outlink)
return AVERROR(ENOMEM);
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_ebur128_init_x86(&ebur128->dsp, nb_channels);
#endif
return 0;
diff --git a/libavfilter/psnr.c b/libavfilter/psnr.c
index a6b7f5969c..89a205f5cf 100644
--- a/libavfilter/psnr.c
+++ b/libavfilter/psnr.c
@@ -58,7 +58,7 @@ static uint64_t sse_line_16bit(const uint8_t *_main_line, const uint8_t *_ref_li
void ff_psnr_init(PSNRDSPContext *dsp, int bpp)
{
dsp->sse_line = bpp > 8 ? sse_line_16bit : sse_line_8bit;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_psnr_init_x86(dsp, bpp);
#endif
}
diff --git a/libavfilter/scene_sad.c b/libavfilter/scene_sad.c
index 05dd97e055..56177ced76 100644
--- a/libavfilter/scene_sad.c
+++ b/libavfilter/scene_sad.c
@@ -59,7 +59,7 @@ void ff_scene_sad_c(SCENE_SAD_PARAMS)
ff_scene_sad_fn ff_scene_sad_get_fn(int depth)
{
ff_scene_sad_fn sad = NULL;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
sad = ff_scene_sad_get_fn_x86(depth);
#endif
if (!sad) {
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index cdebdb7f14..f443d34de8 100644
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -426,7 +426,7 @@ static int config_input(AVFilterLink *inlink)
}
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_atadenoise_init_x86(&s->dsp, depth, s->algorithm, s->sigma);
#endif
diff --git a/libavfilter/vf_blackdetect.h b/libavfilter/vf_blackdetect.h
index 48350568a9..e51beda3a4 100644
--- a/libavfilter/vf_blackdetect.h
+++ b/libavfilter/vf_blackdetect.h
@@ -61,7 +61,7 @@ static unsigned count_pixels16_c(const uint8_t *src, ptrdiff_t stride,
static inline ff_blackdetect_fn ff_blackdetect_get_fn(int depth)
{
ff_blackdetect_fn fn = NULL;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
fn = ff_blackdetect_get_fn_x86(depth);
#endif
diff --git a/libavfilter/vf_blend_init.h b/libavfilter/vf_blend_init.h
index 297ca0514f..4ee0b94ba5 100644
--- a/libavfilter/vf_blend_init.h
+++ b/libavfilter/vf_blend_init.h
@@ -190,7 +190,7 @@ av_unused static void ff_blend_init(FilterParams *param, int depth)
param->blend = depth > 8 ? depth > 16 ? blend_copybottom_32 : blend_copybottom_16 : blend_copybottom_8;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_blend_init_x86(param, depth);
#endif
}
diff --git a/libavfilter/vf_colordetectdsp.h b/libavfilter/vf_colordetectdsp.h
index 7a57e7aa73..ca4727b589 100644
--- a/libavfilter/vf_colordetectdsp.h
+++ b/libavfilter/vf_colordetectdsp.h
@@ -208,7 +208,7 @@ ff_color_detect_dsp_init(FFColorDetectDSPContext *dsp, int depth,
#if ARCH_AARCH64
ff_color_detect_dsp_init_aarch64(dsp, depth, color_range);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_color_detect_dsp_init_x86(dsp, depth, color_range);
#endif
}
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index 1f4efea9aa..ce42df2cde 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -800,7 +800,7 @@ static int param_init(AVFilterContext *ctx)
s->filter[p] = filter16_7x7;
}
}
-#if CONFIG_CONVOLUTION_FILTER && ARCH_X86_64
+#if CONFIG_CONVOLUTION_FILTER && ARCH_X86_64 && HAVE_X86ASM
ff_convolution_init_x86(s);
#endif
} else if (!strcmp(ctx->filter->name, "prewitt")) {
diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h
index 156f6c61fe..ab5e98e83f 100644
--- a/libavfilter/vf_eq.h
+++ b/libavfilter/vf_eq.h
@@ -121,7 +121,7 @@ void ff_eq_init_x86(EQContext *eq);
av_unused static void ff_eq_init(EQContext *eq)
{
eq->process = process_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_eq_init_x86(eq);
#endif
}
diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index a6598f97bb..468042e7db 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -262,7 +262,7 @@ void ff_framerate_init(FrameRateContext *s)
s->blend_factor_max = 1 << BLEND_FACTOR_DEPTH(16);
s->blend = blend_frames16_c;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_framerate_init_x86(s);
#endif
}
diff --git a/libavfilter/vf_fsppdsp.h b/libavfilter/vf_fsppdsp.h
index 5a2f1af030..7ba8485b4b 100644
--- a/libavfilter/vf_fsppdsp.h
+++ b/libavfilter/vf_fsppdsp.h
@@ -81,7 +81,7 @@ static inline void ff_fsppdsp_init(FSPPDSPContext *fspp)
fspp->row_idct = ff_row_idct_c;
fspp->row_fdct = ff_row_fdct_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_fsppdsp_init_x86(fspp);
#endif
}
diff --git a/libavfilter/vf_gblur_init.h b/libavfilter/vf_gblur_init.h
index 67ca46f95e..1289239778 100644
--- a/libavfilter/vf_gblur_init.h
+++ b/libavfilter/vf_gblur_init.h
@@ -115,7 +115,7 @@ av_unused static void ff_gblur_init(GBlurContext *s)
s->horiz_slice = horiz_slice_c;
s->verti_slice = verti_slice_c;
s->postscale_slice = postscale_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_gblur_init_x86(s);
#endif
}
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 4f211c3ddf..c33650576a 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -130,7 +130,7 @@ static av_cold int init(AVFilterContext *ctx)
s->blur_line = ff_gradfun_blur_line_c;
s->filter_line = ff_gradfun_filter_line_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_gradfun_init_x86(s);
#endif
diff --git a/libavfilter/vf_hflip_init.h b/libavfilter/vf_hflip_init.h
index 0f5b0607c2..97cde15b2f 100644
--- a/libavfilter/vf_hflip_init.h
+++ b/libavfilter/vf_hflip_init.h
@@ -102,7 +102,7 @@ av_unused static int ff_hflip_init(FlipContext *s, int step[4], int nb_planes)
return AVERROR_BUG;
}
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_hflip_init_x86(s, step, nb_planes);
#endif
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 1136931b9b..f79ef04cd3 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -279,7 +279,7 @@ static int config_input(AVFilterLink *inlink)
calc_coefs(ctx);
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_hqdn3d_init_x86(s);
#endif
diff --git a/libavfilter/vf_idetdsp.c b/libavfilter/vf_idetdsp.c
index 68a2a267d4..d7c271df20 100644
--- a/libavfilter/vf_idetdsp.c
+++ b/libavfilter/vf_idetdsp.c
@@ -56,7 +56,7 @@ int ff_idet_filter_line_c_16bit(const uint8_t *a, const uint8_t *b, const uint8_
void av_cold ff_idet_dsp_init(IDETDSPContext *dsp, int depth)
{
dsp->filter_line = depth > 8 ? ff_idet_filter_line_c_16bit : ff_idet_filter_line_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_idet_dsp_init_x86(dsp, depth);
#endif
}
diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c
index 61f6c9e1bf..4f50ace386 100644
--- a/libavfilter/vf_limiter.c
+++ b/libavfilter/vf_limiter.c
@@ -140,7 +140,7 @@ static int config_input(AVFilterLink *inlink)
s->dsp.limiter = limiter16;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_limiter_init_x86(&s->dsp, desc->comp[0].depth);
#endif
diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
index 46afe36f6c..4ed609d810 100644
--- a/libavfilter/vf_lut3d.c
+++ b/libavfilter/vf_lut3d.c
@@ -1152,7 +1152,7 @@ static int config_input(AVFilterLink *inlink)
av_assert0(0);
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_lut3d_init_x86(lut3d, desc);
#endif
diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c
index 39bd596827..606afd3913 100644
--- a/libavfilter/vf_maskedclamp.c
+++ b/libavfilter/vf_maskedclamp.c
@@ -208,7 +208,7 @@ static int config_input(AVFilterLink *inlink)
else
s->dsp.maskedclamp = maskedclamp16;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_maskedclamp_init_x86(&s->dsp, s->depth);
#endif
diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c
index 93da0a0edf..18b960034e 100644
--- a/libavfilter/vf_maskedmerge.c
+++ b/libavfilter/vf_maskedmerge.c
@@ -201,7 +201,7 @@ static int config_input(AVFilterLink *inlink)
else
s->maskedmerge = maskedmerge32;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_maskedmerge_init_x86(s);
#endif
diff --git a/libavfilter/vf_nlmeans_init.h b/libavfilter/vf_nlmeans_init.h
index 3a533a078a..cf31e74bd7 100644
--- a/libavfilter/vf_nlmeans_init.h
+++ b/libavfilter/vf_nlmeans_init.h
@@ -131,7 +131,7 @@ av_unused static void ff_nlmeans_init(NLMeansDSPContext *dsp)
#if ARCH_AARCH64
ff_nlmeans_init_aarch64(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_nlmeans_init_x86(dsp);
#endif
}
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 673c92d6af..9149d061b9 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -835,7 +835,7 @@ static int init_slice_fn(AVFilterContext *ctx)
break;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_overlay_init_x86(ctx);
#endif
diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c
index e7aae87df0..7b653b977f 100644
--- a/libavfilter/vf_pp7.c
+++ b/libavfilter/vf_pp7.c
@@ -305,7 +305,7 @@ static int config_input(AVFilterLink *inlink)
pp7->dctB = dctB_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_pp7_init_x86(pp7);
#endif
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index d963840fe9..04acbadc4e 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -207,7 +207,7 @@ static int config_input(AVFilterLink *inlink)
s->comb = comb_c;
s->var = var_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_pullup_init_x86(s);
#endif
return 0;
diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c
index 3209c7db86..0a0c60fb20 100644
--- a/libavfilter/vf_removegrain.c
+++ b/libavfilter/vf_removegrain.c
@@ -500,7 +500,7 @@ static int config_input(AVFilterLink *inlink)
}
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM && CONFIG_GPL
ff_removegrain_init_x86(s);
#endif
diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 15c71cf6b9..dfb91e8da5 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -481,7 +481,7 @@ static int config_input_ref(AVFilterLink *inlink)
s->ssim_plane = desc->comp[0].depth > 8 ? ssim_plane_16bit : ssim_plane;
s->dsp.ssim_4x4_line = ssim_4x4xn_8bit;
s->dsp.ssim_end_line = ssim_endn_8bit;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_ssim_init_x86(&s->dsp);
#endif
diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index 8e1fdc5eb3..d5d4cc1702 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -595,7 +595,7 @@ static int config_output(AVFilterLink *outlink)
s->vsub = desc->log2_chroma_h;
s->dsp.anaglyph = anaglyph;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_stereo3d_init_x86(&s->dsp);
#endif
diff --git a/libavfilter/vf_threshold_init.h b/libavfilter/vf_threshold_init.h
index 3add7b495e..fb319c6cf8 100644
--- a/libavfilter/vf_threshold_init.h
+++ b/libavfilter/vf_threshold_init.h
@@ -84,7 +84,7 @@ av_unused static void ff_threshold_init(ThresholdContext *s)
s->bpc = 2;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_threshold_init_x86(s);
#endif
}
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 7d5217c364..59fe82abe3 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -286,7 +286,7 @@ static int config_out_props(AVFilterLink *outlink)
tinterlace->lowpass_line = lowpass_line_complex_c_16;
else
tinterlace->lowpass_line = lowpass_line_complex_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_tinterlace_init_x86(tinterlace);
#endif
} else if (tinterlace->flags & TINTERLACE_FLAG_VLPF) {
@@ -294,7 +294,7 @@ static int config_out_props(AVFilterLink *outlink)
tinterlace->lowpass_line = lowpass_line_c_16;
else
tinterlace->lowpass_line = lowpass_line_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_tinterlace_init_x86(tinterlace);
#endif
}
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index 88cc008f69..c457b01a4e 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -237,7 +237,7 @@ static int config_props_output(AVFilterLink *outlink)
}
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
for (int i = 0; i < 4; i++) {
TransVtable *v = &s->vtables[i];
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 63412aef87..1cfe408887 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -394,7 +394,7 @@ void ff_v360_init(V360Context *s, int depth)
break;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_v360_init_x86(s, depth);
#endif
}
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index 5b4c83bbd9..afde426f1a 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -317,7 +317,7 @@ static int config_input(AVFilterLink *inlink)
s->dsp.filter_scale = filter16_scale;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_w3fdif_init_x86(&s->dsp, depth);
#endif
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 6e0e500886..9e4f8d5b43 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -289,7 +289,7 @@ static int config_output(AVFilterLink *outlink)
s->filter_edges = filter_edges;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_yadif_init_x86(s);
#endif
diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile
index b485c10fbe..ade0efc9ae 100644
--- a/libavfilter/x86/Makefile
+++ b/libavfilter/x86/Makefile
@@ -1,95 +1,72 @@
-OBJS-$(CONFIG_SCENE_SAD) += x86/scene_sad_init.o
-
-OBJS-$(CONFIG_AFIR_FILTER) += x86/af_afir_init.o
-OBJS-$(CONFIG_ANLMDN_FILTER) += x86/af_anlmdn_init.o
-OBJS-$(CONFIG_ATADENOISE_FILTER) += x86/vf_atadenoise_init.o
-OBJS-$(CONFIG_BLACKDETECT_FILTER) += x86/vf_blackdetect_init.o
-OBJS-$(CONFIG_BLEND_FILTER) += x86/vf_blend_init.o
-OBJS-$(CONFIG_BWDIF_FILTER) += x86/vf_bwdif_init.o
-OBJS-$(CONFIG_COLORDETECT_FILTER) += x86/vf_colordetect_init.o
-OBJS-$(CONFIG_COLORSPACE_FILTER) += x86/colorspacedsp_init.o
-OBJS-$(CONFIG_CONVOLUTION_FILTER) += x86/vf_convolution_init.o
-OBJS-$(CONFIG_EBUR128_FILTER) += x86/f_ebur128_init.o
-OBJS-$(CONFIG_EQ_FILTER) += x86/vf_eq_init.o
-OBJS-$(CONFIG_FSPP_FILTER) += x86/vf_fspp_init.o
-OBJS-$(CONFIG_GBLUR_FILTER) += x86/vf_gblur_init.o
-OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun_init.o
-OBJS-$(CONFIG_FRAMERATE_FILTER) += x86/vf_framerate_init.o
-OBJS-$(CONFIG_HALDCLUT_FILTER) += x86/vf_lut3d_init.o
-OBJS-$(CONFIG_HFLIP_FILTER) += x86/vf_hflip_init.o
-OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d_init.o
-OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idetdsp_init.o
-OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_tinterlace_init.o
-OBJS-$(CONFIG_LIMITER_FILTER) += x86/vf_limiter_init.o
-OBJS-$(CONFIG_LUT3D_FILTER) += x86/vf_lut3d_init.o
-OBJS-$(CONFIG_MASKEDCLAMP_FILTER) += x86/vf_maskedclamp_init.o
-OBJS-$(CONFIG_MASKEDMERGE_FILTER) += x86/vf_maskedmerge_init.o
-OBJS-$(CONFIG_NLMEANS_FILTER) += x86/vf_nlmeans_init.o
OBJS-$(CONFIG_NOISE_FILTER) += x86/vf_noise.o
-OBJS-$(CONFIG_OVERLAY_FILTER) += x86/vf_overlay_init.o
-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7_init.o
-OBJS-$(CONFIG_PSNR_FILTER) += x86/vf_psnr_init.o
-OBJS-$(CONFIG_PULLUP_FILTER) += x86/vf_pullup_init.o
-OBJS-$(CONFIG_REMOVEGRAIN_FILTER) += x86/vf_removegrain_init.o
-OBJS-$(CONFIG_SHOWCQT_FILTER) += x86/avf_showcqt_init.o
-OBJS-$(CONFIG_SOBEL_FILTER) += x86/vf_convolution_init.o
OBJS-$(CONFIG_SPP_FILTER) += x86/vf_spp.o
-OBJS-$(CONFIG_SSIM_FILTER) += x86/vf_ssim_init.o
-OBJS-$(CONFIG_STEREO3D_FILTER) += x86/vf_stereo3d_init.o
-OBJS-$(CONFIG_TBLEND_FILTER) += x86/vf_blend_init.o
-OBJS-$(CONFIG_THRESHOLD_FILTER) += x86/vf_threshold_init.o
-OBJS-$(CONFIG_TINTERLACE_FILTER) += x86/vf_tinterlace_init.o
-OBJS-$(CONFIG_TRANSPOSE_FILTER) += x86/vf_transpose_init.o
-OBJS-$(CONFIG_VOLUME_FILTER) += x86/af_volume_init.o
-OBJS-$(CONFIG_V360_FILTER) += x86/vf_v360_init.o
-OBJS-$(CONFIG_W3FDIF_FILTER) += x86/vf_w3fdif_init.o
-OBJS-$(CONFIG_XPSNR_FILTER) += x86/vf_psnr_init.o
-OBJS-$(CONFIG_YADIF_FILTER) += x86/vf_yadif_init.o
-X86ASM-OBJS-$(CONFIG_SCENE_SAD) += x86/scene_sad.o
+X86ASM-OBJS-$(CONFIG_SCENE_SAD) += x86/scene_sad.o x86/scene_sad_init.o
-X86ASM-OBJS-$(CONFIG_AFIR_FILTER) += x86/af_afir.o
-X86ASM-OBJS-$(CONFIG_ANLMDN_FILTER) += x86/af_anlmdn.o
-X86ASM-OBJS-$(CONFIG_ATADENOISE_FILTER) += x86/vf_atadenoise.o
-X86ASM-OBJS-$(CONFIG_BLACKDETECT_FILTER) += x86/vf_blackdetect.o
-X86ASM-OBJS-$(CONFIG_BLEND_FILTER) += x86/vf_blend.o
-X86ASM-OBJS-$(CONFIG_BWDIF_FILTER) += x86/vf_bwdif.o
-X86ASM-OBJS-$(CONFIG_COLORDETECT_FILTER) += x86/vf_colordetect.o
-X86ASM-OBJS-$(CONFIG_COLORSPACE_FILTER) += x86/colorspacedsp.o
-X86ASM-OBJS-$(CONFIG_CONVOLUTION_FILTER) += x86/vf_convolution.o
-X86ASM-OBJS-$(CONFIG_EBUR128_FILTER) += x86/f_ebur128.o
-X86ASM-OBJS-$(CONFIG_EQ_FILTER) += x86/vf_eq.o
-X86ASM-OBJS-$(CONFIG_FRAMERATE_FILTER) += x86/vf_framerate.o
-X86ASM-OBJS-$(CONFIG_FSPP_FILTER) += x86/vf_fspp.o
-X86ASM-OBJS-$(CONFIG_GBLUR_FILTER) += x86/vf_gblur.o
-X86ASM-OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun.o
-X86ASM-OBJS-$(CONFIG_HALDCLUT_FILTER) += x86/vf_lut3d.o
-X86ASM-OBJS-$(CONFIG_HFLIP_FILTER) += x86/vf_hflip.o
-X86ASM-OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d.o
-X86ASM-OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idetdsp.o
-X86ASM-OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_interlace.o
-X86ASM-OBJS-$(CONFIG_LIMITER_FILTER) += x86/vf_limiter.o
-X86ASM-OBJS-$(CONFIG_LUT3D_FILTER) += x86/vf_lut3d.o
-X86ASM-OBJS-$(CONFIG_MASKEDCLAMP_FILTER) += x86/vf_maskedclamp.o
-X86ASM-OBJS-$(CONFIG_MASKEDMERGE_FILTER) += x86/vf_maskedmerge.o
-X86ASM-OBJS-$(CONFIG_NLMEANS_FILTER) += x86/vf_nlmeans.o
-X86ASM-OBJS-$(CONFIG_OVERLAY_FILTER) += x86/vf_overlay.o
-X86ASM-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7.o
-X86ASM-OBJS-$(CONFIG_PSNR_FILTER) += x86/vf_psnr.o
-X86ASM-OBJS-$(CONFIG_PULLUP_FILTER) += x86/vf_pullup.o
+X86ASM-OBJS-$(CONFIG_AFIR_FILTER) += x86/af_afir.o x86/af_afir_init.o
+X86ASM-OBJS-$(CONFIG_ANLMDN_FILTER) += x86/af_anlmdn.o x86/af_anlmdn_init.o
+X86ASM-OBJS-$(CONFIG_ATADENOISE_FILTER) += x86/vf_atadenoise.o \
+ x86/vf_atadenoise_init.o
+X86ASM-OBJS-$(CONFIG_BLACKDETECT_FILTER) += x86/vf_blackdetect.o \
+ x86/vf_blackdetect_init.o
+X86ASM-OBJS-$(CONFIG_BLEND_FILTER) += x86/vf_blend.o x86/vf_blend_init.o
+X86ASM-OBJS-$(CONFIG_BWDIF_FILTER) += x86/vf_bwdif.o x86/vf_bwdif_init.o
+X86ASM-OBJS-$(CONFIG_COLORDETECT_FILTER) += x86/vf_colordetect.o \
+ x86/vf_colordetect_init.o
+X86ASM-OBJS-$(CONFIG_COLORSPACE_FILTER) += x86/colorspacedsp.o \
+ x86/colorspacedsp_init.o
+X86ASM-OBJS-$(CONFIG_CONVOLUTION_FILTER) += x86/vf_convolution.o \
+ x86/vf_convolution_init.o
+X86ASM-OBJS-$(CONFIG_EBUR128_FILTER) += x86/f_ebur128.o x86/f_ebur128_init.o
+X86ASM-OBJS-$(CONFIG_EQ_FILTER) += x86/vf_eq.o x86/vf_eq_init.o
+X86ASM-OBJS-$(CONFIG_FRAMERATE_FILTER) += x86/vf_framerate.o \
+ x86/vf_framerate_init.o
+X86ASM-OBJS-$(CONFIG_FSPP_FILTER) += x86/vf_fspp.o x86/vf_fspp_init.o
+X86ASM-OBJS-$(CONFIG_GBLUR_FILTER) += x86/vf_gblur.o x86/vf_gblur_init.o
+X86ASM-OBJS-$(CONFIG_GRADFUN_FILTER) += x86/vf_gradfun.o \
+ x86/vf_gradfun_init.o
+X86ASM-OBJS-$(CONFIG_HALDCLUT_FILTER) += x86/vf_lut3d.o x86/vf_lut3d_init.o
+X86ASM-OBJS-$(CONFIG_HFLIP_FILTER) += x86/vf_hflip.o x86/vf_hflip_init.o
+X86ASM-OBJS-$(CONFIG_HQDN3D_FILTER) += x86/vf_hqdn3d.o x86/vf_hqdn3d_init.o
+X86ASM-OBJS-$(CONFIG_IDET_FILTER) += x86/vf_idetdsp.o \
+ x86/vf_idetdsp_init.o
+X86ASM-OBJS-$(CONFIG_INTERLACE_FILTER) += x86/vf_interlace.o \
+ x86/vf_tinterlace_init.o
+X86ASM-OBJS-$(CONFIG_LIMITER_FILTER) += x86/vf_limiter.o \
+ x86/vf_limiter_init.o
+X86ASM-OBJS-$(CONFIG_LUT3D_FILTER) += x86/vf_lut3d.o x86/vf_lut3d_init.o
+X86ASM-OBJS-$(CONFIG_MASKEDCLAMP_FILTER) += x86/vf_maskedclamp.o \
+ x86/vf_maskedclamp_init.o
+X86ASM-OBJS-$(CONFIG_MASKEDMERGE_FILTER) += x86/vf_maskedmerge.o \
+ x86/vf_maskedmerge_init.o
+X86ASM-OBJS-$(CONFIG_NLMEANS_FILTER) += x86/vf_nlmeans.o \
+ x86/vf_nlmeans_init.o
+X86ASM-OBJS-$(CONFIG_OVERLAY_FILTER) += x86/vf_overlay.o \
+ x86/vf_overlay_init.o
+X86ASM-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7.o x86/vf_pp7_init.o
+X86ASM-OBJS-$(CONFIG_PSNR_FILTER) += x86/vf_psnr.o x86/vf_psnr_init.o
+X86ASM-OBJS-$(CONFIG_PULLUP_FILTER) += x86/vf_pullup.o x86/vf_pullup_init.o
ifdef CONFIG_GPL
-X86ASM-OBJS-$(CONFIG_REMOVEGRAIN_FILTER) += x86/vf_removegrain.o
+X86ASM-OBJS-$(CONFIG_REMOVEGRAIN_FILTER) += x86/vf_removegrain.o \
+ x86/vf_removegrain_init.o
endif
-X86ASM-OBJS-$(CONFIG_SHOWCQT_FILTER) += x86/avf_showcqt.o
-X86ASM-OBJS-$(CONFIG_SOBEL_FILTER) += x86/vf_convolution.o
-X86ASM-OBJS-$(CONFIG_SSIM_FILTER) += x86/vf_ssim.o
-X86ASM-OBJS-$(CONFIG_STEREO3D_FILTER) += x86/vf_stereo3d.o
-X86ASM-OBJS-$(CONFIG_TBLEND_FILTER) += x86/vf_blend.o
-X86ASM-OBJS-$(CONFIG_THRESHOLD_FILTER) += x86/vf_threshold.o
-X86ASM-OBJS-$(CONFIG_TINTERLACE_FILTER) += x86/vf_interlace.o
-X86ASM-OBJS-$(CONFIG_TRANSPOSE_FILTER) += x86/vf_transpose.o
-X86ASM-OBJS-$(CONFIG_VOLUME_FILTER) += x86/af_volume.o
-X86ASM-OBJS-$(CONFIG_V360_FILTER) += x86/vf_v360.o
-X86ASM-OBJS-$(CONFIG_W3FDIF_FILTER) += x86/vf_w3fdif.o
-X86ASM-OBJS-$(CONFIG_XPSNR_FILTER) += x86/vf_psnr.o
-X86ASM-OBJS-$(CONFIG_YADIF_FILTER) += x86/vf_yadif.o x86/yadif-16.o x86/yadif-10.o
+X86ASM-OBJS-$(CONFIG_SHOWCQT_FILTER) += x86/avf_showcqt.o \
+ x86/avf_showcqt_init.o
+X86ASM-OBJS-$(CONFIG_SOBEL_FILTER) += x86/vf_convolution.o \
+ x86/vf_convolution_init.o
+X86ASM-OBJS-$(CONFIG_SSIM_FILTER) += x86/vf_ssim.o x86/vf_ssim_init.o
+X86ASM-OBJS-$(CONFIG_STEREO3D_FILTER) += x86/vf_stereo3d.o \
+ x86/vf_stereo3d_init.o
+X86ASM-OBJS-$(CONFIG_TBLEND_FILTER) += x86/vf_blend.o x86/vf_blend_init.o
+X86ASM-OBJS-$(CONFIG_THRESHOLD_FILTER) += x86/vf_threshold.o \
+ x86/vf_threshold_init.o
+X86ASM-OBJS-$(CONFIG_TINTERLACE_FILTER) += x86/vf_interlace.o \
+ x86/vf_tinterlace_init.o
+X86ASM-OBJS-$(CONFIG_TRANSPOSE_FILTER) += x86/vf_transpose.o \
+ x86/vf_transpose_init.o
+X86ASM-OBJS-$(CONFIG_VOLUME_FILTER) += x86/af_volume.o x86/af_volume_init.o
+X86ASM-OBJS-$(CONFIG_V360_FILTER) += x86/vf_v360.o x86/vf_v360_init.o
+X86ASM-OBJS-$(CONFIG_W3FDIF_FILTER) += x86/vf_w3fdif.o x86/vf_w3fdif_init.o
+X86ASM-OBJS-$(CONFIG_XPSNR_FILTER) += x86/vf_psnr.o x86/vf_psnr_init.o
+X86ASM-OBJS-$(CONFIG_YADIF_FILTER) += x86/vf_yadif.o x86/yadif-16.o \
+ x86/yadif-10.o x86/vf_yadif_init.o
diff --git a/libavfilter/x86/scene_sad_init.c b/libavfilter/x86/scene_sad_init.c
index 9863839b4e..a35f02c560 100644
--- a/libavfilter/x86/scene_sad_init.c
+++ b/libavfilter/x86/scene_sad_init.c
@@ -52,7 +52,6 @@ static void FUNC_NAME(SCENE_SAD_PARAMS) { \
*sum += sad[0]; \
}
-#if HAVE_X86ASM
SCENE_SAD_FUNC(scene_sad_sse2, ff_scene_sad8_sse2, 16)
#if HAVE_AVX2_EXTERNAL
SCENE_SAD_FUNC(scene_sad_avx2, ff_scene_sad8_avx2, 32)
@@ -62,11 +61,9 @@ SCENE_SAD16_FUNC(scene_sad16_avx2, ff_scene_sad16_avx2, 32)
SCENE_SAD_FUNC(scene_sad_avx512, ff_scene_sad8_avx512, 64)
SCENE_SAD16_FUNC(scene_sad16_avx512, ff_scene_sad16_avx512, 64)
#endif
-#endif
ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (depth <= 8) {
#if HAVE_AVX512_EXTERNAL
@@ -89,6 +86,5 @@ ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth)
return scene_sad16_avx2;
#endif
}
-#endif
return NULL;
}
diff --git a/libavfilter/x86/vf_colordetect_init.c b/libavfilter/x86/vf_colordetect_init.c
index 7257b5c4f5..4bff4471a1 100644
--- a/libavfilter/x86/vf_colordetect_init.c
+++ b/libavfilter/x86/vf_colordetect_init.c
@@ -58,7 +58,6 @@ static int FUNC_NAME(const uint8_t *color, ptrdiff_t color_stride,
p, q, k); \
}
-#if HAVE_X86ASM
#if HAVE_AVX512ICL_EXTERNAL
DETECT_RANGE_FUNC(detect_range_avx512icl, ff_detect_rangeb_avx512icl, ff_detect_range_c, 0, 64)
DETECT_RANGE_FUNC(detect_range16_avx512icl, ff_detect_rangew_avx512icl, ff_detect_range16_c, 1, 64)
@@ -75,12 +74,10 @@ DETECT_ALPHA_FUNC(detect_alpha16_full_avx2, ff_detect_alphaw_full_avx2, ff_detec
DETECT_ALPHA_FUNC(detect_alpha_limited_avx2, ff_detect_alphab_limited_avx2, ff_detect_alpha_limited_c, 0, 32)
DETECT_ALPHA_FUNC(detect_alpha16_limited_avx2, ff_detect_alphaw_limited_avx2, ff_detect_alpha16_limited_c, 1, 32)
#endif
-#endif
av_cold void ff_color_detect_dsp_init_x86(FFColorDetectDSPContext *dsp, int depth,
enum AVColorRange color_range)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
#if HAVE_AVX2_EXTERNAL
if (EXTERNAL_AVX2_FAST(cpu_flags)) {
@@ -102,5 +99,4 @@ av_cold void ff_color_detect_dsp_init_x86(FFColorDetectDSPContext *dsp, int dept
}
}
#endif
-#endif
}
diff --git a/libavfilter/x86/vf_eq_init.c b/libavfilter/x86/vf_eq_init.c
index a1719672df..a66dd1b993 100644
--- a/libavfilter/x86/vf_eq_init.c
+++ b/libavfilter/x86/vf_eq_init.c
@@ -28,7 +28,6 @@
extern void ff_process_one_line_sse2(const uint8_t *src, uint8_t *dst, short contrast,
short brightness, int w);
-#if HAVE_X86ASM
static void process_sse2(EQParameters *param, uint8_t *dst, int dst_stride,
const uint8_t *src, int src_stride, int w, int h)
{
@@ -42,14 +41,11 @@ static void process_sse2(EQParameters *param, uint8_t *dst, int dst_stride,
dst += dst_stride;
}
}
-#endif
av_cold void ff_eq_init_x86(EQContext *eq)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
eq->process = process_sse2;
}
-#endif
}
diff --git a/libavfilter/x86/vf_gradfun_init.c b/libavfilter/x86/vf_gradfun_init.c
index f262f0a1bb..6b27169b82 100644
--- a/libavfilter/x86/vf_gradfun_init.c
+++ b/libavfilter/x86/vf_gradfun_init.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
@@ -35,7 +34,6 @@ void ff_gradfun_blur_line_movdqu_sse2(intptr_t x, uint16_t *buf,
const uint16_t *buf1, uint16_t *dc,
const uint8_t *src1, const uint8_t *src2);
-#if HAVE_X86ASM
static void gradfun_filter_line_ssse3(uint8_t *dst, const uint8_t *src, const uint16_t *dc,
int width, int thresh,
const uint16_t *dithers)
@@ -66,11 +64,9 @@ static void gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, const uint16_t *
dc + width, src + width * 2,
src + width * 2 + src_linesize);
}
-#endif /* HAVE_X86ASM */
av_cold void ff_gradfun_init_x86(GradFunContext *gf)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSSE3(cpu_flags))
@@ -78,5 +74,4 @@ av_cold void ff_gradfun_init_x86(GradFunContext *gf)
if (EXTERNAL_SSE2(cpu_flags))
gf->blur_line = gradfun_blur_line_sse2;
-#endif /* HAVE_X86ASM */
}
diff --git a/libavfilter/x86/vf_hqdn3d_init.c b/libavfilter/x86/vf_hqdn3d_init.c
index 43aca908b0..15e1ab9539 100644
--- a/libavfilter/x86/vf_hqdn3d_init.c
+++ b/libavfilter/x86/vf_hqdn3d_init.c
@@ -23,7 +23,6 @@
#include "libavutil/attributes.h"
#include "libavfilter/vf_hqdn3d.h"
-#include "config.h"
void ff_hqdn3d_row_8_x86(uint8_t *src, uint8_t *dst, uint16_t *line_ant,
uint16_t *frame_ant, ptrdiff_t w, int16_t *spatial,
@@ -40,10 +39,8 @@ void ff_hqdn3d_row_16_x86(uint8_t *src, uint8_t *dst, uint16_t *line_ant,
av_cold void ff_hqdn3d_init_x86(HQDN3DContext *hqdn3d)
{
-#if HAVE_X86ASM
hqdn3d->denoise_row[8] = ff_hqdn3d_row_8_x86;
hqdn3d->denoise_row[9] = ff_hqdn3d_row_9_x86;
hqdn3d->denoise_row[10] = ff_hqdn3d_row_10_x86;
hqdn3d->denoise_row[16] = ff_hqdn3d_row_16_x86;
-#endif /* HAVE_X86ASM */
}
diff --git a/libavfilter/x86/vf_idetdsp_init.c b/libavfilter/x86/vf_idetdsp_init.c
index 1f4c2e2bc3..5cfcb4eae5 100644
--- a/libavfilter/x86/vf_idetdsp_init.c
+++ b/libavfilter/x86/vf_idetdsp_init.c
@@ -18,12 +18,9 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavfilter/vf_idetdsp.h"
-#if HAVE_X86ASM
-
/* declares main callable idet_filter_line_sse2() */
#define FUNC_MAIN_DECL(KIND, SPAN) \
int ff_idet_filter_line_##KIND(const uint8_t *a, const uint8_t *b, \
@@ -68,10 +65,8 @@ FUNC_MAIN_DECL_16bit(avx2, 16)
FUNC_MAIN_DECL(avx512icl, 64)
FUNC_MAIN_DECL_16bit(avx512icl, 32)
-#endif
av_cold void ff_idet_dsp_init_x86(IDETDSPContext *dsp, int depth)
{
-#if HAVE_X86ASM
const int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -83,5 +78,4 @@ av_cold void ff_idet_dsp_init_x86(IDETDSPContext *dsp, int depth)
if (EXTERNAL_AVX512ICL(cpu_flags)) {
dsp->filter_line = depth > 8 ? idet_filter_line_16bit_avx512icl : idet_filter_line_avx512icl;
}
-#endif // HAVE_X86ASM
}
diff --git a/libavfilter/x86/vf_pullup_init.c b/libavfilter/x86/vf_pullup_init.c
index 943c1de9d7..fd5e59c6ce 100644
--- a/libavfilter/x86/vf_pullup_init.c
+++ b/libavfilter/x86/vf_pullup_init.c
@@ -18,7 +18,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavfilter/vf_pullup.h"
@@ -28,7 +27,6 @@ int ff_pullup_filter_var_sse2 (const uint8_t *a, const uint8_t *b, ptrdiff_t s)
av_cold void ff_pullup_init_x86(PullupContext *s)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -38,5 +36,4 @@ av_cold void ff_pullup_init_x86(PullupContext *s)
if (EXTERNAL_SSSE3(cpu_flags)) {
s->comb = ff_pullup_filter_comb_ssse3;
}
-#endif
}
commit eccf130fdbcf719566d3ffb5e780d89776b77c23
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 19:50:15 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
{lib{avcodec,swscale}/x86/,}Makefile: Kill MMX-OBJS
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/Makefile b/Makefile
index 2f78db02a5..4fc0aebd33 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,7 @@ ffbuild/.config: $(CONFIGURABLE_COMPONENTS)
SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \
HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
- ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \
+ ALTIVEC-OBJS VSX-OBJS X86ASM-OBJS \
MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \
MMI-OBJS LSX-OBJS LASX-OBJS RV-OBJS RVV-OBJS RVVB-OBJS \
OBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS SIMD128-OBJS
diff --git a/ffbuild/arch.mak b/ffbuild/arch.mak
index 197e30bb89..ec79ae7866 100644
--- a/ffbuild/arch.mak
+++ b/ffbuild/arch.mak
@@ -23,5 +23,4 @@ OBJS-$(HAVE_RV_ZVBB) += $(RVVB-OBJS) $(RVVB-OBJS-yes)
OBJS-$(HAVE_SIMD128) += $(SIMD128-OBJS) $(SIMD128-OBJS-yes)
-OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)
OBJS-$(HAVE_X86ASM) += $(X86ASM-OBJS) $(X86ASM-OBJS-yes)
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 63b16f24c8..bf723ed1a6 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -65,6 +65,8 @@ X86ASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp_init.o
X86ASM-OBJS-$(CONFIG_PRORES_RAW_DECODER) += x86/proresdsp_init.o
X86ASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp_init.o
X86ASM-OBJS-$(CONFIG_SBC_ENCODER) += x86/sbcdsp_init.o
+OBJS-$(CONFIG_SNOW_DECODER) += x86/snowdsp.o
+OBJS-$(CONFIG_SNOW_ENCODER) += x86/snowdsp.o
X86ASM-OBJS-$(CONFIG_SVQ1_ENCODER) += x86/svq1enc_init.o
X86ASM-OBJS-$(CONFIG_TAK_DECODER) += x86/takdsp_init.o
OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp_init.o
@@ -81,11 +83,6 @@ X86ASM-OBJS-$(CONFIG_VP9_DECODER) += x86/vp9dsp_init.o \
x86/vp9dsp_init_16bpp.o
-# GCC inline assembly optimizations
-# decoders/encoders
-MMX-OBJS-$(CONFIG_SNOW_DECODER) += x86/snowdsp.o
-MMX-OBJS-$(CONFIG_SNOW_ENCODER) += x86/snowdsp.o
-
# subsystems
X86ASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp.o \
x86/ac3dsp_downmix.o
diff --git a/libswscale/x86/Makefile b/libswscale/x86/Makefile
index f82b411fb1..9c9d286600 100644
--- a/libswscale/x86/Makefile
+++ b/libswscale/x86/Makefile
@@ -4,7 +4,7 @@ OBJS += x86/rgb2rgb.o \
x86/swscale.o \
x86/yuv2rgb.o \
-MMX-OBJS += x86/hscale_fast_bilinear_simd.o \
+OBJS-$(HAVE_MMXEXT_INLINE) += x86/hscale_fast_bilinear_simd.o \
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
diff --git a/libswscale/x86/hscale_fast_bilinear_simd.c b/libswscale/x86/hscale_fast_bilinear_simd.c
index 47ca020004..d8a4e444b4 100644
--- a/libswscale/x86/hscale_fast_bilinear_simd.c
+++ b/libswscale/x86/hscale_fast_bilinear_simd.c
@@ -27,7 +27,6 @@
#define RET 0xC3 // near return opcode for x86
#define PREFETCH "prefetchnta"
-#if HAVE_INLINE_ASM
av_cold int ff_init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode,
int16_t *filter, int32_t *filterPos,
int numSplits)
@@ -358,4 +357,3 @@ void ff_hcscale_fast_mmxext(SwsInternal *c, int16_t *dst1, int16_t *dst2,
dst2[i] = src2[srcW-1]*128;
}
}
-#endif //HAVE_INLINE_ASM
commit ba94177242806ddf48e305ac52eee09a337a4a3b
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 19:07:26 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
avcodec/x86/Makefile: Only compile ASM init files when X86ASM is enabled
To do so, simply add these init files to X86ASM-OBJS instead of OBJS
in the Makefile. The former is already used for the actual assembly
files, but using them for the C init files just works, because the build
system uses file extensions to derive whether it is a C or a NASM file.
This avoids compiling unused function stubs and also reduces our
reliance on DCE: We don't add %if checks to the asm files except
for AVX, AVX2, FMA3, FMA4, XOP and AVX512, so all the MMX-SSE4
functions will be available. It also allows to remove HAVE_X86ASM checks
in these init files.
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/aacencdsp.h b/libavcodec/aacencdsp.h
index 684bbc254f..77aa133691 100644
--- a/libavcodec/aacencdsp.h
+++ b/libavcodec/aacencdsp.h
@@ -65,7 +65,7 @@ static inline void ff_aacenc_dsp_init(AACEncDSPContext *s)
#if ARCH_RISCV
ff_aacenc_dsp_init_riscv(s);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_aacenc_dsp_init_x86(s);
#elif ARCH_AARCH64
ff_aacenc_dsp_init_aarch64(s);
diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_template.c
index c28ba2c9a5..341bf77023 100644
--- a/libavcodec/aacpsdsp_template.c
+++ b/libavcodec/aacpsdsp_template.c
@@ -228,7 +228,7 @@ av_cold void AAC_RENAME(ff_psdsp_init)(PSDSPContext *s)
ff_psdsp_init_aarch64(s);
#elif ARCH_RISCV
ff_psdsp_init_riscv(s);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_psdsp_init_x86(s);
#endif
#endif /* !USE_FIXED */
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 730fa70fff..a4a28c8672 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -363,7 +363,7 @@ void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
c->downmix = ac3_downmix_5_to_1_symmetric_c;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_ac3dsp_set_downmix_x86(c);
#endif
}
@@ -393,7 +393,7 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c)
ff_ac3dsp_init_aarch64(c);
#elif ARCH_ARM
ff_ac3dsp_init_arm(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_ac3dsp_init_x86(c);
#elif ARCH_MIPS
ff_ac3dsp_init_mips(c);
diff --git a/libavcodec/alacdsp.c b/libavcodec/alacdsp.c
index a604566afb..c06cc9da97 100644
--- a/libavcodec/alacdsp.c
+++ b/libavcodec/alacdsp.c
@@ -60,7 +60,7 @@ av_cold void ff_alacdsp_init(ALACDSPContext *c)
#if ARCH_RISCV
ff_alacdsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_alacdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/apv_dsp.c b/libavcodec/apv_dsp.c
index 8fbabcf63d..982ec36910 100644
--- a/libavcodec/apv_dsp.c
+++ b/libavcodec/apv_dsp.c
@@ -134,7 +134,7 @@ av_cold void ff_apv_dsp_init(APVDSPContext *dsp)
{
dsp->decode_transquant = apv_decode_transquant_c;
-#if ARCH_X86_64
+#if ARCH_X86_64 && HAVE_X86ASM
ff_apv_dsp_init_x86_64(dsp);
#endif
}
diff --git a/libavcodec/audiodsp.c b/libavcodec/audiodsp.c
index fd6a00345f..a4758bb4c3 100644
--- a/libavcodec/audiodsp.c
+++ b/libavcodec/audiodsp.c
@@ -74,7 +74,7 @@ av_cold void ff_audiodsp_init(AudioDSPContext *c)
ff_audiodsp_init_ppc(c);
#elif ARCH_RISCV
ff_audiodsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_audiodsp_init_x86(c);
#endif
}
diff --git a/libavcodec/blockdsp.c b/libavcodec/blockdsp.c
index 57ca41bd96..793e7664ec 100644
--- a/libavcodec/blockdsp.c
+++ b/libavcodec/blockdsp.c
@@ -69,7 +69,7 @@ av_cold void ff_blockdsp_init(BlockDSPContext *c)
ff_blockdsp_init_ppc(c);
#elif ARCH_RISCV
ff_blockdsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_blockdsp_init_x86(c);
#elif ARCH_MIPS
ff_blockdsp_init_mips(c);
diff --git a/libavcodec/bswapdsp.c b/libavcodec/bswapdsp.c
index f0ea2b55c5..f375ab79ac 100644
--- a/libavcodec/bswapdsp.c
+++ b/libavcodec/bswapdsp.c
@@ -53,7 +53,7 @@ av_cold void ff_bswapdsp_init(BswapDSPContext *c)
#if ARCH_RISCV
ff_bswapdsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_bswapdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c
index 69420242d6..7444f17bb5 100644
--- a/libavcodec/cavsdsp.c
+++ b/libavcodec/cavsdsp.c
@@ -577,7 +577,7 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c)
c->cavs_idct8_add = cavs_idct8_add_c;
c->idct_perm = FF_IDCT_PERM_NONE;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_cavsdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/cfhddsp.c b/libavcodec/cfhddsp.c
index a141db5246..05757d6515 100644
--- a/libavcodec/cfhddsp.c
+++ b/libavcodec/cfhddsp.c
@@ -112,7 +112,7 @@ av_cold void ff_cfhddsp_init(CFHDDSPContext *c, int depth, int bayer)
else
c->horiz_filter_clip = horiz_filter_clip;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_cfhddsp_init_x86(c, depth, bayer);
#endif
}
diff --git a/libavcodec/cfhdencdsp.c b/libavcodec/cfhdencdsp.c
index a122bcaf19..06801aef6d 100644
--- a/libavcodec/cfhdencdsp.c
+++ b/libavcodec/cfhdencdsp.c
@@ -73,7 +73,7 @@ av_cold void ff_cfhdencdsp_init(CFHDEncDSPContext *c)
c->horiz_filter = horiz_filter;
c->vert_filter = vert_filter;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_cfhdencdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
index d5fc5c4eb2..a0be676699 100644
--- a/libavcodec/dcadsp.c
+++ b/libavcodec/dcadsp.c
@@ -487,7 +487,7 @@ av_cold void ff_dcadsp_init(DCADSPContext *s)
s->lbr_bank = lbr_bank_c;
s->lfe_iir = lfe_iir_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_dcadsp_init_x86(s);
#endif
}
diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c
index d473f64daa..0d92ad06da 100644
--- a/libavcodec/dirac_dwt.c
+++ b/libavcodec/dirac_dwt.c
@@ -59,7 +59,7 @@ int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type,
return AVERROR_INVALIDDATA;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
if (bit_depth == 8)
ff_spatial_idwt_init_x86(d, type);
#endif
diff --git a/libavcodec/diracdsp.c b/libavcodec/diracdsp.c
index 284f914f9d..a02a23974b 100644
--- a/libavcodec/diracdsp.c
+++ b/libavcodec/diracdsp.c
@@ -247,7 +247,7 @@ av_cold void ff_diracdsp_init(DiracDSPContext *c)
PIXFUNC(avg, 16);
PIXFUNC(avg, 32);
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_diracdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 7994b1d497..844731f6c4 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -1363,7 +1363,7 @@ const FFCodec ff_dnxhd_encoder = {
void ff_dnxhdenc_init(DNXHDEncContext *ctx)
{
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_dnxhdenc_init_x86(ctx);
#endif
}
diff --git a/libavcodec/exrdsp.c b/libavcodec/exrdsp.c
index 248cb93c5a..70914b7e5b 100644
--- a/libavcodec/exrdsp.c
+++ b/libavcodec/exrdsp.c
@@ -63,7 +63,7 @@ av_cold void ff_exrdsp_init(ExrDSPContext *c)
#if ARCH_RISCV
ff_exrdsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_exrdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c
index b5b0609716..f8b48770f4 100644
--- a/libavcodec/flacdsp.c
+++ b/libavcodec/flacdsp.c
@@ -154,7 +154,7 @@ av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int cha
ff_flacdsp_init_arm(c, fmt, channels);
#elif ARCH_RISCV
ff_flacdsp_init_riscv(c, fmt, channels);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_flacdsp_init_x86(c, fmt, channels);
#endif
}
diff --git a/libavcodec/flacencdsp.c b/libavcodec/flacencdsp.c
index 46e5a0352b..251b3c2d47 100644
--- a/libavcodec/flacencdsp.c
+++ b/libavcodec/flacencdsp.c
@@ -34,7 +34,7 @@ av_cold void ff_flacencdsp_init(FLACEncDSPContext *c)
c->lpc16_encode = flac_lpc_encode_c_16;
c->lpc32_encode = flac_lpc_encode_c_32;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_flacencdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
index d889e61aca..77d69f8211 100644
--- a/libavcodec/fmtconvert.c
+++ b/libavcodec/fmtconvert.c
@@ -54,7 +54,7 @@ av_cold void ff_fmt_convert_init(FmtConvertContext *c)
ff_fmt_convert_init_ppc(c);
#elif ARCH_RISCV
ff_fmt_convert_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_fmt_convert_init_x86(c);
#endif
#if HAVE_MIPSFPU
diff --git a/libavcodec/g722dsp.c b/libavcodec/g722dsp.c
index 302283688f..5807635ce5 100644
--- a/libavcodec/g722dsp.c
+++ b/libavcodec/g722dsp.c
@@ -73,7 +73,7 @@ av_cold void ff_g722dsp_init(G722DSPContext *c)
ff_g722dsp_init_arm(c);
#elif ARCH_RISCV
ff_g722dsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_g722dsp_init_x86(c);
#endif
}
diff --git a/libavcodec/h263dsp.c b/libavcodec/h263dsp.c
index 6a13353499..165174a499 100644
--- a/libavcodec/h263dsp.c
+++ b/libavcodec/h263dsp.c
@@ -121,7 +121,7 @@ av_cold void ff_h263dsp_init(H263DSPContext *ctx)
#if ARCH_RISCV
ff_h263dsp_init_riscv(ctx);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_h263dsp_init_x86(ctx);
#elif ARCH_MIPS
ff_h263dsp_init_mips(ctx);
diff --git a/libavcodec/h264chroma.c b/libavcodec/h264chroma.c
index 5000c89aa7..0d152de59d 100644
--- a/libavcodec/h264chroma.c
+++ b/libavcodec/h264chroma.c
@@ -50,7 +50,7 @@ av_cold void ff_h264chroma_init(H264ChromaContext *c, int bit_depth)
ff_h264chroma_init_arm(c, bit_depth);
#elif ARCH_PPC
ff_h264chroma_init_ppc(c, bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_h264chroma_init_x86(c, bit_depth);
#elif ARCH_MIPS
ff_h264chroma_init_mips(c, bit_depth);
diff --git a/libavcodec/h264dsp.c b/libavcodec/h264dsp.c
index 8a6a3f5325..f4c5238372 100644
--- a/libavcodec/h264dsp.c
+++ b/libavcodec/h264dsp.c
@@ -160,7 +160,7 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth,
ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc);
#elif ARCH_RISCV
ff_h264dsp_init_riscv(c, bit_depth, chroma_format_idc);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc);
#elif ARCH_MIPS
ff_h264dsp_init_mips(c, bit_depth, chroma_format_idc);
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
index 25f9995a0b..fbd8d2b91d 100644
--- a/libavcodec/h264pred.c
+++ b/libavcodec/h264pred.c
@@ -592,7 +592,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
ff_h264_pred_init_aarch64(h, codec_id, bit_depth, chroma_format_idc);
#elif ARCH_ARM
ff_h264_pred_init_arm(h, codec_id, bit_depth, chroma_format_idc);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_h264_pred_init_x86(h, codec_id, bit_depth, chroma_format_idc);
#elif ARCH_MIPS
ff_h264_pred_init_mips(h, codec_id, bit_depth, chroma_format_idc);
diff --git a/libavcodec/h264qpel.c b/libavcodec/h264qpel.c
index 0bc715c638..c64d35b73d 100644
--- a/libavcodec/h264qpel.c
+++ b/libavcodec/h264qpel.c
@@ -104,7 +104,7 @@ av_cold void ff_h264qpel_init(H264QpelContext *c, int bit_depth)
ff_h264qpel_init_ppc(c, bit_depth);
#elif ARCH_RISCV
ff_h264qpel_init_riscv(c, bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_h264qpel_init_x86(c, bit_depth);
#elif ARCH_MIPS
ff_h264qpel_init_mips(c, bit_depth);
diff --git a/libavcodec/hevc/dsp.c b/libavcodec/hevc/dsp.c
index a154fab2bf..5ae779f9f7 100644
--- a/libavcodec/hevc/dsp.c
+++ b/libavcodec/hevc/dsp.c
@@ -269,7 +269,7 @@ int i = 0;
ff_hevc_dsp_init_riscv(hevcdsp, bit_depth);
#elif ARCH_WASM
ff_hevc_dsp_init_wasm(hevcdsp, bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_hevc_dsp_init_x86(hevcdsp, bit_depth);
#elif ARCH_MIPS
ff_hevc_dsp_init_mips(hevcdsp, bit_depth);
diff --git a/libavcodec/hpeldsp.c b/libavcodec/hpeldsp.c
index 688939ad3f..e753d6216c 100644
--- a/libavcodec/hpeldsp.c
+++ b/libavcodec/hpeldsp.c
@@ -360,7 +360,7 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
ff_hpeldsp_init_arm(c, flags);
#elif ARCH_PPC
ff_hpeldsp_init_ppc(c, flags);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_hpeldsp_init_x86(c, flags);
#elif ARCH_MIPS
ff_hpeldsp_init_mips(c, flags);
diff --git a/libavcodec/huffyuvdsp.c b/libavcodec/huffyuvdsp.c
index 80587dac85..1ae2f820d0 100644
--- a/libavcodec/huffyuvdsp.c
+++ b/libavcodec/huffyuvdsp.c
@@ -89,7 +89,7 @@ av_cold void ff_huffyuvdsp_init(HuffYUVDSPContext *c, enum AVPixelFormat pix_fmt
#if ARCH_RISCV
ff_huffyuvdsp_init_riscv(c, pix_fmt);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_huffyuvdsp_init_x86(c, pix_fmt);
#endif
}
diff --git a/libavcodec/huffyuvencdsp.c b/libavcodec/huffyuvencdsp.c
index 27428635af..e332f678d4 100644
--- a/libavcodec/huffyuvencdsp.c
+++ b/libavcodec/huffyuvencdsp.c
@@ -89,7 +89,7 @@ av_cold void ff_huffyuvencdsp_init(HuffYUVEncDSPContext *c, enum AVPixelFormat p
c->diff_int16 = diff_int16_c;
c->sub_hfyu_median_pred_int16 = sub_hfyu_median_pred_int16_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_huffyuvencdsp_init_x86(c, pix_fmt);
#endif
}
diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index 8a71c7ef77..e039f900eb 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -41,7 +41,7 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
{
int i;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
if (ff_init_scantable_permutation_x86(idct_permutation,
perm_type))
return;
@@ -301,7 +301,7 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
ff_idctdsp_init_ppc(c, avctx, high_bit_depth);
#elif ARCH_RISCV
ff_idctdsp_init_riscv(c, avctx, high_bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_idctdsp_init_x86(c, avctx, high_bit_depth);
#elif ARCH_MIPS
ff_idctdsp_init_mips(c, avctx, high_bit_depth);
diff --git a/libavcodec/jpeg2000dsp.c b/libavcodec/jpeg2000dsp.c
index 7840fdc357..2931a38ef1 100644
--- a/libavcodec/jpeg2000dsp.c
+++ b/libavcodec/jpeg2000dsp.c
@@ -98,7 +98,7 @@ av_cold void ff_jpeg2000dsp_init(Jpeg2000DSPContext *c)
#if ARCH_RISCV
ff_jpeg2000dsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_jpeg2000dsp_init_x86(c);
#endif
}
diff --git a/libavcodec/lossless_audiodsp.c b/libavcodec/lossless_audiodsp.c
index 94e6ce0989..2d57857dad 100644
--- a/libavcodec/lossless_audiodsp.c
+++ b/libavcodec/lossless_audiodsp.c
@@ -63,7 +63,7 @@ av_cold void ff_llauddsp_init(LLAudDSPContext *c)
ff_llauddsp_init_arm(c);
#elif ARCH_RISCV
ff_llauddsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_llauddsp_init_x86(c);
#endif
}
diff --git a/libavcodec/lossless_videodsp.c b/libavcodec/lossless_videodsp.c
index 229494bb50..bf3a3da90d 100644
--- a/libavcodec/lossless_videodsp.c
+++ b/libavcodec/lossless_videodsp.c
@@ -124,7 +124,7 @@ av_cold void ff_llviddsp_init(LLVidDSPContext *c)
ff_llviddsp_init_ppc(c);
#elif ARCH_RISCV
ff_llviddsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_llviddsp_init_x86(c);
#endif
}
diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c
index 8e53f6d573..09861e2074 100644
--- a/libavcodec/me_cmp.c
+++ b/libavcodec/me_cmp.c
@@ -1019,7 +1019,7 @@ av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx)
ff_me_cmp_init_ppc(c, avctx);
#elif ARCH_RISCV
ff_me_cmp_init_riscv(c, avctx);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_me_cmp_init_x86(c, avctx);
#elif ARCH_MIPS
ff_me_cmp_init_mips(c, avctx);
diff --git a/libavcodec/opus/dsp.c b/libavcodec/opus/dsp.c
index 6cd76ceceb..f2278c5bde 100644
--- a/libavcodec/opus/dsp.c
+++ b/libavcodec/opus/dsp.c
@@ -62,7 +62,7 @@ av_cold void ff_opus_dsp_init(OpusDSP *ctx)
ff_opus_dsp_init_aarch64(ctx);
#elif ARCH_RISCV
ff_opus_dsp_init_riscv(ctx);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_opus_dsp_init_x86(ctx);
#endif
}
diff --git a/libavcodec/opus/pvq.c b/libavcodec/opus/pvq.c
index fe57ab02ce..3dea7c19f2 100644
--- a/libavcodec/opus/pvq.c
+++ b/libavcodec/opus/pvq.c
@@ -914,7 +914,7 @@ int av_cold ff_celt_pvq_init(CeltPVQ **pvq, int encode)
#if CONFIG_OPUS_ENCODER
s->pvq_search = ppp_pvq_search_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_celt_pvq_init_x86(s);
#endif
#endif
diff --git a/libavcodec/pixblockdsp.c b/libavcodec/pixblockdsp.c
index 110a374260..5ae840f100 100644
--- a/libavcodec/pixblockdsp.c
+++ b/libavcodec/pixblockdsp.c
@@ -108,7 +108,7 @@ av_cold void ff_pixblockdsp_init(PixblockDSPContext *c, int bits_per_raw_sample)
ff_pixblockdsp_init_ppc(c, high_bit_depth);
#elif ARCH_RISCV
ff_pixblockdsp_init_riscv(c, high_bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_pixblockdsp_init_x86(c, high_bit_depth);
#elif ARCH_MIPS
ff_pixblockdsp_init_mips(c, high_bit_depth);
diff --git a/libavcodec/pngdsp.c b/libavcodec/pngdsp.c
index 50ee96a684..ae40113a51 100644
--- a/libavcodec/pngdsp.c
+++ b/libavcodec/pngdsp.c
@@ -58,7 +58,7 @@ av_cold void ff_pngdsp_init(PNGDSPContext *dsp)
dsp->add_bytes_l2 = add_bytes_l2_c;
dsp->add_paeth_prediction = ff_add_png_paeth_prediction;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_pngdsp_init_x86(dsp);
#endif
}
diff --git a/libavcodec/proresdsp.c b/libavcodec/proresdsp.c
index a4921128f7..eb5dbf4799 100644
--- a/libavcodec/proresdsp.c
+++ b/libavcodec/proresdsp.c
@@ -149,7 +149,7 @@ av_cold void ff_proresdsp_init(ProresDSPContext *dsp, int bits_per_raw_sample)
dsp->idct_permutation_type = FF_IDCT_PERM_NONE;
}
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_proresdsp_init_x86(dsp, bits_per_raw_sample);
#endif
diff --git a/libavcodec/qpeldsp.c b/libavcodec/qpeldsp.c
index 5f937f9d9e..33a5eccd0b 100644
--- a/libavcodec/qpeldsp.c
+++ b/libavcodec/qpeldsp.c
@@ -810,7 +810,7 @@ av_cold void ff_qpeldsp_init(QpelDSPContext *c)
dspfunc(avg_qpel, 0, 16);
dspfunc(avg_qpel, 1, 8);
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_qpeldsp_init_x86(c);
#elif ARCH_MIPS
ff_qpeldsp_init_mips(c);
diff --git a/libavcodec/rv34dsp.c b/libavcodec/rv34dsp.c
index 44486f8edd..2e27137be6 100644
--- a/libavcodec/rv34dsp.c
+++ b/libavcodec/rv34dsp.c
@@ -140,7 +140,7 @@ av_cold void ff_rv34dsp_init(RV34DSPContext *c)
ff_rv34dsp_init_arm(c);
#elif ARCH_RISCV
ff_rv34dsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_rv34dsp_init_x86(c);
#endif
}
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c
index dd73737bd6..7370b89e1b 100644
--- a/libavcodec/rv40dsp.c
+++ b/libavcodec/rv40dsp.c
@@ -712,7 +712,7 @@ av_cold void ff_rv40dsp_init(RV34DSPContext *c)
ff_rv40dsp_init_arm(c);
#elif ARCH_RISCV
ff_rv40dsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_rv40dsp_init_x86(c);
#endif
}
diff --git a/libavcodec/sbcdsp.c b/libavcodec/sbcdsp.c
index 00f9c4c68d..5674bdc4a7 100644
--- a/libavcodec/sbcdsp.c
+++ b/libavcodec/sbcdsp.c
@@ -382,7 +382,7 @@ av_cold void ff_sbcdsp_init(SBCDSPContext *s)
#if ARCH_ARM
ff_sbcdsp_init_arm(s);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_sbcdsp_init_x86(s);
#endif
}
diff --git a/libavcodec/sbrdsp_template.c b/libavcodec/sbrdsp_template.c
index 9a94af8670..b5766c6980 100644
--- a/libavcodec/sbrdsp_template.c
+++ b/libavcodec/sbrdsp_template.c
@@ -102,7 +102,7 @@ av_cold void AAC_RENAME(ff_sbrdsp_init)(SBRDSPContext *s)
ff_sbrdsp_init_aarch64(s);
#elif ARCH_RISCV
ff_sbrdsp_init_riscv(s);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_sbrdsp_init_x86(s);
#endif
#endif /* !USE_FIXED */
diff --git a/libavcodec/svq1encdsp.h b/libavcodec/svq1encdsp.h
index 751b5eed86..dcc8e825a3 100644
--- a/libavcodec/svq1encdsp.h
+++ b/libavcodec/svq1encdsp.h
@@ -52,7 +52,7 @@ static inline void ff_svq1enc_init(SVQ1EncDSPContext *c)
ff_svq1enc_init_ppc(c);
#elif ARCH_RISCV
ff_svq1enc_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_svq1enc_init_x86(c);
#endif
}
diff --git a/libavcodec/synth_filter.c b/libavcodec/synth_filter.c
index f90c6be7a7..82a2f812b8 100644
--- a/libavcodec/synth_filter.c
+++ b/libavcodec/synth_filter.c
@@ -180,7 +180,7 @@ av_cold void ff_synth_filter_init(SynthFilterContext *c)
ff_synth_filter_init_aarch64(c);
#elif ARCH_ARM
ff_synth_filter_init_arm(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_synth_filter_init_x86(c);
#endif
}
diff --git a/libavcodec/takdsp.c b/libavcodec/takdsp.c
index 51b6658de4..a7e281b6e2 100644
--- a/libavcodec/takdsp.c
+++ b/libavcodec/takdsp.c
@@ -79,7 +79,7 @@ av_cold void ff_takdsp_init(TAKDSPContext *c)
#if ARCH_RISCV
ff_takdsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_takdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/ttadsp.c b/libavcodec/ttadsp.c
index 5dda19587c..af82850869 100644
--- a/libavcodec/ttadsp.c
+++ b/libavcodec/ttadsp.c
@@ -57,7 +57,7 @@ av_cold void ff_ttadsp_init(TTADSPContext *c)
{
c->filter_process = tta_filter_process_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_ttadsp_init_x86(c);
#endif
}
diff --git a/libavcodec/ttaencdsp.c b/libavcodec/ttaencdsp.c
index 0efdc109bb..0a717313bf 100644
--- a/libavcodec/ttaencdsp.c
+++ b/libavcodec/ttaencdsp.c
@@ -54,7 +54,7 @@ av_cold void ff_ttaencdsp_init(TTAEncDSPContext *c)
{
c->filter_process = ttaenc_filter_process_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_ttaencdsp_init_x86(c);
#endif
}
diff --git a/libavcodec/utvideodsp.c b/libavcodec/utvideodsp.c
index b63dafbe17..209f8561ab 100644
--- a/libavcodec/utvideodsp.c
+++ b/libavcodec/utvideodsp.c
@@ -79,7 +79,7 @@ av_cold void ff_utvideodsp_init(UTVideoDSPContext *c)
#if ARCH_RISCV
ff_utvideodsp_init_riscv(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_utvideodsp_init_x86(c);
#endif
}
diff --git a/libavcodec/v210dec_init.h b/libavcodec/v210dec_init.h
index a0c97bf426..7523cb02be 100644
--- a/libavcodec/v210dec_init.h
+++ b/libavcodec/v210dec_init.h
@@ -54,7 +54,7 @@ static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u,
av_unused static av_cold void ff_v210dec_init(V210DecContext *s)
{
s->unpack_frame = v210_planar_unpack_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_v210_x86_init(s);
#endif
}
diff --git a/libavcodec/v210enc_init.h b/libavcodec/v210enc_init.h
index 01b6981b50..75ce624854 100644
--- a/libavcodec/v210enc_init.h
+++ b/libavcodec/v210enc_init.h
@@ -83,7 +83,7 @@ av_unused av_cold static void ff_v210enc_init(V210EncContext *s)
s->sample_factor_8 = 2;
s->sample_factor_10 = 1;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_v210enc_init_x86(s);
#endif
}
diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c
index 2caa3c6863..864a6e5e7b 100644
--- a/libavcodec/vc1dsp.c
+++ b/libavcodec/vc1dsp.c
@@ -1041,7 +1041,7 @@ av_cold void ff_vc1dsp_init(VC1DSPContext *dsp)
ff_vc1dsp_init_ppc(dsp);
#elif ARCH_RISCV
ff_vc1dsp_init_riscv(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vc1dsp_init_x86(dsp);
#elif ARCH_MIPS
ff_vc1dsp_init_mips(dsp);
diff --git a/libavcodec/videodsp.c b/libavcodec/videodsp.c
index a19e87a819..c66757ce83 100644
--- a/libavcodec/videodsp.c
+++ b/libavcodec/videodsp.c
@@ -53,7 +53,7 @@ av_cold void ff_videodsp_init(VideoDSPContext *ctx, int bpc)
ff_videodsp_init_ppc(ctx, bpc);
#elif ARCH_RISCV
ff_videodsp_init_riscv(ctx, bpc);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_videodsp_init_x86(ctx, bpc);
#elif ARCH_MIPS
ff_videodsp_init_mips(ctx, bpc);
diff --git a/libavcodec/vorbisdsp.c b/libavcodec/vorbisdsp.c
index 70022bd262..54a55d109d 100644
--- a/libavcodec/vorbisdsp.c
+++ b/libavcodec/vorbisdsp.c
@@ -55,7 +55,7 @@ av_cold void ff_vorbisdsp_init(VorbisDSPContext *dsp)
ff_vorbisdsp_init_ppc(dsp);
#elif ARCH_RISCV
ff_vorbisdsp_init_riscv(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vorbisdsp_init_x86(dsp);
#endif
}
diff --git a/libavcodec/vp3dsp.c b/libavcodec/vp3dsp.c
index b96b4dea68..025ad04231 100644
--- a/libavcodec/vp3dsp.c
+++ b/libavcodec/vp3dsp.c
@@ -459,7 +459,7 @@ av_cold void ff_vp3dsp_init(VP3DSPContext *c)
ff_vp3dsp_init_arm(c);
#elif ARCH_PPC
ff_vp3dsp_init_ppc(c);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vp3dsp_init_x86(c);
#elif ARCH_MIPS
ff_vp3dsp_init_mips(c);
diff --git a/libavcodec/vp6dsp.c b/libavcodec/vp6dsp.c
index bdaa054307..e12a7ed2ad 100644
--- a/libavcodec/vp6dsp.c
+++ b/libavcodec/vp6dsp.c
@@ -64,7 +64,7 @@ av_cold void ff_vp6dsp_init(VP6DSPContext *s)
{
s->vp6_filter_diag4 = vp6_filter_diag4_c;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_vp6dsp_init_x86(s);
#endif
}
diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c
index 146cb0a7c7..5543303adb 100644
--- a/libavcodec/vp8dsp.c
+++ b/libavcodec/vp8dsp.c
@@ -683,7 +683,7 @@ av_cold void ff_vp78dsp_init(VP8DSPContext *dsp)
ff_vp78dsp_init_ppc(dsp);
#elif ARCH_RISCV
ff_vp78dsp_init_riscv(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vp78dsp_init_x86(dsp);
#endif
}
@@ -750,7 +750,7 @@ av_cold void ff_vp8dsp_init(VP8DSPContext *dsp)
ff_vp8dsp_init_arm(dsp);
#elif ARCH_RISCV
ff_vp8dsp_init_riscv(dsp);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vp8dsp_init_x86(dsp);
#elif ARCH_MIPS
ff_vp8dsp_init_mips(dsp);
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c
index 967e6e1e1a..147486e10b 100644
--- a/libavcodec/vp9dsp.c
+++ b/libavcodec/vp9dsp.c
@@ -102,7 +102,7 @@ av_cold void ff_vp9dsp_init(VP9DSPContext *dsp, int bpp, int bitexact)
ff_vp9dsp_init_arm(dsp, bpp);
#elif ARCH_RISCV
ff_vp9dsp_init_riscv(dsp, bpp, bitexact);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vp9dsp_init_x86(dsp, bpp, bitexact);
#elif ARCH_MIPS
ff_vp9dsp_init_mips(dsp, bpp);
diff --git a/libavcodec/vvc/dsp.c b/libavcodec/vvc/dsp.c
index af392f2754..60372cca45 100644
--- a/libavcodec/vvc/dsp.c
+++ b/libavcodec/vvc/dsp.c
@@ -113,7 +113,7 @@ void ff_vvc_dsp_init(VVCDSPContext *vvcdsp, int bit_depth)
ff_vvc_dsp_init_aarch64(vvcdsp, bit_depth);
#elif ARCH_RISCV
ff_vvc_dsp_init_riscv(vvcdsp, bit_depth);
-#elif ARCH_X86
+#elif ARCH_X86 && HAVE_X86ASM
ff_vvc_dsp_init_x86(vvcdsp, bit_depth);
#endif
}
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 84ba395c82..63b16f24c8 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -1,89 +1,87 @@
OBJS += x86/constants.o \
# subsystems
-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o
-OBJS-$(CONFIG_AUDIODSP) += x86/audiodsp_init.o
-OBJS-$(CONFIG_BLOCKDSP) += x86/blockdsp_init.o
-OBJS-$(CONFIG_BSWAPDSP) += x86/bswapdsp_init.o
-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_init.o \
+X86ASM-OBJS-$(CONFIG_AC3DSP) += x86/ac3dsp_init.o
+X86ASM-OBJS-$(CONFIG_AUDIODSP) += x86/audiodsp_init.o
+X86ASM-OBJS-$(CONFIG_BLOCKDSP) += x86/blockdsp_init.o
+X86ASM-OBJS-$(CONFIG_BSWAPDSP) += x86/bswapdsp_init.o
+X86ASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp_init.o \
x86/dirac_dwt_init.o
OBJS-$(CONFIG_FDCTDSP) += x86/fdctdsp_init.o x86/fdct.o
-OBJS-$(CONFIG_FMTCONVERT) += x86/fmtconvert_init.o
-OBJS-$(CONFIG_H263DSP) += x86/h263dsp_init.o
-OBJS-$(CONFIG_H264CHROMA) += x86/h264chroma_init.o
-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
-OBJS-$(CONFIG_H264QPEL) += x86/h264_qpel.o
-OBJS-$(CONFIG_HPELDSP) += x86/hpeldsp_init.o
-OBJS-$(CONFIG_LLAUDDSP) += x86/lossless_audiodsp_init.o
-OBJS-$(CONFIG_LLVIDDSP) += x86/lossless_videodsp_init.o
+X86ASM-OBJS-$(CONFIG_FMTCONVERT) += x86/fmtconvert_init.o
+X86ASM-OBJS-$(CONFIG_H263DSP) += x86/h263dsp_init.o
+X86ASM-OBJS-$(CONFIG_H264CHROMA) += x86/h264chroma_init.o
+X86ASM-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_init.o
+X86ASM-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
+X86ASM-OBJS-$(CONFIG_H264QPEL) += x86/h264_qpel.o
+X86ASM-OBJS-$(CONFIG_HPELDSP) += x86/hpeldsp_init.o
+X86ASM-OBJS-$(CONFIG_HUFFYUVDSP) += x86/huffyuvdsp_init.o
+X86ASM-OBJS-$(CONFIG_HUFFYUVENCDSP) += x86/huffyuvencdsp_init.o
+X86ASM-OBJS-$(CONFIG_IDCTDSP) += x86/idctdsp_init.o
+X86ASM-OBJS-$(CONFIG_LLAUDDSP) += x86/lossless_audiodsp_init.o
+X86ASM-OBJS-$(CONFIG_LLVIDDSP) += x86/lossless_videodsp_init.o
OBJS-$(CONFIG_LLVIDENCDSP) += x86/lossless_videoencdsp_init.o
-OBJS-$(CONFIG_HUFFYUVDSP) += x86/huffyuvdsp_init.o
-OBJS-$(CONFIG_HUFFYUVENCDSP) += x86/huffyuvencdsp_init.o
-OBJS-$(CONFIG_IDCTDSP) += x86/idctdsp_init.o
OBJS-$(CONFIG_LPC) += x86/lpc_init.o
-OBJS-$(CONFIG_ME_CMP) += x86/me_cmp_init.o
+X86ASM-OBJS-$(CONFIG_ME_CMP) += x86/me_cmp_init.o
OBJS-$(CONFIG_MPEGAUDIODSP) += x86/mpegaudiodsp.o
OBJS-$(CONFIG_MPEGVIDEO) += x86/mpegvideo.o
OBJS-$(CONFIG_MPEGVIDEOENC) += x86/mpegvideoenc.o
OBJS-$(CONFIG_MPEGVIDEOENCDSP) += x86/mpegvideoencdsp_init.o
-OBJS-$(CONFIG_PIXBLOCKDSP) += x86/pixblockdsp_init.o
-OBJS-$(CONFIG_QPELDSP) += x86/qpeldsp_init.o
-OBJS-$(CONFIG_RV34DSP) += x86/rv34dsp_init.o
-OBJS-$(CONFIG_VC1DSP) += x86/vc1dsp_init.o
-OBJS-$(CONFIG_VIDEODSP) += x86/videodsp_init.o
-OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o
-OBJS-$(CONFIG_VP8DSP) += x86/vp8dsp_init.o
+X86ASM-OBJS-$(CONFIG_PIXBLOCKDSP) += x86/pixblockdsp_init.o
+X86ASM-OBJS-$(CONFIG_QPELDSP) += x86/qpeldsp_init.o
+X86ASM-OBJS-$(CONFIG_RV34DSP) += x86/rv34dsp_init.o
+X86ASM-OBJS-$(CONFIG_VC1DSP) += x86/vc1dsp_init.o x86/vc1dsp_mmx.o
+X86ASM-OBJS-$(CONFIG_VIDEODSP) += x86/videodsp_init.o
+X86ASM-OBJS-$(CONFIG_VP3DSP) += x86/vp3dsp_init.o
+X86ASM-OBJS-$(CONFIG_VP8DSP) += x86/vp8dsp_init.o
OBJS-$(CONFIG_XMM_CLOBBER_TEST) += x86/w64xmmtest.o
# decoders/encoders
-OBJS-$(CONFIG_AAC_DECODER) += x86/aacpsdsp_init.o \
+X86ASM-OBJS-$(CONFIG_AAC_DECODER) += x86/aacpsdsp_init.o \
x86/sbrdsp_init.o
-OBJS-$(CONFIG_AAC_ENCODER) += x86/aacencdsp_init.o
-OBJS-$(CONFIG_ADPCM_G722_DECODER) += x86/g722dsp_init.o
-OBJS-$(CONFIG_ADPCM_G722_ENCODER) += x86/g722dsp_init.o
-OBJS-$(CONFIG_ALAC_DECODER) += x86/alacdsp_init.o
-OBJS-$(CONFIG_APNG_DECODER) += x86/pngdsp_init.o
-OBJS-$(CONFIG_APV_DECODER) += x86/apv_dsp_init.o
-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
-OBJS-$(CONFIG_CFHD_DECODER) += x86/cfhddsp_init.o
-OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp_init.o
-OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp_init.o x86/synth_filter_init.o
-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc_init.o
-OBJS-$(CONFIG_EXR_DECODER) += x86/exrdsp_init.o
-OBJS-$(CONFIG_FLAC_DECODER) += x86/flacdsp_init.o
-OBJS-$(CONFIG_FLAC_ENCODER) += x86/flacencdsp_init.o
-OBJS-$(CONFIG_OPUS_DECODER) += x86/opusdsp_init.o
-OBJS-$(CONFIG_OPUS_ENCODER) += x86/celt_pvq_init.o
-OBJS-$(CONFIG_JPEG2000_DECODER) += x86/jpeg2000dsp_init.o
-OBJS-$(CONFIG_LSCR_DECODER) += x86/pngdsp_init.o
+X86ASM-OBJS-$(CONFIG_AAC_ENCODER) += x86/aacencdsp_init.o
+X86ASM-OBJS-$(CONFIG_ADPCM_G722_DECODER) += x86/g722dsp_init.o
+X86ASM-OBJS-$(CONFIG_ADPCM_G722_ENCODER) += x86/g722dsp_init.o
+X86ASM-OBJS-$(CONFIG_ALAC_DECODER) += x86/alacdsp_init.o
+X86ASM-OBJS-$(CONFIG_APNG_DECODER) += x86/pngdsp_init.o
+X86ASM-OBJS-$(CONFIG_APV_DECODER) += x86/apv_dsp_init.o
+X86ASM-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
+X86ASM-OBJS-$(CONFIG_CFHD_DECODER) += x86/cfhddsp_init.o
+X86ASM-OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp_init.o
+X86ASM-OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp_init.o x86/synth_filter_init.o
+X86ASM-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc_init.o
+X86ASM-OBJS-$(CONFIG_EXR_DECODER) += x86/exrdsp_init.o
+X86ASM-OBJS-$(CONFIG_FLAC_DECODER) += x86/flacdsp_init.o
+X86ASM-OBJS-$(CONFIG_FLAC_ENCODER) += x86/flacencdsp_init.o
+X86ASM-OBJS-$(CONFIG_OPUS_DECODER) += x86/opusdsp_init.o
+X86ASM-OBJS-$(CONFIG_OPUS_ENCODER) += x86/celt_pvq_init.o
+X86ASM-OBJS-$(CONFIG_JPEG2000_DECODER) += x86/jpeg2000dsp_init.o
+X86ASM-OBJS-$(CONFIG_LSCR_DECODER) += x86/pngdsp_init.o
OBJS-$(CONFIG_MLP_DECODER) += x86/mlpdsp_init.o
-OBJS-$(CONFIG_MPEG4_DECODER) += x86/mpeg4videodsp.o x86/xvididct_init.o
-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o
-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp_init.o
-OBJS-$(CONFIG_PRORES_RAW_DECODER) += x86/proresdsp_init.o
-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp_init.o
-OBJS-$(CONFIG_SBC_ENCODER) += x86/sbcdsp_init.o
-OBJS-$(CONFIG_SVQ1_ENCODER) += x86/svq1enc_init.o
-OBJS-$(CONFIG_TAK_DECODER) += x86/takdsp_init.o
+OBJS-$(CONFIG_MPEG4_DECODER) += x86/mpeg4videodsp.o
+X86ASM-OBJS-$(CONFIG_MPEG4_DECODER) += x86/xvididct_init.o
+X86ASM-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp_init.o
+X86ASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp_init.o
+X86ASM-OBJS-$(CONFIG_PRORES_RAW_DECODER) += x86/proresdsp_init.o
+X86ASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp_init.o
+X86ASM-OBJS-$(CONFIG_SBC_ENCODER) += x86/sbcdsp_init.o
+X86ASM-OBJS-$(CONFIG_SVQ1_ENCODER) += x86/svq1enc_init.o
+X86ASM-OBJS-$(CONFIG_TAK_DECODER) += x86/takdsp_init.o
OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp_init.o
-OBJS-$(CONFIG_TTA_DECODER) += x86/ttadsp_init.o
-OBJS-$(CONFIG_TTA_ENCODER) += x86/ttaencdsp_init.o
-OBJS-$(CONFIG_UTVIDEO_DECODER) += x86/utvideodsp_init.o
-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o
-OBJS-$(CONFIG_V210_ENCODER) += x86/v210enc_init.o
-OBJS-$(CONFIG_VORBIS_DECODER) += x86/vorbisdsp_init.o
-OBJS-$(CONFIG_VP6_DECODER) += x86/vp6dsp_init.o
-OBJS-$(CONFIG_VP9_DECODER) += x86/vp9dsp_init.o \
+X86ASM-OBJS-$(CONFIG_TTA_DECODER) += x86/ttadsp_init.o
+X86ASM-OBJS-$(CONFIG_TTA_ENCODER) += x86/ttaencdsp_init.o
+X86ASM-OBJS-$(CONFIG_UTVIDEO_DECODER) += x86/utvideodsp_init.o
+X86ASM-OBJS-$(CONFIG_V210_DECODER) += x86/v210-init.o
+X86ASM-OBJS-$(CONFIG_V210_ENCODER) += x86/v210enc_init.o
+X86ASM-OBJS-$(CONFIG_VORBIS_DECODER) += x86/vorbisdsp_init.o
+X86ASM-OBJS-$(CONFIG_VP6_DECODER) += x86/vp6dsp_init.o
+X86ASM-OBJS-$(CONFIG_VP9_DECODER) += x86/vp9dsp_init.o \
x86/vp9dsp_init_10bpp.o \
x86/vp9dsp_init_12bpp.o \
x86/vp9dsp_init_16bpp.o
# GCC inline assembly optimizations
-# subsystems
-MMX-OBJS-$(CONFIG_VC1DSP) += x86/vc1dsp_mmx.o
-
# decoders/encoders
MMX-OBJS-$(CONFIG_SNOW_DECODER) += x86/snowdsp.o
MMX-OBJS-$(CONFIG_SNOW_ENCODER) += x86/snowdsp.o
diff --git a/libavcodec/x86/alacdsp_init.c b/libavcodec/x86/alacdsp_init.c
index 18f7308a12..1b2ff9525b 100644
--- a/libavcodec/x86/alacdsp_init.c
+++ b/libavcodec/x86/alacdsp_init.c
@@ -19,7 +19,6 @@
#include "libavutil/attributes.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/alacdsp.h"
-#include "config.h"
void ff_alac_decorrelate_stereo_sse4(int32_t *buffer[2], int nb_samples,
int decorr_shift, int decorr_left_weight);
@@ -30,7 +29,6 @@ void ff_alac_append_extra_bits_mono_sse2(int32_t *buffer[2], int32_t *extra_bits
av_cold void ff_alacdsp_init_x86(ALACDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -40,5 +38,4 @@ av_cold void ff_alacdsp_init_x86(ALACDSPContext *c)
if (EXTERNAL_SSE4(cpu_flags)) {
c->decorrelate_stereo = ff_alac_decorrelate_stereo_sse4;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/blockdsp_init.c b/libavcodec/x86/blockdsp_init.c
index 37f3bb6a84..a2b362e655 100644
--- a/libavcodec/x86/blockdsp_init.c
+++ b/libavcodec/x86/blockdsp_init.c
@@ -36,7 +36,6 @@ void ff_fill_block_tab_8_avx2(uint8_t *block, uint8_t value, ptrdiff_t line_size
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE(cpu_flags)) {
@@ -55,5 +54,4 @@ av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
c->fill_block_tab[0] = ff_fill_block_tab_16_avx2;
c->fill_block_tab[1] = ff_fill_block_tab_8_avx2;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/dirac_dwt_init.c b/libavcodec/x86/dirac_dwt_init.c
index 13b42b60cb..ecf89342b0 100644
--- a/libavcodec/x86/dirac_dwt_init.c
+++ b/libavcodec/x86/dirac_dwt_init.c
@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/dirac_dwt.h"
@@ -133,10 +132,8 @@ static void horizontal_compose_haar1i##ext(uint8_t *_b, uint8_t *_tmp, int w)\
}\
\
-#if HAVE_X86ASM
COMPOSE_VERTICAL(_sse2, 8)
-
void ff_horizontal_compose_dd97i_ssse3(int16_t *_b, int16_t *_tmp, int w);
static void horizontal_compose_dd97i_ssse3(uint8_t *_b, uint8_t *_tmp, int w)
@@ -153,11 +150,9 @@ static void horizontal_compose_dd97i_ssse3(uint8_t *_b, uint8_t *_tmp, int w)
b[2*x+1] = (COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1)>>1;
}
}
-#endif
void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type)
{
-#if HAVE_X86ASM
int mm_flags = av_get_cpu_flags();
if (!(mm_flags & AV_CPU_FLAG_SSE2))
@@ -194,5 +189,4 @@ void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type)
d->horizontal_compose = horizontal_compose_dd97i_ssse3;
break;
}
-#endif // HAVE_X86ASM
}
diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
index ef01ebdf2e..4f27e1fc2b 100644
--- a/libavcodec/x86/diracdsp_init.c
+++ b/libavcodec/x86/diracdsp_init.c
@@ -34,8 +34,6 @@ void ff_put_signed_rect_clamped_10_sse4(uint8_t *dst, int dst_stride, const uint
void ff_dequant_subband_32_sse4(uint8_t *src, uint8_t *dst, ptrdiff_t stride, const int qf, const int qs, int tot_v, int tot_h);
-#if HAVE_X86ASM
-
#define HPEL_FILTER(MMSIZE, EXT) \
void ff_dirac_hpel_filter_v_ ## EXT(uint8_t *, const uint8_t *, int, int); \
void ff_dirac_hpel_filter_h_ ## EXT(uint8_t *, const uint8_t *, int); \
@@ -81,11 +79,8 @@ DIRAC_PIXOP(avg, sse2)
HPEL_FILTER(16, sse2)
-#endif // HAVE_X86ASM
-
void ff_diracdsp_init_x86(DiracDSPContext* c)
{
-#if HAVE_X86ASM
int mm_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(mm_flags)) {
@@ -107,5 +102,4 @@ void ff_diracdsp_init_x86(DiracDSPContext* c)
c->dequant_subband[1] = ff_dequant_subband_32_sse4;
c->put_signed_rect_clamped[1] = ff_put_signed_rect_clamped_10_sse4;
}
-#endif // HAVE_X86ASM
}
diff --git a/libavcodec/x86/flacdsp_init.c b/libavcodec/x86/flacdsp_init.c
index 386955ba67..a2c3829d66 100644
--- a/libavcodec/x86/flacdsp_init.c
+++ b/libavcodec/x86/flacdsp_init.c
@@ -62,7 +62,6 @@ DECORRELATE_IFUNCS(32, avx);
av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -127,5 +126,4 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int
if (EXTERNAL_XOP(cpu_flags)) {
c->lpc32 = ff_flac_lpc_32_xop;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/flacencdsp_init.c b/libavcodec/x86/flacencdsp_init.c
index 5ab37e0a8f..5b45f009d8 100644
--- a/libavcodec/x86/flacencdsp_init.c
+++ b/libavcodec/x86/flacencdsp_init.c
@@ -27,12 +27,12 @@ void ff_flac_enc_lpc_16_sse4(int32_t *, const int32_t *, int, int, const int32_t
av_cold void ff_flacencdsp_init_x86(FLACEncDSPContext *c)
{
-#if HAVE_X86ASM && CONFIG_GPL
+#if CONFIG_GPL
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE4(cpu_flags)) {
if (CONFIG_GPL)
c->lpc16_encode = ff_flac_enc_lpc_16_sse4;
}
-#endif /* HAVE_X86ASM */
+#endif /* CONFIG_GPL */
}
diff --git a/libavcodec/x86/fmtconvert_init.c b/libavcodec/x86/fmtconvert_init.c
index acbc334565..6cf3a807a6 100644
--- a/libavcodec/x86/fmtconvert_init.c
+++ b/libavcodec/x86/fmtconvert_init.c
@@ -27,22 +27,16 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/fmtconvert.h"
-#if HAVE_X86ASM
-
void ff_int32_to_float_fmul_scalar_sse2(float *dst, const int32_t *src, float mul, int len);
void ff_int32_to_float_fmul_array8_sse2(FmtConvertContext *c, float *dst, const int32_t *src,
const float *mul, int len);
-#endif /* HAVE_X86ASM */
-
av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_sse2;
c->int32_to_float_fmul_array8 = ff_int32_to_float_fmul_array8_sse2;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index f2bcca1e11..5d618651a4 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -30,7 +30,6 @@
#include "fpel.h"
#include "qpel.h"
-#if HAVE_X86ASM
void ff_avg_pixels4_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
void ff_put_pixels4x4_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
ptrdiff_t stride);
@@ -344,8 +343,6 @@ LUMA_MC_816(10, mc13, sse2)
LUMA_MC_816(10, mc23, sse2)
LUMA_MC_816(10, mc33, sse2)
-#endif /* HAVE_X86ASM */
-
#define SET_QPEL_FUNCS_1PP(PFX, IDX, SIZE, CPU, PREFIX) \
do { \
c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \
@@ -388,7 +385,6 @@ LUMA_MC_816(10, mc33, sse2)
av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
{
-#if HAVE_X86ASM
int high_bit_depth = bit_depth > 8;
int cpu_flags = av_get_cpu_flags();
@@ -455,5 +451,4 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
H264_QPEL_FUNCS_10(3, 0, ssse3_cache64);
}
}
-#endif
}
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index dc8fc4f720..66c2f36908 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -190,7 +190,6 @@ H264_BIWEIGHT_10_SSE(4, 10)
av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
const int chroma_format_idc)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMXEXT(cpu_flags) && chroma_format_idc <= 1)
@@ -363,5 +362,4 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
#endif /* HAVE_ALIGNED_STACK */
}
}
-#endif
}
diff --git a/libavcodec/x86/hevc/Makefile b/libavcodec/x86/hevc/Makefile
index 8f1c88c569..74418a322c 100644
--- a/libavcodec/x86/hevc/Makefile
+++ b/libavcodec/x86/hevc/Makefile
@@ -1,12 +1,12 @@
clean::
$(RM) $(CLEANSUFFIXES:%=libavcodec/x86/hevc/%) $(CLEANSUFFIXES:%=libavcodec/x86/h26x/%)
-OBJS-$(CONFIG_HEVC_DECODER) += x86/hevc/dsp_init.o \
- x86/h26x/h2656dsp.o
-X86ASM-OBJS-$(CONFIG_HEVC_DECODER) += x86/hevc/add_res.o \
+X86ASM-OBJS-$(CONFIG_HEVC_DECODER) += x86/hevc/dsp_init.o \
+ x86/hevc/add_res.o \
x86/hevc/deblock.o \
x86/hevc/idct.o \
x86/hevc/mc.o \
x86/hevc/sao.o \
x86/hevc/sao_10bit.o \
+ x86/h26x/h2656dsp.o \
x86/h26x/h2656_inter.o
diff --git a/libavcodec/x86/lossless_audiodsp_init.c b/libavcodec/x86/lossless_audiodsp_init.c
index 462329db32..a8bae6ccad 100644
--- a/libavcodec/x86/lossless_audiodsp_init.c
+++ b/libavcodec/x86/lossless_audiodsp_init.c
@@ -34,7 +34,6 @@ int32_t ff_scalarproduct_and_madd_int32_sse4(int16_t *v1, const int32_t *v2,
av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags))
@@ -46,5 +45,4 @@ av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c)
if (EXTERNAL_SSE4(cpu_flags))
c->scalarproduct_and_madd_int32 = ff_scalarproduct_and_madd_int32_sse4;
-#endif
}
diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c
index 3a8b46f4e1..dbb4ef96bb 100644
--- a/libavcodec/x86/me_cmp_init.c
+++ b/libavcodec/x86/me_cmp_init.c
@@ -80,7 +80,6 @@ int ff_vsad16u_approx_sse2(MPVEncContext *v, const uint8_t *pix1, const uint8_t
hadamard_func(sse2)
hadamard_func(ssse3)
-#if HAVE_X86ASM
static int nsse16_ssse3(MPVEncContext *c, const uint8_t *pix1, const uint8_t *pix2,
ptrdiff_t stride, int h)
{
@@ -107,11 +106,8 @@ static int nsse8_ssse3(MPVEncContext *c, const uint8_t *pix1, const uint8_t *pix
return score1 + FFABS(score2) * 8;
}
-#endif /* HAVE_X86ASM */
-
av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMXEXT(cpu_flags)) {
@@ -174,5 +170,4 @@ av_cold void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx)
c->hadamard8_diff[0] = ff_hadamard8_diff16_ssse3;
c->hadamard8_diff[1] = ff_hadamard8_diff_ssse3;
}
-#endif
}
diff --git a/libavcodec/x86/qpeldsp_init.c b/libavcodec/x86/qpeldsp_init.c
index cab2ac433a..a569f564e6 100644
--- a/libavcodec/x86/qpeldsp_init.c
+++ b/libavcodec/x86/qpeldsp_init.c
@@ -80,8 +80,6 @@ void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst,
const uint8_t *src,
ptrdiff_t dstStride, ptrdiff_t srcStride);
-#if HAVE_X86ASM
-
#define QPEL_OP(OPNAME, RND, MMX) \
static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, \
const uint8_t *src, \
@@ -485,8 +483,6 @@ QPEL_OP(put_, _, mmxext)
QPEL_OP(avg_, _, mmxext)
QPEL_OP(put_no_rnd_, _no_rnd_, mmxext)
-#endif /* HAVE_X86ASM */
-
#define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \
do { \
c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index a07acae6bc..97abee3219 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -39,7 +39,6 @@ static void op##_rv40_qpel##size##_mc33_##insn(uint8_t *dst, const uint8_t *src,
ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
}
-#if HAVE_X86ASM
#define DECLARE_WEIGHT(opt) \
void ff_rv40_weight_func_rnd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
int w1, int w2, ptrdiff_t stride); \
@@ -174,13 +173,10 @@ void ff_rv40_ ## OP ## _chroma_mc ## SIZE ## _ ## XMM(uint8_t *dst, const uint8_
ptrdiff_t stride, int h, int x, int y);\
c->OP ## _chroma_pixels_tab[SIZE == 4] = ff_rv40_ ## OP ## _chroma_mc ## SIZE ## _ ## XMM
-#endif /* HAVE_X86ASM */
-
av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c)
{
av_unused int cpu_flags = av_get_cpu_flags();
-#if HAVE_X86ASM
if (EXTERNAL_SSE2(cpu_flags)) {
c->put_pixels_tab[0][15] = put_rv40_qpel16_mc33_sse2;
c->avg_pixels_tab[0][15] = avg_rv40_qpel16_mc33_sse2;
@@ -207,5 +203,4 @@ av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c)
QPEL_MC_SET(put_, _ssse3)
QPEL_MC_SET(avg_, _ssse3)
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/synth_filter_init.c b/libavcodec/x86/synth_filter_init.c
index e09870b23d..93407c92da 100644
--- a/libavcodec/x86/synth_filter_init.c
+++ b/libavcodec/x86/synth_filter_init.c
@@ -43,15 +43,12 @@ static void synth_filter_##opt(AVTXContext *imdct, \
*synth_buf_offset = (*synth_buf_offset - 32) & 511; \
} \
-#if HAVE_X86ASM
SYNTH_FILTER_FUNC(sse2)
SYNTH_FILTER_FUNC(avx)
SYNTH_FILTER_FUNC(fma3)
-#endif /* HAVE_X86ASM */
av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -63,5 +60,4 @@ av_cold void ff_synth_filter_init_x86(SynthFilterContext *s)
if (EXTERNAL_FMA3_FAST(cpu_flags)) {
s->synth_filter_float = synth_filter_fma3;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/takdsp_init.c b/libavcodec/x86/takdsp_init.c
index 9553f8442c..68eb1b8c55 100644
--- a/libavcodec/x86/takdsp_init.c
+++ b/libavcodec/x86/takdsp_init.c
@@ -21,7 +21,6 @@
#include "libavutil/attributes.h"
#include "libavcodec/takdsp.h"
#include "libavutil/x86/cpu.h"
-#include "config.h"
void ff_tak_decorrelate_ls_sse2(const int32_t *p1, int32_t *p2, int length);
void ff_tak_decorrelate_ls_avx2(const int32_t *p1, int32_t *p2, int length);
@@ -34,7 +33,6 @@ void ff_tak_decorrelate_sf_avx2(int32_t *p1, const int32_t *p2, int length, int
av_cold void ff_takdsp_init_x86(TAKDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -53,5 +51,4 @@ av_cold void ff_takdsp_init_x86(TAKDSPContext *c)
c->decorrelate_sm = ff_tak_decorrelate_sm_avx2;
c->decorrelate_sf = ff_tak_decorrelate_sf_avx2;
}
-#endif
}
diff --git a/libavcodec/x86/ttadsp_init.c b/libavcodec/x86/ttadsp_init.c
index f2954e5687..b4d5184260 100644
--- a/libavcodec/x86/ttadsp_init.c
+++ b/libavcodec/x86/ttadsp_init.c
@@ -21,7 +21,6 @@
#include "libavutil/attributes.h"
#include "libavcodec/ttadsp.h"
#include "libavutil/x86/cpu.h"
-#include "config.h"
void ff_tta_filter_process_ssse3(int32_t *qm, int32_t *dx, int32_t *dl,
int32_t *error, int32_t *in, int32_t shift,
@@ -32,12 +31,10 @@ void ff_tta_filter_process_sse4(int32_t *qm, int32_t *dx, int32_t *dl,
av_cold void ff_ttadsp_init_x86(TTADSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSSE3(cpu_flags))
c->filter_process = ff_tta_filter_process_ssse3;
if (EXTERNAL_SSE4(cpu_flags))
c->filter_process = ff_tta_filter_process_sse4;
-#endif
}
diff --git a/libavcodec/x86/ttaencdsp_init.c b/libavcodec/x86/ttaencdsp_init.c
index b470142c50..cfe11f9678 100644
--- a/libavcodec/x86/ttaencdsp_init.c
+++ b/libavcodec/x86/ttaencdsp_init.c
@@ -21,7 +21,6 @@
#include "libavutil/attributes.h"
#include "libavcodec/ttaencdsp.h"
#include "libavutil/x86/cpu.h"
-#include "config.h"
void ff_ttaenc_filter_process_ssse3(int32_t *qm, int32_t *dx, int32_t *dl,
int32_t *error, int32_t *in, int32_t shift,
@@ -32,12 +31,10 @@ void ff_ttaenc_filter_process_sse4(int32_t *qm, int32_t *dx, int32_t *dl,
av_cold void ff_ttaencdsp_init_x86(TTAEncDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSSE3(cpu_flags))
c->filter_process = ff_ttaenc_filter_process_ssse3;
if (EXTERNAL_SSE4(cpu_flags))
c->filter_process = ff_ttaenc_filter_process_sse4;
-#endif
}
diff --git a/libavcodec/x86/v210-init.c b/libavcodec/x86/v210-init.c
index 895cc8f329..7a879f1dc8 100644
--- a/libavcodec/x86/v210-init.c
+++ b/libavcodec/x86/v210-init.c
@@ -32,7 +32,6 @@ extern void ff_v210_planar_unpack_avx512icl(const uint32_t *src, uint16_t *y, ui
av_cold void ff_v210_x86_init(V210DecContext *s)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (s->aligned_input) {
@@ -71,5 +70,4 @@ av_cold void ff_v210_x86_init(V210DecContext *s)
s->unpack_frame = ff_v210_planar_unpack_avx512icl;
#endif
}
-#endif // HAVE_X86ASM
}
diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c
index 5cebc1f6f2..e344f233de 100644
--- a/libavcodec/x86/vc1dsp_init.c
+++ b/libavcodec/x86/vc1dsp_init.c
@@ -52,7 +52,6 @@ static void vc1_h_loop_filter16_ ## EXT(uint8_t *src, ptrdiff_t stride, int pq)
ff_vc1_h_loop_filter8_ ## EXT(src+8*stride, stride, pq); \
}
-#if HAVE_X86ASM
LOOP_FILTER4(mmxext)
LOOP_FILTER816(sse2)
LOOP_FILTER4(ssse3)
@@ -78,8 +77,6 @@ DECLARE_FUNCTION(avg_, 8, _mmxext)
DECLARE_FUNCTION(put_, 16, _sse2)
DECLARE_FUNCTION(avg_, 16, _sse2)
-#endif /* HAVE_X86ASM */
-
void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride, int h, int x, int y);
void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src,
@@ -117,7 +114,6 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
dsp->vc1_v_loop_filter16 = vc1_v_loop_filter16_ ## EXT; \
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_ ## EXT
-#if HAVE_X86ASM
if (EXTERNAL_MMXEXT(cpu_flags)) {
ASSIGN_LF4(mmxext);
@@ -145,5 +141,4 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4;
dsp->vc1_h_loop_filter16 = vc1_h_loop_filter16_sse4;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c
index 602856de1e..7f3c837227 100644
--- a/libavcodec/x86/videodsp_init.c
+++ b/libavcodec/x86/videodsp_init.c
@@ -28,7 +28,6 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/videodsp.h"
-#if HAVE_X86ASM
typedef void emu_edge_vfix_func(uint8_t *dst, x86_reg dst_stride,
const uint8_t *src, x86_reg src_stride,
x86_reg start_y, x86_reg end_y, x86_reg bh);
@@ -213,13 +212,11 @@ static av_noinline void emulated_edge_mc_avx2(uint8_t *buf, const uint8_t *src,
hfixtbl_avx2, &ff_emu_edge_hvar_avx2);
}
#endif /* HAVE_AVX2_EXTERNAL */
-#endif /* HAVE_X86ASM */
void ff_prefetch_mmxext(const uint8_t *buf, ptrdiff_t stride, int h);
av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMXEXT(cpu_flags)) {
@@ -233,5 +230,4 @@ av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
ctx->emulated_edge_mc = emulated_edge_mc_avx2;
}
#endif
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c
index bd20da1fc9..e37afab775 100644
--- a/libavcodec/x86/vp8dsp_init.c
+++ b/libavcodec/x86/vp8dsp_init.c
@@ -26,8 +26,6 @@
#include "libavutil/x86/cpu.h"
#include "libavcodec/vp8dsp.h"
-#if HAVE_X86ASM
-
/*
* MC functions
*/
@@ -254,8 +252,6 @@ DECLARE_LOOP_FILTER(sse2)
DECLARE_LOOP_FILTER(ssse3)
DECLARE_LOOP_FILTER(sse4)
-#endif /* HAVE_X86ASM */
-
#define VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) \
c->put_vp8_epel_pixels_tab[IDX][0][2] = ff_put_vp8_epel ## SIZE ## _h6_ ## OPT; \
c->put_vp8_epel_pixels_tab[IDX][2][0] = ff_put_vp8_epel ## SIZE ## _v6_ ## OPT; \
@@ -282,7 +278,6 @@ DECLARE_LOOP_FILTER(sse4)
av_cold void ff_vp78dsp_init_x86(VP8DSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
@@ -317,12 +312,10 @@ av_cold void ff_vp78dsp_init_x86(VP8DSPContext *c)
VP8_BILINEAR_MC_FUNC(1, 8, ssse3);
VP8_BILINEAR_MC_FUNC(2, 4, ssse3);
}
-#endif /* HAVE_X86ASM */
}
av_cold void ff_vp8dsp_init_x86(VP8DSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
@@ -379,5 +372,4 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext *c)
c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse4;
c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse4;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c
index 72edf6bb45..c103751351 100644
--- a/libavcodec/x86/vp9dsp_init.c
+++ b/libavcodec/x86/vp9dsp_init.c
@@ -26,8 +26,6 @@
#include "libavcodec/vp9dsp.h"
#include "libavcodec/x86/vp9dsp_init.h"
-#if HAVE_X86ASM
-
decl_fpel_func(put, 4, , mmx);
decl_fpel_func(put, 8, , mmx);
decl_fpel_func(put, 16, , sse);
@@ -215,11 +213,8 @@ ipred_func(32, v, avx2);
#undef ipred_dir_tm_funcs
#undef ipred_dc_funcs
-#endif /* HAVE_X86ASM */
-
av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
{
-#if HAVE_X86ASM
int cpu_flags;
if (bpp == 10) {
@@ -430,6 +425,4 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
#undef init_subpel1
#undef init_subpel2
#undef init_subpel3
-
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/vp9dsp_init_16bpp.c b/libavcodec/x86/vp9dsp_init_16bpp.c
index e5afea1512..2d2f01ba5f 100644
--- a/libavcodec/x86/vp9dsp_init_16bpp.c
+++ b/libavcodec/x86/vp9dsp_init_16bpp.c
@@ -26,8 +26,6 @@
#include "libavcodec/vp9dsp.h"
#include "libavcodec/x86/vp9dsp_init.h"
-#if HAVE_X86ASM
-
decl_fpel_func(put, 8, , mmx);
decl_fpel_func(avg, 8, _16, mmxext);
decl_fpel_func(put, 16, , sse);
@@ -68,11 +66,9 @@ decl_ipred_dir_funcs(vl);
decl_ipred_dir_funcs(vr);
decl_ipred_dir_funcs(hu);
decl_ipred_dir_funcs(hd);
-#endif /* HAVE_X86ASM */
av_cold void ff_vp9dsp_init_16bpp_x86(VP9DSPContext *dsp)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
@@ -147,6 +143,4 @@ av_cold void ff_vp9dsp_init_16bpp_x86(VP9DSPContext *dsp)
init_ipred_func(dr, DIAG_DOWN_RIGHT, 32, 16, avx2);
#endif
}
-
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/x86/vp9dsp_init_16bpp_template.c b/libavcodec/x86/vp9dsp_init_16bpp_template.c
index db775f7c1a..a6aa03bdc8 100644
--- a/libavcodec/x86/vp9dsp_init_16bpp_template.c
+++ b/libavcodec/x86/vp9dsp_init_16bpp_template.c
@@ -26,8 +26,6 @@
#include "libavcodec/vp9dsp.h"
#include "libavcodec/x86/vp9dsp_init.h"
-#if HAVE_X86ASM
-
extern const int16_t ff_filters_16bpp[3][15][4][16];
decl_mc_funcs(4, sse2, int16_t, 16, BPC);
@@ -138,11 +136,9 @@ decl_itxfm_func(iadst, iadst, 4, BPC, sse2);
decl_itxfm_funcs(8, BPC, sse2);
decl_itxfm_funcs(16, BPC, sse2);
decl_itxfm_func(idct, idct, 32, BPC, sse2);
-#endif /* HAVE_X86ASM */
av_cold void INIT_FUNC(VP9DSPContext *dsp, int bitexact)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
#define init_lpf_8_func(idx1, idx2, dir, wd, bpp, opt) \
@@ -241,7 +237,6 @@ av_cold void INIT_FUNC(VP9DSPContext *dsp, int bitexact)
init_itx_func_one(TX_32X32, idct, idct, 32, BPC, avx512icl);
}
#endif
-#endif /* HAVE_X86ASM */
ff_vp9dsp_init_16bpp_x86(dsp);
}
diff --git a/libavcodec/x86/vvc/Makefile b/libavcodec/x86/vvc/Makefile
index c426b156c1..0cebfb4e9e 100644
--- a/libavcodec/x86/vvc/Makefile
+++ b/libavcodec/x86/vvc/Makefile
@@ -1,13 +1,13 @@
clean::
$(RM) $(CLEANSUFFIXES:%=libavcodec/x86/vvc/%) $(CLEANSUFFIXES:%=libavcodec/x86/h26x/%)
-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/dsp_init.o \
- x86/h26x/h2656dsp.o
-X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/alf.o \
+X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/dsp_init.o \
+ x86/vvc/alf.o \
x86/vvc/dmvr.o \
x86/vvc/mc.o \
x86/vvc/of.o \
x86/vvc/sad.o \
x86/vvc/sao.o \
x86/vvc/sao_10bit.o \
+ x86/h26x/h2656dsp.o \
x86/h26x/h2656_inter.o
diff --git a/libavcodec/x86/xvididct_init.c b/libavcodec/x86/xvididct_init.c
index c6c87b0c90..81575e93eb 100644
--- a/libavcodec/x86/xvididct_init.c
+++ b/libavcodec/x86/xvididct_init.c
@@ -16,7 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
@@ -27,7 +26,6 @@
av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c)
{
-#if HAVE_X86ASM
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_SSE2(cpu_flags)) {
@@ -36,5 +34,4 @@ av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c)
c->idct = ff_xvid_idct_sse2;
c->perm_type = FF_IDCT_PERM_SSE2;
}
-#endif /* HAVE_X86ASM */
}
diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c
index 317e4e82cd..9d971a21d9 100644
--- a/libavcodec/xvididct.c
+++ b/libavcodec/xvididct.c
@@ -336,7 +336,7 @@ av_cold void ff_xvid_idct_init(IDCTDSPContext *c)
c->idct = ff_xvid_idct;
c->perm_type = FF_IDCT_PERM_NONE;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_X86ASM
ff_xvid_idct_init_x86(c);
#elif ARCH_MIPS
ff_xvid_idct_init_mips(c);
commit 65b4feb782ed5a8ba196d25564720f4f14c076a9
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Thu Nov 27 17:14:05 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 22:20:13 2025 +0100
avcodec/x86/Makefile: Remove redundant WebP decoder->vp8dsp dependencies
Redundant since 35b02732b98c1e2e862dc78476d8bc527af1c93c.
Reviewed-by: Kacper Michajłow <kasper93(a)gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 1c1e14b4b8..84ba395c82 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -78,7 +78,6 @@ OBJS-$(CONFIG_VP9_DECODER) += x86/vp9dsp_init.o \
x86/vp9dsp_init_10bpp.o \
x86/vp9dsp_init_12bpp.o \
x86/vp9dsp_init_16bpp.o
-OBJS-$(CONFIG_WEBP_DECODER) += x86/vp8dsp_init.o
# GCC inline assembly optimizations
@@ -193,4 +192,3 @@ X86ASM-OBJS-$(CONFIG_VP9_DECODER) += x86/vp9intrapred.o \
x86/vp9lpf_16bpp.o \
x86/vp9mc.o \
x86/vp9mc_16bpp.o
-X86ASM-OBJS-$(CONFIG_WEBP_DECODER) += x86/vp8dsp.o
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 +-
ffbuild/arch.mak | 1 -
libavcodec/aacencdsp.h | 2 +-
libavcodec/aacpsdsp_template.c | 2 +-
libavcodec/ac3dsp.c | 4 +-
libavcodec/alacdsp.c | 2 +-
libavcodec/apv_dsp.c | 2 +-
libavcodec/audiodsp.c | 2 +-
libavcodec/blockdsp.c | 2 +-
libavcodec/bswapdsp.c | 2 +-
libavcodec/cavsdsp.c | 2 +-
libavcodec/cfhddsp.c | 2 +-
libavcodec/cfhdencdsp.c | 2 +-
libavcodec/dcadsp.c | 2 +-
libavcodec/dirac_dwt.c | 2 +-
libavcodec/diracdsp.c | 2 +-
libavcodec/dnxhdenc.c | 2 +-
libavcodec/exrdsp.c | 2 +-
libavcodec/flacdsp.c | 2 +-
libavcodec/flacencdsp.c | 2 +-
libavcodec/fmtconvert.c | 2 +-
libavcodec/g722dsp.c | 2 +-
libavcodec/h263dsp.c | 2 +-
libavcodec/h264chroma.c | 2 +-
libavcodec/h264dsp.c | 2 +-
libavcodec/h264pred.c | 2 +-
libavcodec/h264qpel.c | 2 +-
libavcodec/hevc/dsp.c | 2 +-
libavcodec/hpeldsp.c | 2 +-
libavcodec/huffyuvdsp.c | 2 +-
libavcodec/huffyuvencdsp.c | 2 +-
libavcodec/idctdsp.c | 4 +-
libavcodec/jpeg2000dsp.c | 2 +-
libavcodec/lossless_audiodsp.c | 2 +-
libavcodec/lossless_videodsp.c | 2 +-
libavcodec/me_cmp.c | 2 +-
libavcodec/opus/dsp.c | 2 +-
libavcodec/opus/pvq.c | 2 +-
libavcodec/pixblockdsp.c | 2 +-
libavcodec/pngdsp.c | 2 +-
libavcodec/proresdsp.c | 2 +-
libavcodec/qpeldsp.c | 2 +-
libavcodec/rv34dsp.c | 2 +-
libavcodec/rv40dsp.c | 2 +-
libavcodec/sbcdsp.c | 2 +-
libavcodec/sbrdsp_template.c | 2 +-
libavcodec/svq1encdsp.h | 2 +-
libavcodec/synth_filter.c | 2 +-
libavcodec/takdsp.c | 2 +-
libavcodec/ttadsp.c | 2 +-
libavcodec/ttaencdsp.c | 2 +-
libavcodec/utvideodsp.c | 2 +-
libavcodec/v210dec_init.h | 2 +-
libavcodec/v210enc_init.h | 2 +-
libavcodec/vc1dsp.c | 2 +-
libavcodec/videodsp.c | 2 +-
libavcodec/vorbisdsp.c | 2 +-
libavcodec/vp3dsp.c | 2 +-
libavcodec/vp6dsp.c | 2 +-
libavcodec/vp8dsp.c | 4 +-
libavcodec/vp9dsp.c | 2 +-
libavcodec/vvc/dsp.c | 2 +-
libavcodec/x86/Makefile | 133 +++++++++++-------------
libavcodec/x86/alacdsp_init.c | 3 -
libavcodec/x86/blockdsp_init.c | 2 -
libavcodec/x86/dirac_dwt_init.c | 6 --
libavcodec/x86/diracdsp_init.c | 6 --
libavcodec/x86/flacdsp_init.c | 2 -
libavcodec/x86/flacencdsp_init.c | 4 +-
libavcodec/x86/fmtconvert_init.c | 6 --
libavcodec/x86/h264_qpel.c | 5 -
libavcodec/x86/h264dsp_init.c | 2 -
libavcodec/x86/hevc/Makefile | 6 +-
libavcodec/x86/lossless_audiodsp_init.c | 2 -
libavcodec/x86/me_cmp_init.c | 5 -
libavcodec/x86/qpeldsp_init.c | 4 -
libavcodec/x86/rv40dsp_init.c | 5 -
libavcodec/x86/synth_filter_init.c | 4 -
libavcodec/x86/takdsp_init.c | 3 -
libavcodec/x86/ttadsp_init.c | 3 -
libavcodec/x86/ttaencdsp_init.c | 3 -
libavcodec/x86/v210-init.c | 2 -
libavcodec/x86/vc1dsp_init.c | 5 -
libavcodec/x86/videodsp_init.c | 4 -
libavcodec/x86/vp8dsp_init.c | 8 --
libavcodec/x86/vp9dsp_init.c | 7 --
libavcodec/x86/vp9dsp_init_16bpp.c | 6 --
libavcodec/x86/vp9dsp_init_16bpp_template.c | 5 -
libavcodec/x86/vvc/Makefile | 6 +-
libavcodec/x86/xvididct_init.c | 3 -
libavcodec/xvididct.c | 2 +-
libavfilter/af_afirdsp.h | 2 +-
libavfilter/af_anlmdn.c | 2 +-
libavfilter/af_volume.c | 2 +-
libavfilter/avf_showcqt.c | 2 +-
libavfilter/bwdifdsp.c | 2 +-
libavfilter/colorspacedsp.c | 2 +-
libavfilter/convolution.h | 2 +-
libavfilter/f_ebur128.c | 2 +-
libavfilter/psnr.c | 2 +-
libavfilter/scene_sad.c | 2 +-
libavfilter/vf_atadenoise.c | 2 +-
libavfilter/vf_blackdetect.h | 2 +-
libavfilter/vf_blend_init.h | 2 +-
libavfilter/vf_colordetectdsp.h | 2 +-
libavfilter/vf_convolution.c | 2 +-
libavfilter/vf_eq.h | 2 +-
libavfilter/vf_framerate.c | 2 +-
libavfilter/vf_fsppdsp.h | 2 +-
libavfilter/vf_gblur_init.h | 2 +-
libavfilter/vf_gradfun.c | 2 +-
libavfilter/vf_hflip_init.h | 2 +-
libavfilter/vf_hqdn3d.c | 2 +-
libavfilter/vf_idetdsp.c | 2 +-
libavfilter/vf_limiter.c | 2 +-
libavfilter/vf_lut3d.c | 2 +-
libavfilter/vf_maskedclamp.c | 2 +-
libavfilter/vf_maskedmerge.c | 2 +-
libavfilter/vf_nlmeans_init.h | 2 +-
libavfilter/vf_overlay.c | 2 +-
libavfilter/vf_pp7.c | 2 +-
libavfilter/vf_pullup.c | 2 +-
libavfilter/vf_removegrain.c | 2 +-
libavfilter/vf_ssim.c | 2 +-
libavfilter/vf_stereo3d.c | 2 +-
libavfilter/vf_threshold_init.h | 2 +-
libavfilter/vf_tinterlace.c | 4 +-
libavfilter/vf_transpose.c | 2 +-
libavfilter/vf_v360.c | 2 +-
libavfilter/vf_w3fdif.c | 2 +-
libavfilter/vf_yadif.c | 2 +-
libavfilter/x86/Makefile | 155 ++++++++++++----------------
libavfilter/x86/scene_sad_init.c | 4 -
libavfilter/x86/vf_colordetect_init.c | 4 -
libavfilter/x86/vf_eq_init.c | 4 -
libavfilter/x86/vf_gradfun_init.c | 5 -
libavfilter/x86/vf_hqdn3d_init.c | 3 -
libavfilter/x86/vf_idetdsp_init.c | 6 --
libavfilter/x86/vf_pullup_init.c | 3 -
libavutil/aes.c | 2 +-
libavutil/fixed_dsp.c | 2 +-
libavutil/float_dsp.c | 2 +-
libavutil/imgutils.c | 2 +-
libavutil/lls.c | 2 +-
libavutil/pixelutils.c | 2 +-
libavutil/x86/Makefile | 29 ++----
libswresample/resample_dsp.c | 2 +-
libswresample/x86/Makefile | 13 ++-
libswresample/x86/rematrix_init.c | 2 -
libswscale/x86/Makefile | 2 +-
libswscale/x86/hscale_fast_bilinear_simd.c | 2 -
151 files changed, 267 insertions(+), 442 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 1d1643b42a vulkan/prores: use cached bitstream reader
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 1d1643b42a62af07fcb77ad6c9992dd41f4e04af (commit)
via fd2fd3828c1e7384d06afee7481d61865ab6cfa7 (commit)
via ef7354d471c18ec5c998220eaa4a95bdd36ccb6a (commit)
from 2456a39581c3388bcf6f61c66aef36a887537c23 (commit)
- Log -----------------------------------------------------------------
commit 1d1643b42a62af07fcb77ad6c9992dd41f4e04af
Author: averne <averne381(a)gmail.com>
AuthorDate: Sat Nov 29 22:33:45 2025 +0100
Commit: averne <averne381(a)gmail.com>
CommitDate: Sun Nov 30 22:01:17 2025 +0100
vulkan/prores: use cached bitstream reader
Speedup is around 75% on NVIDIA 3050, 20% on AMD 6700XT, 5% on Intel TigerLake.
diff --git a/libavcodec/vulkan_prores.c b/libavcodec/vulkan_prores.c
index 0c704c3d1c..90b8610817 100644
--- a/libavcodec/vulkan_prores.c
+++ b/libavcodec/vulkan_prores.c
@@ -21,7 +21,6 @@
#include "hwaccel_internal.h"
#include "libavutil/mem.h"
#include "libavutil/vulkan.h"
-#include "libavutil/vulkan_loader.h"
#include "libavutil/vulkan_spirv.h"
extern const char *ff_source_common_comp;
@@ -207,14 +206,12 @@ static int vk_prores_end_frame(AVCodecContext *avctx)
RET(ff_vk_exec_mirror_sem_value(&ctx->s, exec, &vp->sem, &vp->sem_value,
pr->frame));
+ /* Transfer ownership to the exec context */
RET(ff_vk_exec_add_dep_buf(&ctx->s, exec, &vp->slices_buf, 1, 0));
vp->slices_buf = NULL;
RET(ff_vk_exec_add_dep_buf(&ctx->s, exec, &pp->metadata_buf, 1, 0));
pp->metadata_buf = NULL;
- /* Transfer ownership to the exec context */
- vp->slices_buf = pp->metadata_buf = NULL;
-
/* Input barrier */
ff_vk_frame_barrier(&ctx->s, exec, pr->frame, img_bar, &nb_img_bar,
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
@@ -404,6 +401,11 @@ static int init_shader(AVCodecContext *avctx, FFVulkanContext *s,
local_size >> 16 & 0xff, local_size >> 8 & 0xff, local_size >> 0 & 0xff,
0));
+ av_bprintf(&shd->src, "#define GET_BITS_SMEM\n");
+
+ if (interlaced)
+ av_bprintf(&shd->src, "#define INTERLACED\n");
+
/* Common code */
GLSLD(ff_source_common_comp);
@@ -412,9 +414,6 @@ static int init_shader(AVCodecContext *avctx, FFVulkanContext *s,
RET(ff_vk_shader_add_descriptor_set(s, shd, descs, num_descs, 0, 0));
- if (interlaced)
- av_bprintf(&shd->src, "#define INTERLACED\n");
-
/* Main code */
GLSLD(source);
@@ -494,6 +493,7 @@ static int vk_decode_prores_init(AVCodecContext *avctx)
RET(init_shader(avctx, &ctx->s, &ctx->exec_pool, spv, &pv->reset,
"prores_dec_reset", "main", desc_set, 1,
ff_source_prores_reset_comp, 0x080801, pr->frame_type != 0));
+
desc_set = (FFVulkanDescriptorSetBinding []) {
{
.name = "slice_offsets_buf",
commit fd2fd3828c1e7384d06afee7481d61865ab6cfa7
Author: averne <averne381(a)gmail.com>
AuthorDate: Sun Nov 30 13:25:37 2025 +0100
Commit: averne <averne381(a)gmail.com>
CommitDate: Sun Nov 30 19:21:08 2025 +0100
libavcodec/vulkan: remove unnessary member in GetBitContext
The number of remaining bits can be calculated using existing state.
This simplifies calculations and frees up one register.
diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp
index 4b71dfd2f4..f5f466ce31 100644
--- a/libavcodec/vulkan/common.comp
+++ b/libavcodec/vulkan/common.comp
@@ -201,7 +201,6 @@ struct GetBitContext {
uint64_t bits;
int bits_valid;
- int size_in_bits;
#ifdef GET_BITS_SMEM
int cur_smem_pos;
#endif
@@ -265,7 +264,6 @@ void init_get_bits(inout GetBitContext gb, u8buf data, int len)
{
gb.buf = gb.buf_start = uint64_t(data);
gb.buf_end = uint64_t(data) + len;
- gb.size_in_bits = len * 8;
/* Preload */
LOAD64()
@@ -320,5 +318,5 @@ int tell_bits(in GetBitContext gb)
int left_bits(in GetBitContext gb)
{
- return gb.size_in_bits - int(gb.buf - gb.buf_start) * 8 + gb.bits_valid;
+ return int(gb.buf_end - gb.buf) * 8 + gb.bits_valid;
}
commit ef7354d471c18ec5c998220eaa4a95bdd36ccb6a
Author: averne <averne381(a)gmail.com>
AuthorDate: Sat Nov 29 22:33:26 2025 +0100
Commit: averne <averne381(a)gmail.com>
CommitDate: Sun Nov 30 19:21:04 2025 +0100
libavcodec/vulkan: introduce cached bitstream reader
This stores a small buffer in shared memory per decode thread (16 bytes),
which helps reduce the number of memory accesses.
The bitstream buffer is first aligned to a 4 byte boundary, so that the
buffer can be filled with a single memory request.
diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp
index eda92ce28d..4b71dfd2f4 100644
--- a/libavcodec/vulkan/common.comp
+++ b/libavcodec/vulkan/common.comp
@@ -42,6 +42,10 @@ layout(buffer_reference, buffer_reference_align = 4) buffer u32vec2buf {
u32vec2 v;
};
+layout(buffer_reference, buffer_reference_align = 4) buffer u32vec4buf {
+ u32vec4 v;
+};
+
layout(buffer_reference, buffer_reference_align = 8) buffer u64buf {
uint64_t v;
};
@@ -198,8 +202,12 @@ struct GetBitContext {
uint64_t bits;
int bits_valid;
int size_in_bits;
+#ifdef GET_BITS_SMEM
+ int cur_smem_pos;
+#endif
};
+#ifndef GET_BITS_SMEM
#define LOAD64() \
{ \
u8vec4buf ptr = u8vec4buf(gb.buf); \
@@ -218,6 +226,40 @@ struct GetBitContext {
gb.bits = uint64_t(rf) << (32 - gb.bits_valid) | gb.bits; \
gb.bits_valid += 32; \
}
+#else /* GET_BITS_SMEM */
+shared u32vec4 gb_storage[gl_WorkGroupSize.x*gl_WorkGroupSize.y*gl_WorkGroupSize.z];
+
+#define FILL_SMEM() \
+ { \
+ u32vec4buf ptr = u32vec4buf(gb.buf); \
+ gb_storage[gl_LocalInvocationIndex] = ptr[0].v; \
+ gb.cur_smem_pos = 0; \
+ }
+
+#define LOAD64() \
+ { \
+ gb.bits = 0; \
+ gb.bits_valid = 0; \
+ u8buf ptr = u8buf(gb.buf); \
+ for (uint i = 0; i < ((4 - uint(gb.buf_start)) & 3); ++i) { \
+ gb.bits |= uint64_t(ptr[i].v) << (56 - i * 8); \
+ gb.bits_valid += 8; \
+ gb.buf += 1; \
+ } \
+ FILL_SMEM(); \
+ }
+
+#define RELOAD32() \
+ { \
+ if (gb.cur_smem_pos >= 4) \
+ FILL_SMEM(); \
+ uint v = gb_storage[gl_LocalInvocationIndex][gb.cur_smem_pos]; \
+ gb.buf += 4; \
+ gb.bits = uint64_t(reverse4(v)) << (32 - gb.bits_valid) | gb.bits; \
+ gb.bits_valid += 32; \
+ gb.cur_smem_pos += 1; \
+ }
+#endif /* GET_BITS_SMEM */
void init_get_bits(inout GetBitContext gb, u8buf data, int len)
{
-----------------------------------------------------------------------
Summary of changes:
libavcodec/vulkan/common.comp | 46 ++++++++++++++++++++++++++++++++++++++++---
libavcodec/vulkan_prores.c | 14 ++++++-------
2 files changed, 50 insertions(+), 10 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 2456a39581 avfilter/avfiltergraph: fix constant string comparision
by ffmpeg-git@ffmpeg.org 30 Nov '25
by ffmpeg-git@ffmpeg.org 30 Nov '25
30 Nov '25
The branch, master has been updated
via 2456a39581c3388bcf6f61c66aef36a887537c23 (commit)
from 89f984e3d1d8f1f009c616e0c6425094395fdbdc (commit)
- Log -----------------------------------------------------------------
commit 2456a39581c3388bcf6f61c66aef36a887537c23
Author: Kacper Michajłow <kasper93(a)gmail.com>
AuthorDate: Sun Nov 30 01:56:07 2025 +0100
Commit: Kacper Michajłow <kasper93(a)gmail.com>
CommitDate: Sun Nov 30 03:02:41 2025 +0100
avfilter/avfiltergraph: fix constant string comparision
It's not guaranteed that the conversion filter name string will be
deduplicated to the same memory location. While this is common
optimization to do, we cannot rely on it always happening.
Fixes regression since 8b375b2ffd4377909180241cdc65d63d372a35a3.
Signed-off-by: Kacper Michajłow <kasper93(a)gmail.com>
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index a46a7bd408..d5c2ef54e6 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -570,7 +570,7 @@ retry:
void *b = FF_FIELD_AT(void *, m->offset, link->outcfg);
if (a && b && a != b && !m->can_merge(a, b)) {
for (k = 0; k < num_conv; k++) {
- if (conv_filters[k] == m->conversion_filter)
+ if (!strcmp(conv_filters[k], m->conversion_filter))
break;
}
if (k == num_conv) {
@@ -683,7 +683,7 @@ retry:
for (neg_step = 0; neg_step < neg->nb_mergers; neg_step++) {
const AVFilterFormatsMerger *m = &neg->mergers[neg_step];
- if (m->conversion_filter != conv_filters[k])
+ if (strcmp(m->conversion_filter, conv_filters[k]))
continue;
if ((ret = MERGE(m, inlink)) <= 0 ||
(ret = MERGE(m, outlink)) <= 0) {
-----------------------------------------------------------------------
Summary of changes:
libavfilter/avfiltergraph.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 89f984e3d1 avcodec/x86/h264_idct: Fix ff_h264_luma_dc_dequant_idct_sse2 checkasm failures
by ffmpeg-git@ffmpeg.org 29 Nov '25
by ffmpeg-git@ffmpeg.org 29 Nov '25
29 Nov '25
The branch, master has been updated
via 89f984e3d1d8f1f009c616e0c6425094395fdbdc (commit)
via e6ae2802a39b24324bd6c394c073a26900a39f23 (commit)
via ada0a81577b8e6724545514024ae41f48633af46 (commit)
via 012c25bac4b65ff1064ac7a52e2ecce49770f351 (commit)
via b9cbbd9074974234a319f042a21875b69b18c6f2 (commit)
via 0ec9c1b68d2f0a0e30ec161659b90ad86fb1e386 (commit)
via 01ff05e4bc0b8f80da8db3a664270bf7976d81f0 (commit)
via b51cbd4116f3e612d148abffa47471acccf19a72 (commit)
via 18019f177e660b38725c4fb91334a6c25801ebdd (commit)
from 9cd4be6d7ce1c226f9b92c0de2ac8add7a90020f (commit)
- Log -----------------------------------------------------------------
commit 89f984e3d1d8f1f009c616e0c6425094395fdbdc
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 20:15:55 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Fix ff_h264_luma_dc_dequant_idct_sse2 checkasm failures
ff_h264_luma_dc_dequant_idct_sse2() does not pass checkasm for certain
seeds, because the input to packssdw no longer fits into an int16_t,
leading to saturation, where the C code just truncates. I don't know
whether the spec contains provisions that ensure that valid input
must not exceed 16 bit or whether the such inputs (even if invalid)
can be triggered by the actual code and not only the test.
This commit adapts the behavior of the function to the C reference code
to fix the test. packssdw is avoided, instead the lower words are
directly transfered to GPRs to be written out. This has unfortunately
led to a slight performance regression here (14.5 vs 15.1 cycles).
Fixes issue #20835.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index d35d583ce7..47e4116f42 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -592,36 +592,58 @@ RET
psrad m1, %1
psrad m2, %1
psrad m3, %1
- packssdw m0, m1
- packssdw m2, m3
%endmacro
-%macro STORE_WORDS 9
- movd t0d, %1
- psrldq %1, 4
- movd t1d, %1
- psrldq %1, 4
- mov [t2+%2*32], t0w
- mov [t2+%4*32], t1w
- shr t0d, 16
- shr t1d, 16
+%macro STORE_WORDS 10
+%if ARCH_X86_64
+ movq t0, %1
+ movq t1, %2
+ psrldq %1, 8
+ psrldq %2, 8
mov [t2+%3*32], t0w
- mov [t2+%5*32], t1w
- movd t0d, %1
- psrldq %1, 4
- movd t1d, %1
+ mov [t2+%7*32], t1w
+ shr t0, 32
+ shr t1, 32
+ mov [t2+%4*32], t0w
+ mov [t2+%8*32], t1w
+ movq t0, %1
+ movq t1, %2
+ mov [t2+%5*32], t0w
+ mov [t2+%9*32], t1w
+ shr t0, 32
+ shr t1, 32
mov [t2+%6*32], t0w
+ mov [t2+%10*32], t1w
+%else
+ movd t0d, %1
+ movd t1d, %2
+ psrldq %1, 4
+ psrldq %2, 4
+ mov [t2+%3*32], t0w
+ mov [t2+%7*32], t1w
+ movd t0d, %1
+ movd t1d, %2
+ psrldq %1, 4
+ psrldq %2, 4
+ mov [t2+%4*32], t0w
mov [t2+%8*32], t1w
- shr t0d, 16
- shr t1d, 16
- mov [t2+%7*32], t0w
+ movd t0d, %1
+ movd t1d, %2
+ psrldq %1, 4
+ psrldq %2, 4
+ mov [t2+%5*32], t0w
mov [t2+%9*32], t1w
+ movd t0d, %1
+ movd t1d, %2
+ mov [t2+%6*32], t0w
+ mov [t2+%10*32], t1w
+%endif
%endmacro
%macro DEQUANT_STORE 1
DEQUANT %1
- STORE_WORDS m0, 0, 1, 4, 5, 2, 3, 6, 7
- STORE_WORDS m2, 8, 9, 12, 13, 10, 11, 14, 15
+ STORE_WORDS m0, m1, 0, 1, 4, 5, 2, 3, 6, 7
+ STORE_WORDS m2, m3, 8, 9, 12, 13, 10, 11, 14, 15
%endmacro
INIT_XMM sse2
commit e6ae2802a39b24324bd6c394c073a26900a39f23
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 17:48:01 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Deduplicate generating constant
pw_1 is currently loaded in both codepaths. Generate it earlier instead.
Gives tiny speedups (15 vs 14.5 cycles) and reduces codesize.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index fe46107867..d35d583ce7 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -51,7 +51,6 @@ scan8_mem: db 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8
%endif
cextern pw_32
-cextern pw_1
SECTION .text
@@ -577,9 +576,9 @@ RET
SWAP %1, %4, %3
%endmacro
+; requires m5 to contain pw_1
%macro DEQUANT 1
movd m4, t3d
- movq m5, [pw_1]
pshufd m4, m4, 0
punpcklwd m0, m5
punpcklwd m1, m5
@@ -635,6 +634,7 @@ cglobal h264_luma_dc_dequant_idct, 3, 4, 7
punpcklwd m0, m1
punpcklwd m2, m3
mova m4, m0
+ pcmpeqw m5, m5
punpckldq m0, m2
punpckhdq m4, m2
movhlps m1, m0
@@ -652,6 +652,7 @@ cglobal h264_luma_dc_dequant_idct, 3, 4, 7
%else
DECLARE_REG_TMP 1,3,0,2
%endif
+ psrlw m5, 15
cmp t3d, 32767
jg .big_qmul
commit ada0a81577b8e6724545514024ae41f48633af46
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 17:26:47 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Don't use MMX registers in ff_h264_luma_dc_dequant_idct_sse2
It is ABI compliant and gives a tiny speedup here (and is 16B smaller).
Old benchmarks:
h264_luma_dc_dequant_idct_8_c: 33.2 ( 1.00x)
h264_luma_dc_dequant_idct_8_sse2: 16.0 ( 2.07x)
New benchmarks:
h264_luma_dc_dequant_idct_8_c: 33.0 ( 1.00x)
h264_luma_dc_dequant_idct_8_sse2: 15.0 ( 2.20x)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 50647f2454..fe46107867 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -578,27 +578,23 @@ RET
%endmacro
%macro DEQUANT 1
- movd xmm4, t3d
- movq xmm5, [pw_1]
- pshufd xmm4, xmm4, 0
- movq2dq xmm0, m0
- movq2dq xmm1, m1
- movq2dq xmm2, m2
- movq2dq xmm3, m3
- punpcklwd xmm0, xmm5
- punpcklwd xmm1, xmm5
- punpcklwd xmm2, xmm5
- punpcklwd xmm3, xmm5
- pmaddwd xmm0, xmm4
- pmaddwd xmm1, xmm4
- pmaddwd xmm2, xmm4
- pmaddwd xmm3, xmm4
- psrad xmm0, %1
- psrad xmm1, %1
- psrad xmm2, %1
- psrad xmm3, %1
- packssdw xmm0, xmm1
- packssdw xmm2, xmm3
+ movd m4, t3d
+ movq m5, [pw_1]
+ pshufd m4, m4, 0
+ punpcklwd m0, m5
+ punpcklwd m1, m5
+ punpcklwd m2, m5
+ punpcklwd m3, m5
+ pmaddwd m0, m4
+ pmaddwd m1, m4
+ pmaddwd m2, m4
+ pmaddwd m3, m4
+ psrad m0, %1
+ psrad m1, %1
+ psrad m2, %1
+ psrad m3, %1
+ packssdw m0, m1
+ packssdw m2, m3
%endmacro
%macro STORE_WORDS 9
@@ -625,19 +621,25 @@ RET
%macro DEQUANT_STORE 1
DEQUANT %1
- STORE_WORDS xmm0, 0, 1, 4, 5, 2, 3, 6, 7
- STORE_WORDS xmm2, 8, 9, 12, 13, 10, 11, 14, 15
+ STORE_WORDS m0, 0, 1, 4, 5, 2, 3, 6, 7
+ STORE_WORDS m2, 8, 9, 12, 13, 10, 11, 14, 15
%endmacro
INIT_XMM sse2
cglobal h264_luma_dc_dequant_idct, 3, 4, 7
-INIT_MMX cpuname
movq m3, [r1+24]
movq m2, [r1+16]
movq m1, [r1+ 8]
movq m0, [r1+ 0]
WALSH4_1D 0,1,2,3,4
- TRANSPOSE4x4W 0,1,2,3,4
+ punpcklwd m0, m1
+ punpcklwd m2, m3
+ mova m4, m0
+ punpckldq m0, m2
+ punpckhdq m4, m2
+ movhlps m1, m0
+ movhlps m3, m4
+ SWAP 2, 4
WALSH4_1D 0,1,2,3,4
; shift, tmp, output, qmul
@@ -665,8 +667,8 @@ INIT_MMX cpuname
inc t1d
shr t3d, t0b
sub t1d, t0d
- movd xmm6, t1d
- DEQUANT_STORE xmm6
+ movd m6, t1d
+ DEQUANT_STORE m6
RET
%ifdef __NASM_VER__
diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c
index f05ae419fc..acf4f61ebb 100644
--- a/tests/checkasm/h264dsp.c
+++ b/tests/checkasm/h264dsp.c
@@ -336,7 +336,7 @@ static void check_idct_dequant(void)
LOCAL_ALIGNED_16(int32_t, dst1_32, [16 * 16]);
H264DSPContext h;
int bit_depth, i, qmul;
- declare_func_emms(AV_CPU_FLAG_MMX | AV_CPU_FLAG_SSE2, void, int16_t *output, int16_t *input, int qmul);
+ declare_func(void, int16_t *output, int16_t *input, int qmul);
qmul = rnd() % 4096;
commit 012c25bac4b65ff1064ac7a52e2ecce49770f351
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 15:59:03 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Zero with full-width stores
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 4b9efd6d6d..50647f2454 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -90,10 +90,15 @@ SECTION .text
paddw m0, m6
IDCT4_1D w, 0, 1, 2, 3, 4, 5
pxor m7, m7
- movq [%2+ 0], m7
- movq [%2+ 8], m7
- movq [%2+16], m7
- movq [%2+24], m7
+ %if mmsize == 16
+ mova [%2+ 0], m7
+ mova [%2+16], m7
+ %else
+ movq [%2+ 0], m7
+ movq [%2+ 8], m7
+ movq [%2+16], m7
+ movq [%2+24], m7
+ %endif
STORE_DIFFx2 m0, m1, m4, m5, m7, 6, %1, %3
lea %1, [%1+%3*2]
commit b9cbbd9074974234a319f042a21875b69b18c6f2
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 15:23:31 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Use tail call where advantageous
It is possible on UNIX64.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 9405aa848a..4b9efd6d6d 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -55,6 +55,19 @@ cextern pw_1
SECTION .text
+; %1=callee, %2=dst to jump to if tail call is impossible (can be empty,
+; then no jmp is performed), %3=current iteration, %4=last iteration
+%macro TAIL_CALL_IF_LAST 4
+%if (%3 == %4) && !has_epilogue
+ jmp %1
+%else
+ call %1
+ %ifnempty %2
+ jmp %2
+ %endif
+%endif
+%endmacro
+
; %1=uint8_t *dst, %2=int16_t *block, %3=ptrdiff_t stride
%macro IDCT4_ADD 3
; Load dct coeffs
@@ -424,7 +437,7 @@ h264_add8x4_idct_sse2:
%else
add r0, r0m
%endif
- call h264_add8x4_idct_sse2
+ TAIL_CALL_IF_LAST h264_add8x4_idct_sse2, , %1, 7
.cycle%1end:
%if %1 < 7
add r2, 64
@@ -461,8 +474,7 @@ RET
%else
add r0, r0m
%endif
- call h264_add8x4_idct_sse2
- jmp .cycle%1end
+ TAIL_CALL_IF_LAST h264_add8x4_idct_sse2, .cycle%1end, %1, 7
.try%1dc:
movsx r0, word [r2 ]
or r0w, word [r2+32]
@@ -473,7 +485,7 @@ RET
%else
add r0, r0m
%endif
- call h264_idct_dc_add8_mmxext
+ TAIL_CALL_IF_LAST h264_idct_dc_add8_mmxext, , %1, 7
.cycle%1end:
%if %1 < 7
add r2, 64
@@ -510,8 +522,7 @@ RET
mov r0, [r0]
add r0, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
%endif
- call h264_add8x4_idct_sse2
- jmp .cycle%1end
+ TAIL_CALL_IF_LAST h264_add8x4_idct_sse2, .cycle%1end, %1, 3
.try%1dc:
movsx r0, word [r2 ]
or r0w, word [r2+32]
@@ -524,7 +535,7 @@ RET
mov r0, [r0]
add r0, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
%endif
- call h264_idct_dc_add8_mmxext
+ TAIL_CALL_IF_LAST h264_idct_dc_add8_mmxext, , %1, 3
.cycle%1end:
%if %1 == 1
add r2, 384+64
commit 0ec9c1b68d2f0a0e30ec161659b90ad86fb1e386
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 14:57:45 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avutil/x86/x86inc: Use parentheses in has_epilogue
Prevents surprises.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index e61d924bc1..0e80ebed43 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -609,7 +609,7 @@ DECLARE_REG 14, R13, 120
RESET_STACK_STATE
%endmacro
-%define has_epilogue regs_used > 7 || stack_size > 0 || vzeroupper_required || xmm_regs_used > 6+high_mm_regs
+%define has_epilogue (regs_used > 7 || stack_size > 0 || vzeroupper_required || xmm_regs_used > 6+high_mm_regs)
%macro RET 0
WIN64_RESTORE_XMM_INTERNAL
@@ -658,7 +658,7 @@ DECLARE_REG 14, R13, 72
%endif
%endmacro
-%define has_epilogue regs_used > 9 || stack_size > 0 || vzeroupper_required
+%define has_epilogue (regs_used > 9 || stack_size > 0 || vzeroupper_required)
%macro RET 0
%if stack_size_padded > 0
@@ -722,7 +722,7 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
%endif
%endmacro
-%define has_epilogue regs_used > 3 || stack_size > 0 || vzeroupper_required
+%define has_epilogue (regs_used > 3 || stack_size > 0 || vzeroupper_required)
%macro RET 0
%if stack_size_padded > 0
commit 01ff05e4bc0b8f80da8db3a664270bf7976d81f0
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 14:09:57 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Avoid call where possible
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 6863dbcb4d..9405aa848a 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -316,29 +316,6 @@ INIT_XMM cpuname
RET
INIT_MMX mmx
-h264_idct_add8_mmx_plane:
-.nextblock:
- movzx r6, byte [scan8+r5]
- movzx r6, byte [r4+r6]
- or r6w, word [r2]
- test r6, r6
- jz .skipblock
-%if ARCH_X86_64
- mov r0d, dword [r1+r5*4]
- add r0, [dst2q]
-%else
- mov r0, r1m ; XXX r1m here is actually r0m of the calling func
- mov r0, [r0]
- add r0, dword [r1+r5*4]
-%endif
- IDCT4_ADD r0, r2, r3
-.skipblock:
- inc r5
- add r2, 32
- test r5, 3
- jnz .nextblock
- rep ret
-
cglobal h264_idct_add8_422_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
; dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
movsxdifnidn r3, r3d
@@ -367,9 +344,31 @@ cglobal h264_idct_add8_422_8, 5, 8 + npicregs, 0, dst1, block_offset, block, str
call h264_idct_add8_mmx_plane
add r5, 4
- call h264_idct_add8_mmx_plane
+ TAIL_CALL h264_idct_add8_mmx_plane, 0
+
+h264_idct_add8_mmx_plane:
+.nextblock:
+ movzx r6d, byte [scan8+r5]
+ movzx r6d, byte [r4+r6]
+ or r6w, word [r2]
+ test r6d, r6d
+ jz .skipblock
+%if ARCH_X86_64
+ mov r0d, dword [r1+r5*4]
+ add r0, [dst2q]
+%else
+ mov r0, r1m ; XXX r1m here is actually r0m of the calling func
+ mov r0, [r0]
+ add r0, dword [r1+r5*4]
+%endif
+ IDCT4_ADD r0, r2, r3
+.skipblock:
+ inc r5d
+ add r2, 32
+ test r5d, 3
+ jnz .nextblock
+ rep ret
- RET ; TODO: check rep ret after a function call
; r0 = uint8_t *dst, r2 = int16_t *block, r3 = ptrdiff_t stride, r6=clobbered
h264_idct_dc_add8_mmxext:
commit b51cbd4116f3e612d148abffa47471acccf19a72
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 12:38:58 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264_idct: Remove redundant movsxdifnidn
Only exported (i.e. cglobal) functions need it; stride is already
sign-extended when it reaches any of the internal functions used here,
so don't sign-extend again.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index 985955d96a..6863dbcb4d 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -55,7 +55,7 @@ cextern pw_1
SECTION .text
-; %1=uint8_t *dst, %2=int16_t *block, %3=int stride
+; %1=uint8_t *dst, %2=int16_t *block, %3=ptrdiff_t stride
%macro IDCT4_ADD 3
; Load dct coeffs
movq m0, [%2]
@@ -145,7 +145,7 @@ SECTION .text
IDCT8_1D [%1], [%1+ 64]
%endmacro
-; %1=uint8_t *dst, %2=int16_t *block, %3=int stride
+; %1=uint8_t *dst, %2=int16_t *block, %3=ptrdiff_t stride
%macro IDCT8_ADD_SSE 4
IDCT8_1D_FULL %2
%if ARCH_X86_64
@@ -317,7 +317,6 @@ INIT_XMM cpuname
INIT_MMX mmx
h264_idct_add8_mmx_plane:
- movsxdifnidn r3, r3d
.nextblock:
movzx r6, byte [scan8+r5]
movzx r6, byte [r4+r6]
@@ -372,9 +371,8 @@ cglobal h264_idct_add8_422_8, 5, 8 + npicregs, 0, dst1, block_offset, block, str
RET ; TODO: check rep ret after a function call
-; r0 = uint8_t *dst, r2 = int16_t *block, r3 = int stride, r6=clobbered
+; r0 = uint8_t *dst, r2 = int16_t *block, r3 = ptrdiff_t stride, r6=clobbered
h264_idct_dc_add8_mmxext:
- movsxdifnidn r3, r3d
movd m0, [r2 ] ; 0 0 X D
mov word [r2+ 0], 0
punpcklwd m0, [r2+32] ; x X d D
@@ -393,9 +391,8 @@ h264_idct_dc_add8_mmxext:
ALIGN 16
INIT_XMM sse2
-; r0 = uint8_t *dst (clobbered), r2 = int16_t *block, r3 = int stride
+; r0 = uint8_t *dst (clobbered), r2 = int16_t *block, r3 = ptrdiff_t stride
h264_add8x4_idct_sse2:
- movsxdifnidn r3, r3d
movq m0, [r2+ 0]
movq m1, [r2+ 8]
movq m2, [r2+16]
commit 18019f177e660b38725c4fb91334a6c25801ebdd
Author: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
AuthorDate: Wed Nov 26 12:26:37 2025 +0100
Commit: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
CommitDate: Sun Nov 30 00:15:43 2025 +0100
avcodec/x86/h264idct: Remove dead MMX macros
Forgotten in 4618f36a2424a3a4d5760afabc2e9dd18d73f0a4.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt(a)outlook.com>
diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
index d9c3c9c862..985955d96a 100644
--- a/libavcodec/x86/h264_idct.asm
+++ b/libavcodec/x86/h264_idct.asm
@@ -145,61 +145,6 @@ SECTION .text
IDCT8_1D [%1], [%1+ 64]
%endmacro
-; %1=int16_t *block, %2=int16_t *dstblock
-%macro IDCT8_ADD_MMX_START 2
- IDCT8_1D_FULL %1
- mova [%1], m7
- TRANSPOSE4x4W 0, 1, 2, 3, 7
- mova m7, [%1]
- mova [%2 ], m0
- mova [%2+16], m1
- mova [%2+32], m2
- mova [%2+48], m3
- TRANSPOSE4x4W 4, 5, 6, 7, 3
- mova [%2+ 8], m4
- mova [%2+24], m5
- mova [%2+40], m6
- mova [%2+56], m7
-%endmacro
-
-; %1=uint8_t *dst, %2=int16_t *block, %3=int stride
-%macro IDCT8_ADD_MMX_END 3-4
- IDCT8_1D_FULL %2
- mova [%2 ], m5
- mova [%2+16], m6
- mova [%2+32], m7
-
- pxor m7, m7
-%if %0 == 4
- movq [%4+ 0], m7
- movq [%4+ 8], m7
- movq [%4+ 16], m7
- movq [%4+ 24], m7
- movq [%4+ 32], m7
- movq [%4+ 40], m7
- movq [%4+ 48], m7
- movq [%4+ 56], m7
- movq [%4+ 64], m7
- movq [%4+ 72], m7
- movq [%4+ 80], m7
- movq [%4+ 88], m7
- movq [%4+ 96], m7
- movq [%4+104], m7
- movq [%4+112], m7
- movq [%4+120], m7
-%endif
- STORE_DIFFx2 m0, m1, m5, m6, m7, 6, %1, %3
- lea %1, [%1+%3*2]
- STORE_DIFFx2 m2, m3, m5, m6, m7, 6, %1, %3
- mova m0, [%2 ]
- mova m1, [%2+16]
- mova m2, [%2+32]
- lea %1, [%1+%3*2]
- STORE_DIFFx2 m4, m0, m5, m6, m7, 6, %1, %3
- lea %1, [%1+%3*2]
- STORE_DIFFx2 m1, m2, m5, m6, m7, 6, %1, %3
-%endmacro
-
; %1=uint8_t *dst, %2=int16_t *block, %3=int stride
%macro IDCT8_ADD_SSE 4
IDCT8_1D_FULL %2
@@ -612,7 +557,7 @@ cglobal h264_idct_add8_8, 5, 7 + ARCH_X86_64, 8
add8_sse2_cycle 3, 0x64
RET
-;void ff_h264_luma_dc_dequant_idct_mmx(int16_t *output, int16_t *input, int qmul)
+;void ff_h264_luma_dc_dequant_idct_sse2(int16_t *output, int16_t *input, int qmul)
%macro WALSH4_1D 5
SUMSUB_BADC w, %4, %3, %2, %1, %5
@@ -620,8 +565,7 @@ RET
SWAP %1, %4, %3
%endmacro
-%macro DEQUANT 1-3
-%if cpuflag(sse2)
+%macro DEQUANT 1
movd xmm4, t3d
movq xmm5, [pw_1]
pshufd xmm4, xmm4, 0
@@ -643,31 +587,9 @@ RET
psrad xmm3, %1
packssdw xmm0, xmm1
packssdw xmm2, xmm3
-%else
- mova m7, [pw_1]
- mova m4, %1
- punpcklwd %1, m7
- punpckhwd m4, m7
- mova m5, %2
- punpcklwd %2, m7
- punpckhwd m5, m7
- movd m7, t3d
- punpckldq m7, m7
- pmaddwd %1, m7
- pmaddwd %2, m7
- pmaddwd m4, m7
- pmaddwd m5, m7
- psrad %1, %3
- psrad %2, %3
- psrad m4, %3
- psrad m5, %3
- packssdw %1, m4
- packssdw %2, m5
-%endif
%endmacro
-%macro STORE_WORDS 5-9
-%if cpuflag(sse)
+%macro STORE_WORDS 9
movd t0d, %1
psrldq %1, 4
movd t1d, %1
@@ -687,33 +609,12 @@ RET
shr t1d, 16
mov [t2+%7*32], t0w
mov [t2+%9*32], t1w
-%else
- movd t0d, %1
- psrlq %1, 32
- movd t1d, %1
- mov [t2+%2*32], t0w
- mov [t2+%4*32], t1w
- shr t0d, 16
- shr t1d, 16
- mov [t2+%3*32], t0w
- mov [t2+%5*32], t1w
-%endif
%endmacro
%macro DEQUANT_STORE 1
-%if cpuflag(sse2)
DEQUANT %1
STORE_WORDS xmm0, 0, 1, 4, 5, 2, 3, 6, 7
STORE_WORDS xmm2, 8, 9, 12, 13, 10, 11, 14, 15
-%else
- DEQUANT m0, m1, %1
- STORE_WORDS m0, 0, 1, 4, 5
- STORE_WORDS m1, 2, 3, 6, 7
-
- DEQUANT m2, m3, %1
- STORE_WORDS m2, 8, 9, 12, 13
- STORE_WORDS m3, 10, 11, 14, 15
-%endif
%endmacro
INIT_XMM sse2
-----------------------------------------------------------------------
Summary of changes:
libavcodec/x86/h264_idct.asm | 310 +++++++++++++++++--------------------------
libavutil/x86/x86inc.asm | 6 +-
tests/checkasm/h264dsp.c | 2 +-
3 files changed, 128 insertions(+), 190 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 9cd4be6d7c tools/sofa2wavs: fix build on Windows
by ffmpeg-git@ffmpeg.org 29 Nov '25
by ffmpeg-git@ffmpeg.org 29 Nov '25
29 Nov '25
The branch, master has been updated
via 9cd4be6d7ce1c226f9b92c0de2ac8add7a90020f (commit)
from 1c5bb1b12da142ae111b35565420ffd1ccc9a029 (commit)
- Log -----------------------------------------------------------------
commit 9cd4be6d7ce1c226f9b92c0de2ac8add7a90020f
Author: Kacper Michajłow <kasper93(a)gmail.com>
AuthorDate: Sat Nov 29 11:33:08 2025 +0100
Commit: Kacper Michajłow <kasper93(a)gmail.com>
CommitDate: Sat Nov 29 21:43:12 2025 +0000
tools/sofa2wavs: fix build on Windows
Signed-off-by: Kacper Michajłow <kasper93(a)gmail.com>
diff --git a/tools/sofa2wavs.c b/tools/sofa2wavs.c
index 1f1075b22f..d551913dce 100644
--- a/tools/sofa2wavs.c
+++ b/tools/sofa2wavs.c
@@ -24,6 +24,12 @@
#include <stdio.h>
#include <mysofa.h>
+#ifdef _WIN32
+#include <direct.h>
+#undef mkdir
+#define mkdir(a, b) _mkdir(a)
+#endif
+
int main(int argc, char **argv)
{
struct MYSOFA_HRTF *hrtf;
-----------------------------------------------------------------------
Summary of changes:
tools/sofa2wavs.c | 6 ++++++
1 file changed, 6 insertions(+)
hooks/post-receive
--
1
0
[ffmpeg] branch master updated. 1c5bb1b12d vulkan/prores: normalize coefficients during IDCT
by ffmpeg-git@ffmpeg.org 29 Nov '25
by ffmpeg-git@ffmpeg.org 29 Nov '25
29 Nov '25
The branch, master has been updated
via 1c5bb1b12da142ae111b35565420ffd1ccc9a029 (commit)
via 1982add48595db4891b16131928b9eb25fb85e2f (commit)
from 04eeaeed11d721ccbcd0104c2e79e3ceb819585d (commit)
- Log -----------------------------------------------------------------
commit 1c5bb1b12da142ae111b35565420ffd1ccc9a029
Author: averne <averne381(a)gmail.com>
AuthorDate: Sat Nov 29 17:25:17 2025 +0100
Commit: averne <averne381(a)gmail.com>
CommitDate: Sat Nov 29 17:56:28 2025 +0100
vulkan/prores: normalize coefficients during IDCT
This allows increased internal precision.
In addition, we can introduce an offset to the DC coefficient
during the second IDCT step, to remove a per-element addition
in the output codepath.
Finally, by processing columns first we can remove the barrier
after loading coefficients.
Signed-off-by: averne <averne381(a)gmail.com>
diff --git a/libavcodec/vulkan/prores_idct.comp b/libavcodec/vulkan/prores_idct.comp
index 5d0d41cfa5..5eef61e57a 100644
--- a/libavcodec/vulkan/prores_idct.comp
+++ b/libavcodec/vulkan/prores_idct.comp
@@ -37,19 +37,27 @@ void put_px(uint tex_idx, ivec2 pos, uint v)
#endif
}
-const float idct_8x8_scales[] = {
- 0.353553390593274f, // cos(4 * pi/16) / 2
- 0.490392640201615f, // cos(1 * pi/16) / 2
- 0.461939766255643f, // cos(2 * pi/16) / 2
- 0.415734806151273f, // cos(3 * pi/16) / 2
- 0.353553390593274f, // cos(4 * pi/16) / 2
- 0.277785116509801f, // cos(5 * pi/16) / 2
- 0.191341716182545f, // cos(6 * pi/16) / 2
- 0.097545161008064f, // cos(7 * pi/16) / 2
+const float idct_scale[64] = {
+ 0.1250000000000000, 0.1733799806652684, 0.1633203706095471, 0.1469844503024199,
+ 0.1250000000000000, 0.0982118697983878, 0.0676495125182746, 0.0344874224103679,
+ 0.1733799806652684, 0.2404849415639108, 0.2265318615882219, 0.2038732892122293,
+ 0.1733799806652684, 0.1362237766939547, 0.0938325693794663, 0.0478354290456362,
+ 0.1633203706095471, 0.2265318615882219, 0.2133883476483184, 0.1920444391778541,
+ 0.1633203706095471, 0.1283199917898342, 0.0883883476483185, 0.0450599888754343,
+ 0.1469844503024199, 0.2038732892122293, 0.1920444391778541, 0.1728354290456362,
+ 0.1469844503024199, 0.1154849415639109, 0.0795474112858021, 0.0405529186026822,
+ 0.1250000000000000, 0.1733799806652684, 0.1633203706095471, 0.1469844503024199,
+ 0.1250000000000000, 0.0982118697983878, 0.0676495125182746, 0.0344874224103679,
+ 0.0982118697983878, 0.1362237766939547, 0.1283199917898342, 0.1154849415639109,
+ 0.0982118697983878, 0.0771645709543638, 0.0531518809229535, 0.0270965939155924,
+ 0.0676495125182746, 0.0938325693794663, 0.0883883476483185, 0.0795474112858021,
+ 0.0676495125182746, 0.0531518809229535, 0.0366116523516816, 0.0186644585125857,
+ 0.0344874224103679, 0.0478354290456362, 0.0450599888754343, 0.0405529186026822,
+ 0.0344874224103679, 0.0270965939155924, 0.0186644585125857, 0.0095150584360892,
};
/* 7.4 Inverse Transform */
-void idct(uint block, uint offset, uint stride)
+void idct8(uint block, uint offset, uint stride)
{
float t0, t1, t2, t3, t4, t5, t6, t7, u8;
float u0, u1, u2, u3, u4, u5, u6, u7;
@@ -117,6 +125,12 @@ void main(void)
uint chroma_shift = comp != 0 ? log2_chroma_w : 0;
bool act = gid.x < mb_width << (4 - chroma_shift);
+ /**
+ * Normalize coefficients to [-1, 1] for increased precision during the iDCT.
+ * DCT coeffs have the range of a 12-bit signed integer (7.4 Inverse Transform).
+ */
+ const float norm = 1.0f / (1 << 11);
+
/* Coalesced load of DCT coeffs in shared memory, inverse quantization */
if (act) {
/**
@@ -131,28 +145,31 @@ void main(void)
int qscale = qidx > 128 ? (qidx - 96) << 2 : qidx;
[[unroll]] for (uint i = 0; i < 8; ++i) {
+ uint cidx = (i << 3) + idx;
int c = sign_extend(int(get_px(comp, ivec2(gid.x, (gid.y << 3) + i))), 16);
- float v = float(c * qscale * int(qmat[(i << 3) + idx]));
- blocks[block][i * 9 + idx] = v * idct_8x8_scales[idx] * idct_8x8_scales[i];
+ float v = float(c * qscale * int(qmat[cidx])) * norm;
+ blocks[block][i * 9 + idx] = v * idct_scale[cidx];
}
}
- /* Row-wise iDCT */
+ /* Column-wise iDCT */
+ idct8(block, idx, 9);
barrier();
- idct(block, idx * 9, 1);
- /* Column-wise iDCT */
+ /* Remap [-1, 1] to [0, 2] to remove a per-element addition in the output loop */
+ blocks[block][idx * 9] += 1.0f;
+
+ /* Row-wise iDCT */
+ idct8(block, idx * 9, 1);
barrier();
- idct(block, idx, 9);
- float fact = 1.0f / (1 << (12 - depth)), off = 1 << (depth - 1);
+ float fact = 1 << (depth - 1);
int maxv = (1 << depth) - 1;
/* 7.5.1 Color Component Samples. Rescale, clamp and write back to global memory */
- barrier();
if (act) {
[[unroll]] for (uint i = 0; i < 8; ++i) {
- float v = round(blocks[block][i * 9 + idx] * fact + off);
+ float v = round(blocks[block][i * 9 + idx] * fact);
put_px(comp, ivec2(gid.x, (gid.y << 3) + i), clamp(int(v), 0, maxv));
}
}
commit 1982add48595db4891b16131928b9eb25fb85e2f
Author: averne <averne381(a)gmail.com>
AuthorDate: Sat Nov 29 17:26:51 2025 +0100
Commit: averne <averne381(a)gmail.com>
CommitDate: Sat Nov 29 17:27:21 2025 +0100
vulkan/prores: fix dequantization for 4:2:2 subsampling
Bug introduced in d00f41f due to an oversight.
diff --git a/libavcodec/vulkan/prores_idct.comp b/libavcodec/vulkan/prores_idct.comp
index 05ba8e4967..5d0d41cfa5 100644
--- a/libavcodec/vulkan/prores_idct.comp
+++ b/libavcodec/vulkan/prores_idct.comp
@@ -127,7 +127,7 @@ void main(void)
uint8_t[64] qmat = comp == 0 ? qmat_luma : qmat_chroma;
/* Table 15 */
- uint8_t qidx = quant_idx[(gid.y >> 1) * mb_width + (gid.x >> 4)];
+ uint8_t qidx = quant_idx[(gid.y >> 1) * mb_width + (gid.x >> (4 - chroma_shift))];
int qscale = qidx > 128 ? (qidx - 96) << 2 : qidx;
[[unroll]] for (uint i = 0; i < 8; ++i) {
-----------------------------------------------------------------------
Summary of changes:
libavcodec/vulkan/prores_idct.comp | 57 +++++++++++++++++++++++++-------------
1 file changed, 37 insertions(+), 20 deletions(-)
hooks/post-receive
--
1
0
[ffmpeg] branch release/8.0 updated. 27a297f186 configure: replace openssl header check with 1.1.1 API
by ffmpeg-git@ffmpeg.org 29 Nov '25
by ffmpeg-git@ffmpeg.org 29 Nov '25
29 Nov '25
The branch, release/8.0 has been updated
via 27a297f1866d13c51a18648469f347177124d3ac (commit)
via a32b797f6437c696813f958cf54cfa5ecc827da3 (commit)
via 29c046c37aa6eb97d1ea95126bb59502558f497e (commit)
from fe72a8781b22912ec7125de1509d83fc2b1ad802 (commit)
- Log -----------------------------------------------------------------
commit 27a297f1866d13c51a18648469f347177124d3ac
Author: Jack Lau <jacklau1222gm(a)gmail.com>
AuthorDate: Mon Nov 17 13:32:05 2025 +0800
Commit: Brad Smith <brad(a)comstyle.com>
CommitDate: Sat Nov 29 05:06:34 2025 -0500
configure: replace openssl header check with 1.1.1 API
Fix #20571
Avoid build errors with openssl forks (like libressl)
that lack some APIs.
This patch replace header check for OPENSSL_init_ssl
(was added in 1.1.0) with the OpenSSL 1.1.1 new API
DTLS_get_data_mtu.
Signed-off-by: Jack Lau <jacklau1222gm(a)gmail.com>
(cherry picked from commit 0486ad61ceb71b7a45976e6e45a4d2a2813aef75)
diff --git a/configure b/configure
index af29901deb..46ee3cb2bf 100755
--- a/configure
+++ b/configure
@@ -7262,12 +7262,12 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
enabled omx && require_headers OMX_Core.h && \
warn "The OpenMAX encoders are deprecated and will be removed in future versions"
-enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
+enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu &&
{ enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
{ enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
- check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h OPENSSL_init_ssl ||
- check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
- check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto -lws2_32 -lgdi32 ||
+ check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h DTLS_get_data_mtu ||
+ check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto ||
+ check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
die "ERROR: openssl (>= 1.1.1) not found"; }
enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
commit a32b797f6437c696813f958cf54cfa5ecc827da3
Author: Kacper Michajłow <kasper93(a)gmail.com>
AuthorDate: Wed Jul 30 20:08:38 2025 +0200
Commit: Brad Smith <brad(a)comstyle.com>
CommitDate: Sat Nov 29 05:06:09 2025 -0500
configure: require at least OpenSSL 1.1.1 (LTS)
Commit f256487cd8f29f24036efa5d91a84a26b048861a bumped requirement to
1.1.0 for OPENSSL_init_ssl.
Bump this again to 1.1.1, because it was an LTS version. Although it has
no mainline support anymore, it still has paid/premium support. 1.1.0 has
no support at all.
Motivated for use of BIO_read_ex() for next commits.
Signed-off-by: Kacper Michajłow <kasper93(a)gmail.com>
(cherry picked from commit 113c9c6cf36a703afc5ef10bbb40f248df521425)
diff --git a/Changelog b/Changelog
index e943157f1d..40150f8517 100644
--- a/Changelog
+++ b/Changelog
@@ -83,6 +83,7 @@ version 8.0:
- Whisper filter
- Drop support for OpenSSL < 1.1.0
- Enable TLS peer certificate verification by default (on next major version bump)
+- Drop support for OpenSSL < 1.1.1
- yasm support dropped, users need to use nasm
- VVC VAAPI decoder
- RealVideo 6.0 decoder
diff --git a/configure b/configure
index 9256ceec20..af29901deb 100755
--- a/configure
+++ b/configure
@@ -7265,10 +7265,10 @@ enabled omx && require_headers OMX_Core.h && \
enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
{ enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
{ enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
- check_pkg_config openssl "openssl >= 1.1.0" openssl/ssl.h OPENSSL_init_ssl ||
+ check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h OPENSSL_init_ssl ||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto -lws2_32 -lgdi32 ||
- die "ERROR: openssl (>= 1.1.0) not found"; }
+ die "ERROR: openssl (>= 1.1.1) not found"; }
enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&
commit 29c046c37aa6eb97d1ea95126bb59502558f497e
Author: Jack Lau <jacklau1222(a)qq.com>
AuthorDate: Sat Sep 6 10:18:39 2025 +0800
Commit: Brad Smith <brad(a)comstyle.com>
CommitDate: Sat Nov 29 05:05:31 2025 -0500
configure: remove openssl version check for whip
This version check for whip is unnecessary.
Since several rencet patches to the configure
have already added version checks for OpenSSL.
Signed-off-by: Jack Lau <jacklau1222(a)qq.com>
(cherry picked from commit adc66f30ee3cbd55d42e6079d381fa1a485adb52)
diff --git a/configure b/configure
index a0eed36abf..9256ceec20 100755
--- a/configure
+++ b/configure
@@ -7277,15 +7277,6 @@ enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/r
}
enabled vapoursynth && require_headers "vapoursynth/VSScript4.h vapoursynth/VapourSynth4.h"
-enabled openssl && {
- enabled whip_muxer && {
- $pkg_config --exists --print-errors "openssl >= 1.0.1k" ||
- require_pkg_config openssl "openssl >= 1.0.1k" openssl/ssl.h SSL_library_init ||
- require_pkg_config openssl "openssl >= 1.0.1k" openssl/ssl.h OPENSSL_init_ssl
- }
-}
-
-
if enabled gcrypt; then
GCRYPT_CONFIG="${cross_prefix}libgcrypt-config"
if "${GCRYPT_CONFIG}" --version > /dev/null 2>&1; then
-----------------------------------------------------------------------
Summary of changes:
Changelog | 1 +
configure | 19 +++++--------------
2 files changed, 6 insertions(+), 14 deletions(-)
hooks/post-receive
--
1
0