projects
/
platform
/
upstream
/
libvpx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa25a31
)
Third set of checks of buffer level against maximum buffer size
author
Adrian Grange
<agrange@google.com>
Tue, 8 Nov 2011 01:15:28 +0000
(17:15 -0800)
committer
Adrian Grange
<agrange@google.com>
Tue, 8 Nov 2011 01:15:28 +0000
(17:15 -0800)
Additional check of buffer level to ensure it doesn't exceed the
maximum buffer size.
Change-Id: I1ba4f8b09bbec89646885040ff47470196af521e
vp8/encoder/ratectrl.c
patch
|
blob
|
history
diff --git
a/vp8/encoder/ratectrl.c
b/vp8/encoder/ratectrl.c
index 1ac905021105f4e2e26030ce080bc2098ac3f0dc..dc6feb98090ca01845c2718748d343e68fe55129 100644
(file)
--- a/
vp8/encoder/ratectrl.c
+++ b/
vp8/encoder/ratectrl.c
@@
-990,6
+990,8
@@
static void calc_pframe_target_size(VP8_COMP *cpi)
{
// Update the buffer level variable.
cpi->bits_off_target += cpi->av_per_frame_bandwidth;
+ if (cpi->bits_off_target > cpi->oxcf.maximum_buffer_size)
+ cpi->bits_off_target = cpi->oxcf.maximum_buffer_size;
cpi->buffer_level = cpi->bits_off_target;
}
else