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 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
};
DECLARE_ALIGNED(16, const uint8_t,
- vp9_coefband_trans_4x4[MAXBAND_INDEX + 1]) = {
+ vp9_coefband_trans_4x4[16]) = {
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5,
- 5, 5, 5, 5, 5, 5
};
DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]) = {
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) {
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,
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)
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);
}
}
vp9_reader *r;
int *eobtotal;
uint8_t *token_cache;
- const uint8_t *band_translate[2];
};
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);
}
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;
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);
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)
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;
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");
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) {
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;
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,