From: Kostya Shishkov Date: Fri, 1 Apr 2022 16:19:44 +0000 (+0200) Subject: aac: do not add 16 to large coefficients X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=243a5f4783410cb701c78cf353fd12135f7da3dd;p=nihav.git aac: do not add 16 to large coefficients --- diff --git a/nihav-mpeg/src/codecs/aac/coeff_read.rs b/nihav-mpeg/src/codecs/aac/coeff_read.rs index d195b39..4a92f0a 100644 --- a/nihav-mpeg/src/codecs/aac/coeff_read.rs +++ b/nihav-mpeg/src/codecs/aac/coeff_read.rs @@ -97,10 +97,10 @@ fn decode_pairs(br: &mut BitReader, cb: &Codebook, unsigned: bool, escape: } if escape { if (x == 16) || (x == -16) { - x += read_escape(br, x > 0)?; + x = read_escape(br, x > 0)?; } if (y == 16) || (y == -16) { - y += read_escape(br, y > 0)?; + y = read_escape(br, y > 0)?; } } out[0] = iquant(f32::from(x)) * scale;