if (pc->mb_no_coeff_skip)
{
- prob_skip_false = cpi->skip_false_count * 256 / (cpi->skip_false_count + cpi->skip_true_count);
+ int total_mbs = pc->mb_rows * pc->mb_cols;
+
+ prob_skip_false = (total_mbs - cpi->skip_true_count ) * 256 / total_mbs;
if (prob_skip_false <= 1)
prob_skip_false = 1;
if (c->mb_no_coeff_skip)
{
- prob_skip_false = cpi->skip_false_count * 256 / (cpi->skip_false_count + cpi->skip_true_count);
+ int total_mbs = c->mb_rows * c->mb_cols;
+
+ prob_skip_false = (total_mbs - cpi->skip_true_count ) * 256 / total_mbs;
if (prob_skip_false <= 1)
prob_skip_false = 1;
cpi->prediction_error = 0;
cpi->intra_error = 0;
cpi->skip_true_count = 0;
- cpi->skip_false_count = 0;
#if 0
// Experimental code
vp8_encode_intra16x16mbuv(x);
sum_intra_stats(cpi, x);
+
vp8_tokenize_mb(cpi, &x->e_mbd, t);
if (xd->mode_info_context->mbmi.mode != B_PRED)
if (!x->skip)
{
vp8_encode_inter16x16(x);
-
- // Clear mb_skip_coeff if mb_no_coeff_skip is not set
- if (!cpi->common.mb_no_coeff_skip)
- xd->mode_info_context->mbmi.mb_skip_coeff = 0;
-
}
else
vp8_build_inter16x16_predictors_mb(xd, xd->dst.y_buffer,
}
else
{
+ /* always set mb_skip_coeff as it is needed by the loopfilter */
+ xd->mode_info_context->mbmi.mb_skip_coeff = 1;
+
if (cpi->common.mb_no_coeff_skip)
{
- xd->mode_info_context->mbmi.mb_skip_coeff = 1;
cpi->skip_true_count ++;
vp8_fix_contexts(xd);
}
else
{
vp8_stuff_mb(cpi, xd, t);
- xd->mode_info_context->mbmi.mb_skip_coeff = 0;
- cpi->skip_false_count ++;
}
}
int gf_bad_count;
int gf_update_recommended;
int skip_true_count;
- int skip_false_count;
unsigned char *segmentation_map;
signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; // Segment data (can be deltas or absolute values)
x->mode_info_context->mbmi.mb_skip_coeff = mb_is_skippable(x, has_y2_block);
if (x->mode_info_context->mbmi.mb_skip_coeff)
{
- cpi->skip_true_count++;
-
if (!cpi->common.mb_no_coeff_skip)
- vp8_stuff_mb(cpi, x, t) ;
+ {
+ vp8_stuff_mb(cpi, x, t);
+ }
else
{
vp8_fix_contexts(x);
+ cpi->skip_true_count++;
}
return;
}
- cpi->skip_false_count++;
-
plane_type = 3;
if(has_y2_block)
{
tokenize2nd_order_b(x, t, cpi);
plane_type = 0;
-
}
tokenize1st_order_b(x, t, plane_type, cpi);
-
}