summaryrefslogtreecommitdiff
path: root/src/mga_video.c
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2006-09-10 00:56:10 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2006-09-10 00:56:10 +0200
commit35651deb8fc3b8b7b0cf4895732f2edeecdabeb7 (patch)
treef8f88230c57819d084c0d9510800ab6a3b6a44a1 /src/mga_video.c
parentd5e9270acf2f914fe7603225ac605cd29830bed6 (diff)
Fixed the remaining MGAAllocateMemory() issues.
Diffstat (limited to 'src/mga_video.c')
-rw-r--r--src/mga_video.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mga_video.c b/src/mga_video.c
index 0c2565f..30ae6fc 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -844,7 +844,7 @@ MGAPutImage(
unsigned char *dst_start;
int new_size, offset, offset2 = 0, offset3 = 0;
int srcPitch, srcPitch2 = 0, dstPitch;
- int top, left, npixels, nlines, bpp;
+ int top, left, npixels, nlines;
BoxRec dstBox;
CARD32 tmp;
@@ -870,10 +870,8 @@ MGAPutImage(
dstBox.y2 -= pScrn->frameY0;
}
- bpp = pScrn->bitsPerPixel >> 3;
-
dstPitch = ((width << 1) + 15) & ~15;
- new_size = ((dstPitch * height) + bpp - 1) / bpp;
+ new_size = dstPitch * height;
switch(id) {
case FOURCC_YV12:
@@ -906,7 +904,7 @@ MGAPutImage(
offset = pPriv->video_offset;
if(pPriv->doubleBuffer)
- offset += pPriv->currentBuffer * new_size * bpp;
+ offset += pPriv->currentBuffer * new_size;
dst_start = pMga->FbStart + offset + left + (top * dstPitch);
if (pMga->TexturedVideo && ((long)data != pPriv->lastPort))