[FFmpeg-devel] [PATCH v2] avfilter/vf_v360: adjustment out_pad and in_pad maximum value to 1/10

Steven Liu lq at chinaffmpeg.org
Sun Apr 26 17:43:54 EEST 2020



> 2020年4月21日 下午10:54,Steven Liu <lq at chinaffmpeg.org> 写道:
> 
> Because not every user know about in_pad and out_pad reasonable value range
> so maybe try to set 1.0, but setting 1.0 is so hugh to get an fatal error.
> 
> Suggested-by: Paul B Mahol <onemda at gmail.com>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> doc/filters.texi      | 1 +
> libavfilter/vf_v360.c | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 80c33f5edb..740aba0642 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -18956,6 +18956,7 @@ No padding.
> @end table
> 
> Default value is @b{@samp{0}}.
> +Maximum value is @b{@samp{0.1}}.
> 
> @item fin_pad
> @item fout_pad
> diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
> index ebc281dfca..e5b75c7226 100644
> --- a/libavfilter/vf_v360.c
> +++ b/libavfilter/vf_v360.c
> @@ -133,8 +133,8 @@ static const AVOption v360_options[] = {
>     {"out_forder", "output cubemap face order", OFFSET(out_forder), AV_OPT_TYPE_STRING, {.str="rludfb"},        0,     NB_DIRECTIONS-1, FLAGS, "out_forder"},
>     {   "in_frot", "input cubemap face rotation",  OFFSET(in_frot), AV_OPT_TYPE_STRING, {.str="000000"},        0,     NB_DIRECTIONS-1, FLAGS, "in_frot"},
>     {  "out_frot", "output cubemap face rotation",OFFSET(out_frot), AV_OPT_TYPE_STRING, {.str="000000"},        0,     NB_DIRECTIONS-1, FLAGS, "out_frot"},
> -    {    "in_pad", "percent input cubemap pads",    OFFSET(in_pad), AV_OPT_TYPE_FLOAT,  {.dbl=0.f},           0.f,                 1.f,TFLAGS, "in_pad"},
> -    {   "out_pad", "percent output cubemap pads",  OFFSET(out_pad), AV_OPT_TYPE_FLOAT,  {.dbl=0.f},           0.f,                 1.f,TFLAGS, "out_pad"},
> +    {    "in_pad", "percent input cubemap pads",    OFFSET(in_pad), AV_OPT_TYPE_FLOAT,  {.dbl=0.f},           0.f,                 0.1,TFLAGS, "in_pad"},
> +    {   "out_pad", "percent output cubemap pads",  OFFSET(out_pad), AV_OPT_TYPE_FLOAT,  {.dbl=0.f},           0.f,                 0.1,TFLAGS, "out_pad"},
>     {   "fin_pad", "fixed input cubemap pads",     OFFSET(fin_pad), AV_OPT_TYPE_INT,    {.i64=0},               0,                 100,TFLAGS, "fin_pad"},
>     {  "fout_pad", "fixed output cubemap pads",   OFFSET(fout_pad), AV_OPT_TYPE_INT,    {.i64=0},               0,                 100,TFLAGS, "fout_pad"},
>     {       "yaw", "yaw rotation",                     OFFSET(yaw), AV_OPT_TYPE_FLOAT,  {.dbl=0.f},        -180.f,               180.f,TFLAGS, "yaw"},
> -- 
> 2.25.0
> 


Ping

Thanks

Steven Liu





More information about the ffmpeg-devel mailing list