diff options
author | Andrey Utkin <andrey_utkin@fastmail.com> | 2016-05-05 15:37:49 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-06 03:47:36 +0200 |
commit | abb69a2f2ba830c0f2557663915a38a9e5b57e61 (patch) | |
tree | ee88fd6ed7ba03037dd00f592501f1c9c2070cc2 | |
parent | 1d4400ac7fb057cbfff62ab4ce72e7b19c68f929 (diff) | |
download | ffmpeg-abb69a2f2ba830c0f2557663915a38a9e5b57e61.tar.gz |
avcodec: Add "sar" alias to "aspect" option of video encoders
It is impossible to pass "aspect" parameter to encoder from ffmpeg CLI
because option from lavc/options_table.h is eclipsed by option with same
name in ffmpeg_opt.c, which has different meaning (DAR, not SAR).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | doc/codecs.texi | 3 | ||||
-rw-r--r-- | libavcodec/options_table.h | 1 | ||||
-rw-r--r-- | tests/ref/fate/api-mjpeg-codec-param | 2 | ||||
-rw-r--r-- | tests/ref/fate/api-png-codec-param | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/doc/codecs.texi b/doc/codecs.texi index ad99fa6906..a18ce8d4b4 100644 --- a/doc/codecs.texi +++ b/doc/codecs.texi @@ -456,6 +456,9 @@ Possible values: @item aspect @var{rational number} (@emph{encoding,video}) Set sample aspect ratio. +@item sar @var{rational number} (@emph{encoding,video}) +Set sample aspect ratio. Alias to @var{aspect}. + @item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) Print specific debug info. diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 9be2338e1b..262ea980aa 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -254,6 +254,7 @@ static const AVOption avcodec_options[] = { {"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, #endif {"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, +{"sar", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, {"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, {"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, {"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, diff --git a/tests/ref/fate/api-mjpeg-codec-param b/tests/ref/fate/api-mjpeg-codec-param index 26822fdf91..c67d1b1ab0 100644 --- a/tests/ref/fate/api-mjpeg-codec-param +++ b/tests/ref/fate/api-mjpeg-codec-param @@ -62,6 +62,7 @@ stream=0, decode=0 bits_per_coded_sample=0 pred=0 aspect=180/180 + sar=180/180 debug=0x00000000 vismv=0x00000000 cmp=0 @@ -218,6 +219,7 @@ stream=0, decode=1 bits_per_coded_sample=0 pred=0 aspect=180/180 + sar=180/180 debug=0x00000000 vismv=0x00000000 cmp=0 diff --git a/tests/ref/fate/api-png-codec-param b/tests/ref/fate/api-png-codec-param index 46ac8ebf06..bd53441894 100644 --- a/tests/ref/fate/api-png-codec-param +++ b/tests/ref/fate/api-png-codec-param @@ -62,6 +62,7 @@ stream=0, decode=0 bits_per_coded_sample=0 pred=0 aspect=2835/2835 + sar=2835/2835 debug=0x00000000 vismv=0x00000000 cmp=0 @@ -218,6 +219,7 @@ stream=0, decode=1 bits_per_coded_sample=0 pred=0 aspect=2835/2835 + sar=2835/2835 debug=0x00000000 vismv=0x00000000 cmp=0 |