[FFmpeg-cvslog] avcodec/x86/hevc_mc: Fix AVX-512-VNNI_hevc_qpel_filters_avx512icl

Felix LeClair git at videolan.org
Sun May 1 13:46:34 EEST 2022


ffmpeg | branch: master | Felix LeClair <felix.leclair123 at hotmail.com> | Thu Apr 28 13:17:22 2022 -0400| [987d2c1083d9bc9464000c8732c3353c7bf7e9ca] | committer: Marton Balint

avcodec/x86/hevc_mc: Fix AVX-512-VNNI_hevc_qpel_filters_avx512icl

Issue: On extremely new hardware using either IceLake or super sets of
Intel IceLakes avx512 instructions, commit
d4cd8830bdac3e26c8e75cd92e574c159fecc4f7 causes build issues.
Specifically a NASM macro expansion of qpel_filter_v is never properly
defined/initialized.

The issue is the definition was erroneously placed inside a conditional
which will not trigger unless the original definition failed (has to do
with if PIC is defined, becomes a bit of a catch 22)
Specifically the error is

X86ASM    libavcodec/x86/hevc_mc.o
libavcodec/x86/hevc_mc.asm:1854: error: symbol `.. at 88472.table' not defined
libavcodec/x86/hevc_mc.asm:1806: ... from macro
`HEVC_PUT_HEVC_QPEL_HV_AVX512ICL' defined here
libavcodec/x86/hevc_mc.asm:1730: ... from macro `QPEL_FILTER_V' defined here
...
repeats a few times...
...
make: *** [ffbuild/common.mak:100: libavcodec/x86/hevc_mc.o] Error 1
```
Specific error was discussed by kurosu and myself (fclc) on the
ffmpeg-devel irc.

This commit fixes the above by swapping lines 1796 and 1795, moving the
define out of the conditional

Side note: It seems fate didn't pick up on this, may merit looking into
(as mentioned by nevcairiel).

Reviewed-by: Wu Jianhua <toqsxw at outlook.com>
Signed-off-by: Felix LeClair (FCLC) <felix.leclair123 at hotmail.com>
Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=987d2c1083d9bc9464000c8732c3353c7bf7e9ca
---

 libavcodec/x86/hevc_mc.asm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm
index c07948dd9b..e159adccc7 100644
--- a/libavcodec/x86/hevc_mc.asm
+++ b/libavcodec/x86/hevc_mc.asm
@@ -1792,8 +1792,8 @@ cglobal hevc_put_hevc_qpel_hv%1_%2, 6, 7, 27, dst, src, srcstride, height, mx, m
     sub            srcq, tmpq
     sub             myq, 1
     shl             myq, 5
-%ifdef PIC
 %define %%table hevc_qpel_filters_avx512icl_v_%1
+%ifdef PIC
     lea tmpq, [%%table]
     %define FILTER tmpq
 %else



More information about the ffmpeg-cvslog mailing list