[FFmpeg-devel] [PATCH] lavc: extend documentation for AVCodecContext:global_quality
Michael Niedermayer
michaelni at gmx.at
Sun Mar 24 03:51:29 CET 2013
On Tue, Mar 19, 2013 at 06:15:34PM +0100, Stefano Sabatini wrote:
> ---
> 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},
what are lambda units ?
global_quality is in distortion per bit units
for encoders conforming to the API (several do not)
all the mpegvideo encoders should conform
the value really just specifies how costly a bit is compared to
some distortion, which can be in various forms like sum of squared
differences or sum of absolute differences, ...
theres also some constant factor in there but that isnt important
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130324/fcb09ff4/attachment.asc>
More information about the ffmpeg-devel
mailing list