]> granicus.if.org Git - libvpx/commitdiff
Fix for var_tx entropy context with rect_tx
authorPeter de Rivaz <peter.derivaz@argondesign.com>
Tue, 18 Oct 2016 14:38:01 +0000 (15:38 +0100)
committerPeter de Rivaz <peter.derivaz@argondesign.com>
Tue, 18 Oct 2016 14:38:01 +0000 (15:38 +0100)
This computation should match the code in encode_block
to increase the accuracy of the rd optimization.

Change-Id: Ibc9d9ab6d88d0c0f3af62e9cc233216aba48a57e

av1/encoder/rdopt.c

index b776548d176118656283127346b18c59f8f11f69..8a41bf7875c0b7e0b59d7f340cea7b95686074c8 100644 (file)
@@ -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);