From 2bdca19eaa2ad7b5fbc09f5b3111b2725ccda01a Mon Sep 17 00:00:00 2001 From: "yuzhuohuang@qq.com" Date: Tue, 15 Nov 2011 18:39:29 +0800 Subject: [PATCH] Fix typos that causes a bug in YUV alpha blend code. --- src/subpic/MemSubPic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/subpic/MemSubPic.cpp b/src/subpic/MemSubPic.cpp index 7c3e5ef..7398f49 100644 --- a/src/subpic/MemSubPic.cpp +++ b/src/subpic/MemSubPic.cpp @@ -717,7 +717,7 @@ STDMETHODIMP CMemSubPic::AlphaBltOther(const RECT* pSrc, const RECT* pDst, SubPi } for(; s2 < s2end; s2+=2, sa2+=2, d2++) { - unsigned int ia = (sa2[0]+ +sa2[1]+ + unsigned int ia = (sa2[0] +sa2[1]+ sa2[0+src.pitch]+sa2[1+src.pitch])>>2; *d2 = (((*d2)*ia)>>8) + ((s2[0] +s2[1]+ s2[src.pitch]+s2[1+src.pitch] )>>2); @@ -742,7 +742,7 @@ STDMETHODIMP CMemSubPic::AlphaBltOther(const RECT* pSrc, const RECT* pDst, SubPi BYTE* d2 = d; for(; s2 < s2end; s2 += 2, sa2 += 2, d2++) { - unsigned int ia = (sa2[0]+ +sa2[1]+ + unsigned int ia = (sa2[0] +sa2[1]+ sa2[0+src.pitch]+sa2[1+src.pitch])>>2; //if(ia < 0xff) { -- 2.11.4.GIT