shithub: dav1d

Download patch

ref: 857232e44513ba2cbbb352a0f68d440c0ecd673e
parent: 5f63e531b9d10a09afe0a6b4875ca4852a7e58c1
author: Michail Alvanos <malvanos@gmail.com>
date: Fri Aug 2 15:04:10 EDT 2019

Improve wiener filter C implementation using loop interchange

--- a/src/looprestoration_tmpl.c
+++ b/src/looprestoration_tmpl.c
@@ -172,8 +172,8 @@
     const int round_bits_v = 11 - (bitdepth == 12) * 2;
     const int rounding_off_v = 1 << (round_bits_v - 1);
     const int round_offset = 1 << (bitdepth + (round_bits_v - 1));
-    for (int i = 0; i < w; i++) {
-        for (int j = 0; j < h; j++) {
+    for (int j = 0; j < h; j++) {
+        for (int i = 0; i < w; i++) {
             int sum = (hor[(j + 3) * REST_UNIT_STRIDE + i] << 7) - round_offset;
 
             for (int k = 0; k < 7; k++) {