Lines Matching defs:dither
27 #include "dither.h"
50 /* dither routine derived from MAD winamp plugin */
57 static FLaC__INLINE FLAC__int32 linear_dither(unsigned source_bps, unsigned target_bps, FLAC__int32 sample, dither_state *dither, const FLAC__int32 MIN, const FLAC__int32 MAX)
67 sample += dither->error[0] - dither->error[1] + dither->error[2];
69 dither->error[2] = dither->error[1];
70 dither->error[1] = dither->error[0] / 2;
78 /* dither */
79 random = (FLAC__int32)prng(dither->random);
80 output += (random & mask) - (dither->random & mask);
82 dither->random = random;
102 dither->error[0] = sample - output;
110 static dither_state dither[FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS];
136 sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX);
191 static dither_state dither[FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS];
217 sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX);