]> granicus.if.org Git - libvpx/commitdiff
Reject sub8x8 partitions with SEG_LVL_SKIP.
authorAlex Converse <aconverse@google.com>
Thu, 16 Jun 2016 22:00:31 +0000 (15:00 -0700)
committerAlex Converse <aconverse@google.com>
Thu, 23 Jun 2016 16:20:51 +0000 (16:20 +0000)
Change-Id: I2503f163464862dc3a7a3141d43d3f07c81b33d2

vp10/encoder/encodeframe.c

index 19ce4c37ed1d211e32b5894e973c7e468982b59d..caca295766a257bf72d594b42afebe15b6516cb6 100644 (file)
@@ -1810,14 +1810,20 @@ static void rd_pick_sb_modes(VP10_COMP *cpi,
 #endif  // CONFIG_SUPERTX
       }
     } else {
-      vp10_rd_pick_inter_mode_sub8x8(cpi, tile_data, x, mi_row, mi_col, rd_cost,
+      if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
+        // The decoder rejects sub8x8 partitions when SEG_LVL_SKIP is set.
+        rd_cost->rate = INT_MAX;
+      } else {
+        vp10_rd_pick_inter_mode_sub8x8(cpi, tile_data, x, mi_row, mi_col,
+                                       rd_cost,
 #if CONFIG_SUPERTX
-                                     totalrate_nocoef,
+                                       totalrate_nocoef,
 #endif  // CONFIG_SUPERTX
-                                     bsize, ctx, best_rd);
+                                       bsize, ctx, best_rd);
 #if CONFIG_SUPERTX
       assert(*totalrate_nocoef >= 0);
 #endif  // CONFIG_SUPERTX
+      }
     }
   }