]> granicus.if.org Git - libvpx/commitdiff
Disable partitioning in the dominant subsampling direction.
authorAlex Converse <aconverse@google.com>
Mon, 2 Dec 2013 20:54:21 +0000 (12:54 -0800)
committerAlex Converse <aconverse@google.com>
Mon, 2 Dec 2013 21:38:11 +0000 (13:38 -0800)
E.g. disable vertical partioning for 4:2:2. Until we come up with something
better to do with the chroma block size, this prevents an assert error.

Change-Id: I9394fb3f14ec1343abc3ad4769de208e6278f285

vp9/encoder/vp9_encodeframe.c

index 38c753849d547ebc62db3216d511c48b35f1ee4a..89da781906063861acfe105f945e07246a7eecf1 100644 (file)
@@ -1567,10 +1567,14 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
   // Override skipping rectangular partition operations for edge blocks
   const int force_horz_split = (mi_row + ms >= cm->mi_rows);
   const int force_vert_split = (mi_col + ms >= cm->mi_cols);
+  const int xss = x->e_mbd.plane[1].subsampling_x;
+  const int yss = x->e_mbd.plane[1].subsampling_y;
 
   int partition_none_allowed = !force_horz_split && !force_vert_split;
-  int partition_horz_allowed = !force_vert_split && bsize >= BLOCK_8X8;
-  int partition_vert_allowed = !force_horz_split && bsize >= BLOCK_8X8;
+  int partition_horz_allowed = !force_vert_split && yss <= xss &&
+                               bsize >= BLOCK_8X8;
+  int partition_vert_allowed = !force_horz_split && xss <= yss &&
+                               bsize >= BLOCK_8X8;
 
   int partition_split_done = 0;
   (void) *tp_orig;