ref: 4e72915ebcd1582170b9a59bfed4e4900a21fbb5
parent: 0211cd899a359538feef4f21b41c152d0a4cace3
parent: c03cc3a85e1a3a86409d013b54669bcb72d54a00
author: Scott LaVarnway <slavarnway@google.com>
date: Mon Sep 24 09:50:30 EDT 2012
Merge "Removed bc and bc2 vp8_readers from VP8D_COMP"
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -48,7 +48,7 @@
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 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 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,7 +596,7 @@
* 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;
@@ -603,7 +603,7 @@
/* 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 @@
#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;
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -823,7 +823,7 @@
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 @@
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 @@
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 @@
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. */
{
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -39,7 +39,8 @@
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 @@
/* end of threading data */
#endif
- vp8_reader mbc[8];
int64_t last_time_stamp;
int ready_for_new_data;
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -64,7 +64,7 @@
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));
--
⑨