diff options
author | Gregory Maxwell <greg@xiph.org> | 2012-11-27 12:51:20 -0500 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2012-11-27 13:07:45 -0500 |
commit | 07418d9dd8c486c4b3842a4268b272ed6f1b9c54 (patch) | |
tree | bb1dfe77dff6f37273ae30cc0516828feb7f7e21 /celt/bands.c | |
parent | b880e9b415f39d83429330d1f3cb40d23ce7de98 (diff) | |
download | opus-07418d9dd8c486c4b3842a4268b272ed6f1b9c54.tar.gz |
Guard _BitScanReverse on MSVC so that MSVC 6 doesn't break.
This also adds some extra casts to shut up compiler warnings
reported on MSVC 6 where there is implicit truncation for the
arguments of bitexact_cos().
Lacking access to CLZ/BSR will make the code a fair bit slower but
that is better than failing to compile.
Diffstat (limited to 'celt/bands.c')
-rw-r--r-- | celt/bands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/bands.c b/celt/bands.c index 8883f40a..35eb83e5 100644 --- a/celt/bands.c +++ b/celt/bands.c @@ -923,8 +923,8 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c fill &= ((1<<B)-1)<<B; delta = 16384; } else { - imid = bitexact_cos(itheta); - iside = bitexact_cos(16384-itheta); + imid = bitexact_cos((opus_int16)itheta); + iside = bitexact_cos((opus_int16)(16384-itheta)); /* This is the mid vs side allocation that minimizes squared error in that band. */ delta = FRAC_MUL16((N-1)<<7,bitexact_log2tan(iside,imid)); |