From 4f84ed36c77b376a82abf05b77c1433b4bf30ea4 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 19 Jul 2023 18:00:35 +0200 Subject: [PATCH] aac: fix intensity stereo direction --- nihav-mpeg/src/codecs/aac/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-mpeg/src/codecs/aac/mod.rs b/nihav-mpeg/src/codecs/aac/mod.rs index 6514853..ea262b9 100644 --- a/nihav-mpeg/src/codecs/aac/mod.rs +++ b/nihav-mpeg/src/codecs/aac/mod.rs @@ -348,7 +348,7 @@ impl ChannelPair { let invert = (self.ms_mask_present == 1) && self.ms_used[g][sfb]; let dir = self.ics[1].get_intensity_dir(g, sfb) ^ invert; let scale = 0.5f32.powf(0.25 * (f32::from(self.ics[1].scales[g][sfb]) + f32::from(INTENSITY_SCALE_MIN))); - if !dir { + if dir { for i in start..end { self.ics[1].coeffs[i] = scale * self.ics[0].coeffs[i]; } -- 2.39.5