Commit 65517337 authored by kostya's avatar kostya

Some AltiVec functions in SwScaler produce different output than their

counterparts in pure C, so don't invoke them in bitexact mode.



git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@28555 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 1611a41a
...@@ -2396,6 +2396,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d ...@@ -2396,6 +2396,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
#ifdef COMPILE_ALTIVEC #ifdef COMPILE_ALTIVEC
if ((c->flags & SWS_CPU_CAPS_ALTIVEC) && if ((c->flags & SWS_CPU_CAPS_ALTIVEC) &&
!(c->flags & SWS_BITEXACT) &&
srcFormat == PIX_FMT_YUV420P) { srcFormat == PIX_FMT_YUV420P) {
// unscaled YV12 -> packed YUV, we want speed // unscaled YV12 -> packed YUV, we want speed
if (dstFormat == PIX_FMT_YUYV422) if (dstFormat == PIX_FMT_YUYV422)
......
...@@ -1136,9 +1136,10 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ ...@@ -1136,9 +1136,10 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
#if HAVE_ALTIVEC #if HAVE_ALTIVEC
/* The following list of supported dstFormat values should /* The following list of supported dstFormat values should
match what's found in the body of altivec_yuv2packedX() */ match what's found in the body of altivec_yuv2packedX() */
if (c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA || if (!(c->flags & SWS_BITEXACT) &&
(c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA ||
c->dstFormat==PIX_FMT_BGR24 || c->dstFormat==PIX_FMT_RGB24 || c->dstFormat==PIX_FMT_BGR24 || c->dstFormat==PIX_FMT_RGB24 ||
c->dstFormat==PIX_FMT_RGBA || c->dstFormat==PIX_FMT_ARGB) c->dstFormat==PIX_FMT_RGBA || c->dstFormat==PIX_FMT_ARGB))
altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize, altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize,
chrFilter, chrSrc, chrFilterSize, chrFilter, chrSrc, chrFilterSize,
dest, dstW, dstY); dest, dstW, dstY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment