comparison libschroedingerenc.c @ 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
comparison
equal deleted inserted replaced
11680:f665332a6dea 11681:04c086666e50
162 /* lossless coding */ 162 /* lossless coding */
163 schro_encoder_setting_set_double(p_schro_params->encoder, 163 schro_encoder_setting_set_double(p_schro_params->encoder,
164 "rate_control", 164 "rate_control",
165 SCHRO_ENCODER_RATE_CONTROL_LOSSLESS); 165 SCHRO_ENCODER_RATE_CONTROL_LOSSLESS);
166 } else { 166 } else {
167 int noise_threshold; 167 int quality;
168 schro_encoder_setting_set_double(p_schro_params->encoder, 168 schro_encoder_setting_set_double(p_schro_params->encoder,
169 "rate_control", 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; 172 quality = avccontext->global_quality / FF_QP2LAMBDA;
173 if (noise_threshold > 100) 173 if (quality > 10)
174 noise_threshold = 100; 174 quality = 10;
175 schro_encoder_setting_set_double(p_schro_params->encoder, 175 schro_encoder_setting_set_double(p_schro_params->encoder,
176 "noise_threshold", 176 "quality", quality);
177 noise_threshold);
178 } 177 }
179 } else { 178 } else {
180 schro_encoder_setting_set_double(p_schro_params->encoder, 179 schro_encoder_setting_set_double(p_schro_params->encoder,
181 "rate_control", 180 "rate_control",
182 SCHRO_ENCODER_RATE_CONTROL_CONSTANT_BITRATE); 181 SCHRO_ENCODER_RATE_CONTROL_CONSTANT_BITRATE);