Improvements from Matjaz Thaler

This commit is contained in:
Klaus Schmidinger
2001-08-09 11:41:39 +02:00
parent 85a0277910
commit c50dc5e888
47 changed files with 4454 additions and 1727 deletions

View File

@@ -22,16 +22,16 @@
*/
extern uint_16 lfsr_state;
extern const uint_16 dither_lut[256];
extern uint16_t lfsr_state;
extern const uint16_t dither_lut[256];
static inline uint_16 dither_gen(void)
static inline uint16_t dither_gen(void)
{
sint_16 state;
int16_t state;
state = dither_lut[lfsr_state >> 8] ^ (lfsr_state << 8);
lfsr_state = (uint_16) state;
lfsr_state = (uint16_t) state;
return ((state * (sint_32) (0.707106 * 256.0))>>8);
return ((state * (int32_t) (0.707106 * 256.0))>>8);
}