Commit 1fc992d5 authored by Yaowu Xu's avatar Yaowu Xu

Change to use correct type

This commit changes to use int instead of unsigned for a variable used in
inverse quantization.

Ported from libvpx/master: d3fe3b2a

Change-Id: I8f0ff5f80c9e68d52425265ef177357c65ead1e2
parent b101b1f4
...@@ -296,12 +296,12 @@ void av1_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, ...@@ -296,12 +296,12 @@ void av1_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block,
} }
static void invert_quant(int16_t *quant, int16_t *shift, int d) { static void invert_quant(int16_t *quant, int16_t *shift, int d) {
unsigned t; uint32_t t;
int l; int l, m;
t = d; t = d;
for (l = 0; t > 1; l++) t >>= 1; for (l = 0; t > 1; l++) t >>= 1;
t = 1 + (1 << (16 + l)) / d; m = 1 + (1 << (16 + l)) / d;
*quant = (int16_t)(t - (1 << 16)); *quant = (int16_t)(m - (1 << 16));
*shift = 1 << (16 - l); *shift = 1 << (16 - l);
} }
......
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