swscale_mmx: drop no longer required parameters from VSCALEX macros

This commit is contained in:
Diego Biurrun 2011-12-14 03:15:38 +01:00
parent 52de07e1f1
commit 3c62a71486
1 changed files with 17 additions and 17 deletions

View File

@ -215,18 +215,18 @@ SCALE_FUNCS_SSE(sse4);
extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \ extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \
const int16_t **src, uint8_t *dest, int dstW, \ const int16_t **src, uint8_t *dest, int dstW, \
const uint8_t *dither, int offset) const uint8_t *dither, int offset)
#define VSCALEX_FUNCS(opt1, opt2) \ #define VSCALEX_FUNCS(opt) \
VSCALEX_FUNC(8, opt1); \ VSCALEX_FUNC(8, opt); \
VSCALEX_FUNC(9, opt2); \ VSCALEX_FUNC(9, opt); \
VSCALEX_FUNC(10, opt2) VSCALEX_FUNC(10, opt)
#if ARCH_X86_32 #if ARCH_X86_32
VSCALEX_FUNCS(mmx2, mmx2); VSCALEX_FUNCS(mmx2);
#endif #endif
VSCALEX_FUNCS(sse2, sse2); VSCALEX_FUNCS(sse2);
VSCALEX_FUNCS(sse4, sse4); VSCALEX_FUNCS(sse4);
VSCALEX_FUNC(16, sse4); VSCALEX_FUNC(16, sse4);
VSCALEX_FUNCS(avx, avx); VSCALEX_FUNCS(avx);
#define VSCALE_FUNC(size, opt) \ #define VSCALE_FUNC(size, opt) \
extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \ extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \
@ -277,12 +277,12 @@ void ff_sws_init_swScale_mmx(SwsContext *c)
case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \ case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \
default: ASSIGN_SCALE_FUNC2(hscalefn, X, opt1, opt2); break; \ default: ASSIGN_SCALE_FUNC2(hscalefn, X, opt1, opt2); break; \
} }
#define ASSIGN_VSCALEX_FUNC(vscalefn, opt1, opt2, opt2chk, do_16_case) \ #define ASSIGN_VSCALEX_FUNC(vscalefn, opt, do_16_case) \
switch(c->dstBpc){ \ switch(c->dstBpc){ \
case 16: do_16_case; break; \ case 16: do_16_case; break; \
case 10: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2planeX_10_ ## opt2; break; \ case 10: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \
case 9: if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2planeX_9_ ## opt2; break; \ case 9: if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \
default: vscalefn = ff_yuv2planeX_8_ ## opt1; break; \ default: vscalefn = ff_yuv2planeX_8_ ## opt; break; \
} }
#define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \ #define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \
switch(c->dstBpc){ \ switch(c->dstBpc){ \
@ -298,7 +298,7 @@ switch(c->dstBpc){ \
ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2); ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMX2);
} }
if (cpu_flags & AV_CPU_FLAG_MMX2) { if (cpu_flags & AV_CPU_FLAG_MMX2) {
ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2, mmx2, cpu_flags & AV_CPU_FLAG_MMX2,); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2,);
} }
#endif #endif
#define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \ #define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \
@ -312,7 +312,7 @@ switch(c->dstBpc){ \
if (cpu_flags & AV_CPU_FLAG_SSE2) { if (cpu_flags & AV_CPU_FLAG_SSE2) {
ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2); ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2);
ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2);
ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2, sse2, 1,); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2,);
ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1); ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1);
} }
if (cpu_flags & AV_CPU_FLAG_SSSE3) { if (cpu_flags & AV_CPU_FLAG_SSSE3) {
@ -323,14 +323,14 @@ switch(c->dstBpc){ \
/* Xto15 don't need special sse4 functions */ /* Xto15 don't need special sse4 functions */
ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3); ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3);
ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3);
ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4, sse4, 1, ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4,
if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4); if (!isBE(c->dstFormat)) c->yuv2planeX = ff_yuv2planeX_16_sse4);
if (c->dstBpc == 16 && !isBE(c->dstFormat)) if (c->dstBpc == 16 && !isBE(c->dstFormat))
c->yuv2plane1 = ff_yuv2plane1_16_sse4; c->yuv2plane1 = ff_yuv2plane1_16_sse4;
} }
if (cpu_flags & AV_CPU_FLAG_AVX) { if (cpu_flags & AV_CPU_FLAG_AVX) {
ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, avx, 1,); ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx,);
ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1); ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1);
} }
#endif #endif