Merge "bug fix check frame buffer index before copy"

This commit is contained in:
John Koleszar
2011-05-27 12:35:06 -07:00
committed by Code Review

View File

@@ -3102,18 +3102,24 @@ void update_reference_frames(VP8_COMMON *cm)
assert(!(cm->copy_buffer_to_arf & ~0x3));
if (cm->copy_buffer_to_arf == 1)
{
if(cm->alt_fb_idx != cm->lst_fb_idx)
{
yv12_fb[cm->lst_fb_idx].flags |= VP8_ALT_FLAG;
yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
cm->alt_fb_idx = cm->lst_fb_idx;
}
}
else /* if (cm->copy_buffer_to_arf == 2) */
{
if(cm->alt_fb_idx != cm->gld_fb_idx)
{
yv12_fb[cm->gld_fb_idx].flags |= VP8_ALT_FLAG;
yv12_fb[cm->alt_fb_idx].flags &= ~VP8_ALT_FLAG;
cm->alt_fb_idx = cm->gld_fb_idx;
}
}
}
if (cm->refresh_golden_frame)
{
@@ -3128,12 +3134,17 @@ void update_reference_frames(VP8_COMMON *cm)
assert(!(cm->copy_buffer_to_arf & ~0x3));
if (cm->copy_buffer_to_gf == 1)
{
if(cm->gld_fb_idx != cm->lst_fb_idx)
{
yv12_fb[cm->lst_fb_idx].flags |= VP8_GOLD_FLAG;
yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
cm->gld_fb_idx = cm->lst_fb_idx;
}
}
else /* if (cm->copy_buffer_to_gf == 2) */
{
if(cm->alt_fb_idx != cm->gld_fb_idx)
{
yv12_fb[cm->alt_fb_idx].flags |= VP8_GOLD_FLAG;
yv12_fb[cm->gld_fb_idx].flags &= ~VP8_GOLD_FLAG;
@@ -3141,6 +3152,7 @@ void update_reference_frames(VP8_COMMON *cm)
}
}
}
}
if (cm->refresh_last_frame)
{