aboutsummaryrefslogtreecommitdiffhomepage
path: root/libswscale
diff options
context:
space:
mode:
authorGravatar sdrik <sdrik@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-24 07:11:35 +0000
committerGravatar sdrik <sdrik@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-24 07:11:35 +0000
commit05698d8a5c9a0b5bc44680483fee9d8f160e478d (patch)
treeaddff3406b9f512f4d273b9deb17a1630ad9850b /libswscale
parent311a555a591f796b289944ed7ecab9caff2a2a9c (diff)
Adds "YUYV422 to YUVA420P" and "UYVY422 to YUVA420P" unscaled convertion
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29048 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index c9e56cc3d9..316f4517e4 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1885,6 +1885,9 @@ static int YUYV2YUV420Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], in
yuyvtoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
+ if (dstParam[3])
+ fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);
+
return srcSliceH;
}
@@ -1907,6 +1910,9 @@ static int UYVY2YUV420Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], in
uyvytoyuv420(ydst, udst, vdst, src[0], c->srcW, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
+ if (dstParam[3])
+ fillPlane(dstParam[3], dstStride[3], c->srcW, srcSliceH, srcSliceY, 255);
+
return srcSliceH;
}
@@ -2582,9 +2588,9 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
c->swScale= PlanarToUyvyWrapper;
}
}
- if(srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV420P)
+ if(srcFormat == PIX_FMT_YUYV422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P))
c->swScale= YUYV2YUV420Wrapper;
- if(srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV420P)
+ if(srcFormat == PIX_FMT_UYVY422 && (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P))
c->swScale= UYVY2YUV420Wrapper;
if(srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV422P)
c->swScale= YUYV2YUV422Wrapper;