From 22cfc841d58dfbc708878240ee85a8845bd0086c Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Tue, 19 Jan 2016 18:15:40 +0000 Subject: [PATCH] Update VAR_TX related context when using SUPERTX. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c index a6e7b6582..e56f753b9 100644 --- a/vp10/encoder/encodeframe.c +++ b/vp10/encoder/encodeframe.c @@ -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) { -- 2.40.0