Commit c03cc3a8 authored by Scott LaVarnway's avatar Scott LaVarnway

Removed bc and bc2 vp8_readers from VP8D_COMP

Used mbc instead.

Change-Id: If22136b4fee89b68ca2246265f3c27853701136c
parent e278673c
......@@ -48,7 +48,7 @@ static MB_PREDICTION_MODE read_uv_mode(vp8_reader *bc, const vp8_prob *p)
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;
......@@ -150,7 +150,7 @@ static const unsigned char mbsplit_fill_offset[4][16] = {
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
......@@ -338,7 +338,7 @@ static void decode_split_mv(vp8_reader *const bc, MODE_INFO *mi,
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 */
{
......@@ -596,14 +596,14 @@ static void decode_mb_mode_mvs(VP8D_COMP *pbi, MODE_INFO *mi,
* 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;
......@@ -645,7 +645,7 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi)
#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;
......
......@@ -823,7 +823,7 @@ static unsigned int read_available_partition_size(
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;
......@@ -831,14 +831,10 @@ static void setup_token_decoder(VP8D_COMP *pbi,
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. */
......@@ -983,7 +979,7 @@ static void init_frame(VP8D_COMP *pbi)
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];
......@@ -1256,7 +1252,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
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. */
{
......
......@@ -39,7 +39,8 @@ typedef struct VP8D_COMP
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;
......@@ -77,7 +78,6 @@ typedef struct VP8D_COMP
/* end of threading data */
#endif
vp8_reader mbc[8];
int64_t last_time_stamp;
int ready_for_new_data;
......
......@@ -64,7 +64,7 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D
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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment