summaryrefslogtreecommitdiff
path: root/libavcodec/libtheoraenc.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-03-19 13:19:12 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-03-30 16:58:40 +0100
commit37fce84e2718631e1d6a5ead16510df591d43151 (patch)
tree55aad624e285c0c349e2e57f58289907a1e4832c /libavcodec/libtheoraenc.c
parentb448c0a68d0cc7dfef736267dfdaed0e213c020b (diff)
lavc/libtheoraenc: clarify comment about global_quality to quality conversion
Diffstat (limited to 'libavcodec/libtheoraenc.c')
-rw-r--r--libavcodec/libtheoraenc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 893370fb52..a2e5b74cb6 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -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);
if (avc_context->flags & CODEC_FLAG_QSCALE) {
- /* to be constant with the libvorbis implementation, clip global_quality to 0 - 10
- Theora accepts a quality parameter p, which is:
- * 0 <= p <=63
- * an int value
- */
+ /* Clip global_quality in QP units to the [0 - 10] range
+ to be consistent with the libvorbis implementation.
+ Theora accepts a quality parameter which is an int value in
+ the [0 - 63] range.
+ */
t_info.quality = av_clipf(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
t_info.target_bitrate = 0;
} else {