shithub: libvpx

Download patch

ref: c2044fda1d00421ddab27c9fd80383546a8ba844
parent: ce5b17f9ad936941eee61dfc5b3daebc02f0a5b6
author: Johann <johannkoenig@google.com>
date: Fri Jun 30 03:37:20 EDT 2017

buffer.h: use stride_ instead of stride()

Change-Id: Ib51231349bf0ff3e23672762dc7bfa49b5fe4083

--- a/test/buffer.h
+++ b/test/buffer.h
@@ -149,7 +149,7 @@
 template <typename T>
 T *Buffer<T>::TopLeftPixel() const {
   if (!raw_buffer_) return NULL;
-  return raw_buffer_ + (top_padding_ * stride()) + left_padding_;
+  return raw_buffer_ + (top_padding_ * stride_) + left_padding_;
 }
 
 template <typename T>
@@ -160,7 +160,7 @@
     for (int width = 0; width < width_; ++width) {
       src[width] = value;
     }
-    src += stride();
+    src += stride_;
   }
 }
 
@@ -172,7 +172,7 @@
     for (int width = 0; width < width_; ++width) {
       src[width] = (*rand_class.*rand_func)();
     }
-    src += stride();
+    src += stride_;
   }
 }
 
@@ -215,8 +215,8 @@
   if (!raw_buffer_) return;
   for (int height = 0; height < height_ + top_padding_ + bottom_padding_;
        ++height) {
-    for (int width = 0; width < stride(); ++width) {
-      printf("%4d", raw_buffer_[height + width * stride()]);
+    for (int width = 0; width < stride_; ++width) {
+      printf("%4d", raw_buffer_[height + width * stride_]);
     }
     printf("\n");
   }
@@ -289,7 +289,7 @@
         return false;
       }
     }
-    src += stride();
+    src += stride_;
   }
   return true;
 }
@@ -301,7 +301,7 @@
 
   // Top padding.
   T const *top = raw_buffer_;
-  for (int i = 0; i < stride() * top_padding_; ++i) {
+  for (int i = 0; i < stride_ * top_padding_; ++i) {
     if (padding_value_ != top[i]) {
       return false;
     }
@@ -315,7 +315,7 @@
         return false;
       }
     }
-    left += stride();
+    left += stride_;
   }
 
   // Right padding.
@@ -326,12 +326,12 @@
         return false;
       }
     }
-    right += stride();
+    right += stride_;
   }
 
   // Bottom padding
-  T const *bottom = raw_buffer_ + (top_padding_ + height_) * stride();
-  for (int i = 0; i < stride() * bottom_padding_; ++i) {
+  T const *bottom = raw_buffer_ + (top_padding_ + height_) * stride_;
+  for (int i = 0; i < stride_ * bottom_padding_; ++i) {
     if (padding_value_ != bottom[i]) {
       return false;
     }