ref: ca9c352fc3bf09ab0012fdd4a5bb9a11e2f35eb6
parent: fd354b2e1e4cc662af49d4f535c231c1d8760ef6
author: Jingning Han <[email protected]>
date: Tue Feb 3 06:17:51 EST 2015
Assign 2nd ref frame in choose_partitioning Avoid the use of uninitialized second reference frame for fetching reference block. Change-Id: I9983a0daea829700b3270dc8bf2bcc6d6ea36652
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -528,11 +528,12 @@
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;