Commit 4ce287aa authored by Yaowu Xu's avatar Yaowu Xu

Replace int with uint32_t for non-negative values

This also fix a few compiler warnings of comparison between signed
and unsigned values.

Change-Id: I1d633f4dfdffff73743dc3f373564056c6d58813
parent 84c56af0
......@@ -276,7 +276,7 @@ static INLINE int_mv get_sub_block_mv(const MODE_INFO *candidate, int which_mv,
int search_col, int block_idx) {
#if CONFIG_REF_MV
(void)search_col;
(void)block_idx;
(void)block_idx;
return candidate->mbmi.mv[which_mv];
#else
return block_idx >= 0 && candidate->mbmi.sb_type < BLOCK_8X8
......
......@@ -23,15 +23,15 @@ TEST(ScanTest, av1_augment_prob) {
av1_augment_prob(prob, tx1d_size, tx1d_size);
for (int r = 0; r < tx1d_size; ++r) {
for (int c = 0; c < tx1d_size; ++c) {
const int idx = r * tx1d_size + c;
const uint32_t idx = r * tx1d_size + c;
EXPECT_EQ(ref_prob[idx], prob[idx] >> 16);
}
}
const int mask = (1 << 10) - 1;
const uint32_t mask = (1 << 10) - 1;
for (int r = 0; r < tx1d_size; ++r) {
for (int c = 0; c < tx1d_size; ++c) {
const int idx = r * tx1d_size + c;
const uint32_t idx = r * tx1d_size + c;
EXPECT_EQ(idx, mask ^ (prob[r * tx1d_size + c] & mask));
}
}
......
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