From 23a64c890e99e7c70365f12694c76e8605a11f85 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 15 Oct 2012 13:54:05 -0700 Subject: [PATCH] Remove test from B_MODE_INFO. It is essentially a duplicate of mode for RD-only purposes. Removing it saves us 4 bytes per B_MODE_INFO, or ~0.5MB for a 1080p video encode. Change-Id: I0a54db5f51658b3946d7efb1ca6e8cfbda0cdf88 --- vp8/common/blockd.h | 1 - vp8/encoder/encodeintra.c | 1 - vp8/encoder/rdopt.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h index b852a3684..092d9ff21 100644 --- a/vp8/common/blockd.h +++ b/vp8/common/blockd.h @@ -237,7 +237,6 @@ union b_mode_info { struct { B_PREDICTION_MODE first; #if CONFIG_HYBRIDTRANSFORM8X8 || CONFIG_HYBRIDTRANSFORM || CONFIG_HYBRIDTRANSFORM16X16 - B_PREDICTION_MODE test; TX_TYPE tx_type; #endif diff --git a/vp8/encoder/encodeintra.c b/vp8/encoder/encodeintra.c index eacae81d6..8021055d1 100644 --- a/vp8/encoder/encodeintra.c +++ b/vp8/encoder/encodeintra.c @@ -74,7 +74,6 @@ void vp8_encode_intra4x4block(const VP8_ENCODER_RTCD *rtcd, #if CONFIG_HYBRIDTRANSFORM if (x->q_index < ACTIVE_HT) { - b->bmi.as_mode.test = b->bmi.as_mode.first; txfm_map(b, b->bmi.as_mode.first); vp8_fht_c(be->src_diff, be->coeff, 32, b->bmi.as_mode.tx_type, 4); vp8_ht_quantize_b_4x4(be, b); diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index fe6b7de6d..bb2160701 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1182,6 +1182,7 @@ static int64_t rd_pick_intra4x4block(VP8_COMP *cpi, MACROBLOCK *x, BLOCK *be, // Do we need to do this for mode2 also? if (mode == B_LD_PRED || mode == B_VL_PRED) continue; + b->bmi.as_mode.first = mode; rate = bmode_costs[mode]; #if CONFIG_COMP_INTRA_PRED @@ -1200,7 +1201,6 @@ static int64_t rd_pick_intra4x4block(VP8_COMP *cpi, MACROBLOCK *x, BLOCK *be, #if CONFIG_HYBRIDTRANSFORM if (active_ht) { - b->bmi.as_mode.test = mode; txfm_map(b, mode); vp8_fht_c(be->src_diff, be->coeff, 32, b->bmi.as_mode.tx_type, 4); vp8_ht_quantize_b_4x4(be, b); -- 2.50.1