summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_pickmode.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-12-15 12:54:02 -0800
committerJingning Han <jingning@google.com>2014-12-15 12:58:34 -0800
commitc2c7596fc71b14c40ec4e90547c04b4cde439861 (patch)
tree2c9841fb7d118146c8f7e0e0c9ebef758b788968 /vp9/encoder/vp9_pickmode.c
parent83e2c62aba3a427e283c87900ba1ab0806766bef (diff)
downloadlibvpx-c2c7596fc71b14c40ec4e90547c04b4cde439861.tar
libvpx-c2c7596fc71b14c40ec4e90547c04b4cde439861.tar.gz
libvpx-c2c7596fc71b14c40ec4e90547c04b4cde439861.tar.bz2
libvpx-c2c7596fc71b14c40ec4e90547c04b4cde439861.zip
Initialize best_tx_size with invalid value
If vp9_pick_inter_mode works properly, it should at least check one coding mode and hence get best_tx_size assigned a valid value. There is no need to initialize best_tx_size with a legitimate value before starting the mode search. Change-Id: Ic0496cd89672ea9c2c512a9bd1da952190af9cba
Diffstat (limited to 'vp9/encoder/vp9_pickmode.c')
-rw-r--r--vp9/encoder/vp9_pickmode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 379d06739..db5650c10 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -522,8 +522,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
struct macroblockd_plane *const pd = &xd->plane[0];
PREDICTION_MODE best_mode = ZEROMV;
MV_REFERENCE_FRAME ref_frame, best_ref_frame = LAST_FRAME;
- TX_SIZE best_tx_size = MIN(max_txsize_lookup[bsize],
- tx_mode_to_biggest_tx_size[cm->tx_mode]);
+ TX_SIZE best_tx_size = TX_SIZES;
INTERP_FILTER best_pred_filter = EIGHTTAP;
int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES];
struct buf_2d yv12_mb[4][MAX_MB_PLANE];
@@ -870,7 +869,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
pd->dst = orig_dst;
for (i = 0; i < 4; ++i) {
- const TX_SIZE saved_tx_size = mbmi->tx_size;
const PREDICTION_MODE this_mode = intra_mode_list[i];
if (!((1 << this_mode) & cpi->sf.intra_y_mode_mask[intra_tx_size]))
continue;
@@ -897,7 +895,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
mbmi->mv[0].as_int = INVALID_MV;
} else {
x->skip_txfm[0] = best_mode_skip_txfm;
- mbmi->tx_size = saved_tx_size;
+ mbmi->tx_size = best_tx_size;
}
}
}