Commit 89c3f53f authored by Ronald S. Bultje's avatar Ronald S. Bultje

Fix wiener AVX2 SIMD and related unit test.

parent 1c42f8bf
......@@ -81,11 +81,13 @@ cglobal wiener_filter_h, 8, 12, 16, dst, left, src, stride, fh, w, h, edge
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 @@ cglobal wiener_filter_v, 7, 10, 16, dst, stride, mid, w, h, fv, edge
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
......
......@@ -95,7 +95,7 @@ static void check_wiener(Dav1dLoopRestorationDSPContext *const c) {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment