[FFmpeg-devel] [PATCH] lavc: extend documentation for AVCodecContext:global_quality

Stefano Sabatini stefasab at gmail.com
Tue Mar 19 18:15:34 CET 2013


---
 doc/ffmpeg-codecs.texi     |   13 +++++++++++++
 libavcodec/options_table.h |    2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/doc/ffmpeg-codecs.texi b/doc/ffmpeg-codecs.texi
index 8f807c1..b365e1d 100644
--- a/doc/ffmpeg-codecs.texi
+++ b/doc/ffmpeg-codecs.texi
@@ -732,6 +732,19 @@ Set inter quant bias.
 @item color_table_id @var{integer}
 
 @item global_quality @var{integer} (@emph{encoding,audio,video})
+Set global constant quality for codecs which cannot change it per
+frame. Default value is 0.
+
+The value is expressed in lambda units, and can be converted to QP
+units using the equation @var{qp} = QP2LAMBDA * @var{lambda}, where
+QP2LAMBDA is 118.
+
+This value is honored only in case the option @option{flags +qscale}
+is set, otherwise the encoder will try to honour the compression rate
+specification set through @option{b} and related options.
+
+Note also that the exact interpretation of this parameter depends on
+the specific encoder.
 
 @item coder @var{integer} (@emph{encoding,video})
 
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index d7e2683..23cf7d9 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -263,7 +263,7 @@ static const AVOption options[]={
 {"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
 {"ibias", "intra quant bias", OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
 {"pbias", "inter quant bias", OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
-{"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
+{"global_quality", "set global quality expressed in lambda units", OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
 {"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"},
 {"vlc", "variable length coder / Huffman coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"},
 {"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"},
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list