shithub: dav1d

Download patch

ref: 89c3f53fa5991fb03894afc2ac72592d52a33c3f
parent: 1c42f8bf81d8fc1ac2d7a89dd00337fd70c5ae80
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Fri Oct 19 04:07:21 EDT 2018

Fix wiener AVX2 SIMD and related unit test.

--- a/src/x86/looprestoration.asm
+++ b/src/x86/looprestoration.asm
@@ -81,11 +81,13 @@
     test       leftq, leftq ; left == NULL for the edge-extended bottom/top
     jz .load_left_combined
     movd         xm0, [leftq]
+    add        leftq, 4
     pinsrd       xm0, [srcq], 1
     pslldq       xm0, 9
     jmp .left_load_done
 .load_left_combined:
-    movq         xm0, [srcq-5]
+    movq         xm0, [srcq-3]
+    pslldq       xm0, 10
     jmp .left_load_done
 .emu_left:
     movd         xm0, [srcq]
@@ -195,6 +197,7 @@
     vpbroadcastd m12, [pd_1024]
 
     DEFINE_ARGS dst, stride, mid, w, h, ylim, edge, y, mptr, dstptr
+    mov        ylimd, edged
     and        ylimd, 8 ; have_bottom
     shr        ylimd, 2
     sub        ylimd, 3
--- a/tests/checkasm/looprestoration.c
+++ b/tests/checkasm/looprestoration.c
@@ -95,7 +95,7 @@
 
             const int base_w = 1 + (rand() % 384);
             const int base_h = 1 + (rand() & 63);
-            for (enum LrEdgeFlags edges = 0; edges <= 0; edges++) {
+            for (enum LrEdgeFlags edges = 0; edges <= 0xf; edges++) {
                 const int w = edges & LR_HAVE_RIGHT ? 256 : base_w;
                 const int h = edges & LR_HAVE_BOTTOM ? 64 : base_h;