[FFmpeg-devel] [PATCH v2] tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests

Soft Works softworkz at hotmail.com
Sat May 28 16:17:54 EEST 2022



From: Kieran Kunhya <kierank at obe.tv>
Sent: Saturday, May 28, 2022 3:11 PM
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
Cc: softworkz <softworkz at hotmail.com>
Subject: Re: [FFmpeg-devel] [PATCH v2] tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests



On Sat, 28 May 2022, 11:20 softworkz, <ffmpegagent at gmail.com<mailto:ffmpegagent at gmail.com>> wrote:
From: softworkz <softworkz at hotmail.com<mailto:softworkz at hotmail.com>>

These tests:

- vsynth2-mpeg2-422
- vsynth1-mpeg2-422
- vsynth_lena-mpeg2-422

were failing on newer CPUs where av_cpu_max_align() returns
values > 32. This patch sets cpuflags to disable avx512
extensions for those tests only.

Signed-off-by: softworkz <softworkz at hotmail.com<mailto:softworkz at hotmail.com>>
---
    tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests

    Fix FATE tests which are failing on newer x86 CPUs.

    v2: Add the flag on x86 platforms only

Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-32%2Fsoftworkz%2Fsubmit_alignment-v2
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-32/softworkz/submit_alignment-v2
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/32

Range-diff vs v1:

 1:  c36271eb6b ! 1:  1586956890 tests/fate/vcodec: Limit mem alignment for vsynth..mpeg2-422 tests
     @@ Commit message

       ## tests/fate/vcodec.mak ##
      @@ tests/fate/vcodec.mak: fate-vsynth%-mpeg2-422:          ENCOPTS = -b:v 1000k                   \
     -                                            -trellis 1                   \
     -                                            -flags +ildct+ilme           \
                                                  -mpv_flags +qp_rd+mv0        \
     -+                                           -cpuflags -avx512            \
                                                  -intra_vlc 1                 \
                                                  -mbd rd                      \
     -                                            -pix_fmt yuv422p
     +-                                           -pix_fmt yuv422p
     ++                                           -pix_fmt yuv422p             \
     ++                                                                            $(if $(HAVE_MMX), -cpuflags -avx512 )
     ++
     + fate-vsynth%-mpeg2-idct-int:     ENCOPTS = -qscale 10 -idct int -dct int
     + fate-vsynth%-mpeg2-ilace:        ENCOPTS = -qscale 10 -flags +ildct+ilme
     + fate-vsynth%-mpeg2-ivlc-qprd:    ENCOPTS = -b:v 500k                    \


 tests/fate/vcodec.mak | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index 8ca17950ea..91228237bd 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -264,7 +264,9 @@ fate-vsynth%-mpeg2-422:          ENCOPTS = -b:v 1000k                   \
                                            -mpv_flags +qp_rd+mv0        \
                                            -intra_vlc 1                 \
                                            -mbd rd                      \
-                                           -pix_fmt yuv422p
+                                           -pix_fmt yuv422p             \
+                                                                                  $(if $(HAVE_MMX), -cpuflags -avx512 )
+
 fate-vsynth%-mpeg2-idct-int:     ENCOPTS = -qscale 10 -idct int -dct int
 fate-vsynth%-mpeg2-ilace:        ENCOPTS = -qscale 10 -flags +ildct+ilme
 fate-vsynth%-mpeg2-ivlc-qprd:    ENCOPTS = -b:v 500k                    \

base-commit: 9fba0b8a8c754a012fc74c90ffb7c26a56be8ca0
--
ffmpeg-codebot
_______________________________________________

Huh, this is horrible.

Do you have a better idea?

The one advantage of this method is that you don’t need to change compilation parameters
nor  any source code. It’s only a runtime flag being set only for this specific family of tests.

Suggestions welcome :-)

Thanks,
sw


More information about the ffmpeg-devel mailing list