summaryrefslogtreecommitdiff
path: root/vp9/encoder/encodeframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder/encodeframe.c')
-rw-r--r--vp9/encoder/encodeframe.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/vp9/encoder/encodeframe.c b/vp9/encoder/encodeframe.c
index 98e03d6f7..b91cd04a2 100644
--- a/vp9/encoder/encodeframe.c
+++ b/vp9/encoder/encodeframe.c
@@ -578,6 +578,20 @@ static void update_state(VP9_COMP *cpi, MACROBLOCK *x,
mbmi->best_second_mv.as_int = best_second_mv.as_int;
vp9_update_nmv_count(cpi, x, &best_mv, &best_second_mv);
}
+#if CONFIG_COMP_INTERINTRA_PRED
+ if (mbmi->mode >= NEARESTMV && mbmi->mode < SPLITMV &&
+ mbmi->second_ref_frame <= INTRA_FRAME) {
+ if (mbmi->second_ref_frame == INTRA_FRAME) {
+ ++cpi->interintra_count[1];
+ ++cpi->ymode_count[mbmi->interintra_mode];
+#if SEPARATE_INTERINTRA_UV
+ ++cpi->y_uv_mode_count[mbmi->interintra_mode][mbmi->interintra_uv_mode];
+#endif
+ } else {
+ ++cpi->interintra_count[0];
+ }
+ }
+#endif
cpi->prediction_error += ctx->distortion;
cpi->intra_error += ctx->intra_error;
@@ -1114,7 +1128,7 @@ static void encode_sb(VP9_COMP *cpi,
pred_context = vp9_get_pred_context(cm, xd, PRED_COMP);
- if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME)
+ if (xd->mode_info_context->mbmi.second_ref_frame <= INTRA_FRAME)
cpi->single_pred_count[pred_context]++;
else
cpi->comp_pred_count[pred_context]++;
@@ -1393,6 +1407,10 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
vp9_zero(cpi->sb_ymode_count)
cpi->sb_count = 0;
#endif
+#if CONFIG_COMP_INTERINTRA_PRED
+ vp9_zero(cpi->interintra_count);
+ vp9_zero(cpi->interintra_select_count);
+#endif
vpx_memset(cm->above_context, 0,
sizeof(ENTROPY_CONTEXT_PLANES) * cm->mb_cols);
@@ -2219,7 +2237,7 @@ static void encode_inter_macroblock(VP9_COMP *cpi, MACROBLOCK *x,
xd->pre.u_buffer = cpi->common.yv12_fb[ref_fb_idx].u_buffer + recon_uvoffset;
xd->pre.v_buffer = cpi->common.yv12_fb[ref_fb_idx].v_buffer + recon_uvoffset;
- if (mbmi->second_ref_frame) {
+ if (mbmi->second_ref_frame > 0) {
int second_ref_fb_idx;
if (mbmi->second_ref_frame == LAST_FRAME)
@@ -2406,7 +2424,7 @@ static void encode_inter_superblock(VP9_COMP *cpi, MACROBLOCK *x,
xd->pre.u_buffer = cpi->common.yv12_fb[ref_fb_idx].u_buffer + recon_uvoffset;
xd->pre.v_buffer = cpi->common.yv12_fb[ref_fb_idx].v_buffer + recon_uvoffset;
- if (xd->mode_info_context->mbmi.second_ref_frame) {
+ if (xd->mode_info_context->mbmi.second_ref_frame > 0) {
int second_ref_fb_idx;
if (xd->mode_info_context->mbmi.second_ref_frame == LAST_FRAME)