summaryrefslogtreecommitdiff
path: root/src/radeon_textured_video.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2011-08-11 11:22:57 +0200
committerMichel Dänzer <michel@daenzer.net>2011-08-11 11:22:57 +0200
commitf95a41b7851565c282d22f8d679db1377428f165 (patch)
tree422b0e9496468f80d7dd95031f5c9ebeb0277280 /src/radeon_textured_video.c
parent93fc0843a1e31dc9237433bc2bf17df79e956d26 (diff)
video: Don't round up bottom/right edge for clipping source width/height.
It's not necessary: If the top/left edge was rounded down, this will be compensated by the subtraction. Worse, if the original source width/height is odd, rounding up may result in reading past the end of the source data. Fixes http://bugs.debian.org/637258 . Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_textured_video.c')
-rw-r--r--src/radeon_textured_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index d247db64..e49575da 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -383,7 +383,7 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
/* copy data */
top = (y1 >> 16) & ~1;
- nlines = RADEON_ALIGN((y2 + 0xffff) >> 16, 2) - top;
+ nlines = ((y2 + 0xffff) >> 16) - top;
pPriv->src_offset = pPriv->video_offset;
if (info->cs) {