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/dsputil.c | |
parent | 0e083d7e43805db1a978cb57bfa25fda62e8ff18 (diff) | |
download | ffmpeg-82bb3048013201c0095d2853d4623633d912252f.tar.gz |
dsputil: Use correct type in me_cmp_func function pointer
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 67 |
1 files changed, 31 insertions, 36 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 76f20e0ad7..9fe6f0b757 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -252,7 +252,8 @@ static void bswap16_buf(uint16_t *dst, const uint16_t *src, int len) *dst++ = av_bswap16(*src++); } -static int sse4_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) +static int sse4_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) { int s = 0, i; uint32_t *sq = ff_square_tab + 256; @@ -268,7 +269,8 @@ static int sse4_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) return s; } -static int sse8_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) +static int sse8_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) { int s = 0, i; uint32_t *sq = ff_square_tab + 256; @@ -288,7 +290,8 @@ static int sse8_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) return s; } -static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) +static int sse16_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) { int s = 0, i; uint32_t *sq = ff_square_tab + 256; @@ -1633,7 +1636,7 @@ static void put_mspel8_mc22_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride) wmv2_mspel8_v_lowpass(dst, halfH + 8, stride, 8, 8); } -static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, +static inline int pix_abs16_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1661,7 +1664,7 @@ static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs16_x2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs16_x2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1689,7 +1692,7 @@ static int pix_abs16_x2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs16_y2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs16_y2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1719,7 +1722,7 @@ static int pix_abs16_y2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs16_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs16_xy2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1749,7 +1752,7 @@ static int pix_abs16_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static inline int pix_abs8_c(void *v, uint8_t *pix1, uint8_t *pix2, +static inline int pix_abs8_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1769,7 +1772,7 @@ static inline int pix_abs8_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs8_x2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs8_x2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1789,7 +1792,7 @@ static int pix_abs8_x2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs8_y2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs8_y2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1811,7 +1814,7 @@ static int pix_abs8_y2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int pix_abs8_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, +static int pix_abs8_xy2_c(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { int s = 0, i; @@ -1833,9 +1836,8 @@ static int pix_abs8_xy2_c(void *v, uint8_t *pix1, uint8_t *pix2, return s; } -static int nsse16_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h) +static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h) { - MpegEncContext *c = v; int score1 = 0, score2 = 0, x, y; for (y = 0; y < h; y++) { @@ -1858,9 +1860,8 @@ static int nsse16_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h) return score1 + FFABS(score2) * 8; } -static int nsse8_c(void *v, uint8_t *s1, uint8_t *s2, int stride, int h) +static int nsse8_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h) { - MpegEncContext *c = v; int score1 = 0, score2 = 0, x, y; for (y = 0; y < h; y++) { @@ -1912,7 +1913,8 @@ static void add_8x8basis_c(int16_t rem[64], int16_t basis[64], int scale) (BASIS_SHIFT - RECON_SHIFT); } -static int zero_cmp(void *s, uint8_t *a, uint8_t *b, int stride, int h) +static int zero_cmp(MpegEncContext *s, uint8_t *a, uint8_t *b, + int stride, int h) { return 0; } @@ -2128,7 +2130,7 @@ static void add_hfyu_left_prediction_bgr32_c(uint8_t *dst, const uint8_t *src, #define BUTTERFLYA(x, y) (FFABS((x) + (y)) + FFABS((x) - (y))) -static int hadamard8_diff8x8_c(/* MpegEncContext */ void *s, uint8_t *dst, +static int hadamard8_diff8x8_c(MpegEncContext *s, uint8_t *dst, uint8_t *src, int stride, int h) { int i, temp[64], sum = 0; @@ -2180,7 +2182,7 @@ static int hadamard8_diff8x8_c(/* MpegEncContext */ void *s, uint8_t *dst, return sum; } -static int hadamard8_intra8x8_c(/* MpegEncContext */ void *s, uint8_t *src, +static int hadamard8_intra8x8_c(MpegEncContext *s, uint8_t *src, uint8_t *dummy, int stride, int h) { int i, temp[64], sum = 0; @@ -2232,10 +2234,9 @@ static int hadamard8_intra8x8_c(/* MpegEncContext */ void *s, uint8_t *src, return sum; } -static int dct_sad8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, +static int dct_sad8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = (MpegEncContext *) c; LOCAL_ALIGNED_16(int16_t, temp, [64]); assert(h == 8); @@ -2274,10 +2275,9 @@ static int dct_sad8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, DST(7, (a4 >> 2) - a7); \ } -static int dct264_sad8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, +static int dct264_sad8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = (MpegEncContext *) c; int16_t dct[8][8]; int i, sum = 0; @@ -2300,10 +2300,9 @@ static int dct264_sad8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, } #endif -static int dct_max8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, +static int dct_max8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = (MpegEncContext *) c; LOCAL_ALIGNED_16(int16_t, temp, [64]); int sum = 0, i; @@ -2318,10 +2317,9 @@ static int dct_max8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, return sum; } -static int quant_psnr8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, +static int quant_psnr8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = c; LOCAL_ALIGNED_16(int16_t, temp, [64 * 2]); int16_t *const bak = temp + 64; int sum = 0, i; @@ -2344,10 +2342,9 @@ static int quant_psnr8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, return sum; } -static int rd8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, uint8_t *src2, +static int rd8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = (MpegEncContext *) c; const uint8_t *scantable = s->intra_scantable.permutated; LOCAL_ALIGNED_16(int16_t, temp, [64]); LOCAL_ALIGNED_16(uint8_t, lsrc1, [64]); @@ -2422,10 +2419,9 @@ static int rd8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, uint8_t *src2, return distortion + ((bits * s->qscale * s->qscale * 109 + 64) >> 7); } -static int bit8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, uint8_t *src2, +static int bit8x8_c(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int stride, int h) { - MpegEncContext *const s = (MpegEncContext *) c; const uint8_t *scantable = s->intra_scantable.permutated; LOCAL_ALIGNED_16(int16_t, temp, [64]); int i, last, run, bits, level, start_i; @@ -2485,7 +2481,7 @@ static int bit8x8_c(/* MpegEncContext */ void *c, uint8_t *src1, uint8_t *src2, } #define VSAD_INTRA(size) \ -static int vsad_intra ## size ## _c(/* MpegEncContext */ void *c, \ +static int vsad_intra ## size ## _c(MpegEncContext *c, \ uint8_t *s, uint8_t *dummy, \ int stride, int h) \ { \ @@ -2506,7 +2502,7 @@ static int vsad_intra ## size ## _c(/* MpegEncContext */ void *c, \ VSAD_INTRA(8) VSAD_INTRA(16) -static int vsad16_c(/* MpegEncContext */ void *c, uint8_t *s1, uint8_t *s2, +static int vsad16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h) { int score = 0, x, y; @@ -2523,7 +2519,7 @@ static int vsad16_c(/* MpegEncContext */ void *c, uint8_t *s1, uint8_t *s2, #define SQ(a) ((a) * (a)) #define VSSE_INTRA(size) \ -static int vsse_intra ## size ## _c(/* MpegEncContext */ void *c, \ +static int vsse_intra ## size ## _c(MpegEncContext *c, \ uint8_t *s, uint8_t *dummy, \ int stride, int h) \ { \ @@ -2544,7 +2540,7 @@ static int vsse_intra ## size ## _c(/* MpegEncContext */ void *c, \ VSSE_INTRA(8) VSSE_INTRA(16) -static int vsse16_c(/* MpegEncContext */ void *c, uint8_t *s1, uint8_t *s2, +static int vsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h) { int score = 0, x, y; @@ -2570,8 +2566,7 @@ static int ssd_int8_vs_int16_c(const int8_t *pix1, const int16_t *pix2, } #define WRAPPER8_16_SQ(name8, name16) \ -static int name16(void /*MpegEncContext*/ *s, \ - uint8_t *dst, uint8_t *src, \ +static int name16(MpegEncContext *s, uint8_t *dst, uint8_t *src, \ int stride, int h) \ { \ int score = 0; \ |