Fixed normalization

This commit is contained in:
Abramo Bagnara 2002-07-09 20:21:00 +00:00
parent c4a0be5c5c
commit a81bf16bc9

View file

@ -789,14 +789,14 @@ static inline void _norms(const void *src, void *dst,
int32_t s; int32_t s;
switch (src_wid) { switch (src_wid) {
case 8: case 8:
s = *(int8_t*)src; s = *(int32_t*)src;
if (s >= 0x7f) if (s >= 0x7f)
goto _max; goto _max;
else if (s <= -0x80) else if (s <= -0x80)
goto _min; goto _min;
break; break;
case 16: case 16:
s = *(int16_t*)src; s = *(int32_t*)src;
if (s >= 0x7fff) if (s >= 0x7fff)
goto _max; goto _max;
else if (s <= -0x8000) else if (s <= -0x8000)