From: Kostya Shishkov Date: Wed, 7 Oct 2020 12:01:38 +0000 (+0200) Subject: ape: trim filter coefficients to 16-bit X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=87c44b3b802b7b6fc8d21f598cb6d9034504e0a3;p=nihav.git ape: trim filter coefficients to 16-bit --- diff --git a/nihav-llaudio/src/codecs/apepred.rs b/nihav-llaudio/src/codecs/apepred.rs index 547164c..9f7e8b6 100644 --- a/nihav-llaudio/src/codecs/apepred.rs +++ b/nihav-llaudio/src/codecs/apepred.rs @@ -97,6 +97,7 @@ fn adapt_loop(filt: &mut [i32], coeffs: &[i32], adapt: &[i32], val: i32) -> i32 } else if val > 0 { *coef -= *adapt; } + *coef = *coef << 16 >> 16; } sum }