summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authorpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-18 00:41:28 +0000
committerpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-18 00:41:28 +0000
commit1960b4ad49fa5111f1acf8ca31640d72befa6867 (patch)
tree10026eba9ff2f682f0abbc0fbee96222ee6ad914 /postproc
parentdb8d9b1dc23d86980008f7f4ff38fdb74385e78f (diff)
downloadmpv-1960b4ad49fa5111f1acf8ca31640d72befa6867.tar.bz2
mpv-1960b4ad49fa5111f1acf8ca31640d72befa6867.tar.xz
don't call altivec_yuv2packedX() with a dstFormat that it doesn't support;
instead fall back on yuv2packedXinC git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17642 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale_template.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c
index 6a8e576ffb..98828a9136 100644
--- a/postproc/swscale_template.c
+++ b/postproc/swscale_template.c
@@ -967,14 +967,19 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
#endif
default:
#ifdef HAVE_ALTIVEC
- altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize,
- chrFilter, chrSrc, chrFilterSize,
- dest, dstW, dstY);
-#else
- yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
- chrFilter, chrSrc, chrFilterSize,
- dest, dstW, dstY);
+ /* The following list of supported dstFormat values should
+ match what's found in the body of altivec_yuv2packedX() */
+ if(c->dstFormat==IMGFMT_ABGR || c->dstFormat==IMGFMT_BGRA ||
+ c->dstFormat==IMGFMT_BGR24 || c->dstFormat==IMGFMT_RGB24 ||
+ c->dstFormat==IMGFMT_RGBA || c->dstFormat==IMGFMT_ARGB)
+ altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize,
+ chrFilter, chrSrc, chrFilterSize,
+ dest, dstW, dstY);
+ else
#endif
+ yuv2packedXinC(c, lumFilter, lumSrc, lumFilterSize,
+ chrFilter, chrSrc, chrFilterSize,
+ dest, dstW, dstY);
break;
}
}