From patchwork Mon Apr 18 14:22:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 33907 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asA47-0003sm-Ft; Mon, 18 Apr 2016 14:22:15 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-8) with esmtp id 1asA44-0001PA-kw; Mon, 18 Apr 2016 16:22:14 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbcDROWK (ORCPT + 1 other); Mon, 18 Apr 2016 10:22:10 -0400 Received: from mail-yw0-f171.google.com ([209.85.161.171]:33967 "EHLO mail-yw0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbcDROWI convert rfc822-to-8bit (ORCPT ); Mon, 18 Apr 2016 10:22:08 -0400 Received: by mail-yw0-f171.google.com with SMTP id j74so25999241ywg.1 for ; Mon, 18 Apr 2016 07:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=ek8cu1uqYtO5tYEVlMXluyFgSFe+cHxQ4tkJH8RLOWY=; b=B8UEwwWt57r/sYWfmigGxM4mBP5vyfNb6IrcdxO+aNfsMSzoeBPe/0wvTN2Y03CSZV 7TRUUYdjZ47GZ/i/3IisqejqihIV4aRwBG6NSQJEJzRjHpIFDm6RSF/G0erjUkNPzbXM RohCsbYCg7gGNCFJYp4N0WQfVwtH5c94HaJnoEqojkW2pHtjAqpLBBmcbnkLcCaR5OTu 7W0k2DF4sD9YcH6mWDyctdj4TWlrCKI7p3VST9hFIB6/CxE3dtlRFVmCMYNPd6iQhklf TinqiUGXSyARnGqPXThum3h9beM2UZ/7r2Os3VqzyB9lkftOGzYa4XctAB2fDyiHN+Do jKQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=ek8cu1uqYtO5tYEVlMXluyFgSFe+cHxQ4tkJH8RLOWY=; b=bL7NwKBasUgqLhkdmMrGkLP2w/rSR8IS3jIZAQ5lyj5z8RxrWggx7k44oi0qgFB4rt zRD4jDr7SIBFWxqBw7Znff72kaQvhVT2qPzr8ebZVxujmK0il9M293kilYsGOadJykuJ ATum6q9aOJwo7gsTfi6SfLWq0x2W9Ye+yKKSlR/KfQOkI61WoIi/NdvCvCwSaqOUWiug L/fVerYXcw7e1EqE4yaB4Zkh/mYuJPMktj/TU1z68A0JNM2Tz7y+pk/mBnlYQEczHU+7 nI9Hnx71nkCygz/QuU4MyMT+dajm10rcdYdSli6uX+8oDrcROoX/SkkyYuwlXhMzP1dl o8og== X-Gm-Message-State: AOPr4FVYRDLiZQQxIl+yyKbBuHS8LPznvQJDzELooJ7rreR88f2yKQW+bDYMkFuHU20fFEJ7AERE1isk+3zaNg== MIME-Version: 1.0 X-Received: by 10.37.117.8 with SMTP id q8mr14471363ybc.115.1460989327490; Mon, 18 Apr 2016 07:22:07 -0700 (PDT) Received: by 10.129.38.132 with HTTP; Mon, 18 Apr 2016 07:22:07 -0700 (PDT) In-Reply-To: <1460736595.973.5.camel@ndufresne.ca> References: <570B9285.9000209@linaro.org> <570B9454.6020307@linaro.org> <1460391908.30296.12.camel@collabora.com> <570CB882.4090805@linaro.org> <1460736595.973.5.camel@ndufresne.ca> Date: Mon, 18 Apr 2016 10:22:07 -0400 Message-ID: Subject: Re: gstreamer: v4l2videodec plugin From: Rob Clark To: nicolas@ndufresne.ca Cc: Stanimir Varbanov , Discussion of the development of and with GStreamer , Linux Media Mailing List Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.4.18.141517 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DATE_TZ_NA 0, DKIM_SIGNATURE 0, NO_URI_HTTPS 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_HTTP_RECEIVED 0, __PHISH_SPEAR_STRUCTURE_1 0, __PHISH_SPEAR_STRUCTURE_2 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __YOUTUBE_RCVD 0' On Fri, Apr 15, 2016 at 12:09 PM, Nicolas Dufresne wrote: > Le vendredi 15 avril 2016 à 11:58 -0400, Rob Clark a écrit : >> The issue is probably the YUV format, which we cannot really deal >> with >> properly in gallium.. it's a similar issue to multi-planer even if >> it >> is in a single buffer. >> >> The best way to handle this would be to import the same dmabuf fd >> twice, with appropriate offsets, to create one GL_RED eglimage for Y >> and one GL_RG eglimage for UV, and then combine them in shader in a >> similar way to how you'd handle separate Y and UV planes.. > > That's the strategy we use in GStreamer, as very few GL stack support > implicit color conversions. For that to work you need to implement the > "offset" field in winsys_handle, that was added recently, and make sure > you have R8 and RG88 support (usually this is just mapping). oh, heh, looks like nobody bothered to add this yet: --------- > cheers, > Nicolas --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 9aded3b..fab78ab 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -669,6 +669,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen, rsc->base.vtbl = &fd_resource_vtbl; rsc->cpp = util_format_get_blocksize(tmpl->format); slice->pitch /= rsc->cpp; + slice->offset = handle->offset; assert(rsc->cpp); ---------