fix valgrind warning

scales for second reference frame vars are unitialized if the
second ref frame is one of of those disallowed by refframeflags

Change-Id: I4ce42de391178c1699dcaede18c5f12c84993c61
This commit is contained in:
Jim Bankoski 2013-05-29 12:34:10 -07:00
parent a4dd99b34d
commit 5e5470b254

View File

@ -2567,11 +2567,6 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
this_mode = vp9_mode_order[mode_index].mode; this_mode = vp9_mode_order[mode_index].mode;
ref_frame = vp9_mode_order[mode_index].ref_frame; ref_frame = vp9_mode_order[mode_index].ref_frame;
if (!(ref_frame == INTRA_FRAME
|| (cpi->ref_frame_flags & flag_list[ref_frame]))) {
continue;
}
if (cpi->speed > 0 && bsize >= BLOCK_SIZE_SB8X8) { if (cpi->speed > 0 && bsize >= BLOCK_SIZE_SB8X8) {
if (!(ref_frame_mask & (1 << ref_frame))) { if (!(ref_frame_mask & (1 << ref_frame))) {
continue; continue;
@ -2589,6 +2584,15 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
mbmi->ref_frame = ref_frame; mbmi->ref_frame = ref_frame;
mbmi->second_ref_frame = vp9_mode_order[mode_index].second_ref_frame; mbmi->second_ref_frame = vp9_mode_order[mode_index].second_ref_frame;
if (!(ref_frame == INTRA_FRAME
|| (cpi->ref_frame_flags & flag_list[ref_frame]))) {
continue;
}
if (!(mbmi->second_ref_frame == NONE
|| (cpi->ref_frame_flags & flag_list[mbmi->second_ref_frame]))) {
continue;
}
// TODO(jingning, jkoleszar): scaling reference frame not supported for // TODO(jingning, jkoleszar): scaling reference frame not supported for
// SPLITMV. // SPLITMV.
if (mbmi->ref_frame > 0 && if (mbmi->ref_frame > 0 &&