ref: 187fac45a4fea6facad79e8e898bfb5bb4a45365
parent: d0ad2e25d156cf538888f9b2389361d660a0421e
parent: d22ea1d3f6f7c4ca97e07c5637696ece3db11d54
author: Marco Paniconi <marpan@google.com>
date: Fri Jul 27 02:02:34 EDT 2018
Merge "vp9: 4x4 tx_size for nonrd-pickmode for screen content"
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -406,6 +406,11 @@
tx_size = TX_8X8;
else if (tx_size > TX_16X16)
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))
+ tx_size = TX_4X4;
} else {
tx_size = VPXMIN(max_txsize_lookup[bsize],
tx_mode_to_biggest_tx_size[cpi->common.tx_mode]);
@@ -588,6 +593,12 @@
xd->mi[0]->tx_size = TX_8X8;
else if (xd->mi[0]->tx_size > TX_16X16)
xd->mi[0]->tx_size = TX_16X16;
+
+ // For screen-content force 4X4 tx_size over 8X8, for large variance.
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
+ xd->mi[0]->tx_size == TX_8X8 && bsize <= BLOCK_16X16 &&
+ var > (ac_thr << 6))
+ xd->mi[0]->tx_size = TX_4X4;
} else {
xd->mi[0]->tx_size =
VPXMIN(max_txsize_lookup[bsize],