Commit 37fce84e authored by Stefano Sabatini's avatar Stefano Sabatini

lavc/libtheoraenc: clarify comment about global_quality to quality conversion

parent b448c0a6
...@@ -207,11 +207,11 @@ static av_cold int encode_init(AVCodecContext* avc_context) ...@@ -207,11 +207,11 @@ static av_cold int encode_init(AVCodecContext* avc_context)
avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift); avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
if (avc_context->flags & CODEC_FLAG_QSCALE) { if (avc_context->flags & CODEC_FLAG_QSCALE) {
/* to be constant with the libvorbis implementation, clip global_quality to 0 - 10 /* Clip global_quality in QP units to the [0 - 10] range
Theora accepts a quality parameter p, which is: to be consistent with the libvorbis implementation.
* 0 <= p <=63 Theora accepts a quality parameter which is an int value in
* an int value the [0 - 63] range.
*/ */
t_info.quality = av_clipf(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; t_info.target_bitrate = 0;
} else { } else {
......
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