Commit 467c0338 authored by Maximilian Seesslen's avatar Maximilian Seesslen Committed by Michael Niedermayer

fixed granularity of video quality when encoding with theora codec

The floating point version of av_clip has to be used when converting the quality level.
Signed-off-by: 's avatarMaximilian Seesslen <mes@seesslen.net>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c98d3056
......@@ -212,7 +212,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
* 0 <= p <=63
* an int value
*/
t_info.quality = av_clip(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
t_info.quality = av_clipf(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
t_info.target_bitrate = 0;
} else {
t_info.target_bitrate = avc_context->bit_rate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment