summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-05-12 13:27:33 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-05-16 10:10:31 -0700
commitdd48790f4600a880fc4907c6e3b1cd51e9c0f0b7 (patch)
treedff68fa3d2bb846803a27fcfaa895a4b19e71da7
parenteec5e996ec9361099bf81d8d3b66933d5981c5a8 (diff)
Divide width by 2 in planar-to-packed conversion loop, since each pass through
the loop writes two source pixels.
-rw-r--r--src/i830_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 89f49e02..39ab5073 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1125,7 +1125,7 @@ I830CopyPlanarToPackedData(ScrnInfoPtr pScrn, unsigned char *buf, int srcPitch,
unsigned char *sv = srcv;
int i;
- i = w;
+ i = w / 2;
while(i > 4) {
dst[0] = sy[0] | (sy[1] << 16) | (sv[0] << 8) | (su[0] << 24);
dst[1] = sy[2] | (sy[3] << 16) | (sv[1] << 8) | (su[1] << 24);