]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Adjust thresh for 4x4 tx selection
authorMarco Paniconi <marpan@google.com>
Thu, 25 Apr 2019 23:12:19 +0000 (16:12 -0700)
committerMarco Paniconi <marpan@google.com>
Fri, 26 Apr 2019 01:44:33 +0000 (18:44 -0700)
For screen content nonrd_pickmode: reduce
threshold to select 4x4 tx_size, under certain
conditions.

Change-Id: If68c30172272868033f0e3011e53c76b4e7c48b6

vp9/encoder/vp9_pickmode.c

index d4ffe54baa9ac51314650fcca8c03f7cc8a2de35..b483489d3170816271fd250945c2d661382a7c96 100644 (file)
@@ -370,7 +370,7 @@ static TX_SIZE calculate_tx_size(VP9_COMP *const cpi, BLOCK_SIZE bsize,
       tx_size = TX_16X16;
     // For screen-content force 4X4 tx_size over 8X8, for large variance.
     if (cpi->oxcf.content == VP9E_CONTENT_SCREEN && tx_size == TX_8X8 &&
-        bsize <= BLOCK_16X16 && var > (ac_thr << 6))
+        bsize <= BLOCK_16X16 && ((var >> 5) > (unsigned int)ac_thr))
       tx_size = TX_4X4;
   } else {
     tx_size = VPXMIN(max_txsize_lookup[bsize],