diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-16 22:04:14 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-20 14:58:25 -0800 |
commit | 3ab9a2a5577d445252724af4067d2a7c8a378efa (patch) | |
tree | 8c0b8f83376754549ca57b1e027571342173966a /libavcodec/rv40dsp.c | |
parent | 770a5c6d025e9c8eb3f5aba9cf1d7d7938fb918a (diff) | |
download | ffmpeg-3ab9a2a5577d445252724af4067d2a7c8a378efa.tar.gz |
rv34: change most "int stride" into "ptrdiff_t stride".
This prevents having to sign-extend on 64-bit systems with 32-bit ints,
such as x86-64. Also fixes crashes on systems where we don't do it and
arguments are not in registers, such as Win64 for all weight functions.
Diffstat (limited to 'libavcodec/rv40dsp.c')
-rw-r--r-- | libavcodec/rv40dsp.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/rv40dsp.c b/libavcodec/rv40dsp.c index 909ccd1732..c12958a89c 100644 --- a/libavcodec/rv40dsp.c +++ b/libavcodec/rv40dsp.c @@ -278,7 +278,7 @@ RV40_CHROMA_MC(put_, op_put) RV40_CHROMA_MC(avg_, op_avg) #define RV40_WEIGHT_FUNC(size) \ -static void rv40_weight_func_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, int stride)\ +static void rv40_weight_func_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, ptrdiff_t stride)\ {\ int i, j;\ \ @@ -316,7 +316,7 @@ static const uint8_t rv40_dither_r[16] = { */ static av_always_inline void rv40_weak_loop_filter(uint8_t *src, const int step, - const int stride, + const ptrdiff_t stride, const int filter_p1, const int filter_q1, const int alpha, @@ -362,7 +362,7 @@ static av_always_inline void rv40_weak_loop_filter(uint8_t *src, } } -static void rv40_h_weak_loop_filter(uint8_t *src, const int stride, +static void rv40_h_weak_loop_filter(uint8_t *src, const ptrdiff_t stride, const int filter_p1, const int filter_q1, const int alpha, const int beta, const int lim_p0q0, const int lim_q1, @@ -372,7 +372,7 @@ static void rv40_h_weak_loop_filter(uint8_t *src, const int stride, alpha, beta, lim_p0q0, lim_q1, lim_p1); } -static void rv40_v_weak_loop_filter(uint8_t *src, const int stride, +static void rv40_v_weak_loop_filter(uint8_t *src, const ptrdiff_t stride, const int filter_p1, const int filter_q1, const int alpha, const int beta, const int lim_p0q0, const int lim_q1, @@ -384,7 +384,7 @@ static void rv40_v_weak_loop_filter(uint8_t *src, const int stride, static av_always_inline void rv40_strong_loop_filter(uint8_t *src, const int step, - const int stride, + const ptrdiff_t stride, const int alpha, const int lims, const int dmode, @@ -440,14 +440,14 @@ static av_always_inline void rv40_strong_loop_filter(uint8_t *src, } } -static void rv40_h_strong_loop_filter(uint8_t *src, const int stride, +static void rv40_h_strong_loop_filter(uint8_t *src, const ptrdiff_t stride, const int alpha, const int lims, const int dmode, const int chroma) { rv40_strong_loop_filter(src, stride, 1, alpha, lims, dmode, chroma); } -static void rv40_v_strong_loop_filter(uint8_t *src, const int stride, +static void rv40_v_strong_loop_filter(uint8_t *src, const ptrdiff_t stride, const int alpha, const int lims, const int dmode, const int chroma) { @@ -455,7 +455,7 @@ static void rv40_v_strong_loop_filter(uint8_t *src, const int stride, } static av_always_inline int rv40_loop_filter_strength(uint8_t *src, - int step, int stride, + int step, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1) @@ -490,14 +490,14 @@ static av_always_inline int rv40_loop_filter_strength(uint8_t *src, return strong0 && strong1; } -static int rv40_h_loop_filter_strength(uint8_t *src, int stride, +static int rv40_h_loop_filter_strength(uint8_t *src, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1) { return rv40_loop_filter_strength(src, stride, 1, beta, beta2, edge, p1, q1); } -static int rv40_v_loop_filter_strength(uint8_t *src, int stride, +static int rv40_v_loop_filter_strength(uint8_t *src, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1) { |