Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-02-15 17:06:05 +0400
committerStefano Sabatini <stefasab@gmail.com>2013-02-16 03:08:31 +0400
commit2042cd37699f306cea011993e406e6e8d02b6897 (patch)
treebf9bc36c6e0fe4d6e5442fd31bdb0e8a452cbb78 /libavfilter/vf_unsharp.c
parent37b42bcb7db92a23da74f4e29fc11f810e8c6be5 (diff)
lavfi/unsharp: extend range for amount values, to reflect the behavior of mp=unsharp
Also update the documentation accordingly, and suggest a meaningful range.
Diffstat (limited to 'libavfilter/vf_unsharp.c')
-rw-r--r--libavfilter/vf_unsharp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index cf2d37a3cb..2170d651e7 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -36,6 +36,8 @@
* http://www.engin.umd.umich.edu/~jwvm/ece581/21_GBlur.pdf
*/
+#include <float.h> /* DBL_MAX */
+
#include "avfilter.h"
#include "formats.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 },
{ "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 },
- { "luma_amount", "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}, -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}, -DBL_MAX, DBL_MAX },
{ "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 },
{ "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 },
- { "chroma_amount", "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}, -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}, -DBL_MAX, DBL_MAX },
{ NULL }
};