summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;