summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2007-07-16 13:03:58 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2007-07-19 17:28:35 +0800
commit25658f838bd1bcd7559d7a032d127c626833fb7c (patch)
tree0e3284e9dfe7e35bee3d2f21ae5a44d9f61c3712 /src/i830_video.c
parent8f316a4584d0676e5dae051698bde0831f018cc4 (diff)
1. The pitches for y/u/v surfaces are 1024bytes aligned.
2. clean code
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index f7f2f740..015b4268 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2382,8 +2382,14 @@ I830PutImage(ScrnInfoPtr pScrn,
switch (id) {
case FOURCC_YV12:
case FOURCC_I420:
- srcPitch = (width + 3) & ~3;
- srcPitch2 = ((width >> 1) + 3) & ~3;
+ if (pI830->IsXvMCSurface) {
+ srcPitch = (width + 0x400) & ~0x3ff;
+ srcPitch2 = ((width >> 1) + 0x400) & ~0x3ff;
+ } else {
+ srcPitch = (width + 0x3) & ~0x3;
+ srcPitch2 = ((width >> 1) + 0x3) & ~0x3;
+ }
+
if (pPriv->textured && IS_I965G(pI830))
destId = FOURCC_YUY2;
break;