shithub: libvpx

Download patch

ref: 0bba4042c2d5186af23fc156092e6ddc3dcaf71a
parent: 9b5997fa0a3ff41c0d2261e0cb5e12f4c26d11ab
parent: 42c1f6dbf4771975654f48122e1b27e633d90412
author: Jingning Han <jingning@google.com>
date: Thu Apr 17 11:22:41 EDT 2014

Merge "Skip fetching original frame pointers for UV in background check"

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1273,7 +1273,6 @@
 
 static int is_background(VP9_COMP *cpi, const TileInfo *const tile,
                          int mi_row, int mi_col) {
-  MACROBLOCK *const x = &cpi->mb;
   uint8_t *src, *pre;
   int src_stride, pre_stride;
 
@@ -1283,11 +1282,10 @@
   int this_sad = 0;
   int threshold = 0;
 
-  vp9_setup_src_planes(x, cpi->Source, mi_row, mi_col);
-
-  src_stride = x->plane[0].src.stride;
-  src = x->plane[0].src.buf;
-
+  // This assumes the input source frames are of the same dimension.
+  src_stride = cpi->Source->y_stride;
+  src = cpi->Source->y_buffer + (mi_row * MI_SIZE) * src_stride +
+            (mi_col * MI_SIZE);
   pre_stride = cpi->Last_Source->y_stride;
   pre = cpi->Last_Source->y_buffer + (mi_row * MI_SIZE) * pre_stride +
           (mi_col * MI_SIZE);