summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2011-01-26 12:52:31 +0000
committerPaul Wilkins <paulwilkins@google.com>2011-01-26 12:52:31 +0000
commita3f71ccff6c514a7396a1a329194e5cda18b6825 (patch)
tree6aeba91215162b499eedbc167942fb94cbed49fe /vp8
parent2caa36aa4fce2bb7e3f8e43624cab94b78bc8950 (diff)
downloadlibvpx-a3f71ccff6c514a7396a1a329194e5cda18b6825.tar
libvpx-a3f71ccff6c514a7396a1a329194e5cda18b6825.tar.gz
libvpx-a3f71ccff6c514a7396a1a329194e5cda18b6825.tar.bz2
libvpx-a3f71ccff6c514a7396a1a329194e5cda18b6825.zip
Correction to buffer update for non-viewable frames.
The code previously tested cpi->common.refresh_alt_ref_frame but there are situations where this flag may be set for viewable frames. The correct test should be !cm->show_frame. Change-Id: Ia1a600622992a4a68fe1d38ac23bf6b34b133688
Diffstat (limited to 'vp8')
-rw-r--r--vp8/encoder/onyx_if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index 900785364..d60bf8b52 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4614,7 +4614,8 @@ static void encode_frame_to_data_rate
}
// Update the buffer level variable.
- if (cpi->common.refresh_alt_ref_frame)
+ // Non-viewable frames are a special case and are treated as pure overhead.
+ if ( !cm->show_frame )
cpi->bits_off_target -= cpi->projected_frame_size;
else
cpi->bits_off_target += cpi->av_per_frame_bandwidth - cpi->projected_frame_size;