Browse code

schroenc: Use constant quality for constant quality, not noise threshold

Originally committed as revision 23026 to svn://svn.ffmpeg.org/ffmpeg/trunk

David Conrad authored on 2010/05/06 06:02:41
Showing 1 changed files
... ...
@@ -164,17 +164,16 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext)
164 164
                                              "rate_control",
165 165
                                              SCHRO_ENCODER_RATE_CONTROL_LOSSLESS);
166 166
         } else {
167
-            int noise_threshold;
167
+            int quality;
168 168
             schro_encoder_setting_set_double(p_schro_params->encoder,
169 169
                                              "rate_control",
170
-                                             SCHRO_ENCODER_RATE_CONTROL_CONSTANT_NOISE_THRESHOLD);
170
+                                             SCHRO_ENCODER_RATE_CONTROL_CONSTANT_QUALITY);
171 171
 
172
-            noise_threshold = avccontext->global_quality / FF_QP2LAMBDA;
173
-            if (noise_threshold > 100)
174
-                noise_threshold = 100;
172
+            quality = avccontext->global_quality / FF_QP2LAMBDA;
173
+            if (quality > 10)
174
+                quality = 10;
175 175
             schro_encoder_setting_set_double(p_schro_params->encoder,
176
-                                             "noise_threshold",
177
-                                             noise_threshold);
176
+                                             "quality", quality);
178 177
         }
179 178
     } else {
180 179
         schro_encoder_setting_set_double(p_schro_params->encoder,