Commit 8127465f authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Keith Packard
Browse files

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: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: default avatarTiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent faca1bc5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment