Fix Wiener filter extreme value tests

The aforementioned test cases fill the whole image with the highest
possible value which is not suitable because the filter uses differences
to the average pixel value, in this case always zero. The fix sets the
source image and dgd values to maximise the difference with the average
and to stress the accumulation parts of the implementations.

Change-Id: I79e1db52b1d537d869c5b7eb769c80040cd52da1
diff --git a/test/wiener_test.cc b/test/wiener_test.cc
index abb7aba..5813138 100644
--- a/test/wiener_test.cc
+++ b/test/wiener_test.cc
@@ -322,9 +322,11 @@
       buf + (3 * RESTORATION_UNITSIZE_MAX * RESTORATION_UNITSIZE_MAX);
 
   for (int iter = 0; iter < iters && !HasFatalFailure(); ++iter) {
+    // Fill with alternating extreme values to maximize difference with
+    // the average.
     for (int i = 0; i < MAX_DATA_BLOCK * MAX_DATA_BLOCK; ++i) {
-      dgd_buf[i] = 255;
-      src_buf[i] = 255;
+      dgd_buf[i] = i & 1 ? 255 : 0;
+      src_buf[i] = i & 1 ? 255 : 0;
     }
     uint8_t *dgd = dgd_buf + wiener_halfwin * MAX_DATA_BLOCK + wiener_halfwin;
     uint8_t *src = src_buf;
@@ -656,9 +658,11 @@
   const int src_stride = MAX_DATA_BLOCK;
   const int iters = 1;
   for (int iter = 0; iter < iters && !HasFatalFailure(); ++iter) {
+    // Fill with alternating extreme values to maximize difference with
+    // the average.
     for (int i = 0; i < MAX_DATA_BLOCK * MAX_DATA_BLOCK; ++i) {
-      dgd_buf[i] = ((uint16_t)1 << bit_depth) - 1;
-      src_buf[i] = ((uint16_t)1 << bit_depth) - 1;
+      dgd_buf[i] = i & 1 ? ((uint16_t)1 << bit_depth) - 1 : 0;
+      src_buf[i] = i & 1 ? ((uint16_t)1 << bit_depth) - 1 : 0;
     }
     const uint8_t *dgd8 = CONVERT_TO_BYTEPTR(
         dgd_buf + wiener_halfwin * MAX_DATA_BLOCK + wiener_halfwin);