Merge "Decoder's code cleanup."

This commit is contained in:
Dmitry Kovalev 2013-06-28 10:38:54 -07:00 committed by Gerrit Code Review
commit 0345fc3ad9
9 changed files with 82 additions and 136 deletions

View File

@ -181,8 +181,7 @@ void tx_counts_to_branch_counts_32x32(unsigned int *tx_count_32x32p,
void tx_counts_to_branch_counts_16x16(unsigned int *tx_count_16x16p, void tx_counts_to_branch_counts_16x16(unsigned int *tx_count_16x16p,
unsigned int (*ct_16x16p)[2]) { unsigned int (*ct_16x16p)[2]) {
ct_16x16p[0][0] = tx_count_16x16p[TX_4X4]; ct_16x16p[0][0] = tx_count_16x16p[TX_4X4];
ct_16x16p[0][1] = tx_count_16x16p[TX_8X8] + ct_16x16p[0][1] = tx_count_16x16p[TX_8X8] + tx_count_16x16p[TX_16X16];
tx_count_16x16p[TX_16X16];
ct_16x16p[1][0] = tx_count_16x16p[TX_8X8]; ct_16x16p[1][0] = tx_count_16x16p[TX_8X8];
ct_16x16p[1][1] = tx_count_16x16p[TX_16X16]; ct_16x16p[1][1] = tx_count_16x16p[TX_16X16];
} }
@ -197,36 +196,20 @@ const vp9_prob vp9_default_mbskip_probs[MBSKIP_CONTEXTS] = {
192, 128, 64 192, 128, 64
}; };
void vp9_init_mbmode_probs(VP9_COMMON *x) { void vp9_init_mbmode_probs(VP9_COMMON *cm) {
vpx_memcpy(x->fc.uv_mode_prob, default_if_uv_probs, vp9_copy(cm->fc.uv_mode_prob, default_if_uv_probs);
sizeof(default_if_uv_probs)); vp9_copy(cm->kf_uv_mode_prob, default_kf_uv_probs);
vpx_memcpy(x->kf_uv_mode_prob, default_kf_uv_probs, vp9_copy(cm->fc.y_mode_prob, default_if_y_probs);
sizeof(default_kf_uv_probs)); vp9_copy(cm->fc.switchable_interp_prob, vp9_switchable_interp_prob);
vpx_memcpy(x->fc.y_mode_prob, default_if_y_probs, vp9_copy(cm->fc.partition_prob, vp9_partition_probs);
sizeof(default_if_y_probs)); vp9_copy(cm->fc.intra_inter_prob, default_intra_inter_p);
vp9_copy(cm->fc.comp_inter_prob, default_comp_inter_p);
vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob, vp9_copy(cm->fc.comp_ref_prob, default_comp_ref_p);
sizeof(vp9_switchable_interp_prob)); vp9_copy(cm->fc.single_ref_prob, default_single_ref_p);
vp9_copy(cm->fc.tx_probs_32x32p, vp9_default_tx_probs_32x32p);
vpx_memcpy(x->fc.partition_prob, vp9_partition_probs, vp9_copy(cm->fc.tx_probs_16x16p, vp9_default_tx_probs_16x16p);
sizeof(vp9_partition_probs)); vp9_copy(cm->fc.tx_probs_8x8p, vp9_default_tx_probs_8x8p);
vp9_copy(cm->fc.mbskip_probs, vp9_default_mbskip_probs);
vpx_memcpy(x->fc.intra_inter_prob, default_intra_inter_p,
sizeof(default_intra_inter_p));
vpx_memcpy(x->fc.comp_inter_prob, default_comp_inter_p,
sizeof(default_comp_inter_p));
vpx_memcpy(x->fc.comp_ref_prob, default_comp_ref_p,
sizeof(default_comp_ref_p));
vpx_memcpy(x->fc.single_ref_prob, default_single_ref_p,
sizeof(default_single_ref_p));
vpx_memcpy(x->fc.tx_probs_32x32p, vp9_default_tx_probs_32x32p,
sizeof(vp9_default_tx_probs_32x32p));
vpx_memcpy(x->fc.tx_probs_16x16p, vp9_default_tx_probs_16x16p,
sizeof(vp9_default_tx_probs_16x16p));
vpx_memcpy(x->fc.tx_probs_8x8p, vp9_default_tx_probs_8x8p,
sizeof(vp9_default_tx_probs_8x8p));
vpx_memcpy(x->fc.mbskip_probs, vp9_default_mbskip_probs,
sizeof(vp9_default_mbskip_probs));
} }
const vp9_tree_index vp9_switchable_interp_tree[VP9_SWITCHABLE_FILTERS*2-2] = { const vp9_tree_index vp9_switchable_interp_tree[VP9_SWITCHABLE_FILTERS*2-2] = {
@ -253,15 +236,13 @@ void vp9_entropy_mode_init() {
vp9_tokens_from_tree(vp9_switchable_interp_encodings, vp9_tokens_from_tree(vp9_switchable_interp_encodings,
vp9_switchable_interp_tree); vp9_switchable_interp_tree);
vp9_tokens_from_tree(vp9_partition_encodings, vp9_partition_tree); vp9_tokens_from_tree(vp9_partition_encodings, vp9_partition_tree);
vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array, vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array,
vp9_sb_mv_ref_tree, NEARESTMV); vp9_sb_mv_ref_tree, NEARESTMV);
} }
void vp9_init_mode_contexts(VP9_COMMON *pc) { void vp9_init_mode_contexts(VP9_COMMON *pc) {
vpx_memset(pc->fc.inter_mode_counts, 0, sizeof(pc->fc.inter_mode_counts)); vpx_memset(pc->fc.inter_mode_counts, 0, sizeof(pc->fc.inter_mode_counts));
vpx_memcpy(pc->fc.inter_mode_probs, vpx_memcpy(pc->fc.inter_mode_probs, vp9_default_inter_mode_probs,
vp9_default_inter_mode_probs,
sizeof(vp9_default_inter_mode_probs)); sizeof(vp9_default_inter_mode_probs));
} }

View File

@ -455,10 +455,9 @@ unsigned char vp9_get_pred_flag(const MACROBLOCKD *const xd,
// This function sets the status of the given prediction signal. // This function sets the status of the given prediction signal.
// I.e. is the predicted value for the given signal correct. // I.e. is the predicted value for the given signal correct.
void vp9_set_pred_flag(MACROBLOCKD *xd, PRED_ID pred_id, void vp9_set_pred_flag(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize, PRED_ID pred_id,
unsigned char pred_flag) { unsigned char pred_flag) {
const int mis = xd->mode_info_stride; const int mis = xd->mode_info_stride;
BLOCK_SIZE_TYPE bsize = xd->mode_info_context->mbmi.sb_type;
const int bh = 1 << mi_height_log2(bsize); const int bh = 1 << mi_height_log2(bsize);
const int bw = 1 << mi_width_log2(bsize); const int bw = 1 << mi_width_log2(bsize);
#define sub(a, b) (b) < 0 ? (a) + (b) : (a) #define sub(a, b) (b) < 0 ? (a) + (b) : (a)

View File

@ -38,7 +38,7 @@ const vp9_prob *vp9_get_pred_probs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
unsigned char vp9_get_pred_flag(const MACROBLOCKD *xd, PRED_ID pred_id); unsigned char vp9_get_pred_flag(const MACROBLOCKD *xd, PRED_ID pred_id);
void vp9_set_pred_flag(MACROBLOCKD *xd, PRED_ID pred_id, void vp9_set_pred_flag(MACROBLOCKD *xd, BLOCK_SIZE_TYPE bsize, PRED_ID pred_id,
unsigned char pred_flag); unsigned char pred_flag);
int vp9_get_segment_id(VP9_COMMON *cm, const uint8_t *segment_ids, int vp9_get_segment_id(VP9_COMMON *cm, const uint8_t *segment_ids,

View File

@ -172,9 +172,7 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd,
if (xd->mode_info_context) { if (xd->mode_info_context) {
MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi; MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
set_scale_factors(xd, set_scale_factors(xd, mbmi->ref_frame[0] - 1, mbmi->ref_frame[1] - 1,
mbmi->ref_frame[0] - 1,
mbmi->ref_frame[1] - 1,
cm->active_ref_scale); cm->active_ref_scale);
} }

View File

@ -109,14 +109,10 @@ static void setup_pre_planes(MACROBLOCKD *xd,
} }
} }
static void set_scale_factors(MACROBLOCKD *xd, static void set_scale_factors(MACROBLOCKD *xd, int ref0, int ref1,
int ref0, int ref1, struct scale_factors sf[MAX_REF_FRAMES]) {
struct scale_factors scale_factor[MAX_REF_FRAMES]) { xd->scale_factor[0] = xd->scale_factor_uv[0] = sf[ref0 >= 0 ? ref0 : 0];
xd->scale_factor[1] = xd->scale_factor_uv[1] = sf[ref1 >= 0 ? ref1 : 0];
xd->scale_factor[0] = scale_factor[ref0 >= 0 ? ref0 : 0];
xd->scale_factor[1] = scale_factor[ref1 >= 0 ? ref1 : 0];
xd->scale_factor_uv[0] = xd->scale_factor[0];
xd->scale_factor_uv[1] = xd->scale_factor[1];
} }
void vp9_setup_scale_factors(VP9_COMMON *cm, int i); void vp9_setup_scale_factors(VP9_COMMON *cm, int i);

View File

@ -413,7 +413,7 @@ static int read_inter_segment_id(VP9D_COMP *pbi, int mi_row, int mi_col,
if (cm->temporal_update) { if (cm->temporal_update) {
const vp9_prob pred_prob = vp9_get_pred_prob(cm, xd, PRED_SEG_ID); const vp9_prob pred_prob = vp9_get_pred_prob(cm, xd, PRED_SEG_ID);
const int pred_flag = vp9_read(r, pred_prob); const int pred_flag = vp9_read(r, pred_prob);
vp9_set_pred_flag(xd, PRED_SEG_ID, pred_flag); vp9_set_pred_flag(xd, bsize, PRED_SEG_ID, pred_flag);
segment_id = pred_flag ? pred_segment_id segment_id = pred_flag ? pred_segment_id
: read_segment_id(r, xd); : read_segment_id(r, xd);
} else { } else {

View File

@ -14,15 +14,16 @@
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vpx_scale/vpx_scale.h" #include "vpx_scale/vpx_scale.h"
#include "vp9/common/vp9_alloccommon.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_entropymode.h"
#include "vp9/common/vp9_extend.h" #include "vp9/common/vp9_extend.h"
#include "vp9/common/vp9_modecont.h" #include "vp9/common/vp9_modecont.h"
#include "vp9/common/vp9_common.h" #include "vp9/common/vp9_pred_common.h"
#include "vp9/common/vp9_quant_common.h"
#include "vp9/common/vp9_reconintra.h" #include "vp9/common/vp9_reconintra.h"
#include "vp9/common/vp9_reconinter.h" #include "vp9/common/vp9_reconinter.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_alloccommon.h"
#include "vp9/common/vp9_entropymode.h"
#include "vp9/common/vp9_quant_common.h"
#include "vp9/common/vp9_seg_common.h" #include "vp9/common/vp9_seg_common.h"
#include "vp9/common/vp9_tile_common.h" #include "vp9/common/vp9_tile_common.h"
@ -133,6 +134,7 @@ static void decode_block_intra(int plane, int block, BLOCK_SIZE_TYPE bsize,
int ss_txfrm_size, void *arg) { int ss_txfrm_size, void *arg) {
MACROBLOCKD* const xd = arg; MACROBLOCKD* const xd = arg;
struct macroblockd_plane *pd = &xd->plane[plane]; struct macroblockd_plane *pd = &xd->plane[plane];
MODE_INFO *const mi = xd->mode_info_context;
const int raster_block = txfrm_block_to_raster_block(xd, bsize, plane, const int raster_block = txfrm_block_to_raster_block(xd, bsize, plane,
block, ss_txfrm_size); block, ss_txfrm_size);
@ -143,13 +145,12 @@ static void decode_block_intra(int plane, int block, BLOCK_SIZE_TYPE bsize,
int b_mode; int b_mode;
int plane_b_size; int plane_b_size;
const int tx_ib = raster_block >> tx_size; const int tx_ib = raster_block >> tx_size;
const int mode = plane == 0 ? xd->mode_info_context->mbmi.mode const int mode = plane == 0 ? mi->mbmi.mode
: xd->mode_info_context->mbmi.uv_mode; : mi->mbmi.uv_mode;
if (plane == 0 && mi->mbmi.sb_type < BLOCK_SIZE_SB8X8) {
if (plane == 0 && xd->mode_info_context->mbmi.sb_type < BLOCK_SIZE_SB8X8) {
assert(bsize == BLOCK_SIZE_SB8X8); assert(bsize == BLOCK_SIZE_SB8X8);
b_mode = xd->mode_info_context->bmi[raster_block].as_mode.first; b_mode = mi->bmi[raster_block].as_mode.first;
} else { } else {
b_mode = mode; b_mode = mode;
} }
@ -163,92 +164,67 @@ static void decode_block_intra(int plane, int block, BLOCK_SIZE_TYPE bsize,
dst, pd->dst.stride); dst, pd->dst.stride);
// Early exit if there are no coefficients // Early exit if there are no coefficients
if (xd->mode_info_context->mbmi.mb_skip_coeff) if (mi->mbmi.mb_skip_coeff)
return; return;
decode_block(plane, block, bsize, ss_txfrm_size, arg); decode_block(plane, block, bsize, ss_txfrm_size, arg);
} }
static void decode_atom(VP9D_COMP *pbi, MACROBLOCKD *xd, static int decode_tokens(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize, vp9_reader *r) {
int mi_row, int mi_col, MACROBLOCKD *const xd = &pbi->mb;
vp9_reader *r, BLOCK_SIZE_TYPE bsize) {
if (xd->mode_info_context->mbmi.mb_skip_coeff) {
vp9_reset_sb_tokens_context(xd, bsize);
return -1;
} else {
if (xd->segmentation_enabled)
mb_init_dequantizer(&pbi->common, xd);
// TODO(dkovalev) if (!vp9_reader_has_error(r))
return vp9_decode_tokens(pbi, r, bsize);
}
}
static void decode_atom(VP9D_COMP *pbi, int mi_row, int mi_col,
vp9_reader *r) {
BLOCK_SIZE_TYPE bsize = BLOCK_SIZE_SB8X8;
MACROBLOCKD *const xd = &pbi->mb;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi; MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
assert(mbmi->ref_frame[0] != INTRA_FRAME); assert(mbmi->ref_frame[0] != INTRA_FRAME);
vp9_setup_interp_filters(xd, mbmi->interp_filter, &pbi->common); vp9_setup_interp_filters(xd, mbmi->interp_filter, &pbi->common);
// prediction
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, bsize); vp9_build_inter_predictors_sb(xd, mi_row, mi_col, bsize);
if (decode_tokens(pbi, bsize, r) >= 0)
if (mbmi->mb_skip_coeff) {
vp9_reset_sb_tokens_context(xd, bsize);
} else {
if (xd->segmentation_enabled)
mb_init_dequantizer(&pbi->common, xd);
if (!vp9_reader_has_error(r))
vp9_decode_tokens(pbi, r, bsize);
foreach_transformed_block(xd, bsize, decode_block, xd); foreach_transformed_block(xd, bsize, decode_block, xd);
}
} }
static void decode_sb_intra(VP9D_COMP *pbi, MACROBLOCKD *xd, static void decode_sb_intra(VP9D_COMP *pbi, int mi_row, int mi_col,
int mi_row, int mi_col,
vp9_reader *r, BLOCK_SIZE_TYPE bsize) { vp9_reader *r, BLOCK_SIZE_TYPE bsize) {
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi; MACROBLOCKD *const xd = &pbi->mb;
if (mbmi->mb_skip_coeff) { decode_tokens(pbi, bsize, r);
vp9_reset_sb_tokens_context(xd, bsize);
} else {
if (xd->segmentation_enabled)
mb_init_dequantizer(&pbi->common, xd);
if (!vp9_reader_has_error(r))
vp9_decode_tokens(pbi, r, bsize);
}
foreach_transformed_block(xd, bsize, decode_block_intra, xd); foreach_transformed_block(xd, bsize, decode_block_intra, xd);
} }
static void decode_sb(VP9D_COMP *pbi, int mi_row, int mi_col, vp9_reader *r,
static void decode_sb(VP9D_COMP *pbi, MACROBLOCKD *xd, int mi_row, int mi_col, BLOCK_SIZE_TYPE bsize) {
vp9_reader *r, BLOCK_SIZE_TYPE bsize) { VP9_COMMON *const cm = &pbi->common;
const int bwl = mi_width_log2(bsize), bhl = mi_height_log2(bsize); MACROBLOCKD *const xd = &pbi->mb;
const int bw = 1 << bwl, bh = 1 << bhl;
int n, eobtotal;
VP9_COMMON *const pc = &pbi->common;
MODE_INFO *const mi = xd->mode_info_context; MODE_INFO *const mi = xd->mode_info_context;
MB_MODE_INFO *const mbmi = &mi->mbmi; MB_MODE_INFO *const mbmi = &mi->mbmi;
const int mis = pc->mode_info_stride; int eobtotal;
assert(mbmi->sb_type == bsize); assert(mbmi->sb_type == bsize);
assert(mbmi->ref_frame[0] != INTRA_FRAME); assert(mbmi->ref_frame[0] != INTRA_FRAME);
vp9_setup_interp_filters(xd, mbmi->interp_filter, pc); vp9_setup_interp_filters(xd, mbmi->interp_filter, cm);
// generate prediction
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, bsize); vp9_build_inter_predictors_sb(xd, mi_row, mi_col, bsize);
if (mbmi->mb_skip_coeff) { eobtotal = decode_tokens(pbi, bsize, r);
vp9_reset_sb_tokens_context(xd, bsize); if (eobtotal == 0) {
} else { vp9_set_pred_flag(xd, bsize, PRED_MBSKIP, 1); // skip loopfilter
// re-initialize macroblock dequantizer before detokenization } else if (eobtotal > 0) {
if (xd->segmentation_enabled)
mb_init_dequantizer(pc, xd);
// dequantization and idct
eobtotal = vp9_decode_tokens(pbi, r, bsize);
if (eobtotal == 0) { // skip loopfilter
for (n = 0; n < bw * bh; n++) {
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
if (mi_col + x_idx < pc->mi_cols && mi_row + y_idx < pc->mi_rows)
mi[y_idx * mis + x_idx].mbmi.mb_skip_coeff = 1;
}
} else {
foreach_transformed_block(xd, bsize, decode_block, xd); foreach_transformed_block(xd, bsize, decode_block, xd);
} }
}
} }
static void set_offsets(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize, static void set_offsets(VP9D_COMP *pbi, BLOCK_SIZE_TYPE bsize,
@ -316,18 +292,19 @@ static void decode_modes_b(VP9D_COMP *pbi, int mi_row, int mi_col,
if (bsize < BLOCK_SIZE_SB8X8) if (bsize < BLOCK_SIZE_SB8X8)
if (xd->ab_index > 0) if (xd->ab_index > 0)
return; return;
set_offsets(pbi, bsize, mi_row, mi_col); set_offsets(pbi, bsize, mi_row, mi_col);
vp9_decode_mb_mode_mv(pbi, xd, mi_row, mi_col, r); vp9_decode_mb_mode_mv(pbi, xd, mi_row, mi_col, r);
if (xd->mode_info_context->mbmi.ref_frame[0] == INTRA_FRAME) { if (xd->mode_info_context->mbmi.ref_frame[0] == INTRA_FRAME) {
decode_sb_intra(pbi, xd, mi_row, mi_col, r, (bsize < BLOCK_SIZE_SB8X8) ? decode_sb_intra(pbi, mi_row, mi_col, r,
BLOCK_SIZE_SB8X8 : bsize); (bsize < BLOCK_SIZE_SB8X8) ? BLOCK_SIZE_SB8X8 : bsize);
} else { } else {
set_refs(pbi, mi_row, mi_col); set_refs(pbi, mi_row, mi_col);
if (bsize < BLOCK_SIZE_SB8X8) if (bsize < BLOCK_SIZE_SB8X8)
decode_atom(pbi, xd, mi_row, mi_col, r, BLOCK_SIZE_SB8X8); decode_atom(pbi, mi_row, mi_col, r);
else else
decode_sb(pbi, xd, mi_row, mi_col, r, bsize); decode_sb(pbi, mi_row, mi_col, r, bsize);
} }
xd->corrupted |= vp9_reader_has_error(r); xd->corrupted |= vp9_reader_has_error(r);
} }

View File

@ -2056,7 +2056,6 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
VP9_COMMON * const cm = &cpi->common; VP9_COMMON * const cm = &cpi->common;
MACROBLOCK * const x = &cpi->mb; MACROBLOCK * const x = &cpi->mb;
MACROBLOCKD * const xd = &x->e_mbd; MACROBLOCKD * const xd = &x->e_mbd;
int n;
MODE_INFO *mi = xd->mode_info_context; MODE_INFO *mi = xd->mode_info_context;
MB_MODE_INFO *mbmi = &mi->mbmi; MB_MODE_INFO *mbmi = &mi->mbmi;
unsigned int segment_id = mbmi->segment_id; unsigned int segment_id = mbmi->segment_id;
@ -2147,11 +2146,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
// copy skip flag on all mb_mode_info contexts in this SB // copy skip flag on all mb_mode_info contexts in this SB
// if this was a skip at this txfm size // if this was a skip at this txfm size
for (n = 1; n < bw * bh; n++) { vp9_set_pred_flag(xd, bsize, PRED_MBSKIP, mi->mbmi.mb_skip_coeff);
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
if (mi_col + x_idx < cm->mi_cols && mi_row + y_idx < cm->mi_rows)
mi[x_idx + y_idx * mis].mbmi.mb_skip_coeff = mi->mbmi.mb_skip_coeff;
}
if (output_enabled) { if (output_enabled) {
if (cm->txfm_mode == TX_MODE_SELECT && mbmi->sb_type >= BLOCK_SIZE_SB8X8 if (cm->txfm_mode == TX_MODE_SELECT && mbmi->sb_type >= BLOCK_SIZE_SB8X8

View File

@ -136,16 +136,16 @@ static void count_segs(VP9_COMP *cpi, MODE_INFO *mi,
// Temporal prediction not allowed on key frames // Temporal prediction not allowed on key frames
if (cm->frame_type != KEY_FRAME) { if (cm->frame_type != KEY_FRAME) {
const BLOCK_SIZE_TYPE bsize = mi->mbmi.sb_type;
// Test to see if the segment id matches the predicted value. // Test to see if the segment id matches the predicted value.
const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map, const int pred_segment_id = vp9_get_segment_id(cm, cm->last_frame_seg_map,
mi->mbmi.sb_type, bsize, mi_row, mi_col);
mi_row, mi_col);
const int pred_flag = pred_segment_id == segment_id; const int pred_flag = pred_segment_id == segment_id;
const int pred_context = vp9_get_pred_context(cm, xd, PRED_SEG_ID); const int pred_context = vp9_get_pred_context(cm, xd, PRED_SEG_ID);
// Store the prediction status for this mb and update counts // Store the prediction status for this mb and update counts
// as appropriate // as appropriate
vp9_set_pred_flag(xd, PRED_SEG_ID, pred_flag); vp9_set_pred_flag(xd, bsize, PRED_SEG_ID, pred_flag);
temporal_predictor_count[pred_context][pred_flag]++; temporal_predictor_count[pred_context][pred_flag]++;
if (!pred_flag) if (!pred_flag)