#endif // CONFIG_SUPERTX
int mi_row, int mi_col,
vp10_reader *r,
-#if CONFIG_ANS
- struct AnsDecoder *const tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
PARTITION_TYPE partition,
#endif // CONFIG_EXT_PARTITION_TYPES
for (col = 0; col < max_blocks_wide; col += step)
predict_and_reconstruct_intra_block(xd,
#if CONFIG_ANS
- cm->token_tab, tok,
-#else
- r,
+ cm->token_tab,
#endif
+ r,
mbmi, plane,
row, col, tx_size);
}
for (col = 0; col < max_blocks_wide; col += step)
eobtotal += reconstruct_inter_block(xd,
#if CONFIG_ANS
- cm->token_tab, tok,
-#else
- r,
+ cm->token_tab,
#endif
+ r,
mbmi, plane, row, col,
tx_size);
#endif
#endif
int mi_row, int mi_col,
vp10_reader* r,
-#if CONFIG_ANS
- struct AnsDecoder *const tok,
-#endif // CONFIG_ANS
BLOCK_SIZE bsize, int n4x4_l2) {
VP10_COMMON *const cm = &pbi->common;
const int n8x8_l2 = n4x4_l2 - 1;
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row + hbs, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
#if CONFIG_EXT_PARTITION_TYPES
partition,
#endif // CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
subsize, n8x8_l2);
decode_partition(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
subsize, n8x8_l2);
decode_partition(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row + hbs, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
subsize, n8x8_l2);
decode_partition(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif // CONFIG_SUPERTX
mi_row + hbs, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
subsize, n8x8_l2);
break;
#if CONFIG_EXT_PARTITION_TYPES
supertx_enabled,
#endif
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row + hbs, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, subsize, n4x4_l2, n8x8_l2);
break;
case PARTITION_HORZ_B:
supertx_enabled,
#endif
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, subsize, n4x4_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row + hbs, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row + hbs, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
break;
case PARTITION_VERT_A:
supertx_enabled,
#endif
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row + hbs, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, subsize, n8x8_l2, n4x4_l2);
break;
case PARTITION_VERT_B:
supertx_enabled,
#endif
mi_row, mi_col, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, subsize, n8x8_l2, n4x4_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
decode_block(pbi, xd,
#if CONFIG_SUPERTX
supertx_enabled,
#endif
mi_row + hbs, mi_col + hbs, r,
-#if CONFIG_ANS
- tok,
-#endif // CONFIG_ANS
partition, bsize2, n8x8_l2, n8x8_l2);
break;
#endif
for (col = 0; col < max_blocks_wide; col += step)
eobtotal += reconstruct_inter_block(xd,
#if CONFIG_ANS
- cm->token_tab, tok,
-#else
- r,
+ cm->token_tab,
#endif
+ r,
mbmi, i, row, col,
tx_size);
}
0,
#endif // CONFIG_SUPERTX
mi_row, mi_col, &td->bit_reader,
-#if CONFIG_ANS
- &td->bit_reader,
-#endif // CONFIG_ANS
BLOCK_LARGEST, MAX_SB_SIZE_LOG2 - 2);
}
pbi->mb.corrupted |= td->xd.corrupted;
0,
#endif
mi_row, mi_col, &tile_data->bit_reader,
-#if CONFIG_ANS
- &tile_data->bit_reader,
-#endif // CONFIG_ANS
BLOCK_LARGEST, MAX_SB_SIZE_LOG2 - 2);
}
}
#endif // CONFIG_EXT_INTRA
}
-#if CONFIG_ANS && CONFIG_SUPERTX
-#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
- supertx_enabled, mi_row, mi_col) \
- write_modes_b(cpi, tile, w, ans, tok, tok_end, supertx_enabled, mi_row, \
- mi_col)
-#elif CONFIG_SUPERTX
-#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
+#if CONFIG_SUPERTX
+#define write_modes_b_wrapper(cpi, tile, w, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, tok, tok_end, supertx_enabled, mi_row, mi_col)
-#elif CONFIG_ANS
-#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
- supertx_enabled, mi_row, mi_col) \
- write_modes_b(cpi, tile, w, ans, tok, tok_end, mi_row, mi_col)
#else
-#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
+#define write_modes_b_wrapper(cpi, tile, w, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col)
#endif // CONFIG_ANS && CONFIG_SUPERTX
static void write_modes_b(VP10_COMP *cpi, const TileInfo *const tile,
vp10_writer *w,
-#if CONFIG_ANS
- struct BufAnsCoder *ans,
-#endif // CONFIG_ANS
const TOKENEXTRA **tok,
const TOKENEXTRA *const tok_end,
#if CONFIG_SUPERTX
for (row = 0; row < num_4x4_h; row += bw)
for (col = 0; col < num_4x4_w; col += bw)
#if CONFIG_ANS
- pack_mb_tokens_ans(ans, cm->token_tab, tok, tok_end, cm->bit_depth,
+ pack_mb_tokens_ans(w, cm->token_tab, tok, tok_end, cm->bit_depth,
tx);
#else
pack_mb_tokens(w, tok, tok_end, cm->bit_depth, tx);
TX_SIZE tx = plane ? get_uv_tx_size(&m->mbmi, &xd->plane[plane])
: m->mbmi.tx_size;
#if CONFIG_ANS
- pack_mb_tokens_ans(ans, cm->token_tab, tok, tok_end, cm->bit_depth, tx);
+ pack_mb_tokens_ans(w, cm->token_tab, tok, tok_end, cm->bit_depth, tx);
#else
pack_mb_tokens(w, tok, tok_end, cm->bit_depth, tx);
#endif // CONFIG_ANS
}
}
-#if CONFIG_ANS && CONFIG_SUPERTX
-#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
- supertx_enabled, mi_row, mi_col, bsize) \
- write_modes_sb(cpi, tile, w, ans, tok, tok_end, supertx_enabled, mi_row, \
- mi_col, bsize)
-#elif CONFIG_SUPERTX
-#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
+#if CONFIG_SUPERTX
+#define write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, tok, tok_end, supertx_enabled, mi_row, mi_col, \
bsize)
-#elif CONFIG_ANS
-#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
- supertx_enabled, mi_row, mi_col, bsize) \
- write_modes_sb(cpi, tile, w, ans, tok, tok_end, mi_row, mi_col, bsize)
#else
-#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
+#define write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, tok, tok_end, mi_row, mi_col, bsize)
#endif // CONFIG_ANS && CONFIG_SUPERTX
static void write_modes_sb(VP10_COMP *const cpi,
const TileInfo *const tile,
vp10_writer *const w,
-#if CONFIG_ANS
- struct BufAnsCoder *ans,
-#endif // CONFIG_ANS
const TOKENEXTRA **tok,
const TOKENEXTRA *const tok_end,
#if CONFIG_SUPERTX
}
#endif // CONFIG_SUPERTX
if (subsize < BLOCK_8X8) {
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
} else {
switch (partition) {
case PARTITION_NONE:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
break;
case PARTITION_HORZ:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
if (mi_row + bs < cm->mi_rows)
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end,
supertx_enabled, mi_row + bs, mi_col);
break;
case PARTITION_VERT:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
if (mi_col + bs < cm->mi_cols)
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end,
supertx_enabled, mi_row, mi_col + bs);
break;
case PARTITION_SPLIT:
- write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col, subsize);
- write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col + bs, subsize);
- write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col, subsize);
- write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col + bs, subsize);
break;
#if CONFIG_EXT_PARTITION_TYPES
case PARTITION_HORZ_A:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col + bs);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col);
break;
case PARTITION_HORZ_B:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col + bs);
break;
case PARTITION_VERT_A:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col + bs);
break;
case PARTITION_VERT_B:
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row, mi_col + bs);
- write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, supertx_enabled,
+ write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled,
mi_row + bs, mi_col + bs);
break;
#endif // CONFIG_EXT_PARTITION_TYPES
for (row = 0; row < num_4x4_h; row += bw)
for (col = 0; col < num_4x4_w; col += bw)
#if CONFIG_ANS
- pack_mb_tokens_ans(ans, cm->token_tab, tok, tok_end, cm->bit_depth,
+ pack_mb_tokens_ans(w, cm->token_tab, tok, tok_end, cm->bit_depth,
tx);
#else
pack_mb_tokens(w, tok, tok_end, cm->bit_depth, tx);
static void write_modes(VP10_COMP *const cpi,
const TileInfo *const tile,
vp10_writer *const w,
-#if CONFIG_ANS
- struct BufAnsCoder *ans,
-#endif // CONFIG_ANS
const TOKENEXTRA **tok,
const TOKENEXTRA *const tok_end) {
VP10_COMMON *const cm = &cpi->common;
vp10_zero_left_context(xd);
for (mi_col = mi_col_start; mi_col < mi_col_end; mi_col += MAX_MIB_SIZE) {
- write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, 0,
+ write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, 0,
mi_row, mi_col, BLOCK_LARGEST);
}
}
tile_size = mode_bc.pos;
#else
buf_ans_write_init(&mode_bc, uco_ans_buf, ans_window_size);
- write_modes(cpi, &tile_info, &mode_bc, &mode_bc, &tok, tok_end);
+ write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
assert(tok == tok_end);
ans_write_init(&token_ans, buf->data + data_offset);
buf_ans_flush(&mode_bc, &token_ans);
tile_size = mode_bc.pos;
#else
buf_ans_write_init(&mode_bc, uco_ans_buf, ans_window_size);
- write_modes(cpi, &tile_info, &mode_bc, &mode_bc, &tok, tok_end);
+ write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
assert(tok == tok_end);
ans_write_init(&token_ans, dst + total_size);
buf_ans_flush(&mode_bc, &token_ans);