diff options
author | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-09-10 00:56:10 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-09-10 00:56:10 +0200 |
commit | 35651deb8fc3b8b7b0cf4895732f2edeecdabeb7 (patch) | |
tree | f8f88230c57819d084c0d9510800ab6a3b6a44a1 /src | |
parent | d5e9270acf2f914fe7603225ac605cd29830bed6 (diff) |
Fixed the remaining MGAAllocateMemory() issues.
Diffstat (limited to 'src')
-rw-r--r-- | src/mga_video.c | 8 |
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)) |