summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86xv.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@nokia.com>2009-12-14 19:19:01 +0200
committerKeith Packard <keithp@keithp.com>2009-12-16 21:53:18 -0800
commit8127465f44fee99181f37a5e55dafc90bfafe3d8 (patch)
tree4d9f2b12cbd4d6221c1a9697c33e06ecd2edc4d9 /hw/xfree86/common/xf86xv.c
parentfaca1bc582e374d32ee9d63d10e072fbef4940a3 (diff)
xf86xv: Fix off-by-one in viewport clipping
Most of the Xv Put/Get operations have an off by one error in the viewport clipping. Apparently PutImage was fixed at some point but the same code was already copy-pasted all over the place, and so the other operations still suffer from the bug. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/common/xf86xv.c')
-rw-r--r--hw/xfree86/common/xf86xv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 82216598b..bdcc4fc2b 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -787,8 +787,8 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv)
VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
- VPBox.y2 = portPriv->pScrn->frameY1;
+ VPBox.x2 = portPriv->pScrn->frameX1 + 1;
+ VPBox.y2 = portPriv->pScrn->frameY1 + 1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
@@ -877,8 +877,8 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
- VPBox.y2 = portPriv->pScrn->frameY1;
+ VPBox.x2 = portPriv->pScrn->frameX1 + 1;
+ VPBox.y2 = portPriv->pScrn->frameY1 + 1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);
@@ -1433,8 +1433,8 @@ xf86XVPutStill(
VPBox.x1 = portPriv->pScrn->frameX0;
VPBox.y1 = portPriv->pScrn->frameY0;
- VPBox.x2 = portPriv->pScrn->frameX1;
- VPBox.y2 = portPriv->pScrn->frameY1;
+ VPBox.x2 = portPriv->pScrn->frameX1 + 1;
+ VPBox.y2 = portPriv->pScrn->frameY1 + 1;
REGION_INIT(pScreen, &VPReg, &VPBox, 1);
REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg);