summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/savage_video.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/savage_video.c b/src/savage_video.c
index cb944a4..351dde9 100644
--- a/src/savage_video.c
+++ b/src/savage_video.c
@@ -1177,7 +1177,7 @@ SavageCopyPlanarDataBCI(
SavagePtr psav = SAVPTR(pScrn);
/* half of the dest buffer for copying the YVU data to it ??? */
unsigned char *dstCopy = (unsigned char *)(((unsigned long)dst
- + 2 * srcPitch * h
+ + dstPitch * h
+ 0x0f) & ~0x0f);
/* for pixel transfer */
unsigned long offsetY = (unsigned long)dstCopy - (unsigned long)psav->FBBase;
@@ -1909,6 +1909,10 @@ SavagePutImage(
break;
}
+ if (srcPitch2 != 0 && S3_SAVAGE4_SERIES(psav->Chipset) && psav->BCIforXv) {
+ new_size = ((new_size + 0xF) & ~0xF) + srcPitch * height + srcPitch2 * height;
+ }
+
/* if(!(pPriv->area = SavageAllocateMemory(pScrn, pPriv->area, new_h)))
return BadAlloc;*/
pPriv->video_offset = SavageAllocateMemory(pScrn, &pPriv->video_memory,