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

Unified Diff: source/libvpx/vp8/encoder/tokenize.c

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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/vp8/encoder/rdopt.c ('k') | source/libvpx/vp8/vp8_common.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/encoder/tokenize.c
===================================================================
--- source/libvpx/vp8/encoder/tokenize.c (revision 263011)
+++ source/libvpx/vp8/encoder/tokenize.c (working copy)
@@ -213,6 +213,7 @@
/* Luma */
for (block = 0; block < 16; block++, b++)
{
+ const int eob = *b->eob;
tmp1 = vp8_block2above[block];
tmp2 = vp8_block2left[block];
qcoeff_ptr = b->qcoeff;
@@ -223,7 +224,7 @@
c = type ? 0 : 1;
- if(c >= *b->eob)
+ if(c >= eob)
{
/* c = band for this case */
t->Token = DCT_EOB_TOKEN;
@@ -250,7 +251,8 @@
t++;
c++;
- for (; c < *b->eob; c++)
+ assert(eob <= 16);
+ for (; c < eob; c++)
{
rc = vp8_default_zig_zag1d[c];
band = vp8_coef_bands[c];
@@ -286,6 +288,7 @@
/* Chroma */
for (block = 16; block < 24; block++, b++)
{
+ const int eob = *b->eob;
tmp1 = vp8_block2above[block];
tmp2 = vp8_block2left[block];
qcoeff_ptr = b->qcoeff;
@@ -294,7 +297,7 @@
VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l);
- if(!(*b->eob))
+ if(!eob)
{
/* c = band for this case */
t->Token = DCT_EOB_TOKEN;
@@ -321,7 +324,8 @@
t++;
c = 1;
- for (; c < *b->eob; c++)
+ assert(eob <= 16);
+ for (; c < eob; c++)
{
rc = vp8_default_zig_zag1d[c];
band = vp8_coef_bands[c];
« no previous file with comments | « source/libvpx/vp8/encoder/rdopt.c ('k') | source/libvpx/vp8/vp8_common.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698