diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-08 14:06:18 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-03-13 08:15:51 -0700 |
commit | 441b093915717afa7d24be34bdab2a4911b30a57 (patch) | |
tree | 7f3af322921e0e78e0740ed507bd69805222fc83 /libavcodec/x86/dsputil_init.c | |
parent | 4cb4680c1087a2cd13d4b0c9167a2eb3147f99d8 (diff) | |
download | ffmpeg-441b093915717afa7d24be34bdab2a4911b30a57.tar.gz |
x86: dsputil_init: K&R formatting cosmetics
Diffstat (limited to 'libavcodec/x86/dsputil_init.c')
-rw-r--r-- | libavcodec/x86/dsputil_init.c | 123 |
1 files changed, 62 insertions, 61 deletions
diff --git a/libavcodec/x86/dsputil_init.c b/libavcodec/x86/dsputil_init.c index c62dcdd8e8..88692a0194 100644 --- a/libavcodec/x86/dsputil_init.c +++ b/libavcodec/x86/dsputil_init.c @@ -43,29 +43,29 @@ void ff_avg_pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2, void ff_put_no_rnd_pixels16_l2_mmxext(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h); void ff_put_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride, int h); + int dstStride, int srcStride, int h); void ff_avg_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride, int h); + int dstStride, int srcStride, int h); void ff_put_no_rnd_mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h); void ff_put_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride, int h); + int dstStride, int srcStride, int h); void ff_avg_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride, int h); + int dstStride, int srcStride, int h); void ff_put_no_rnd_mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h); void ff_put_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride); + int dstStride, int srcStride); void ff_avg_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride); + int dstStride, int srcStride); void ff_put_no_rnd_mpeg4_qpel16_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, int dstStride, int srcStride); void ff_put_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride); + int dstStride, int srcStride); void ff_avg_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, - int dstStride, int srcStride); + int dstStride, int srcStride); void ff_put_no_rnd_mpeg4_qpel8_v_lowpass_mmxext(uint8_t *dst, uint8_t *src, int dstStride, int srcStride); #define ff_put_no_rnd_pixels16_mmxext ff_put_pixels16_mmxext @@ -91,19 +91,19 @@ void ff_bswap32_buf_sse2(uint32_t *dst, const uint32_t *src, int w); void ff_add_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top); -int ff_add_hfyu_left_prediction_ssse3(uint8_t *dst, const uint8_t *src, - int w, int left); -int ff_add_hfyu_left_prediction_sse4(uint8_t *dst, const uint8_t *src, +int ff_add_hfyu_left_prediction_ssse3(uint8_t *dst, const uint8_t *src, int w, int left); +int ff_add_hfyu_left_prediction_sse4(uint8_t *dst, const uint8_t *src, + int w, int left); -void ff_vector_clip_int32_mmx (int32_t *dst, const int32_t *src, - int32_t min, int32_t max, unsigned int len); -void ff_vector_clip_int32_sse2 (int32_t *dst, const int32_t *src, - int32_t min, int32_t max, unsigned int len); +void ff_vector_clip_int32_mmx(int32_t *dst, const int32_t *src, + int32_t min, int32_t max, unsigned int len); +void ff_vector_clip_int32_sse2(int32_t *dst, const int32_t *src, + int32_t min, int32_t max, unsigned int len); void ff_vector_clip_int32_int_sse2(int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len); -void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src, - int32_t min, int32_t max, unsigned int len); +void ff_vector_clip_int32_sse4(int32_t *dst, const int32_t *src, + int32_t min, int32_t max, unsigned int len); #if HAVE_YASM @@ -111,8 +111,8 @@ PIXELS16(static, ff_avg, , , _mmxext) PIXELS16(static, ff_put, , , _mmxext) #define QPEL_OP(OPNAME, RND, MMX) \ -static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \ - ptrdiff_t stride) \ +static void OPNAME ## qpel8_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## pixels8_ ## MMX(dst, src, stride, 8); \ } \ @@ -121,7 +121,7 @@ static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[8]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \ stride, 8); \ ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \ @@ -139,7 +139,7 @@ static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[8]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \ stride, 8); \ ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + 1, half, stride, \ @@ -150,7 +150,7 @@ static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[8]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \ 8, stride); \ ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \ @@ -168,7 +168,7 @@ static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[8]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \ 8, stride); \ ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + stride, half, stride,\ @@ -179,8 +179,8 @@ static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \ @@ -194,8 +194,8 @@ static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \ @@ -209,8 +209,8 @@ static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \ @@ -224,8 +224,8 @@ static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \ @@ -239,8 +239,8 @@ static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ @@ -252,8 +252,8 @@ static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half) + 64; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 64; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ @@ -265,7 +265,7 @@ static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, \ @@ -278,7 +278,7 @@ static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[8 + 9]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \ @@ -291,15 +291,15 @@ static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[9]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \ stride, 9); \ ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \ stride, 8); \ } \ \ -static void OPNAME ## qpel16_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \ - ptrdiff_t stride) \ +static void OPNAME ## qpel16_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \ + ptrdiff_t stride) \ { \ ff_ ## OPNAME ## pixels16_ ## MMX(dst, src, stride, 16); \ } \ @@ -308,7 +308,7 @@ static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[32]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \ stride, 16); \ ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \ @@ -326,7 +326,7 @@ static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[32]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t*) temp; \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \ stride, 16); \ ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src + 1, half, \ @@ -337,7 +337,7 @@ static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[32]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \ stride); \ ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \ @@ -355,7 +355,7 @@ static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t temp[32]; \ - uint8_t * const half = (uint8_t*)temp; \ + uint8_t *const half = (uint8_t *) temp; \ ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \ stride); \ ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src+stride, half, \ @@ -366,8 +366,8 @@ static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \ @@ -382,8 +382,8 @@ static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \ @@ -398,8 +398,8 @@ static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \ @@ -414,8 +414,8 @@ static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \ @@ -430,8 +430,8 @@ static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \ @@ -444,8 +444,8 @@ static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[16 * 2 + 17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half) + 256; \ - uint8_t * const halfHV = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half) + 256; \ + uint8_t *const halfHV = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \ @@ -458,7 +458,7 @@ static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \ @@ -471,7 +471,7 @@ static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \ @@ -484,7 +484,7 @@ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ ptrdiff_t stride) \ { \ uint64_t half[17 * 2]; \ - uint8_t * const halfH = ((uint8_t*)half); \ + uint8_t *const halfH = ((uint8_t *) half); \ ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \ stride, 17); \ ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \ @@ -494,10 +494,11 @@ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \ QPEL_OP(put_, _, mmxext) QPEL_OP(avg_, _, mmxext) QPEL_OP(put_no_rnd_, _no_rnd_, mmxext) + #endif /* HAVE_YASM */ #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \ - do { \ +do { \ c->PFX ## _pixels_tab[IDX][ 0] = PREFIX ## PFX ## SIZE ## _mc00_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \ c->PFX ## _pixels_tab[IDX][ 2] = PREFIX ## PFX ## SIZE ## _mc20_ ## CPU; \ @@ -514,7 +515,7 @@ QPEL_OP(put_no_rnd_, _no_rnd_, mmxext) c->PFX ## _pixels_tab[IDX][13] = PREFIX ## PFX ## SIZE ## _mc13_ ## CPU; \ c->PFX ## _pixels_tab[IDX][14] = PREFIX ## PFX ## SIZE ## _mc23_ ## CPU; \ c->PFX ## _pixels_tab[IDX][15] = PREFIX ## PFX ## SIZE ## _mc33_ ## CPU; \ - } while (0) +} while (0) static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int cpu_flags) |