Merge "Extend number of reference buffers to 8." into experimental

This commit is contained in:
Adrian Grange 2013-05-03 09:59:54 -07:00 committed by Gerrit Code Review
commit 7aae782c37
4 changed files with 11 additions and 12 deletions

View File

@ -771,8 +771,7 @@ void vp9_setup_past_independence(VP9_COMMON *cm, MACROBLOCKD *xd) {
vp9_update_mode_info_border(cm, cm->prev_mip);
vp9_update_mode_info_in_image(cm, cm->prev_mi);
cm->ref_frame_sign_bias[GOLDEN_FRAME] = 0;
cm->ref_frame_sign_bias[ALTREF_FRAME] = 0;
vpx_memset(cm->ref_frame_sign_bias, 0, sizeof(cm->ref_frame_sign_bias));
cm->frame_context_idx = 0;
}

View File

@ -32,13 +32,9 @@
void vp9_initialize_common(void);
#if CONFIG_MULTIPLE_ARF
// Define the number of candidate reference buffers.
#define NUM_REF_FRAMES 8
#define NUM_REF_FRAMES_LG2 3
#else
#define NUM_REF_FRAMES 3
#define NUM_REF_FRAMES_LG2 2
#endif
#define ALLOWED_REFS_PER_FRAME 3

View File

@ -1274,8 +1274,11 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
vp9_setup_scale_factors_for_frame(sf, fb, pc->width, pc->height);
}
pc->ref_frame_sign_bias[GOLDEN_FRAME] = vp9_read_bit(&header_bc);
pc->ref_frame_sign_bias[ALTREF_FRAME] = vp9_read_bit(&header_bc);
// Read the sign bias for each reference frame buffer.
for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
pc->ref_frame_sign_bias[i + 1] = vp9_read_bit(&header_bc);
}
xd->allow_high_precision_mv = vp9_read_bit(&header_bc);
pc->mcomp_filter_type = read_mcomp_filter_type(&header_bc);

View File

@ -1984,9 +1984,10 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
vp9_write_literal(&header_bc, cpi->gld_fb_idx, NUM_REF_FRAMES_LG2);
vp9_write_literal(&header_bc, cpi->alt_fb_idx, NUM_REF_FRAMES_LG2);
// Indicate reference frame sign bias for Golden and ARF frames (always 0 for last frame buffer)
vp9_write_bit(&header_bc, pc->ref_frame_sign_bias[GOLDEN_FRAME]);
vp9_write_bit(&header_bc, pc->ref_frame_sign_bias[ALTREF_FRAME]);
// Indicate the sign bias for each reference frame buffer.
for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
vp9_write_bit(&header_bc, pc->ref_frame_sign_bias[LAST_FRAME + i]);
}
// Signal whether to allow high MV precision
vp9_write_bit(&header_bc, (xd->allow_high_precision_mv) ? 1 : 0);