Lines Matching defs:source_bps
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)
62 FLAC__ASSERT(source_bps < 32);
64 FLAC__ASSERT(target_bps <= source_bps);
73 output = sample + (1L << (source_bps - target_bps - 1));
75 scalebits = source_bps - target_bps;
108 size_t FLAC__plugin_common__pack_pcm_signed_big_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps)
119 FLAC__ASSERT(source_bps < 32);
121 FLAC__ASSERT(target_bps <= source_bps);
122 FLAC__ASSERT((source_bps & 7) == 0);
125 if(source_bps != target_bps) {
126 const FLAC__int32 MIN = -(1L << (source_bps - 1));
127 const FLAC__int32 MAX = ~MIN; /*(1L << (source_bps-1)) - 1 */
136 sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX);
189 size_t FLAC__plugin_common__pack_pcm_signed_little_endian(FLAC__byte *data, const FLAC__int32 * const input[], unsigned wide_samples, unsigned channels, unsigned source_bps, unsigned target_bps)
200 FLAC__ASSERT(source_bps < 32);
202 FLAC__ASSERT(target_bps <= source_bps);
203 FLAC__ASSERT((source_bps & 7) == 0);
206 if(source_bps != target_bps) {
207 const FLAC__int32 MIN = -(1L << (source_bps - 1));
208 const FLAC__int32 MAX = ~MIN; /*(1L << (source_bps-1)) - 1 */
217 sample = linear_dither(source_bps, target_bps, *input_++, &dither[channel], MIN, MAX);