summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-14 23:58:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-14 23:58:10 +0100
commite462257242fc037c99206457d1316e1ff9e5306f (patch)
tree045910517a8b587f7a016b1c46403e1d1021f4f2 /libswscale
parenta1be5bc79d7ac4c7c7ed79c4d72b4f1945ecb55c (diff)
parent115a57302a7d6661426304bec3a5bc72d0edf4b0 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits) applehttp: Properly clean up if unable to probe a segment applehttp: Avoid reading uninitialized memory fate: Replace misleading "aac" in the name of an ADTS test with "adts". fate: Drop pointless "-an" from pictor test command. fate: split off image codec FATE tests into their own file fate: split off WMA codec FATE tests into their own file fate: split off lossless video and audio FATE tests into their own files fate: split off qtrle codec FATE tests into their own file fate: split off Ut Video codec FATE tests into their own file fate: split off screen codec FATE tests into their own file fate: split off Real Inc. codec FATE tests into their own file fate: split off AC-3 codec FATE tests into their own file mpegvideo: remove abort() in ff_find_unused_picture() rv40: NEON optimised loop filter strength selection rv40: rearrange loop filter functions configure: cosmetics: sort some lists where appropriate swscale_mmx: drop no longer required parameters from VSCALEX macros swscale: Mark yuv2planeX_8_mmx as MMX2; it contains MMX2 instructions. build: conditionally compile x86 H.264 chroma optimizations v410 encoder and decoder ... Conflicts: Changelog configure doc/developer.texi doc/general.texi libavcodec/arm/asm.S libavcodec/avcodec.h libavcodec/v410dec.c libavcodec/v410enc.c libavcodec/version.h libavcodec/x86/Makefile libavcodec/x86/dsputil_mmx.c libswscale/x86/swscale_mmx.c tests/Makefile tests/fate2.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/x86/scale.asm2
-rw-r--r--libswscale/x86/swscale_mmx.c36
2 files changed, 20 insertions, 18 deletions
diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
index e8a5e5cd7c..14e2fb8406 100644
--- a/libswscale/x86/scale.asm
+++ b/libswscale/x86/scale.asm
@@ -651,7 +651,7 @@ cglobal yuv2planeX_%2_%1, %4, 7, %3
%define PALIGNR PALIGNR_MMX
%ifdef ARCH_X86_32
INIT_MMX
-yuv2planeX_fn mmx, 8, 0, 7
+yuv2planeX_fn mmx2, 8, 0, 7
yuv2planeX_fn mmx2, 9, 0, 5
yuv2planeX_fn mmx2, 10, 0, 5
%endif
diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c
index e46da770ae..7cac5d80fd 100644
--- a/libswscale/x86/swscale_mmx.c
+++ b/libswscale/x86/swscale_mmx.c
@@ -278,18 +278,18 @@ SCALE_FUNCS_SSE(sse4);
extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \
const int16_t **src, uint8_t *dest, int dstW, \
const uint8_t *dither, int offset)
-#define VSCALEX_FUNCS(opt1, opt2) \
- VSCALEX_FUNC(8, opt1); \
- VSCALEX_FUNC(9, opt2); \
- VSCALEX_FUNC(10, opt2)
+#define VSCALEX_FUNCS(opt) \
+ VSCALEX_FUNC(8, opt); \
+ VSCALEX_FUNC(9, opt); \
+ VSCALEX_FUNC(10, opt)
#if ARCH_X86_32
-VSCALEX_FUNCS(mmx, mmx2);
+VSCALEX_FUNCS(mmx2);
#endif
-VSCALEX_FUNCS(sse2, sse2);
-VSCALEX_FUNCS(sse4, sse4);
+VSCALEX_FUNCS(sse2);
+VSCALEX_FUNCS(sse4);
VSCALEX_FUNC(16, sse4);
-VSCALEX_FUNCS(avx, avx);
+VSCALEX_FUNCS(avx);
#define VSCALE_FUNC(size, opt) \
extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \
@@ -347,12 +347,12 @@ void ff_sws_init_swScale_mmx(SwsContext *c)
case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, 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){ \
- case 16: /*do_16_case;*/ break; \
- case 10: if (!isBE(c->dstFormat) && opt2chk) /*vscalefn = ff_yuv2planeX_10_ ## opt2;*/ break; \
- case 9: if (!isBE(c->dstFormat) && opt2chk) /*vscalefn = ff_yuv2planeX_9_ ## opt2;*/ break; \
- default: /*vscalefn = ff_yuv2planeX_8_ ## opt1;*/ break; \
+ case 16: /*do_16_case;*/ break; \
+ case 10: if (!isBE(c->dstFormat)) /*vscalefn = ff_yuv2planeX_10_ ## opt;*/ break; \
+ case 9: if (!isBE(c->dstFormat)) /*vscalefn = ff_yuv2planeX_9_ ## opt;*/ break; \
+ default: /*vscalefn = ff_yuv2planeX_8_ ## opt;*/ break; \
}
#define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \
switch(c->dstBpc){ \
@@ -365,9 +365,11 @@ switch(c->dstBpc){ \
if (cpu_flags & AV_CPU_FLAG_MMX) {
ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx);
ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx);
- ASSIGN_VSCALEX_FUNC(c->yuv2planeX, 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) {
+ ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2,);
+ }
#endif
#define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \
switch (filtersize) { \
@@ -380,7 +382,7 @@ switch(c->dstBpc){ \
if (cpu_flags & AV_CPU_FLAG_SSE2) {
ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, 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);
}
if (cpu_flags & AV_CPU_FLAG_SSSE3) {
@@ -391,14 +393,14 @@ switch(c->dstBpc){ \
/* Xto15 don't need special sse4 functions */
ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, 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 (c->dstBpc == 16 && !isBE(c->dstFormat))
c->yuv2plane1 = ff_yuv2plane1_16_sse4;
}
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);
}
#endif