shithub: aacenc

Download patch

ref: 88aed260ec4dbbccc64ef28abff8f6ad62de550c
parent: 47142b7155cebdb94195e69782c95bd33c11cfdd
author: Krzysztof Nikiel <knik@users.sourceforge.net>
date: Fri Aug 18 05:26:16 EDT 2017

bugfix: integer calculation should be double; fix quality multiplier accordingly

--- a/libfaac/quantize.c
+++ b/libfaac/quantize.c
@@ -85,9 +85,9 @@
         target *= 0.45;
     }
 
-    target *= 1.0 / (0.75 + ((start+end)/last));
+    target *= 1.0 / (0.75 + ((double)(start+end)/last));
 
-    bandqual[sfb] = 3.5 * target * quality;
+    bandqual[sfb] = 5.5 * target * quality;
   }
 }