From cba0a5db2b52ae814a56faaa6da4142d39daa55f Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Tue, 7 May 2013 11:56:26 -0700 Subject: [PATCH] Removing unused code + little cleanup. Change-Id: I81c19a8f19cfb5c7183609656ade833d72feb500 --- vp9/common/vp9_blockd.h | 5 ----- vp9/common/vp9_entropy.c | 5 ----- vp9/common/vp9_entropy.h | 2 -- vp9/decoder/vp9_decodemv.c | 14 +------------- vp9/decoder/vp9_decodframe.c | 16 +++++++--------- 5 files changed, 8 insertions(+), 34 deletions(-) diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index a219935..0b06875 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -316,11 +316,6 @@ struct macroblockd_plane { #define BLOCK_OFFSET(x, i, n) ((x) + (i) * (n)) -#define MB_SUBBLOCK_FIELD(x, field, i) (\ - ((i) < 16) ? BLOCK_OFFSET((x)->plane[0].field, (i), 16) : \ - ((i) < 20) ? BLOCK_OFFSET((x)->plane[1].field, ((i) - 16), 16) : \ - BLOCK_OFFSET((x)->plane[2].field, ((i) - 20), 16)) - typedef struct macroblockd { struct macroblockd_plane plane[MAX_MB_PLANE]; diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c index faa45bd..3ed204f 100644 --- a/vp9/common/vp9_entropy.c +++ b/vp9/common/vp9_entropy.c @@ -8,9 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ - -#include - #include "vp9/common/vp9_entropy.h" #include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_onyxc_int.h" @@ -19,8 +16,6 @@ #include "vpx/vpx_integer.h" #include "vp9/common/vp9_coefupdateprobs.h" -const int vp9_i8x8_block[4] = {0, 2, 8, 10}; - DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = { 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index f12ee95..4b2c2ad 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -16,8 +16,6 @@ #include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_common.h" -extern const int vp9_i8x8_block[4]; - /* Coefficient token alphabet */ #define ZERO_TOKEN 0 /* 0 Extra Bits 0+0 */ diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index 2c7483d..8a9a71b 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -97,7 +97,7 @@ static TX_SIZE select_txfm_size(VP9_COMMON *cm, vp9_reader *r, return txfm_size; } -extern const int vp9_i8x8_block[4]; + static void kfread_modes(VP9D_COMP *pbi, MODE_INFO *m, int mi_row, int mi_col, vp9_reader *r) { @@ -403,14 +403,6 @@ unsigned int vp9_mv_cont_count[5][4] = { }; #endif -static const unsigned char mbsplit_fill_count[4] = { 8, 8, 4, 1 }; -static const unsigned char mbsplit_fill_offset[4][16] = { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15 }, - { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15 }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } -}; - static void read_switchable_interp_probs(VP9D_COMP* const pbi, vp9_reader *r) { VP9_COMMON *const cm = &pbi->common; int i, j; @@ -881,10 +873,6 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, mbmi->uv_mode = read_uv_mode(r, cm->fc.uv_mode_prob[mbmi->mode]); cm->fc.uv_mode_counts[mbmi->mode][mbmi->uv_mode]++; } - /* - if (cm->current_video_frame == 1) - printf("mode: %d skip: %d\n", mbmi->mode, mbmi->mb_skip_coeff); - */ if (cm->txfm_mode == TX_MODE_SELECT && mbmi->mb_skip_coeff == 0 && ((mbmi->ref_frame == INTRA_FRAME && mbmi->mode != I4X4_PRED) || diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index dc1db51..4db69e8 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -9,7 +9,6 @@ */ #include -#include #include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/common/vp9_common.h" @@ -250,10 +249,10 @@ static void decode_atom_intra(VP9D_COMP *pbi, MACROBLOCKD *xd, for (i = 0; i < bc; i++) { int b_mode = xd->mode_info_context->bmi[i].as_mode.first; - uint8_t* dst; - dst = raster_block_offset_uint8(xd, bsize, 0, i, - xd->plane[0].dst.buf, - xd->plane[0].dst.stride); + + uint8_t* dst = raster_block_offset_uint8(xd, bsize, 0, i, + xd->plane[0].dst.buf, + xd->plane[0].dst.stride); vp9_intra4x4_predict(xd, i, bsize, b_mode, dst, xd->plane[0].dst.stride); // TODO(jingning): refactor to use foreach_transformed_block_in_plane_ @@ -459,12 +458,12 @@ static void decode_modes_sb(VP9D_COMP *pbi, int mi_row, int mi_col, break; case PARTITION_HORZ: decode_modes_b(pbi, mi_row, mi_col, r, subsize); - if ((mi_row + bs) < pc->mi_rows) + if (mi_row + bs < pc->mi_rows) decode_modes_b(pbi, mi_row + bs, mi_col, r, subsize); break; case PARTITION_VERT: decode_modes_b(pbi, mi_row, mi_col, r, subsize); - if ((mi_col + bs) < pc->mi_cols) + if (mi_col + bs < pc->mi_cols) decode_modes_b(pbi, mi_row, mi_col + bs, r, subsize); break; case PARTITION_SPLIT: @@ -884,9 +883,8 @@ static void decode_tile(VP9D_COMP *pbi, vp9_reader *r) { vpx_memset(&pc->left_context, 0, sizeof(pc->left_context)); vpx_memset(pc->left_seg_context, 0, sizeof(pc->left_seg_context)); for (mi_col = pc->cur_tile_mi_col_start; - mi_col < pc->cur_tile_mi_col_end; mi_col += 8) { + mi_col < pc->cur_tile_mi_col_end; mi_col += 8) decode_modes_sb(pbi, mi_row, mi_col, r, BLOCK_SIZE_SB64X64); - } } } -- 2.7.4