Browse Source

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

Originally committed as revision 23026 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
David Conrad 15 years ago
parent
commit
e0a24555b4
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      libavcodec/libschroedingerenc.c

+ 6
- 7
libavcodec/libschroedingerenc.c View File

@@ -164,17 +164,16 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext)
"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,


Loading…
Cancel
Save