diff options
Diffstat (limited to 'vp9/decoder/vp9_decodframe.c')
-rw-r--r-- | vp9/decoder/vp9_decodframe.c | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index 75c6384bb..efa7df903 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -45,7 +45,6 @@ typedef struct TileWorkerData { DECLARE_ALIGNED(16, int16_t, qcoeff[MAX_MB_PLANE][64 * 64]); DECLARE_ALIGNED(16, int16_t, dqcoeff[MAX_MB_PLANE][64 * 64]); DECLARE_ALIGNED(16, uint16_t, eobs[MAX_MB_PLANE][256]); - const uint8_t *band_translate[2]; } TileWorkerData; static int read_be32(const uint8_t *p) { @@ -295,7 +294,6 @@ struct intra_args { MACROBLOCKD *xd; vp9_reader *r; uint8_t *token_cache; - const uint8_t *band_translate[2]; }; static void predict_and_reconstruct_intra_block(int plane, int block, @@ -304,9 +302,6 @@ static void predict_and_reconstruct_intra_block(int plane, int block, struct intra_args *const args = arg; VP9_COMMON *const cm = args->cm; MACROBLOCKD *const xd = args->xd; - const uint8_t *band_translate[2] = { - args->band_translate[0], args->band_translate[1] - }; struct macroblockd_plane *const pd = &xd->plane[plane]; MODE_INFO *const mi = xd->mi_8x8[0]; const MB_PREDICTION_MODE mode = (plane == 0) @@ -327,7 +322,7 @@ static void predict_and_reconstruct_intra_block(int plane, int block, if (!mi->mbmi.skip_coeff) { vp9_decode_block_tokens(cm, xd, plane, block, plane_bsize, x, y, tx_size, - args->r, args->token_cache, band_translate); + args->r, args->token_cache); inverse_transform_block(xd, plane, block, tx_size, x, y); } } @@ -338,7 +333,6 @@ struct inter_args { vp9_reader *r; int *eobtotal; uint8_t *token_cache; - const uint8_t *band_translate[2]; }; static void reconstruct_inter_block(int plane, int block, @@ -347,16 +341,12 @@ static void reconstruct_inter_block(int plane, int block, struct inter_args *args = arg; VP9_COMMON *const cm = args->cm; MACROBLOCKD *const xd = args->xd; - const uint8_t *band_translate[2] = { - args->band_translate[0], args->band_translate[1] - }; int x, y; txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y); *args->eobtotal += vp9_decode_block_tokens(cm, xd, plane, block, plane_bsize, x, y, tx_size, - args->r, args->token_cache, - band_translate); + args->r, args->token_cache); inverse_transform_block(xd, plane, block, tx_size, x, y); } @@ -408,8 +398,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, const TileInfo *const tile, int mi_row, int mi_col, vp9_reader *r, BLOCK_SIZE bsize, - uint8_t *token_cache, - const uint8_t *band_translate[2]) { + uint8_t *token_cache) { const int less8x8 = bsize < BLOCK_8X8; MB_MODE_INFO *mbmi; @@ -432,7 +421,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, if (!is_inter_block(mbmi)) { struct intra_args arg = { - cm, xd, r, token_cache, {band_translate[0], band_translate[1]} + cm, xd, r, token_cache }; foreach_transformed_block(xd, bsize, predict_and_reconstruct_intra_block, &arg); @@ -452,8 +441,7 @@ static void decode_modes_b(VP9_COMMON *const cm, MACROBLOCKD *const xd, if (!mbmi->skip_coeff) { int eobtotal = 0; struct inter_args arg = { - cm, xd, r, &eobtotal, token_cache, - {band_translate[0], band_translate[1]} + cm, xd, r, &eobtotal, token_cache }; foreach_transformed_block(xd, bsize, reconstruct_inter_block, &arg); if (!less8x8 && eobtotal == 0) @@ -494,8 +482,7 @@ static void decode_modes_sb(VP9_COMMON *const cm, MACROBLOCKD *const xd, const TileInfo *const tile, int mi_row, int mi_col, vp9_reader* r, BLOCK_SIZE bsize, - uint8_t *token_cache, - const uint8_t *band_translate[2]) { + uint8_t *token_cache) { const int hbs = num_8x8_blocks_wide_lookup[bsize] / 2; PARTITION_TYPE partition; BLOCK_SIZE subsize; @@ -506,37 +493,33 @@ static void decode_modes_sb(VP9_COMMON *const cm, MACROBLOCKD *const xd, partition = read_partition(cm, xd, hbs, mi_row, mi_col, bsize, r); subsize = get_subsize(bsize, partition); if (subsize < BLOCK_8X8) { - decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache, - band_translate); + decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache); } else { switch (partition) { case PARTITION_NONE: - decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache, - band_translate); + decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache); break; case PARTITION_HORZ: - decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache, - band_translate); + decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache); if (mi_row + hbs < cm->mi_rows) decode_modes_b(cm, xd, tile, mi_row + hbs, mi_col, r, subsize, - token_cache, band_translate); + token_cache); break; case PARTITION_VERT: - decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache, - band_translate); + decode_modes_b(cm, xd, tile, mi_row, mi_col, r, subsize, token_cache); if (mi_col + hbs < cm->mi_cols) decode_modes_b(cm, xd, tile, mi_row, mi_col + hbs, r, subsize, - token_cache, band_translate); + token_cache); break; case PARTITION_SPLIT: decode_modes_sb(cm, xd, tile, mi_row, mi_col, r, subsize, - token_cache, band_translate); + token_cache); decode_modes_sb(cm, xd, tile, mi_row, mi_col + hbs, r, subsize, - token_cache, band_translate); + token_cache); decode_modes_sb(cm, xd, tile, mi_row + hbs, mi_col, r, subsize, - token_cache, band_translate); + token_cache); decode_modes_sb(cm, xd, tile, mi_row + hbs, mi_col + hbs, r, subsize, - token_cache, band_translate); + token_cache); break; default: assert(!"Invalid partition type"); @@ -820,11 +803,8 @@ static void decode_tile(VP9D_COMP *pbi, const TileInfo *const tile, vp9_zero(xd->left_seg_context); for (mi_col = tile->mi_col_start; mi_col < tile->mi_col_end; mi_col += MI_BLOCK_SIZE) { - const uint8_t *band_translate[2] = { - vp9_coefband_trans_4x4, pbi->coefband_trans_8x8plus - }; decode_modes_sb(cm, xd, tile, mi_row, mi_col, r, BLOCK_64X64, - pbi->token_cache, band_translate); + pbi->token_cache); } if (pbi->do_loopfilter_inline) { @@ -985,8 +965,7 @@ static int tile_worker_hook(void *arg1, void *arg2) { mi_col += MI_BLOCK_SIZE) { decode_modes_sb(tile_data->cm, &tile_data->xd, tile, mi_row, mi_col, &tile_data->bit_reader, BLOCK_64X64, - tile_data->token_cache, - tile_data->band_translate); + tile_data->token_cache); } } return !tile_data->xd.corrupted; @@ -1045,8 +1024,6 @@ static const uint8_t *decode_tiles_mt(VP9D_COMP *pbi, const uint8_t *data) { tile_data->cm = cm; tile_data->xd = pbi->mb; tile_data->xd.corrupted = 0; - tile_data->band_translate[0] = vp9_coefband_trans_4x4; - tile_data->band_translate[1] = pbi->coefband_trans_8x8plus; vp9_tile_init(tile, tile_data->cm, 0, tile_col); setup_token_decoder(data, data_end, size, &cm->error, |