summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-21 13:51:11 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-21 13:51:11 -0400
commitefa0825a86a8dc0f03ebb42c576ed26189e9d4bb (patch)
treeb0b95c2869aeb290eb013fa5b144e369d2ef6571
parentaa59b5b55e6ac64940fb3f0fa61f7b8fe36ba745 (diff)
Tex vid: fix top clipping
-rw-r--r--src/radeon_textured_video.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index b6cedb24..ab743beb 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -362,7 +362,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top;
pPriv->src_offset = pPriv->video_offset + info->fbLocation + pScrn->fbOffset;
- pPriv->src_addr = (uint8_t *)(info->FB + pPriv->video_offset + (top * dstPitch));
+ pPriv->src_addr = (uint8_t *)(info->FB + pPriv->video_offset);
pPriv->src_pitch = dstPitch;
pPriv->planeu_offset = dstPitch * dst_height;
@@ -376,8 +376,10 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
switch(id) {
case FOURCC_YV12:
case FOURCC_I420:
- s2offset = (srcPitch * ((height + 1) & ~1)) + ((top >> 1) * srcPitch2);
- s3offset = (s2offset + (srcPitch2 * ((height + 1) >> 1))) + ((top >> 1) * srcPitch2);
+ s2offset = srcPitch * ((height + 1) & ~1);
+ s3offset = s2offset + (srcPitch2 * ((height + 1) >> 1));
+ s2offset += ((top >> 1) * srcPitch2);
+ s3offset += ((top >> 1) * srcPitch2);
if (pPriv->bicubic_state != BICUBIC_OFF) {
if (id == FOURCC_I420) {
tmp = s2offset;