]> granicus.if.org Git - libvpx/commitdiff
Update VAR_TX related context when using SUPERTX.
authorGeza Lore <gezalore@gmail.com>
Tue, 19 Jan 2016 18:15:40 +0000 (18:15 +0000)
committerGeza Lore <gezalore@gmail.com>
Tue, 26 Jan 2016 01:18:56 +0000 (01:18 +0000)
The encoder did not update left_txfm_context and above_txfm_context in
MACROBLOCKD (used for choosing the probability context for the vartx
split bits) when the supertx bit was set for a block. The deoder on the
other hand did update these for supertx blocks. The encoder used these
to compute the context counts, which the packer then uses to adapt it's
probabilities. This results in the packer and the decoder using
different probabilities.

This patch harmonizes the encoder and the decoder by making the encoder
update the mentioned context for supertx coded blocks.

Change-Id: I3a22132124b1bce2ee501d640ceab374b19e3ca1

vp10/encoder/encodeframe.c

index a6e7b6582d62927ee59d63b3ca35c0062363430b..e56f753b9140c7fd9ee72ed3b20fd6e6a51b16d4 100644 (file)
@@ -2052,6 +2052,10 @@ static void encode_sb(VP10_COMP *cpi, ThreadData *td,
       }
       if (partition != PARTITION_SPLIT || bsize == BLOCK_8X8)
         update_partition_context(xd, mi_row, mi_col, subsize, bsize);
+#if CONFIG_VAR_TX
+      set_txfm_ctx(xd->left_txfm_context, supertx_size, xd->n8_h);
+      set_txfm_ctx(xd->above_txfm_context, supertx_size, mi_height);
+#endif  // CONFIG_VAR_TX
       return;
     } else {
       if (output_enabled) {