]> granicus.if.org Git - libvpx/commitdiff
Update transform block partition information for intra blocks
authorJingning Han <jingning@google.com>
Mon, 15 Jun 2015 17:04:27 +0000 (10:04 -0700)
committerJingning Han <jingning@google.com>
Mon, 15 Jun 2015 22:53:19 +0000 (15:53 -0700)
If a block is coded in the intra modes, update the transform block
partition information as maximum block size.

Change-Id: I5ea440c700fc887ff2fe84fabde77a9d896d16f4

vp9/decoder/vp9_decodemv.c
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_encodeframe.c

index e04e0c0ae7dc1a8f0da13c697827d0c42e01b8b7..3a15dd0f1a54ceea7bcc751139e893dae09b9af3 100644 (file)
@@ -671,6 +671,17 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi,
                                 xd->left_txfm_context + (idy / 2),
                                 max_tx_size);
     }
+  } else {
+    TX_SIZE max_tx_size = max_txsize_lookup[bsize];
+    BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size];
+    int bh = num_4x4_blocks_wide_lookup[txb_size];
+    int width  = num_4x4_blocks_wide_lookup[bsize];
+    int height = num_4x4_blocks_high_lookup[bsize];
+    int idx, idy;
+    for (idy = 0; idy < height; idy += bh)
+      for (idx = 0; idx < width; idx += bh)
+        txfm_partition_update(xd->above_txfm_context + (idx / 2),
+                              xd->left_txfm_context + (idy / 2), mbmi->tx_size);
   }
 
   if (inter_block)
index 91154e4c20c44e5a407deb3a021fbac82f2f5b45..04e94c35ebe153dec05176796a90f01ac21062b4 100644 (file)
@@ -354,6 +354,17 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
                                 xd->left_txfm_context + (idy / 2),
                                 max_tx_size);
     }
+  } else {
+    TX_SIZE max_tx_size = max_txsize_lookup[bsize];
+    BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size];
+    int bh = num_4x4_blocks_wide_lookup[txb_size];
+    int width  = num_4x4_blocks_wide_lookup[bsize];
+    int height = num_4x4_blocks_high_lookup[bsize];
+    int idx, idy;
+    for (idy = 0; idy < height; idy += bh)
+      for (idx = 0; idx < width; idx += bh)
+        txfm_partition_update(xd->above_txfm_context + (idx / 2),
+                              xd->left_txfm_context + (idy / 2), mbmi->tx_size);
   }
 
   if (!is_inter) {
index 94720427e45cd5816305cdd4aa3cc4cba37f31b2..7f002d987219cdc9ff7eaa19064cb35537fb45a9 100644 (file)
@@ -4224,6 +4224,17 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
             update_txfm_count(xd, td->counts, max_txsize_lookup[mbmi->sb_type],
                               idy, idx, !output_enabled);
     }
+  } else {
+    TX_SIZE max_tx_size = max_txsize_lookup[bsize];
+    BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size];
+    int bh = num_4x4_blocks_wide_lookup[txb_size];
+    int width  = num_4x4_blocks_wide_lookup[bsize];
+    int height = num_4x4_blocks_high_lookup[bsize];
+    int idx, idy;
+    for (idy = 0; idy < height; idy += bh)
+      for (idx = 0; idx < width; idx += bh)
+        txfm_partition_update(xd->above_txfm_context + (idx / 2),
+                              xd->left_txfm_context + (idy / 2), mbmi->tx_size);
   }
 
   if (mbmi->sb_type < BLOCK_8X8)