changeset 11681:04c086666e50 libavcodec

schroenc: Use constant quality for constant quality, not noise threshold
author conrad
date Wed, 05 May 2010 21:02:41 +0000
parents f665332a6dea
children 5173cc26d42f
files libschroedingerenc.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libschroedingerenc.c	Wed May 05 21:02:37 2010 +0000
+++ b/libschroedingerenc.c	Wed May 05 21:02:41 2010 +0000
@@ -164,17 +164,16 @@
                                              "rate_control",
                                              SCHRO_ENCODER_RATE_CONTROL_LOSSLESS);
         } else {
-            int noise_threshold;
+            int quality;
             schro_encoder_setting_set_double(p_schro_params->encoder,
                                              "rate_control",
-                                             SCHRO_ENCODER_RATE_CONTROL_CONSTANT_NOISE_THRESHOLD);
+                                             SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY);
 
-            noise_threshold = avccontext->global_quality / FF_QP2LAMBDA;
-            if (noise_threshold > 100)
-                noise_threshold = 100;
+            quality = avccontext->global_quality / FF_QP2LAMBDA;
+            if (quality > 10)
+                quality = 10;
             schro_encoder_setting_set_double(p_schro_params->encoder,
-                                             "noise_threshold",
-                                             noise_threshold);
+                                             "quality", quality);
         }
     } else {
         schro_encoder_setting_set_double(p_schro_params->encoder,