diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-12-20 15:44:16 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-03-20 05:03:23 -0700 |
commit | 82bb3048013201c0095d2853d4623633d912252f (patch) | |
tree | 4b8e701fed59b8b2f37ac82c36143a69b67b7722 /libavcodec/x86 | |
parent | 0e083d7e43805db1a978cb57bfa25fda62e8ff18 (diff) | |
download | ffmpeg-82bb3048013201c0095d2853d4623633d912252f.tar.gz |
dsputil: Use correct type in me_cmp_func function pointer
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/dsputilenc.asm | 7 | ||||
-rw-r--r-- | libavcodec/x86/dsputilenc_mmx.c | 30 | ||||
-rw-r--r-- | libavcodec/x86/motion_est.c | 20 |
3 files changed, 30 insertions, 27 deletions
diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm index 2790a88036..f676ba63fd 100644 --- a/libavcodec/x86/dsputilenc.asm +++ b/libavcodec/x86/dsputilenc.asm @@ -209,8 +209,8 @@ hadamard8x8_diff %+ SUFFIX: hadamard8_16_wrapper %1, 3 %elif cpuflag(mmx) ALIGN 16 -; int ff_hadamard8_diff_ ## cpu(void *s, uint8_t *src1, uint8_t *src2, -; int stride, int h) +; int ff_hadamard8_diff_ ## cpu(MpegEncContext *s, uint8_t *src1, +; uint8_t *src2, int stride, int h) ; r0 = void *s = unused, int h = unused (always 8) ; note how r1, r2 and r3 are not clobbered in this function, so 16x16 ; can simply call this 2x2x (and that's why we access rsp+gprsize @@ -275,7 +275,8 @@ INIT_XMM ssse3 HADAMARD8_DIFF 9 INIT_XMM sse2 -; int ff_sse16_sse2(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h); +; int ff_sse16_sse2(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, +; int line_size, int h); cglobal sse16, 5, 5, 8 shr r4d, 1 pxor m0, m0 ; mm0 = 0 diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index 99f094e76e..705a7d16e2 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -41,7 +41,8 @@ int ff_pix_norm1_mmx(uint8_t *pix, int line_size); #if HAVE_INLINE_ASM -static int sse8_mmx(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) +static int sse8_mmx(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) { int tmp; @@ -105,7 +106,7 @@ static int sse8_mmx(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) return tmp; } -static int sse16_mmx(void *v, uint8_t *pix1, uint8_t *pix2, +static int sse16_mmx(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int tmp; @@ -414,10 +415,9 @@ static int hf_noise16_mmx(uint8_t *pix1, int line_size, int h) return tmp + hf_noise8_mmx(pix + 8, line_size, h); } -static int nsse16_mmx(void *p, uint8_t *pix1, uint8_t *pix2, +static int nsse16_mmx(MpegEncContext *c, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { - MpegEncContext *c = p; int score1, score2; if (c) @@ -433,10 +433,9 @@ static int nsse16_mmx(void *p, uint8_t *pix1, uint8_t *pix2, return score1 + FFABS(score2) * 8; } -static int nsse8_mmx(void *p, uint8_t *pix1, uint8_t *pix2, +static int nsse8_mmx(MpegEncContext *c, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { - MpegEncContext *c = p; int score1 = sse8_mmx(c, pix1, pix2, line_size, h); int score2 = hf_noise8_mmx(pix1, line_size, h) - hf_noise8_mmx(pix2, line_size, h); @@ -447,7 +446,7 @@ static int nsse8_mmx(void *p, uint8_t *pix1, uint8_t *pix2, return score1 + FFABS(score2) * 8; } -static int vsad_intra16_mmx(void *v, uint8_t *pix, uint8_t *dummy, +static int vsad_intra16_mmx(MpegEncContext *v, uint8_t *pix, uint8_t *dummy, int line_size, int h) { int tmp; @@ -511,7 +510,7 @@ static int vsad_intra16_mmx(void *v, uint8_t *pix, uint8_t *dummy, } #undef SUM -static int vsad_intra16_mmxext(void *v, uint8_t *pix, uint8_t *dummy, +static int vsad_intra16_mmxext(MpegEncContext *v, uint8_t *pix, uint8_t *dummy, int line_size, int h) { int tmp; @@ -554,7 +553,7 @@ static int vsad_intra16_mmxext(void *v, uint8_t *pix, uint8_t *dummy, } #undef SUM -static int vsad16_mmx(void *v, uint8_t *pix1, uint8_t *pix2, +static int vsad16_mmx(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int tmp; @@ -635,7 +634,7 @@ static int vsad16_mmx(void *v, uint8_t *pix1, uint8_t *pix2, } #undef SUM -static int vsad16_mmxext(void *v, uint8_t *pix1, uint8_t *pix2, +static int vsad16_mmxext(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int tmp; @@ -973,13 +972,14 @@ static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, #endif /* HAVE_INLINE_ASM */ -int ff_sse16_sse2(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h); +int ff_sse16_sse2(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h); #define hadamard_func(cpu) \ -int ff_hadamard8_diff_ ## cpu(void *s, uint8_t *src1, uint8_t *src2, \ - int stride, int h); \ -int ff_hadamard8_diff16_ ## cpu(void *s, uint8_t *src1, uint8_t *src2, \ - int stride, int h); + int ff_hadamard8_diff_ ## cpu(MpegEncContext *s, uint8_t *src1, \ + uint8_t *src2, int stride, int h); \ + int ff_hadamard8_diff16_ ## cpu(MpegEncContext *s, uint8_t *src1, \ + uint8_t *src2, int stride, int h); hadamard_func(mmx) hadamard_func(mmxext) diff --git a/libavcodec/x86/motion_est.c b/libavcodec/x86/motion_est.c index d126012e39..2b34a2897f 100644 --- a/libavcodec/x86/motion_est.c +++ b/libavcodec/x86/motion_est.c @@ -27,6 +27,7 @@ #include "libavutil/mem.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" +#include "libavcodec/mpegvideo.h" #include "dsputil_x86.h" #if HAVE_INLINE_ASM @@ -94,7 +95,8 @@ static inline void sad8_1_mmxext(uint8_t *blk1, uint8_t *blk2, : "r" ((x86_reg) stride)); } -static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) +static int sad16_sse2(MpegEncContext *v, uint8_t *blk2, uint8_t *blk1, + int stride, int h) { int ret; __asm__ volatile ( @@ -323,7 +325,7 @@ static inline void sad8_y2a_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) } #define PIX_SAD(suf) \ -static int sad8_ ## suf(void *v, uint8_t *blk2, \ +static int sad8_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ assert(h == 8); \ @@ -337,7 +339,7 @@ static int sad8_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad8_x2_ ## suf(void *v, uint8_t *blk2, \ +static int sad8_x2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ assert(h == 8); \ @@ -352,7 +354,7 @@ static int sad8_x2_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad8_y2_ ## suf(void *v, uint8_t *blk2, \ +static int sad8_y2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ assert(h == 8); \ @@ -367,7 +369,7 @@ static int sad8_y2_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad8_xy2_ ## suf(void *v, uint8_t *blk2, \ +static int sad8_xy2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ assert(h == 8); \ @@ -381,7 +383,7 @@ static int sad8_xy2_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad16_ ## suf(void *v, uint8_t *blk2, \ +static int sad16_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ __asm__ volatile ( \ @@ -395,7 +397,7 @@ static int sad16_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad16_x2_ ## suf(void *v, uint8_t *blk2, \ +static int sad16_x2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ __asm__ volatile ( \ @@ -410,7 +412,7 @@ static int sad16_x2_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad16_y2_ ## suf(void *v, uint8_t *blk2, \ +static int sad16_y2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ __asm__ volatile ( \ @@ -425,7 +427,7 @@ static int sad16_y2_ ## suf(void *v, uint8_t *blk2, \ return sum_ ## suf(); \ } \ \ -static int sad16_xy2_ ## suf(void *v, uint8_t *blk2, \ +static int sad16_xy2_ ## suf(MpegEncContext *v, uint8_t *blk2, \ uint8_t *blk1, int stride, int h) \ { \ __asm__ volatile ( \ |