diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-13 00:44:08 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-02-15 01:06:56 +0100 |
commit | 7ac3ccc5f238960cdf9e9c525c638d9f724031aa (patch) | |
tree | a1d80fa4bbcd979d2a48b0adf911bccda777a25d /libavfilter/vf_unsharp.c | |
parent | 772b949d8eea8ad74a370aab3926691076e9dcd4 (diff) | |
download | ffmpeg-7ac3ccc5f238960cdf9e9c525c638d9f724031aa.tar.gz |
lavfi/unsharp: use the same macros used in the original MP filter
Remove possibly pointless inconsistency with the ported code.
Also specify parameter value ranges consistent with those of the ported
filter.
Diffstat (limited to 'libavfilter/vf_unsharp.c')
-rw-r--r-- | libavfilter/vf_unsharp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 3a9b0b6849..3949687a23 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -44,8 +44,8 @@ #include "libavutil/mem.h" #include "libavutil/pixdesc.h" -#define MIN_SIZE 3 -#define MAX_SIZE 13 +#define MIN_MATRIX_SIZE 3 +#define MAX_MATRIX_SIZE 63 /* right-shift and round-up */ #define SHIFTUP(x,shift) (-((-(x))>>(shift))) @@ -58,7 +58,7 @@ typedef struct FilterParam { int steps_y; ///< vertical step count int scalebits; ///< bits to shift pixel int32_t halfscale; ///< amount to add to pixel - uint32_t *sc[(MAX_SIZE * MAX_SIZE) - 1]; ///< finite state machine storage + uint32_t *sc[MAX_MATRIX_SIZE - 1]; ///< finite state machine storage } FilterParam; typedef struct { @@ -72,7 +72,7 @@ static void apply_unsharp( uint8_t *dst, int dst_stride, int width, int height, FilterParam *fp) { uint32_t **sc = fp->sc; - uint32_t sr[(MAX_SIZE * MAX_SIZE) - 1], tmp1, tmp2; + uint32_t sr[MAX_MATRIX_SIZE - 1], tmp1, tmp2; int32_t res; int x, y, z; |