20 #ifndef MPD_PCM_DITHER_HXX 21 #define MPD_PCM_DITHER_HXX 33 :error{0, 0, 0}, random(0) {}
44 template<
typename ST,
unsigned SBITS,
unsigned DBITS>
48 const int32_t *src_end);
51 const int32_t *src_end);
64 template<
typename T, T MIN, T MAX,
unsigned scale_bits>
75 template<
typename ST,
typename DT>
76 typename DT::value_type DitherConvert(
typename ST::value_type sample);
78 template<
typename ST,
typename DT>
79 void DitherConvert(
typename DT::pointer_type dest,
80 typename ST::const_pointer_type src,
81 typename ST::const_pointer_type src_end);
void Dither32To16(int16_t *dest, const int32_t *src, const int32_t *src_end)
void Dither24To16(int16_t *dest, const int32_t *src, const int32_t *src_end)
ST DitherShift(ST sample)
Shift the given sample by #SBITS-#DBITS to the right, and apply dithering.