Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2354)

Unified Diff: source/libvpx/vp9/decoder/vp9_dboolhuff.c

Issue 23600008: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_dboolhuff.h ('k') | source/libvpx/vp9/decoder/vp9_decodemv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/decoder/vp9_dboolhuff.c
===================================================================
--- source/libvpx/vp9/decoder/vp9_dboolhuff.c (revision 219822)
+++ source/libvpx/vp9/decoder/vp9_dboolhuff.c (working copy)
@@ -16,7 +16,7 @@
// This is meant to be a large, positive constant that can still be efficiently
// loaded as an immediate (on platforms like ARM, for example).
// Even relatively modest values like 100 would work fine.
-#define VP9_LOTS_OF_BITS 0x40000000
+#define LOTS_OF_BITS 0x40000000
int vp9_reader_init(vp9_reader *r, const uint8_t *buffer, size_t size) {
@@ -41,13 +41,13 @@
const uint8_t *buffer = r->buffer;
VP9_BD_VALUE value = r->value;
int count = r->count;
- int shift = VP9_BD_VALUE_SIZE - 8 - (count + 8);
+ int shift = BD_VALUE_SIZE - 8 - (count + 8);
int loop_end = 0;
const int bits_left = (int)((buffer_end - buffer)*CHAR_BIT);
const int x = shift + CHAR_BIT - bits_left;
if (x >= 0) {
- count += VP9_LOTS_OF_BITS;
+ count += LOTS_OF_BITS;
loop_end = x;
}
@@ -66,7 +66,7 @@
const uint8_t *vp9_reader_find_end(vp9_reader *r) {
// Find the end of the coded buffer
- while (r->count > CHAR_BIT && r->count < VP9_BD_VALUE_SIZE) {
+ while (r->count > CHAR_BIT && r->count < BD_VALUE_SIZE) {
r->count -= CHAR_BIT;
r->buffer--;
}
@@ -83,10 +83,10 @@
//
// When reading a byte from the user's buffer, count is filled with 8 and
// one byte is filled into the value buffer. When we reach the end of the
- // data, count is additionally filled with VP9_LOTS_OF_BITS. So when
- // count == VP9_LOTS_OF_BITS - 1, the user's data has been exhausted.
+ // data, count is additionally filled with LOTS_OF_BITS. So when
+ // count == LOTS_OF_BITS - 1, the user's data has been exhausted.
//
// 1 if we have tried to decode bits after the end of stream was encountered.
// 0 No error.
- return r->count > VP9_BD_VALUE_SIZE && r->count < VP9_LOTS_OF_BITS;
+ return r->count > BD_VALUE_SIZE && r->count < LOTS_OF_BITS;
}
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_dboolhuff.h ('k') | source/libvpx/vp9/decoder/vp9_decodemv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698