]> git.nihav.org Git - nihav.git/commitdiff
aac: do not add 16 to large coefficients
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 1 Apr 2022 16:19:44 +0000 (18:19 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 1 Apr 2022 16:19:44 +0000 (18:19 +0200)
nihav-mpeg/src/codecs/aac/coeff_read.rs

index d195b394f8b37b3a7314991c59db696deb64afd6..4a92f0ace68cd9b3e10daa443e5190c4ff98e555 100644 (file)
@@ -97,10 +97,10 @@ fn decode_pairs(br: &mut BitReader, cb: &Codebook<u16>, 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;