Commit 4096bb17 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_unsharp: limit matrix size in either direction to 23

Anything bigger is not supported anyway.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent d790887d
...@@ -13434,11 +13434,11 @@ It accepts the following parameters: ...@@ -13434,11 +13434,11 @@ It accepts the following parameters:
@table @option @table @option
@item luma_msize_x, lx @item luma_msize_x, lx
Set the luma matrix horizontal size. It must be an odd integer between Set the luma matrix horizontal size. It must be an odd integer between
3 and 63. The default value is 5. 3 and 23. The default value is 5.
@item luma_msize_y, ly @item luma_msize_y, ly
Set the luma matrix vertical size. It must be an odd integer between 3 Set the luma matrix vertical size. It must be an odd integer between 3
and 63. The default value is 5. and 23. The default value is 5.
@item luma_amount, la @item luma_amount, la
Set the luma effect strength. It must be a floating point number, reasonable Set the luma effect strength. It must be a floating point number, reasonable
...@@ -13451,11 +13451,11 @@ Default value is 1.0. ...@@ -13451,11 +13451,11 @@ Default value is 1.0.
@item chroma_msize_x, cx @item chroma_msize_x, cx
Set the chroma matrix horizontal size. It must be an odd integer Set the chroma matrix horizontal size. It must be an odd integer
between 3 and 63. The default value is 5. between 3 and 23. The default value is 5.
@item chroma_msize_y, cy @item chroma_msize_y, cy
Set the chroma matrix vertical size. It must be an odd integer Set the chroma matrix vertical size. It must be an odd integer
between 3 and 63. The default value is 5. between 3 and 23. The default value is 5.
@item chroma_amount, ca @item chroma_amount, ca
Set the chroma effect strength. It must be a floating point number, reasonable Set the chroma effect strength. It must be a floating point number, reasonable
......
...@@ -266,7 +266,7 @@ end: ...@@ -266,7 +266,7 @@ end:
#define OFFSET(x) offsetof(UnsharpContext, x) #define OFFSET(x) offsetof(UnsharpContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
#define MIN_SIZE 3 #define MIN_SIZE 3
#define MAX_SIZE 63 #define MAX_SIZE 23
static const AVOption unsharp_options[] = { static const AVOption unsharp_options[] = {
{ "luma_msize_x", "set luma matrix horizontal size", OFFSET(lmsize_x), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS }, { "luma_msize_x", "set luma matrix horizontal size", OFFSET(lmsize_x), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS },
{ "lx", "set luma matrix horizontal size", OFFSET(lmsize_x), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS }, { "lx", "set luma matrix horizontal size", OFFSET(lmsize_x), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment