ref: 7e0f88b6be2784309bead554ef190096ac0a58c1
parent: 8105ce6dce6d897c60e31f6811909f076995b867
author: Jingning Han <[email protected]>
date: Mon Aug 12 12:56:32 EDT 2013
Use lookup table to find largest txfm size Refactor choose_largest_txfm_size_ and make it find the largest transform size via lookup table. Change-Id: I685e0396d71111b599d5367ab1b9c934bd5490c8
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -787,8 +787,7 @@
int *skip, int64_t *sse,
int64_t ref_best_rd,
BLOCK_SIZE_TYPE bs) {
- const TX_SIZE max_txfm_size = TX_32X32
- - (bs < BLOCK_32X32) - (bs < BLOCK_16X16);
+ const TX_SIZE max_txfm_size = max_txsize_lookup[bs];
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
@@ -818,8 +817,7 @@
int *s, int *skip,
int64_t tx_cache[TX_MODES],
BLOCK_SIZE_TYPE bs) {
- const TX_SIZE max_tx_size = TX_32X32
- - (bs < BLOCK_32X32) - (bs < BLOCK_16X16);
+ const TX_SIZE max_tx_size = max_txsize_lookup[bs];
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
@@ -922,8 +920,7 @@
int *s, int *skip, int64_t *sse,
int64_t ref_best_rd,
BLOCK_SIZE_TYPE bs) {
- const TX_SIZE max_txfm_size = TX_32X32
- - (bs < BLOCK_32X32) - (bs < BLOCK_16X16);
+ const TX_SIZE max_txfm_size = max_txsize_lookup[bs];
VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;