diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-03-08 22:40:03 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-03-12 18:26:42 +0100 |
commit | a8b6015823e628047a45916404c00044c5e80415 (patch) | |
tree | 8568a5d96ba659cb3ac672bed3d0988ea6a4eb34 /libavcodec/x86 | |
parent | a4472ac01e86f9fae5adb9034f2777b86a9c5480 (diff) | |
download | ffmpeg-a8b6015823e628047a45916404c00044c5e80415.tar.gz |
dsputil: convert remaining functions to use ptrdiff_t strides
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/cavsdsp.c | 12 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 86 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.h | 18 | ||||
-rw-r--r-- | libavcodec/x86/h264_qpel.c | 58 | ||||
-rw-r--r-- | libavcodec/x86/rv40dsp_init.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/vc1dsp_init.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/vc1dsp_mmx.c | 9 |
7 files changed, 108 insertions, 79 deletions
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c index 3e36ed04c0..8574588929 100644 --- a/libavcodec/x86/cavsdsp.c +++ b/libavcodec/x86/cavsdsp.c @@ -409,19 +409,23 @@ static void OPNAME ## cavs_qpel16_h_ ## MMX(uint8_t *dst, uint8_t *src, int dstS }\ #define CAVS_MC(OPNAME, SIZE, MMX) \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## cavs_qpel ## SIZE ## _h_ ## MMX(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## cavs_qpel ## SIZE ## _v1_ ## MMX(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## cavs_qpel ## SIZE ## _v2_ ## MMX(dst, src, stride, stride);\ }\ \ -static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ OPNAME ## cavs_qpel ## SIZE ## _v3_ ## MMX(dst, src, stride, stride);\ }\ diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index a13e9a11d9..aa7b3984aa 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -460,7 +460,7 @@ void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, } static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, - int line_size, int h) + ptrdiff_t line_size, int h) { __asm__ volatile ( "lea (%3, %3), %%"REG_a" \n\t" @@ -487,7 +487,7 @@ static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, } static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, - int line_size, int h) + ptrdiff_t line_size, int h) { __asm__ volatile ( "lea (%3, %3), %%"REG_a" \n\t" @@ -750,13 +750,13 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, #if HAVE_YASM #define QPEL_OP(OPNAME, ROUNDER, RND, MMX) \ static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## pixels8_ ## MMX(dst, src, stride, 8); \ } \ \ static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[8]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -767,14 +767,14 @@ static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## mpeg4_qpel8_h_lowpass_ ## MMX(dst, src, stride, \ stride, 8); \ } \ \ static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[8]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -785,7 +785,7 @@ static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[8]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -796,14 +796,14 @@ static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, src, \ stride, stride); \ } \ \ static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[8]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -814,7 +814,7 @@ static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -829,7 +829,7 @@ static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -844,7 +844,7 @@ static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -859,7 +859,7 @@ static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -874,7 +874,7 @@ static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -887,7 +887,7 @@ static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half) + 64; \ @@ -900,7 +900,7 @@ static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -913,7 +913,7 @@ static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -926,7 +926,7 @@ static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[9]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -937,13 +937,13 @@ static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## pixels16_ ## MMX(dst, src, stride, 16); \ } \ \ static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[32]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -954,14 +954,14 @@ static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## mpeg4_qpel16_h_lowpass_ ## MMX(dst, src, \ stride, stride, 16);\ } \ \ static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[32]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -972,7 +972,7 @@ static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[32]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -983,14 +983,14 @@ static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, src, \ stride, stride); \ } \ \ static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t temp[32]; \ uint8_t * const half = (uint8_t*)temp; \ @@ -1001,7 +1001,7 @@ static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1017,7 +1017,7 @@ static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1033,7 +1033,7 @@ static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1049,7 +1049,7 @@ static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1065,7 +1065,7 @@ static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1079,7 +1079,7 @@ static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half) + 256; \ @@ -1093,7 +1093,7 @@ static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -1106,7 +1106,7 @@ static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -1119,7 +1119,7 @@ static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ } \ \ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ uint8_t * const halfH = ((uint8_t*)half); \ @@ -1136,19 +1136,19 @@ QPEL_OP(put_no_rnd_, ff_pw_15, _no_rnd_, mmxext) #if HAVE_INLINE_ASM -void ff_put_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, int stride) +void ff_put_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { put_pixels8_xy2_mmx(dst, src, stride, 8); } -void ff_put_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, int stride) +void ff_put_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { put_pixels16_xy2_mmx(dst, src, stride, 16); } -void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, int stride) +void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { avg_pixels8_xy2_mmx(dst, src, stride, 8); } -void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, int stride) +void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { avg_pixels16_xy2_mmx(dst, src, stride, 16); } @@ -1278,29 +1278,29 @@ void ff_avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, #if HAVE_INLINE_ASM /* CAVS-specific */ -void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride) +void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { put_pixels8_mmx(dst, src, stride, 8); } -void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride) +void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { avg_pixels8_mmx(dst, src, stride, 8); } -void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride) +void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { put_pixels16_mmx(dst, src, stride, 16); } -void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride) +void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride) { avg_pixels16_mmx(dst, src, stride, 16); } /* VC-1-specific */ void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, - int stride, int rnd) + ptrdiff_t stride, int rnd) { put_pixels8_mmx(dst, src, stride, 8); } diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h index 78cbd1e408..e4880c0976 100644 --- a/libavcodec/x86/dsputil_mmx.h +++ b/libavcodec/x86/dsputil_mmx.h @@ -92,17 +92,17 @@ void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int void ff_avg_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h); -void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); -void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); -void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); -void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); +void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride); +void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride); +void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride); +void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, ptrdiff_t stride); -void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd); +void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int rnd); -void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); -void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); -void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); -void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); +void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, ptrdiff_t stride); +void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, ptrdiff_t stride); +void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, ptrdiff_t stride); +void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, ptrdiff_t stride); void ff_deinterlace_line_mmx(uint8_t *dst, const uint8_t *lum_m4, const uint8_t *lum_m3, diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index 921f270648..5b3a287d12 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -250,81 +250,98 @@ H264_MC_V(OPNAME, SIZE, MMX, ALIGN)\ H264_MC_H(OPNAME, SIZE, MMX, ALIGN)\ H264_MC_HV(OPNAME, SIZE, MMX, ALIGN)\ -static void put_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, int stride){ +static void put_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, + ptrdiff_t stride) +{ ff_put_pixels16_sse2(dst, src, stride, 16); } -static void avg_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, int stride){ +static void avg_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, + ptrdiff_t stride) +{ ff_avg_pixels16_sse2(dst, src, stride, 16); } #define put_h264_qpel8_mc00_sse2 put_h264_qpel8_mc00_mmxext #define avg_h264_qpel8_mc00_sse2 avg_h264_qpel8_mc00_mmxext #define H264_MC_C(OPNAME, SIZE, MMX, ALIGN) \ -static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## MMX (uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ ff_ ## OPNAME ## pixels ## SIZE ## _ ## MMX(dst, src, stride, SIZE);\ }\ #define H264_MC_H(OPNAME, SIZE, MMX, ALIGN) \ -static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, src, stride, stride);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_ ## MMX(dst, src, stride, stride);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, src+1, stride, stride);\ }\ #define H264_MC_V(OPNAME, SIZE, MMX, ALIGN) \ -static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\ ff_ ## OPNAME ## pixels ## SIZE ## _l2_ ## MMX(dst, src, temp, stride, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _v_lowpass_ ## MMX(dst, src, stride, stride);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\ ff_ ## OPNAME ## pixels ## SIZE ## _l2_ ## MMX(dst, src+stride, temp, stride, stride, SIZE);\ }\ #define H264_MC_HV(OPNAME, SIZE, MMX, ALIGN) \ -static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, temp, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src+1, SIZE, stride);\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, temp, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, temp, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\ ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src+1, SIZE, stride);\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, temp, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint16_t, temp)[SIZE*(SIZE<8?12:24)];\ ff_ ## OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(dst, temp, src, stride, SIZE, stride);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\ uint8_t * const halfHV= temp;\ int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\ @@ -333,7 +350,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## MMX(uint8_t *dst, uint8_t * ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, halfHV, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\ uint8_t * const halfHV= temp;\ int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\ @@ -342,7 +360,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## MMX(uint8_t *dst, uint8_t * ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, halfHV, stride, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\ uint8_t * const halfHV= temp;\ int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\ @@ -351,7 +370,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## MMX(uint8_t *dst, uint8_t * ff_ ## OPNAME ## pixels ## SIZE ## _l2_shift5_mmxext(dst, halfV+2, halfHV, stride, SIZE, SIZE);\ }\ \ -static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ +static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## MMX(uint8_t *dst, uint8_t *src, ptrdiff_t stride)\ +{\ DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\ uint8_t * const halfHV= temp;\ int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\ @@ -398,7 +418,7 @@ H264_MC_816(H264_MC_HV, ssse3) //10bit #define LUMA_MC_OP(OP, NUM, DEPTH, TYPE, OPT) \ void ff_ ## OP ## _h264_qpel ## NUM ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT \ - (uint8_t *dst, uint8_t *src, int stride); + (uint8_t *dst, uint8_t *src, ptrdiff_t stride); #define LUMA_MC_ALL(DEPTH, TYPE, OPT) \ LUMA_MC_OP(put, 4, DEPTH, TYPE, OPT) \ diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c index 9454e3813b..37f6c2623c 100644 --- a/libavcodec/x86/rv40dsp_init.c +++ b/libavcodec/x86/rv40dsp_init.c @@ -71,7 +71,7 @@ DECLARE_WEIGHT(ssse3) #define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT) \ static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst, \ uint8_t *src, \ - int stride) \ + ptrdiff_t stride) \ { \ int i; \ if (PH && PV) { \ diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index 3f0b67ce67..228f4dc03e 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -63,7 +63,7 @@ static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq) } static void avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src, - int stride, int rnd) + ptrdiff_t stride, int rnd) { ff_avg_pixels8_mmxext(dst, src, stride, 8); } diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index 9db8f9e85c..048ffd8ee0 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -463,12 +463,17 @@ VC1_MSPEL_MC(avg_) /** Macro to ease bicubic filter interpolation functions declarations */ #define DECLARE_FUNCTION(a, b) \ -static void put_vc1_mspel_mc ## a ## b ## _mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \ +static void put_vc1_mspel_mc ## a ## b ## _mmx(uint8_t *dst, \ + const uint8_t *src, \ + ptrdiff_t stride, \ + int rnd) \ +{ \ put_vc1_mspel_mc(dst, src, stride, a, b, rnd); \ }\ static void avg_vc1_mspel_mc ## a ## b ## _mmxext(uint8_t *dst, \ const uint8_t *src, \ - int stride, int rnd) \ + ptrdiff_t stride, \ + int rnd) \ { \ avg_vc1_mspel_mc(dst, src, stride, a, b, rnd); \ } |