ref: 56a8bc54a61619f675694f06be7fe5cce2a6dc56
parent: 00d221192998ebd733b69d0c8ff308d13c52aa3c
author: Jingning Han <jingning@google.com>
date: Tue Dec 16 11:02:58 EST 2014
Properly store the tx_size of selected intra mode Use a temporary variable to store the transform size associated with the best intra mode and restore the mode_info if the overall best mode is intra mode. Change-Id: I2606e0061ad32f91b095462902b1eb734b128eea
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -845,6 +845,7 @@
MIN(max_txsize_lookup[bsize],
tx_mode_to_biggest_tx_size[cpi->common.tx_mode]);
int i;
+ TX_SIZE best_intra_tx_size = TX_SIZES;
if (reuse_inter_pred && best_pred != NULL) {
if (best_pred->data == orig_dst.buf) {
@@ -888,7 +889,7 @@
if (this_rdc.rdcost < best_rdc.rdcost) {
best_rdc = this_rdc;
mbmi->mode = this_mode;
- mbmi->tx_size = intra_tx_size;
+ best_intra_tx_size = mbmi->tx_size;
mbmi->ref_frame[0] = INTRA_FRAME;
mbmi->uv_mode = this_mode;
mbmi->mv[0].as_int = INVALID_MV;
@@ -899,6 +900,8 @@
if (mbmi->ref_frame[0] != INTRA_FRAME) {
x->skip_txfm[0] = best_mode_skip_txfm;
mbmi->tx_size = best_tx_size;
+ } else {
+ mbmi->tx_size = best_intra_tx_size;
}
}