Commit 37499294 authored by hui su's avatar hui su Committed by sebastien alaiwan

Make variables const in write_uniform() and read_uniform()

BUG=aomedia:448

Change-Id: Ie02581a20ca12b24d0a5719a1d9220fb20e25ff7
parent b0f808b0
......@@ -34,12 +34,10 @@
#define ACCT_STR __func__
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
static INLINE int read_uniform(aom_reader *r, int n) {
int l = get_unsigned_bits(n);
int m = (1 << l) - n;
int v = aom_read_literal(r, l - 1, ACCT_STR);
const int l = get_unsigned_bits(n);
const int m = (1 << l) - n;
const int v = aom_read_literal(r, l - 1, ACCT_STR);
assert(l != 0);
if (v < m)
return v;
else
......
......@@ -98,8 +98,8 @@ static const struct av1_token tx_size_encodings[MAX_TX_DEPTH][TX_SIZES] = {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
static INLINE void write_uniform(aom_writer *w, int n, int v) {
int l = get_unsigned_bits(n);
int m = (1 << l) - n;
const int l = get_unsigned_bits(n);
const int m = (1 << l) - n;
if (l == 0) return;
if (v < m) {
aom_write_literal(w, v, l - 1);
......
......@@ -414,7 +414,8 @@ static const REF_DEFINITION av1_ref_order[MAX_REFS] = {
#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
static INLINE int write_uniform_cost(int n, int v) {
int l = get_unsigned_bits(n), m = (1 << l) - n;
const int l = get_unsigned_bits(n);
const int m = (1 << l) - n;
if (l == 0) return 0;
if (v < m)
return (l - 1) * av1_cost_bit(128, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment