Fixed a couple of bugs for LAST3

Change-Id: I63126a844c255df4a447aac7f630ba54cc7d7d7a
This commit is contained in:
Zoe Liu 2015-09-21 11:50:35 -07:00
parent c0889b9a8c
commit 9144967ca8
2 changed files with 10 additions and 10 deletions

View File

@ -1522,8 +1522,7 @@ static void update_stats(VP9_COMMON *cm, const MACROBLOCK *x) {
[has_second_ref(mbmi)]++;
if (has_second_ref(mbmi)) {
#if CONFIG_MULTI_REF
#if CONFIG_LAST3_REF
#if CONFIG_MULTI_REF && CONFIG_LAST3_REF
const int bit = (ref0 == GOLDEN_FRAME || ref0 == LAST3_FRAME);
counts->comp_ref[vp9_get_pred_context_comp_ref_p(cm, xd)][0][bit]++;
if (!bit) {
@ -1533,15 +1532,16 @@ static void update_stats(VP9_COMMON *cm, const MACROBLOCK *x) {
counts->comp_ref[vp9_get_pred_context_comp_ref_p2(cm, xd)][2]
[ref0 == GOLDEN_FRAME]++;
}
#else // CONFIG_LAST3_REF
#else // CONFIG_MULTI_REF && CONFIG_LAST3_REF
counts->comp_ref[vp9_get_pred_context_comp_ref_p(cm, xd)][0]
[ref0 == GOLDEN_FRAME]++;
#if CONFIG_MULTI_REF
if (ref0 != GOLDEN_FRAME) {
counts->comp_ref[vp9_get_pred_context_comp_ref_p1(cm, xd)][1]
[ref0 == LAST_FRAME]++;
}
#endif // CONFIG_LAST3_REF
#endif // CONFIG_MULTI_REF
#endif // CONFIG_MULTI_REF && CONFIG_LAST3_REF
} else {
#if CONFIG_MULTI_REF
const int bit = (ref0 == ALTREF_FRAME || ref0 == GOLDEN_FRAME);

View File

@ -8573,24 +8573,24 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
case GOLDEN_FRAME:
ref_frame_skip_mask[0] |= (1 << LAST_FRAME) |
#if CONFIG_LAST3_REF
(1 << LAST2_FRAME) |
#if CONFIG_MULTI_REF
(1 << LAST2_FRAME) |
#if CONFIG_LAST3_REF
(1 << LAST3_FRAME) |
#endif // CONFIG_MULTI_REF
#endif // CONFIG_LAST3_REF
#endif // CONFIG_MULTI_REF
(1 << ALTREF_FRAME);
ref_frame_skip_mask[1] |= SECOND_REF_FRAME_MASK;
break;
case ALTREF_FRAME:
ref_frame_skip_mask[0] |= (1 << LAST_FRAME) |
#if CONFIG_LAST3_REF
(1 << LAST2_FRAME) |
#if CONFIG_MULTI_REF
(1 << LAST2_FRAME) |
#if CONFIG_LAST3_REF
(1 << LAST3_FRAME) |
#endif // CONFIG_MULTI_REF
#endif // CONFIG_LAST3_REF
#endif // CONFIG_MULTI_REF
(1 << GOLDEN_FRAME);
break;