#endif
- /* Count of last ref frame 0,0 usage */
- if ((xd->mode_info_context->mbmi.mode == ZEROMV) && (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME))
- cpi->inter_zz_count ++;
-
/* Special case code for cyclic refresh
* If cyclic update enabled then copy xd->mbmi.segment_id; (which
* may have been updated based on mode during
xd->subpixel_predict16x16 = vp8_bilinear_predict16x16;
}
- /* Reset frame count of inter 0,0 motion vector usage. */
- cpi->inter_zz_count = 0;
-
cpi->prediction_error = 0;
cpi->intra_error = 0;
cpi->skip_true_count = 0;
#endif
- /* Count of last ref frame 0,0 usage */
- if ((xd->mode_info_context->mbmi.mode == ZEROMV) && (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME))
- cpi->inter_zz_count++;
-
/* Special case code for cyclic refresh
* If cyclic update enabled then copy
* xd->mbmi.segment_id; (which may have been updated
}
}
+ /* Count last ref frame 0,0 usage on current encoded frame. */
+ {
+ int mb_row;
+ int mb_col;
+ /* Point to beginning of MODE_INFO arrays. */
+ MODE_INFO *tmp = cm->mi;
+
+ cpi->inter_zz_count = 0;
+
+ if(cm->frame_type != KEY_FRAME)
+ {
+ for (mb_row = 0; mb_row < cm->mb_rows; mb_row ++)
+ {
+ for (mb_col = 0; mb_col < cm->mb_cols; mb_col ++)
+ {
+ if(tmp->mbmi.mode == ZEROMV && tmp->mbmi.ref_frame == LAST_FRAME)
+ cpi->inter_zz_count++;
+ tmp++;
+ }
+ tmp++;
+ }
+ }
+ }
+
#if CONFIG_MULTI_RES_ENCODING
vp8_cal_dissimilarity(cpi);
#endif