]> granicus.if.org Git - libvpx/commitdiff
vp9: Fix to scene cut/content change detection.
authorMarco <marpan@google.com>
Tue, 15 Mar 2016 17:30:24 +0000 (10:30 -0700)
committerMarco <marpan@google.com>
Tue, 15 Mar 2016 17:31:57 +0000 (10:31 -0700)
Use proper conditon on resolution check.

Change-Id: Idf563eb4391f373baf79546414a075b6516a5d35

vp9/encoder/vp9_ratectrl.c

index a75295eae03dbd29bf48aa10ff84cc4b81e411d0..9dd73947430a063f76960678176df37f4537e838 100644 (file)
@@ -2006,8 +2006,8 @@ void vp9_avg_source_sad(VP9_COMP *cpi) {
   RATE_CONTROL *const rc = &cpi->rc;
   rc->high_source_sad = 0;
   if (cpi->Last_Source != NULL &&
-      cpi->Last_Source->y_width == cm->width &&
-      cpi->Last_Source->y_height == cm->height) {
+      cpi->Last_Source->y_width == cpi->Source->y_width &&
+      cpi->Last_Source->y_height == cpi->Source->y_height) {
     const uint8_t *src_y = cpi->Source->y_buffer;
     const int src_ystride = cpi->Source->y_stride;
     const uint8_t *last_src_y = cpi->Last_Source->y_buffer;