summaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-15 19:50:59 +0000
committerramiro <ramiro@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-15 19:50:59 +0000
commit87e34c3f3f4a88746456e9c93e6901d16195cc90 (patch)
treeba1da53ff81c2832087e57ce40a81c105321ef4e /libswscale
parent1c6c7706eceb6b814124fc6dadea075483f0a9f9 (diff)
downloadmpv-87e34c3f3f4a88746456e9c93e6901d16195cc90.tar.bz2
mpv-87e34c3f3f4a88746456e9c93e6901d16195cc90.tar.xz
Don't initialize normal horizontal filter if MMX2 filter is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30313 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index f525420f91..15071ea218 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -2673,22 +2673,6 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
/* precalculate horizontal scaler filter coefficients */
{
- const int filterAlign=
- (flags & SWS_CPU_CAPS_MMX) ? 4 :
- (flags & SWS_CPU_CAPS_ALTIVEC) ? 8 :
- 1;
-
- if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc,
- srcW , dstW, filterAlign, 1<<14,
- (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags,
- srcFilter->lumH, dstFilter->lumH, c->param) < 0)
- goto fail;
- if (initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc,
- c->chrSrcW, c->chrDstW, filterAlign, 1<<14,
- (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
- srcFilter->chrH, dstFilter->chrH, c->param) < 0)
- goto fail;
-
#if defined(COMPILE_MMX2)
// can't downscale !!!
if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) {
@@ -2718,8 +2702,25 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
mprotect(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
#endif
- }
+ } else
#endif /* defined(COMPILE_MMX2) */
+ {
+ const int filterAlign=
+ (flags & SWS_CPU_CAPS_MMX) ? 4 :
+ (flags & SWS_CPU_CAPS_ALTIVEC) ? 8 :
+ 1;
+
+ if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc,
+ srcW , dstW, filterAlign, 1<<14,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC) : flags,
+ srcFilter->lumH, dstFilter->lumH, c->param) < 0)
+ goto fail;
+ if (initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc,
+ c->chrSrcW, c->chrDstW, filterAlign, 1<<14,
+ (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
+ srcFilter->chrH, dstFilter->chrH, c->param) < 0)
+ goto fail;
+ }
} // initialize horizontal stuff