diff options
author | Paul Wilkins <paulwilkins@google.com> | 2010-07-19 14:10:07 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2010-07-19 14:10:07 +0100 |
commit | bf18069cebd34326da5f479143f46c994ee41114 (patch) | |
tree | af4c81850cfa1721426bb2b1bd8357504e24067c | |
parent | 7c938f4d3cfebf68e93b0bfa4debc89a202d267a (diff) | |
download | libvpx-bf18069cebd34326da5f479143f46c994ee41114.tar libvpx-bf18069cebd34326da5f479143f46c994ee41114.tar.gz libvpx-bf18069cebd34326da5f479143f46c994ee41114.tar.bz2 libvpx-bf18069cebd34326da5f479143f46c994ee41114.zip |
Rate control fix for ARNR filtered frames.
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
-rw-r--r-- | vp8/encoder/onyx_if.c | 13 | ||||
-rw-r--r-- | vp8/encoder/ratectrl.c | 8 |
2 files changed, 5 insertions, 16 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index a51f754a3..c654eb394 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -4960,20 +4960,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon { 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 diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c index b309d5364..582c617ef 100644 --- a/vp8/encoder/ratectrl.c +++ b/vp8/encoder/ratectrl.c @@ -1120,10 +1120,12 @@ void vp8_calc_pframe_target_size(VP8_COMP *cpi) } // 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; |