diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-25 17:49:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-14 23:04:43 +0200 |
commit | a770a61e6d6eee8fffe9f0f488679ee98467c1f6 (patch) | |
tree | c2aa5ef475430ccdf6d9a9357e13b11fdb964e72 | |
parent | b2111ad4df29594534426fb7d206035ba2aef944 (diff) | |
download | ffmpeg-a770a61e6d6eee8fffe9f0f488679ee98467c1f6.tar.gz |
avfilter/vf_pullup: use ptrdiff_t as stride argument for dsp functions
This should avoid issues on x86_64
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6dffc8f5aaab6b20385f0a0d9ef95cec7d6cdd4b)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/vf_pullup.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_pullup.h | 6 | ||||
-rw-r--r-- | libavfilter/x86/vf_pullup_init.c | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 5b448dd313..c87b4b3801 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -69,7 +69,7 @@ static int query_formats(AVFilterContext *ctx) #define ABS(a) (((a) ^ ((a) >> 31)) - ((a) >> 31)) -static int diff_c(const uint8_t *a, const uint8_t *b, int s) +static int diff_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, diff = 0; @@ -83,7 +83,7 @@ static int diff_c(const uint8_t *a, const uint8_t *b, int s) return diff; } -static int comb_c(const uint8_t *a, const uint8_t *b, int s) +static int comb_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, comb = 0; @@ -98,7 +98,7 @@ static int comb_c(const uint8_t *a, const uint8_t *b, int s) return comb; } -static int var_c(const uint8_t *a, const uint8_t *b, int s) +static int var_c(const uint8_t *a, const uint8_t *b, ptrdiff_t s) { int i, j, var = 0; @@ -531,7 +531,7 @@ static void pullup_release_frame(PullupFrame *f) static void compute_metric(PullupContext *s, int *dest, PullupField *fa, int pa, PullupField *fb, int pb, - int (*func)(const uint8_t *, const uint8_t *, int)) + int (*func)(const uint8_t *, const uint8_t *, ptrdiff_t)) { int mp = s->metric_plane; int xstep = 8; diff --git a/libavfilter/vf_pullup.h b/libavfilter/vf_pullup.h index 3213b4d231..8f59335180 100644 --- a/libavfilter/vf_pullup.h +++ b/libavfilter/vf_pullup.h @@ -61,9 +61,9 @@ typedef struct PullupContext { PullupBuffer buffers[10]; PullupFrame frame; - int (*diff)(const uint8_t *a, const uint8_t *b, int s); - int (*comb)(const uint8_t *a, const uint8_t *b, int s); - int (*var )(const uint8_t *a, const uint8_t *b, int s); + int (*diff)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*comb)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*var )(const uint8_t *a, const uint8_t *b, ptrdiff_t s); } PullupContext; void ff_pullup_init_x86(PullupContext *s); diff --git a/libavfilter/x86/vf_pullup_init.c b/libavfilter/x86/vf_pullup_init.c index 9948abf13e..5b36b68e51 100644 --- a/libavfilter/x86/vf_pullup_init.c +++ b/libavfilter/x86/vf_pullup_init.c @@ -23,9 +23,9 @@ #include "libavutil/x86/cpu.h" #include "libavfilter/vf_pullup.h" -int ff_pullup_filter_diff_mmx(const uint8_t *a, const uint8_t *b, int s); -int ff_pullup_filter_comb_mmx(const uint8_t *a, const uint8_t *b, int s); -int ff_pullup_filter_var_mmx (const uint8_t *a, const uint8_t *b, int s); +int ff_pullup_filter_diff_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s); +int ff_pullup_filter_comb_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s); +int ff_pullup_filter_var_mmx (const uint8_t *a, const uint8_t *b, ptrdiff_t s); av_cold void ff_pullup_init_x86(PullupContext *s) { |