ref: d22ea1d3f6f7c4ca97e07c5637696ece3db11d54
parent: e55e3f80319e9cae14b91b649bc861b0b5297c53
author: Marco Paniconi <[email protected]>
date: Thu Jul 26 10:06:42 EDT 2018
vp9: 4x4 tx_size for nonrd-pickmode for screen content Force 4x4 transform size under some conditions for real-time screen-content mode. Improvemet on text in some screen clips. Change-Id: I77cafa23ea1060ef4334dc07eac53189bf80e0ec
--- 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],