Fix up various mixed unsigned/signed comparisons.

This silences MSVC warning C4018 and fixes a bug with the intra
decision and improves portability to 16 bit platforms.
This commit is contained in:
Gregory Maxwell 2011-08-30 18:35:06 -04:00 committed by Jean-Marc Valin
parent 927488b292
commit 17a29c2567
8 changed files with 19 additions and 26 deletions

View file

@ -148,7 +148,7 @@ static inline opus_val16 celt_log2(opus_val32 x)
opus_val16 n, frac;
/* -0.41509302963303146, 0.9609890551383969, -0.31836011537636605,
0.15530808010959576, -0.08556153059057618 */
static const opus_val16 C[5] = {-6801+(1<<13-DB_SHIFT), 15746, -5217, 2545, -1401};
static const opus_val16 C[5] = {-6801+(1<<(13-DB_SHIFT)), 15746, -5217, 2545, -1401};
if (x==0)
return -32767;
i = celt_ilog2(x);