Mesa (mesa_7_7_branch): st/xorg: fix a silly offset bug in xv

Zack Rusin zack at kemper.freedesktop.org
Wed Feb 10 02:16:04 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 2d3262d47d57d71a55e5c61d4910c1f38cb0bb8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d3262d47d57d71a55e5c61d4910c1f38cb0bb8c

Author: Zack Rusin <zackr at vmware.com>
Date:   Tue Feb  9 21:12:57 2010 -0500

st/xorg: fix a silly offset bug in xv

we were multiplying the difference in the wrong direction.

---

 src/gallium/state_trackers/xorg/xorg_xv.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
index 5f6d749..eb5ce88 100644
--- a/src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/src/gallium/state_trackers/xorg/xorg_xv.c
@@ -389,6 +389,9 @@ draw_yuv(struct xorg_xv_port_priv *port,
 {
    struct pipe_texture **textures = port->yuv[port->current_set];
 
+   /*debug_printf("  draw_yuv([%d, %d, %d ,%d], [%d, %d, %d, %d])\n",
+                src_x, src_y, src_w, src_h,
+                dst_x, dst_y, dst_w, dst_h);*/
    renderer_draw_yuv(port->r,
                      src_x, src_y, src_w, src_h,
                      dst_x, dst_y, dst_w, dst_h,
@@ -490,6 +493,9 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
    exaMoveInPixmap(pPixmap);
    dst = exaGetPixmapDriverPrivate(pPixmap);
 
+   /*debug_printf("display_video([%d, %d, %d, %d], [%d, %d, %d, %d])\n",
+     src_x, src_y, src_w, src_h, dstX, dstY, dst_w, dst_h);*/
+
    if (dst && !dst->tex) {
 	xorg_exa_set_shared_usage(pPixmap);
 	pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL);
@@ -540,8 +546,9 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
       offset_w = dst_w - w;
       offset_h = dst_h - h;
 
-      draw_yuv(pPriv, src_x + offset_x*diff_x, src_y + offset_y*diff_y,
-               src_w - offset_w*diff_x, src_h - offset_h*diff_x,
+      draw_yuv(pPriv,
+               src_x + offset_x*diff_x, src_y + offset_y*diff_y,
+               src_w - offset_w*diff_x, src_h - offset_h*diff_y,
                x, y, w, h);
 
       pbox++;




More information about the mesa-commit mailing list