From: Peter de Rivaz Date: Tue, 18 Oct 2016 14:38:01 +0000 (+0100) Subject: Fix for var_tx entropy context with rect_tx X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46fcb05fde415d5031626a4a5a7fedf79c4cad52;p=libvpx Fix for var_tx entropy context with rect_tx This computation should match the code in encode_block to increase the accuracy of the rd optimization. Change-Id: Ibc9d9ab6d88d0c0f3af62e9cc233216aba48a57e --- diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index b776548d1..8a41bf787 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c @@ -4408,7 +4408,11 @@ static int64_t encode_inter_mb_segment(AV1_COMP *cpi, MACROBLOCK *x, block = k; else block = (i ? 2 : 0); +#if CONFIG_VAR_TX + coeff_ctx = get_entropy_context(tx_size, ta + (k & 1), tl + (k >> 1)); +#else coeff_ctx = combine_entropy_contexts(*(ta + (k & 1)), *(tl + (k >> 1))); +#endif #if CONFIG_NEW_QUANT av1_xform_quant_fp_nuq(x, 0, block, idy + (i >> 1), idx + (i & 0x01), BLOCK_8X8, tx_size, coeff_ctx);