]> granicus.if.org Git - libvpx/commitdiff
Remove tx_select_threshes
authorYunqing Wang <yunqingwang@google.com>
Mon, 27 Jul 2015 18:58:39 +0000 (11:58 -0700)
committerYunqing Wang <yunqingwang@google.com>
Mon, 27 Jul 2015 19:02:05 +0000 (12:02 -0700)
Removed unused tx_select_threshes and tx_select_diff.

Change-Id: I5e9e7ad170056efe14b5f071e94d0c5a36e4a34c

vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_encoder.h
vp9/encoder/vp9_ethread.c
vp9/encoder/vp9_rd.h

index a450945718fed4e3e0b2913d7b829f2861d56163..658a11c26bfe215c2032c410bccf268ae78265b1 100644 (file)
@@ -1059,11 +1059,6 @@ static void update_state(VP9_COMP *cpi, ThreadData *td,
   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 int input_fpmb_stats(FIRSTPASS_MB_STATS *firstpass_mb_stats,
 
 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 @@ static void encode_frame_internal(VP9_COMP *cpi) {
   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 @@ void vp9_encode_frame(VP9_COMP *cpi) {
     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 */
@@ -4062,14 +4053,6 @@ void vp9_encode_frame(VP9_COMP *cpi) {
     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;
       int comp_count_zero = 0;
index b76b6b7139ce0ce50139bd211461ef06bd0284d2..4d4da9283bd40427d938140e63ff5da0b4a3bd0d 100644 (file)
@@ -255,7 +255,6 @@ typedef struct TileDataEnc {
 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;
 
index b4132d815d2b912791a8a59da73cccf36685e36f..00025b7a1984927e5d2db9f23f7529f8c971b91b 100644 (file)
@@ -21,9 +21,6 @@ static void accumulate_rd_opt(ThreadData *td, ThreadData *td_t) {
   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++)
index 7ba2568fe68c68e19845edd361f3870a5a586adb..28385c981edb53eebebc6f49d8fde943b9defa71 100644 (file)
@@ -103,8 +103,6 @@ typedef struct RD_OPT {
   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];