Used mbc instead.
Change-Id: If22136b4fee89b68ca2246265f3c27853701136c
static void read_kf_modes(VP8D_COMP *pbi, MODE_INFO *mi)
{
- vp8_reader *const bc = & pbi->bc;
+ vp8_reader *const bc = & pbi->mbc[8];
const int mis = pbi->common.mode_info_stride;
mi->mbmi.ref_frame = INTRA_FRAME;
static void mb_mode_mv_init(VP8D_COMP *pbi)
{
- vp8_reader *const bc = & pbi->bc;
+ vp8_reader *const bc = & pbi->mbc[8];
MV_CONTEXT *const mvc = pbi->common.fc.mvc;
#if CONFIG_ERROR_CONCEALMENT
static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi)
{
- vp8_reader *const bc = & pbi->bc;
+ vp8_reader *const bc = & pbi->mbc[8];
mbmi->ref_frame = (MV_REFERENCE_FRAME) vp8_read(bc, pbi->prob_intra);
if (mbmi->ref_frame) /* inter MB */
{
* By default on a key frame reset all MBs to segment 0
*/
if (pbi->mb.update_mb_segmentation_map)
- read_mb_features(&pbi->bc, &mi->mbmi, &pbi->mb);
+ read_mb_features(&pbi->mbc[8], &mi->mbmi, &pbi->mb);
else if(pbi->common.frame_type == KEY_FRAME)
mi->mbmi.segment_id = 0;
/* Read the macroblock coeff skip flag if this feature is in use,
* else default to 0 */
if (pbi->common.mb_no_coeff_skip)
- mi->mbmi.mb_skip_coeff = vp8_read(&pbi->bc, pbi->prob_skip_false);
+ mi->mbmi.mb_skip_coeff = vp8_read(&pbi->mbc[8], pbi->prob_skip_false);
else
mi->mbmi.mb_skip_coeff = 0;
#if CONFIG_ERROR_CONCEALMENT
/* look for corruption. set mvs_corrupt_from_mb to the current
* mb_num if the frame is corrupt from this macroblock. */
- if (vp8dx_bool_error(&pbi->bc) && mb_num <
+ if (vp8dx_bool_error(&pbi->mbc[8]) && mb_num <
(int)pbi->mvs_corrupt_from_mb)
{
pbi->mvs_corrupt_from_mb = mb_num;
static void setup_token_decoder(VP8D_COMP *pbi,
const unsigned char* token_part_sizes)
{
- vp8_reader *bool_decoder = &pbi->bc2;
+ vp8_reader *bool_decoder = &pbi->mbc[0];
unsigned int partition_idx;
unsigned int fragment_idx;
unsigned int num_token_partitions;
pbi->fragment_sizes[0];
TOKEN_PARTITION multi_token_partition =
- (TOKEN_PARTITION)vp8_read_literal(&pbi->bc, 2);
- if (!vp8dx_bool_error(&pbi->bc))
+ (TOKEN_PARTITION)vp8_read_literal(&pbi->mbc[8], 2);
+ if (!vp8dx_bool_error(&pbi->mbc[8]))
pbi->common.multi_token_partition = multi_token_partition;
num_token_partitions = 1 << pbi->common.multi_token_partition;
- if (num_token_partitions > 1)
- {
- bool_decoder = &pbi->mbc[0];
- }
/* Check for partitions within the fragments and unpack the fragments
* so that each fragment pointer points to its corresponding partition. */
int vp8_decode_frame(VP8D_COMP *pbi)
{
- vp8_reader *const bc = & pbi->bc;
+ vp8_reader *const bc = & pbi->mbc[8];
VP8_COMMON *const pc = & pbi->common;
MACROBLOCKD *const xd = & pbi->mb;
const unsigned char *data = pbi->fragments[0];
setup_token_decoder(pbi, data + first_partition_length_in_bytes);
- xd->current_bc = &pbi->bc2;
+ xd->current_bc = &pbi->mbc[0];
/* Read the default quantizers. */
{
DECLARE_ALIGNED(16, VP8_COMMON, common);
- vp8_reader bc, bc2;
+ /* the last partition will be used for the modes/mvs */
+ vp8_reader mbc[MAX_PARTITIONS];
VP8D_CONFIG oxcf;
/* end of threading data */
#endif
- vp8_reader mbc[8];
int64_t last_time_stamp;
int ready_for_new_data;
mbd->mode_ref_lf_delta_enabled = xd->mode_ref_lf_delta_enabled;
mbd->mode_ref_lf_delta_update = xd->mode_ref_lf_delta_update;
- mbd->current_bc = &pbi->bc2;
+ mbd->current_bc = &pbi->mbc[0];
vpx_memcpy(mbd->dequant_y1_dc, xd->dequant_y1_dc, sizeof(xd->dequant_y1_dc));
vpx_memcpy(mbd->dequant_y1, xd->dequant_y1, sizeof(xd->dequant_y1));