From patchwork Tue May 26 07:52:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Show Liu X-Patchwork-Id: 3856 Return-Path: Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CB55603D1 for ; Tue, 26 May 2020 09:52:23 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kt33H34T"; dkim-atps=neutral Received: by mail-pl1-x644.google.com with SMTP id bh7so1411728plb.11 for ; Tue, 26 May 2020 00:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A9M8bomYEeA6PoIdyhb1OUTwEt6lk1Iv+oOzb1cluQw=; b=kt33H34T9WiiG2x7N+bDWz/xwzTTs5cvsX39E91NVTqKWjesUcaI7uTcc7Lm0U/b5Y njR9VPmcXOc6nwSDTrltpoT56VsG10LZbO7oYxySXMFBr8dBn9zMT2WjP4AkSW34Y5EF ZcERCFUeVLAQyA4KagUY7VNlCgAHM1f+VpAmiXNII8vQ43OKKFE04jC0vHDM8Eo494p9 jYxmYT23f10brXNecT83o5D806WQcldnjUnv660yYSKwdznUp2zqv3c6u87AW3N9ujgh YJrf/Pw61HrOXZz43AlWdgR/2LqhFfmzU92y2jwVUcM0nkirxfry7fPKwawCorcpy0kq pTeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A9M8bomYEeA6PoIdyhb1OUTwEt6lk1Iv+oOzb1cluQw=; b=tKTgGBo/2kg4IA9HfnMxF/bmZBQwZcapooBt3kkwn6EXdpI0Lt0aM7cYq4SzuO3u+D YpjSntKC3otrjNjhSCQ33Cz1k92/aSu6ZMm3cZxaaiMupCqi7Kxi5K2+YNRL7j6ldf5b WSvQjqPNiQ07e1Aj2FcS62HYeITN3tP6Tej5EPcH9AmGq1vA69/rDdWzMGMUq38qcsuu Mo/skmMp1SApwFe3i4BvXVrwQeUEy/BhDT3sYk6WLq+ElIjQL/m6kdXSbr4GvVOJ7Cb0 5YG6dYLtIYc5IsQg79HGrWqcWegrzfcVCSIqqu9Dpwia2T4VwovunqlLq+ZeN14iP2Bo wZug== X-Gm-Message-State: AOAM532d3Nz7fGV5ZlOBtS2NFE+icBKbMx3gS7V+mMohgnfUfI4Hum4h S6W/fpnUTMZobGgWRyo7uEkirLg5+2eguQ== X-Google-Smtp-Source: ABdhPJwAilPIFMAqbulEk2NiUxxDxFAFo7Xnlbs7OWYN0CQ6r10ibEWXf3mbz54KjsHwdyUJ+VVgyQ== X-Received: by 2002:a17:902:a60a:: with SMTP id u10mr30411055plq.249.1590479541176; Tue, 26 May 2020 00:52:21 -0700 (PDT) Received: from localhost.localdomain (211-20-20-223.HINET-IP.hinet.net. [211.20.20.223]) by smtp.gmail.com with ESMTPSA id v5sm14991091pjy.4.2020.05.26.00.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 00:52:20 -0700 (PDT) From: Show Liu To: libcamera-devel@lists.libcamera.org Date: Tue, 26 May 2020 15:52:02 +0800 Message-Id: <20200526075203.4503-1-show.liu@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC v2] [PATCH 0/1] qcam: Render YUV formats frame by OpenGL shader X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 07:52:24 -0000 This patch is to render the YUV(NV formats family) frame by OpenGL shader. I rework viewfinder class and give viewfinder handle abstract class as interface and make it able to handle viewfinder and viewfinderGL both. I tested on rockpi4b with kernel 5.7rc4+imx219 camera module. Show Liu (1): qcam: Render YUV formats frame by OpenGL shader src/qcam/fshader.h | 86 ++++++++++ src/qcam/main.cpp | 2 + src/qcam/main_window.cpp | 19 ++- src/qcam/main_window.h | 3 +- src/qcam/meson.build | 2 + src/qcam/viewfinder.cpp | 18 +- src/qcam/viewfinder.h | 23 ++- src/qcam/viewfinderGL.cpp | 346 ++++++++++++++++++++++++++++++++++++++ src/qcam/viewfinderGL.h | 102 +++++++++++ 9 files changed, 587 insertions(+), 14 deletions(-) create mode 100644 src/qcam/fshader.h create mode 100644 src/qcam/viewfinderGL.cpp create mode 100644 src/qcam/viewfinderGL.h