]> granicus.if.org Git - libvpx/commitdiff
Removing frame_type field from MACROBLOCKD struct.
authorDmitry Kovalev <dkovalev@google.com>
Fri, 19 Jul 2013 18:55:36 +0000 (11:55 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Fri, 19 Jul 2013 18:55:36 +0000 (11:55 -0700)
Change-Id: Ia4e83913251c1cdc7aa2abd64bf01ecb1a962119

vp9/common/vp9_blockd.h
vp9/decoder/vp9_decodframe.c
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_rdopt.c

index 35a6b1ec1349a7039649497c815a49e6bbacc090..500041c90d979060d738f76e138ac5a47e5dc753 100644 (file)
@@ -224,8 +224,6 @@ typedef struct macroblockd {
   MODE_INFO *mode_info_context;
   int mode_info_stride;
 
-  FRAME_TYPE frame_type;
-
   int up_available;
   int left_available;
   int right_available;
index 27e67d226a89b9b26f459e8e4c7629385e909451..d2222e3573ce18f17637fcf73d08c0e7ed07d92d 100644 (file)
@@ -954,7 +954,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
 
   xd->mode_info_context = pc->mi;
   xd->prev_mode_info_context = pc->prev_mi;
-  xd->frame_type = pc->frame_type;
   xd->mode_info_stride = pc->mode_info_stride;
 
   init_dequantizer(pc, &pbi->mb);
index 70c64eedae2ed567833c9c0c86c238966c4bd360..2d2c273124e6f9c2c991fb7b3fd84a351eaf407e 100644 (file)
@@ -1907,7 +1907,6 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
   cpi->seg0_idx = 0;
 
   xd->mode_info_stride = cm->mode_info_stride;
-  xd->frame_type = cm->frame_type;
 
   // reset intra mode contexts
   if (cm->frame_type == KEY_FRAME)
index a0c64beb515249645c7d6f5caac1be94bcfa05b1..1872ae641c22e7a0b3b3c5e9a5e510f9b8865ff5 100644 (file)
@@ -1346,7 +1346,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
       int64_t UNINITIALIZED_IS_SAFE(d);
       i = idy * 2 + idx;
 
-      if (xd->frame_type == KEY_FRAME) {
+      if (cpi->common.frame_type == KEY_FRAME) {
         const MB_PREDICTION_MODE A = above_block_mode(mic, i, mis);
         const MB_PREDICTION_MODE L = (xd->left_available || idx) ?
                                      left_block_mode(mic, i) : DC_PRED;
@@ -1488,13 +1488,12 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
                                        int64_t *distortion, int *skippable,
                                        BLOCK_SIZE_TYPE bsize) {
   MB_PREDICTION_MODE mode;
-  MB_PREDICTION_MODE last_mode;
   MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
   int64_t best_rd = INT64_MAX, this_rd;
   int this_rate_tokenonly, this_rate, s;
   int64_t this_distortion;
 
-  last_mode = bsize <= BLOCK_SIZE_SB8X8 ?
+  MB_PREDICTION_MODE last_mode = bsize <= BLOCK_SIZE_SB8X8 ?
               TM_PRED : cpi->sf.last_chroma_intra_mode;
 
   for (mode = DC_PRED; mode <= last_mode; mode++) {
@@ -1502,7 +1501,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
     super_block_uvrd(&cpi->common, x, &this_rate_tokenonly,
                      &this_distortion, &s, NULL, bsize);
     this_rate = this_rate_tokenonly +
-                x->intra_uv_mode_cost[x->e_mbd.frame_type][mode];
+                x->intra_uv_mode_cost[cpi->common.frame_type][mode];
     this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
 
     if (this_rd < best_rd) {
@@ -1530,7 +1529,7 @@ static int64_t rd_sbuv_dcpred(VP9_COMP *cpi, MACROBLOCK *x,
   super_block_uvrd(&cpi->common, x, rate_tokenonly,
                    distortion, skippable, NULL, bsize);
   *rate = *rate_tokenonly +
-          x->intra_uv_mode_cost[x->e_mbd.frame_type][DC_PRED];
+          x->intra_uv_mode_cost[cpi->common.frame_type][DC_PRED];
   this_rd = RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
 
   x->e_mbd.mode_info_context->mbmi.uv_mode = DC_PRED;