Warning fixes

This commit is contained in:
Henrik Rydgård
2014-04-08 15:26:37 +02:00
parent 9ab7a8cb90
commit 06ec64fa62
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -564,7 +564,7 @@ inline int jpeg_decoder::huff_decode(huff_tables *pH, int& extra_bits)
// Tables and macro used to fully decode the DPCM differences.
static const int s_extend_test[16] = { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 };
static const int s_extend_offset[16] = { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
static const int s_extend_mask[] = { 0, (1<<0), (1<<1), (1<<2), (1<<3), (1<<4), (1<<5), (1<<6), (1<<7), (1<<8), (1<<9), (1<<10), (1<<11), (1<<12), (1<<13), (1<<14), (1<<15), (1<<16) };
//static const int s_extend_mask[] = { 0, (1<<0), (1<<1), (1<<2), (1<<3), (1<<4), (1<<5), (1<<6), (1<<7), (1<<8), (1<<9), (1<<10), (1<<11), (1<<12), (1<<13), (1<<14), (1<<15), (1<<16) };
// The logical AND's in this macro are to shut up static code analysis (aren't really necessary - couldn't find another way to do this)
#define JPGD_HUFF_EXTEND(x, s) (((x) < s_extend_test[s & 15]) ? ((x) + s_extend_offset[s & 15]) : (x))
+4 -4
View File
@@ -1878,8 +1878,8 @@ done:
static uint etc1_decode_value(uint diff, uint inten, uint selector, uint packed_c)
{
const uint limit = diff ? 32 : 16; limit;
RG_ETC1_ASSERT((diff < 2) && (inten < 8) && (selector < 4) && (packed_c < limit));
//const uint limit = diff ? 32 : 16; limit;
//RG_ETC1_ASSERT((diff < 2) && (inten < 8) && (selector < 4) && (packed_c < limit));
int c;
if (diff)
c = (packed_c >> 2) | (packed_c << 3);
@@ -1940,7 +1940,7 @@ done:
// For random 888 inputs, MSE results are better than Erricson's ETC1 packer in "slow" mode ~9.5% of the time, is slightly worse only ~.01% of the time, and is equal the rest of the time.
static uint64 pack_etc1_block_solid_color(etc1_block& block, const uint8* pColor, etc1_pack_params& pack_params)
{
pack_params;
// pack_params;
RG_ETC1_ASSERT(g_etc1_inverse_lookup[0][255]);
static uint s_next_comp[4] = { 1, 2, 0, 1 };
@@ -2032,7 +2032,7 @@ found_perfect_match:
{
RG_ETC1_ASSERT(g_etc1_inverse_lookup[0][255]);
pack_params;
//pack_params;
static uint s_next_comp[4] = { 1, 2, 0, 1 };
uint best_error = cUINT32_MAX, best_i = 0;