mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi/unsharp: extend range for amount values, to reflect the behavior of mp=unsharp
Also update the documentation accordingly, and suggest a meaningful range.
This commit is contained in:
parent
37b42bcb7d
commit
2042cd3769
|
@ -4936,12 +4936,14 @@ Set the luma/chroma matrix vertical size. It can be an integer between
|
||||||
|
|
||||||
@item luma_amount, la
|
@item luma_amount, la
|
||||||
@item chroma_amount, ca
|
@item chroma_amount, ca
|
||||||
Set the luma/chroma effect strength. It can be a float number between
|
Set the luma/chroma effect strength. It can be a float number,
|
||||||
-2.0 and 5.0. Default value is 1.0 for @option{luma_amount}, 0.0 for
|
reasonable values lay between -1.5 and 1.5.
|
||||||
@option{chroma_amount}.
|
|
||||||
|
|
||||||
Negative values will blur the input video, while positive values will
|
Negative values will blur the input video, while positive values will
|
||||||
sharpen.
|
sharpen it, a value of zero will disable the effect.
|
||||||
|
|
||||||
|
Default value is 1.0 for @option{luma_amount}, 0.0 for
|
||||||
|
@option{chroma_amount}.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Some examples follow:
|
Some examples follow:
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_MAJOR 3
|
#define LIBAVFILTER_VERSION_MAJOR 3
|
||||||
#define LIBAVFILTER_VERSION_MINOR 37
|
#define LIBAVFILTER_VERSION_MINOR 37
|
||||||
#define LIBAVFILTER_VERSION_MICRO 102
|
#define LIBAVFILTER_VERSION_MICRO 103
|
||||||
|
|
||||||
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
|
||||||
LIBAVFILTER_VERSION_MINOR, \
|
LIBAVFILTER_VERSION_MINOR, \
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
* http://www.engin.umd.umich.edu/~jwvm/ece581/21_GBlur.pdf
|
* http://www.engin.umd.umich.edu/~jwvm/ece581/21_GBlur.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <float.h> /* DBL_MAX */
|
||||||
|
|
||||||
#include "avfilter.h"
|
#include "avfilter.h"
|
||||||
#include "formats.h"
|
#include "formats.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
@ -78,15 +80,15 @@ static const AVOption unsharp_options[] = {
|
||||||
{ "lx", "set luma matrix x size", OFFSET(luma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "lx", "set luma matrix x size", OFFSET(luma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "luma_msize_y", "set luma matrix y size", OFFSET(luma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "luma_msize_y", "set luma matrix y size", OFFSET(luma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "ly", "set luma matrix y size", OFFSET(luma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "ly", "set luma matrix y size", OFFSET(luma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "luma_amount", "set luma effect amount", OFFSET(luma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=1.0}, -2.0, 5.0 },
|
{ "luma_amount", "set luma effect amount", OFFSET(luma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=1.0}, -DBL_MAX, DBL_MAX },
|
||||||
{ "la", "set luma effect amount", OFFSET(luma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=1.0}, -2.0, 5.0 },
|
{ "la", "set luma effect amount", OFFSET(luma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=1.0}, -DBL_MAX, DBL_MAX },
|
||||||
|
|
||||||
{ "chroma_msize_x", "set chroma matrix x size", OFFSET(chroma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "chroma_msize_x", "set chroma matrix x size", OFFSET(chroma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "cx", "set chroma matrix x size", OFFSET(chroma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "cx", "set chroma matrix x size", OFFSET(chroma_msize_x), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "chroma_msize_y", "set chroma matrix y size", OFFSET(chroma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "chroma_msize_y", "set chroma matrix y size", OFFSET(chroma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "cy" , "set chroma matrix y size", OFFSET(chroma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
{ "cy" , "set chroma matrix y size", OFFSET(chroma_msize_y), AV_OPT_TYPE_INT, {.i64=5}, 3, 63 },
|
||||||
{ "chroma_amount", "set chroma effect strenght", OFFSET(chroma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -2.0, 5.0 },
|
{ "chroma_amount", "set chroma effect strenght", OFFSET(chroma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -DBL_MAX, DBL_MAX },
|
||||||
{ "ca", "set chroma effect strenght", OFFSET(chroma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -2.0, 5.0 },
|
{ "ca", "set chroma effect strenght", OFFSET(chroma_amount), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -DBL_MAX, DBL_MAX },
|
||||||
|
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue