diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-11-28 12:01:33 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2020-11-28 12:01:33 +0100 |
commit | fdd68493ebf7c0e1f367ccd3ec3e6c6848d21eff (patch) | |
tree | 0ae28863933e02a7012eaf3212fe1da09f56e3a1 | |
parent | 7afec34d769a340e73f9074f387c2b25a9b1d847 (diff) | |
download | nihav-fdd68493ebf7c0e1f367ccd3ec3e6c6848d21eff.tar.gz |
maximum FLAC order is 32
-rw-r--r-- | nihav-llaudio/src/codecs/flac.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nihav-llaudio/src/codecs/flac.rs b/nihav-llaudio/src/codecs/flac.rs index 55cd6bb..0ca80aa 100644 --- a/nihav-llaudio/src/codecs/flac.rs +++ b/nihav-llaudio/src/codecs/flac.rs @@ -121,7 +121,7 @@ fn apply_fixed_predictor(dst: &mut [i32], order: usize) { }; } -fn apply_lpc(dst: &mut [i32], filt: &[i32; 16], order: usize, shift: u8) { +fn apply_lpc(dst: &mut [i32], filt: &[i32; 32], order: usize, shift: u8) { for i in order..dst.len() { let mut sum = 0i64; for (coef, filt) in dst[i - order..].iter().take(order).zip(filt.iter()) { @@ -213,7 +213,7 @@ impl FlacDecoder { let precision = br.read(4)? as u8 + 1; validate!(precision < 16); let shift = br.read(5)? as u8; - let mut filter = [0i32; 16]; + let mut filter = [0i32; 32]; for el in filter[..order].iter_mut().rev() { *el = br.read_s(precision)?; } |