shithub: aacenc

Download patch

ref: 98aa3da4d1102f24bc308203afa7282a9dbc1c67
parent: bba23c9ec4b5f39ea752796712b34dac8b28bafa
author: Krzysztof Nikiel <knik@users.sourceforge.net>
date: Mon Aug 14 17:41:45 EDT 2017

max quality setting raised to 2000

--- a/frontend/main.c
+++ b/frontend/main.c
@@ -545,7 +545,7 @@
                 unsigned int i;
                 if (sscanf(optarg, "%u", &i) > 0)
                 {
-                    if (i > 0 && i < 1000)
+                    if (i > 0)
                         quantqual = i;
                 }
                 break;
--- a/libfaac/frame.c
+++ b/libfaac/frame.c
@@ -66,8 +66,8 @@
 
 // default bandwidth/samplerate ratio
 static const double bwfac = 0.42;
+enum {MAXQUAL = 2000, MINQUAL = 10};
 
-
 int FAACAPI faacEncGetVersion( char **faac_id_string,
 			      				char **faac_copyright_string)
 {
@@ -254,10 +254,10 @@
     if (hEncoder->config.bandWidth > (hEncoder->sampleRate / 2))
 		hEncoder->config.bandWidth = hEncoder->sampleRate / 2;
 
-    if (config->quantqual > 500)
-		config->quantqual = 500;
-    if (config->quantqual < 10)
-		config->quantqual = 10;
+    if (config->quantqual > MAXQUAL)
+        config->quantqual = MAXQUAL;
+    if (config->quantqual < MINQUAL)
+        config->quantqual = MINQUAL;
 
     hEncoder->config.quantqual = config->quantqual;