Make the bi-predictive frame group interval adjustable

This is for the bidir-pred experiment. Previously the length of the
bi-predictive frame group interval is fixed at 2, i.e. one
bi-predictive frame may be inserted every other frame. This patch
makes the length adjustable, i.e. any positive number may be
specified, but the use of the backward ref will be turned off if the
bi-predictive frame group interval is larger than the golden frame
group.

Further, an additional rate factor level has been added:
INTER_LOW
, which applies to LAST_BIPRED_UPDATE frames that are not used as
references.

Change-Id: I5514d34a64dd486bbb5756c2d0612946f598a789
This commit is contained in:
Zoe Liu
2016-05-25 11:57:15 -07:00
parent 6fd7f7dd3e
commit e89ca180c2
12 changed files with 250 additions and 95 deletions

View File

@@ -3727,6 +3727,23 @@ void vp10_decode_frame(VP10Decoder *pbi,
!cm->last_intra_only &&
cm->last_show_frame &&
(cm->last_frame_type != KEY_FRAME);
#if !CONFIG_EXT_REFS && CONFIG_BIDIR_PRED
// NOTE(zoeliu): As cm->prev_frame can take neither a frame of
// show_exisiting_frame=1, nor can it take a frame not used as
// a reference, it is probable that by the time it is being
// referred to, the frame buffer it originally points to may
// already get expired and have been reassigned to the current
// newly coded frame. Hence, we need to check whether this is
// the case, and if yes, we have 2 choices:
// (1) Simply disable the use of previous frame mvs; or
// (2) Have cm->prev_frame point to one reference frame buffer,
// e.g. LAST_FRAME.
if (cm->use_prev_frame_mvs && !dec_is_ref_frame_buf(pbi, cm->prev_frame)) {
// Reassign the LAST_FRAME buffer to cm->prev_frame.
RefBuffer *last_fb_ref_buf = &cm->frame_refs[LAST_FRAME - LAST_FRAME];
cm->prev_frame = &cm->buffer_pool->frame_bufs[last_fb_ref_buf->idx];
}
#endif // !CONFIG_EXT_REFS && CONFIG_BIDIR_PRED
vp10_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y);