From patchwork Tue Aug 11 14:06:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 40673 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7BE73I2022317 for ; Tue, 11 Aug 2009 14:07:03 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9977B9EE15; Tue, 11 Aug 2009 07:07:03 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CC1D9EE13 for ; Tue, 11 Aug 2009 07:06:58 -0700 (PDT) Received: by mail.ffwll.ch (Postfix, from userid 1000) id 9404B20C21C; Wed, 12 Aug 2009 00:00:27 +0200 (CEST) X-Spam-ASN: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on orange.ffwll.ch X-Spam-Level: X-Spam-Hammy: 0.000-+--signed-off-by, 0.000-+--signedoffby, 0.000-+--100644 X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Spammy: 0.972-+--H*m:ffwll, 0.970-+--H*Ad:U*daniel.vetter, 0.947-+--H*Ad:D*ffwll.ch Received: from biene (unknown [192.168.23.129]) by mail.ffwll.ch (Postfix) with ESMTP id 16B6120C226; Wed, 12 Aug 2009 00:00:07 +0200 (CEST) Received: from daniel by biene with local (Exim 4.69) (envelope-from ) id 1Mas0B-0003eS-3X; Tue, 11 Aug 2009 16:06:59 +0200 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Tue, 11 Aug 2009 16:06:37 +0200 Message-Id: <8a3ddc0d78dcb40a14f8037b81cf202eaa40c301.1249999028.git.daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <2096013512e0099bfbb89439943c1b70cccabc92.1249999028.git.daniel.vetter@ffwll.ch> References: <0328734a90544a6cd72d9eaf64015db9d3462921.1249999028.git.daniel.vetter@ffwll.ch> <10614c7dd4ecbb1b4d3dd6a15b949cb389053f1f.1249999028.git.daniel.vetter@ffwll.ch> <891b387c6b31972a3e339508e57bd660b2991a17.1249999028.git.daniel.vetter@ffwll.ch> <2096013512e0099bfbb89439943c1b70cccabc92.1249999028.git.daniel.vetter@ffwll.ch> In-Reply-To: References: MIME-Version: 1.0 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 07/18] Xv: kill destId in I830PutImage X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org It's only used to remember that XvMC has ỲV12 as output. is_planar_fourcc already takes care of that in all necessary cases. Signed-off-by: Daniel Vetter --- src/i830_video.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/i830_video.c b/src/i830_video.c index 0b30569..471fd44 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2187,7 +2187,7 @@ I830PutImage(ScrnInfoPtr pScrn, I830OverlayRegPtr overlay; PixmapPtr pPixmap = get_drawable_pixmap(pDraw);; INT32 x1, x2, y1, y2; - int srcPitch = 0, srcPitch2 = 0, dstPitch, destId; + int srcPitch = 0, srcPitch2 = 0, dstPitch; int dstPitch2 = 0; int top, left, npixels, nlines, size; BoxRec dstBox; @@ -2246,7 +2246,6 @@ I830PutImage(ScrnInfoPtr pScrn, } } - destId = id; if (is_planar_fourcc(id)) { srcPitch = (width + 0x3) & ~0x3; srcPitch2 = ((width >> 1) + 0x3) & ~0x3; @@ -2274,7 +2273,7 @@ I830PutImage(ScrnInfoPtr pScrn, /* Determine the desired destination pitch (representing the chroma's pitch, * in the planar case. */ - switch (destId) { + switch (id) { case FOURCC_YV12: case FOURCC_I420: if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) { @@ -2357,7 +2356,6 @@ I830PutImage(ScrnInfoPtr pScrn, pPriv->YBufOffset = (uint32_t)((uintptr_t)buf); pPriv->VBufOffset = pPriv->YBufOffset + (dstPitch2 * height); pPriv->UBufOffset = pPriv->VBufOffset + (dstPitch * height / 2); - destId = FOURCC_YV12; } else { #endif if (pPriv->textured) @@ -2406,7 +2404,7 @@ I830PutImage(ScrnInfoPtr pScrn, } if (!pPriv->textured) { - i830_display_overlay(pScrn, crtc, destId, width, height, dstPitch, + i830_display_overlay(pScrn, crtc, id, width, height, dstPitch, x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); @@ -2466,11 +2464,11 @@ I830PutImage(ScrnInfoPtr pScrn, pPriv->VBufOffset = pPriv->UBufOffset + height*width/4; } #endif - I965DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height, + I965DisplayVideoTextured(pScrn, pPriv, id, clipBoxes, width, height, dstPitch, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pPixmap); } else { - I915DisplayVideoTextured(pScrn, pPriv, destId, clipBoxes, width, height, + I915DisplayVideoTextured(pScrn, pPriv, id, clipBoxes, width, height, dstPitch, dstPitch2, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pPixmap); }