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: 8872611 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0FD449F1C1 for ; Mon, 18 Apr 2016 14:22:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 337DF20222 for ; Mon, 18 Apr 2016 14:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 566D320220 for ; Mon, 18 Apr 2016 14:22:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbcDROWK (ORCPT ); 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-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); ---------