scale_and_round

Function scale_and_round 

Source
pub fn scale_and_round(
    x_hat_ltpf: &[Scaler],
    _bits_per_audio_sample_dec: usize,
    x_hat_clip: &mut [i16],
)
Expand description

Convert from floating point to signed integer by rounding to the nearest integer value then clipping to max and min of a 16 bit integer

ยงArguments

  • x_hat_ltpf - Input samples from the output of the long term post filter
  • _bits_per_audio_sample_dec - Bits per audio sample (e.g. 16). Assumed to be 16 and not currently used
  • x_hat_clip - 16 bit integer output samples rounded and clipped