Previously we had assumed that it was necessary to give a full frame's
bit allocation to the alt ref frame if it has been created through temporal
filtering. This is not the case. The active max quantizer control
insures that sufficient bits are allocated if needed and allocating a
full frame's worth of bits creates an excessive overhead for the ARF.
Change-Id: I83c95ed7bc7ce0e53ccae6ff32db5a97f145937a
{
if (cpi->source_encode_index == cpi->last_alt_ref_sei)
{
-#if VP8_TEMPORAL_ALT_REF
-
- if (cpi->oxcf.arnr_max_frames == 0)
- {
- cpi->is_src_frame_alt_ref = 1; // copy alt ref
- }
- else
- {
- cpi->is_src_frame_alt_ref = 0;
- }
-
-#else
cpi->is_src_frame_alt_ref = 1;
-#endif
cpi->last_alt_ref_sei = -1;
}
else
}
// If there is an active ARF at this location use the minimum
- // bits on this frame unless it was a contructed arf.
- else if (cpi->oxcf.arnr_max_frames == 0)
+ // bits on this frame even if it is a contructed arf.
+ // The active maximum quantizer insures that an appropriate
+ // number of bits will be spent if needed for contstructed ARFs.
+ else
{
- cpi->this_frame_target = 0; // Minimial spend on gf that is replacing an arf
+ cpi->this_frame_target = 0;
}
cpi->current_gf_interval = cpi->frames_till_gf_update_due;