[FFmpeg-cvslog] tests/checkasm/vf_gblur.c: update check_horiz_slice for the new ff_horiz_slice_avx2/512

Wu Jianhua git at videolan.org
Sun Aug 29 21:06:09 EEST 2021


ffmpeg | branch: master | Wu Jianhua <jianhua.wu at intel.com> | Wed Aug  4 10:06:16 2021 +0800| [133b2767cf5a7cc3cd09ba9b58de62d981c0f453] | committer: Paul B Mahol

tests/checkasm/vf_gblur.c: update check_horiz_slice for the new ff_horiz_slice_avx2/512

Co-authored-by: Cheng Yanfei <yanfei.cheng at intel.com>
Co-authored-by: Jin Jun <jun.i.jin at intel.com>
Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>

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

 tests/checkasm/vf_gblur.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/checkasm/vf_gblur.c b/tests/checkasm/vf_gblur.c
index 0fac37b6be..a7a1c1a24e 100644
--- a/tests/checkasm/vf_gblur.c
+++ b/tests/checkasm/vf_gblur.c
@@ -34,19 +34,19 @@
             tmp_buf[j] = (float)(rnd() & 0xFF); \
     } while (0)
 
-static void check_horiz_slice(float *dst_ref, float *dst_new)
+static void check_horiz_slice(float *dst_ref, float *dst_new, float *localbuf)
 {
     int steps = 2;
     float nu = 0.101f;
     float bscale = 1.112f;
 
-    declare_func(void, float *dst, int w, int h, int steps, float nu, float bscale);
-    call_ref(dst_ref, WIDTH, HEIGHT, steps, nu, bscale);
-    call_new(dst_new, WIDTH, HEIGHT, steps, nu, bscale);
+    declare_func(void, float *dst, int w, int h, int steps, float nu, float bscale, float *localbuf);
+    call_ref(dst_ref, WIDTH, HEIGHT, steps, nu, bscale, localbuf);
+    call_new(dst_new, WIDTH, HEIGHT, steps, nu, bscale, localbuf);
     if (!float_near_abs_eps_array(dst_ref, dst_new, 0.01f, PIXELS)) {
          fail();
     }
-    bench_new(dst_new, WIDTH, HEIGHT, 1, nu, bscale);
+    bench_new(dst_new, WIDTH, HEIGHT, 1, nu, bscale, localbuf);
 }
 
 static void check_verti_slice(float *dst_ref, float *dst_new)
@@ -87,10 +87,12 @@ void checkasm_check_vf_gblur(void)
     randomize_buffers(dst_ref, PIXELS);
     memcpy(dst_new, dst_ref, BUF_SIZE);
 
+    s.planewidth[0] = WIDTH;
+    s.planeheight[0] = HEIGHT;
     ff_gblur_init(&s);
 
     if (check_func(s.horiz_slice, "horiz_slice")) {
-        check_horiz_slice(dst_ref, dst_new);
+        check_horiz_slice(dst_ref, dst_new, s.localbuf);
     }
     report("horiz_slice");
 
@@ -108,6 +110,9 @@ void checkasm_check_vf_gblur(void)
     }
     report("verti_slice");
 
+    if (s.localbuf)
+        av_free(s.localbuf);
+
     av_freep(&dst_ref);
     av_freep(&dst_new);
 }



More information about the ffmpeg-cvslog mailing list