From ca9c352fc3bf09ab0012fdd4a5bb9a11e2f35eb6 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 3 Feb 2015 11:17:51 -0800 Subject: [PATCH] Assign 2nd ref frame in choose_partitioning Avoid the use of uninitialized second reference frame for fetching reference block. Change-Id: I9983a0daea829700b3270dc8bf2bcc6d6ea36652 --- vp9/encoder/vp9_encodeframe.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 18929c74a..091013060 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -528,11 +528,12 @@ static void choose_partitioning(VP9_COMP *cpi, sp = x->plane[0].src.stride; if (cm->frame_type != KEY_FRAME) { + MB_MODE_INFO *mbmi = &xd->mi[0].src_mi->mbmi; vp9_setup_pre_planes(xd, 0, yv12, mi_row, mi_col, sf); - - xd->mi[0].src_mi->mbmi.ref_frame[0] = LAST_FRAME; - xd->mi[0].src_mi->mbmi.sb_type = BLOCK_64X64; - xd->mi[0].src_mi->mbmi.mv[0].as_int = 0; + mbmi->ref_frame[0] = LAST_FRAME; + mbmi->ref_frame[1] = NONE; + mbmi->sb_type = BLOCK_64X64; + mbmi->mv[0].as_int = 0; vp9_build_inter_predictors_sby(xd, mi_row, mi_col, BLOCK_64X64); d = xd->plane[0].dst.buf; -- 2.40.0