diff options
author | Alex Converse <aconverse@google.com> | 2016-05-02 21:32:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-05-02 21:32:39 +0000 |
commit | 8307045cb51b60b749cc7955fc80c7d6ec9bdc1a (patch) | |
tree | 159a657c7d368616b6b6360809268791dbe9133a /vp10 | |
parent | 04a6db562aeb5f6f4516056482bd1d2dc64b8772 (diff) | |
parent | 918a2fd72658ac764f5627b7eb2b56f91479cf09 (diff) | |
download | libvpx-8307045cb51b60b749cc7955fc80c7d6ec9bdc1a.tar libvpx-8307045cb51b60b749cc7955fc80c7d6ec9bdc1a.tar.gz libvpx-8307045cb51b60b749cc7955fc80c7d6ec9bdc1a.tar.bz2 libvpx-8307045cb51b60b749cc7955fc80c7d6ec9bdc1a.zip |
Merge "Use signed variables in the lookahead."
Diffstat (limited to 'vp10')
-rw-r--r-- | vp10/encoder/lookahead.c | 10 | ||||
-rw-r--r-- | vp10/encoder/lookahead.h | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/vp10/encoder/lookahead.c b/vp10/encoder/lookahead.c index dce013903..3185cb691 100644 --- a/vp10/encoder/lookahead.c +++ b/vp10/encoder/lookahead.c @@ -20,8 +20,8 @@ /* Return the buffer at the given absolute index and increment the index */ static struct lookahead_entry *pop(struct lookahead_ctx *ctx, - unsigned int *idx) { - unsigned int index = *idx; + int *idx) { + int index = *idx; struct lookahead_entry *buf = ctx->buf + index; assert(index < ctx->max_sz); @@ -35,7 +35,7 @@ static struct lookahead_entry *pop(struct lookahead_ctx *ctx, void vp10_lookahead_destroy(struct lookahead_ctx *ctx) { if (ctx) { if (ctx->buf) { - unsigned int i; + int i; for (i = 0; i < ctx->max_sz; i++) vpx_free_frame_buffer(&ctx->buf[i].img); @@ -221,9 +221,9 @@ struct lookahead_entry *vp10_lookahead_peek(struct lookahead_ctx *ctx, if (index >= 0) { // Forward peek - if (index < (int)ctx->sz) { + if (index < ctx->sz) { index += ctx->read_idx; - if (index >= (int)ctx->max_sz) + if (index >= ctx->max_sz) index -= ctx->max_sz; buf = ctx->buf + index; } diff --git a/vp10/encoder/lookahead.h b/vp10/encoder/lookahead.h index 22429aeeb..f650f8028 100644 --- a/vp10/encoder/lookahead.h +++ b/vp10/encoder/lookahead.h @@ -31,10 +31,10 @@ struct lookahead_entry { #define MAX_PRE_FRAMES 1 struct lookahead_ctx { - unsigned int max_sz; /* Absolute size of the queue */ - unsigned int sz; /* Number of buffers currently in the queue */ - unsigned int read_idx; /* Read index */ - unsigned int write_idx; /* Write index */ + int max_sz; /* Absolute size of the queue */ + int sz; /* Number of buffers currently in the queue */ + int read_idx; /* Read index */ + int write_idx; /* Write index */ struct lookahead_entry *buf; /* Buffer list */ }; |