ref: b2446fb6be2d51fdeda6818221c6273ffd8213c1
parent: 55c6a74bd4f228e48d56de200f25154eb733fc40
author: Yunqing Wang <[email protected]>
date: Mon Jul 27 07:58:39 EDT 2015
Remove tx_select_threshes Removed unused tx_select_threshes and tx_select_diff. Change-Id: I5e9e7ad170056efe14b5f071e94d0c5a36e4a34c
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1059,11 +1059,6 @@
if (!output_enabled)
return;
- if (!segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
- for (i = 0; i < TX_MODES; i++)
- rdc->tx_select_diff[i] += ctx->tx_rd_diff[i];
- }
-
#if CONFIG_INTERNAL_STATS
if (frame_is_intra_only(cm)) {
static const int kf_mode_index[] = {
@@ -3869,7 +3864,6 @@
static void encode_frame_internal(VP9_COMP *cpi) {
SPEED_FEATURES *const sf = &cpi->sf;
- RD_OPT *const rd_opt = &cpi->rd;
ThreadData *const td = &cpi->td;
MACROBLOCK *const x = &td->mb;
VP9_COMMON *const cm = &cpi->common;
@@ -3883,8 +3877,6 @@
vp9_zero(rdc->coef_counts);
vp9_zero(rdc->comp_pred_diff);
vp9_zero(rdc->filter_diff);
- vp9_zero(rdc->tx_select_diff);
- vp9_zero(rd_opt->tx_select_threshes);
xd->lossless = cm->base_qindex == 0 &&
cm->y_dc_delta_q == 0 &&
@@ -4034,7 +4026,6 @@
const MV_REFERENCE_FRAME frame_type = get_frame_type(cpi);
int64_t *const mode_thrs = rd_opt->prediction_type_threshes[frame_type];
int64_t *const filter_thrs = rd_opt->filter_threshes[frame_type];
- int *const tx_thrs = rd_opt->tx_select_threshes[frame_type];
const int is_alt_ref = frame_type == ALTREF_FRAME;
/* prediction (compound, single or hybrid) mode selection */
@@ -4061,14 +4052,6 @@
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
filter_thrs[i] = (filter_thrs[i] + rdc->filter_diff[i] / cm->MBs) / 2;
-
- for (i = 0; i < TX_MODES; ++i) {
- int64_t pd = rdc->tx_select_diff[i];
- if (i == TX_MODE_SELECT)
- pd -= RDCOST(cpi->td.mb.rdmult, cpi->td.mb.rddiv, 2048 * (TX_SIZES - 1),
- 0);
- tx_thrs[i] = (tx_thrs[i] + (int)(pd / cm->MBs)) / 2;
- }
if (cm->reference_mode == REFERENCE_MODE_SELECT) {
int single_count_zero = 0;
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -255,7 +255,6 @@
typedef struct RD_COUNTS {
vp9_coeff_count coef_counts[TX_SIZES][PLANE_TYPES];
int64_t comp_pred_diff[REFERENCE_MODES];
- int64_t tx_select_diff[TX_MODES];
int64_t filter_diff[SWITCHABLE_FILTER_CONTEXTS];
} RD_COUNTS;
--- a/vp9/encoder/vp9_ethread.c
+++ b/vp9/encoder/vp9_ethread.c
@@ -21,9 +21,6 @@
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
td->rd_counts.filter_diff[i] += td_t->rd_counts.filter_diff[i];
- for (i = 0; i < TX_MODES; i++)
- td->rd_counts.tx_select_diff[i] += td_t->rd_counts.tx_select_diff[i];
-
for (i = 0; i < TX_SIZES; i++)
for (j = 0; j < PLANE_TYPES; j++)
for (k = 0; k < REF_TYPES; k++)
--- a/vp9/encoder/vp9_rd.h
+++ b/vp9/encoder/vp9_rd.h
@@ -103,8 +103,6 @@
int threshes[MAX_SEGMENTS][BLOCK_SIZES][MAX_MODES];
int64_t prediction_type_threshes[MAX_REF_FRAMES][REFERENCE_MODES];
- // TODO(agrange): can this overflow?
- int tx_select_threshes[MAX_REF_FRAMES][TX_MODES];
int64_t filter_threshes[MAX_REF_FRAMES][SWITCHABLE_FILTER_CONTEXTS];