diff options
author | Roland Scheidegger <sroland@tungstengraphics.com> | 2008-12-30 22:23:39 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@tungstengraphics.com> | 2009-03-24 19:57:14 +0100 |
commit | 97e19d96ba65a3df2fa3bbf73cfcc01b6dc3e796 (patch) | |
tree | f3073e4e099b10901f4e73577abffa6bea6d4c24 | |
parent | 7aaf5f08e4147b75c4975e6d680d3f5a93424164 (diff) |
clip fixes
This fixes some oddities observed when the video is only partly visible.
Instead of recalculating the geometry of the video, always use the same.
Also fixes a assignment present twice, and another issue (bring in line with
what the overlay code does).
-rw-r--r-- | src/radeon_textured_video.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 2df299f5..f72f2c59 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -327,10 +327,10 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, if (!xf86XVClipVideoHelper(&dstBox, &x1, &x2, &y1, &y2, clipBoxes, width, height)) return Success; - src_w = (x2 - x1) >> 16; +/* src_w = (x2 - x1) >> 16; src_h = (y2 - y1) >> 16; drw_w = dstBox.x2 - dstBox.x1; - drw_h = dstBox.y2 - dstBox.y1; + drw_h = dstBox.y2 - dstBox.y1;*/ if ((x1 >= x2) || (y1 >= y2)) return Success; @@ -475,7 +475,6 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top; s2offset = srcPitch * height; s3offset = (srcPitch2 * (height >> 1)) + s2offset; - top &= ~1; pPriv->src_addr += left << 1; tmp = ((top >> 1) * srcPitch2) + (left >> 1); s2offset += tmp; @@ -504,7 +503,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, width, height); } else { nlines = ((y2 + 0xffff) >> 16) - top; - RADEONCopyData(pScrn, buf, pPriv->src_addr, srcPitch, dstPitch, nlines, npixels, 2); + pPriv->src_addr += left << 1; + RADEONCopyData(pScrn, buf + (top * srcPitch) + (left << 1), + pPriv->src_addr, srcPitch, dstPitch, nlines, npixels, 2); } break; } |