From patchwork Wed Jun 24 07:37:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Show Liu X-Patchwork-Id: 4197 Return-Path: Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 78371609A5 for ; Wed, 24 Jun 2020 09:37:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="VAT66ALi"; dkim-atps=neutral Received: by mail-pf1-x441.google.com with SMTP id x207so782534pfc.5 for ; Wed, 24 Jun 2020 00:37:21 -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=/Ep8EwY+5kRVIff+2E0Ltubic9w2i8azB+87JxoIb8U=; b=VAT66ALiFBGW9uFZ1L9eBm9r0SUR4wntuW2ye7ylv2hB3seXPLpcMXQghUoaryl1w8 dsi4ZLP/ke4AcPWNrs4O4oXKvDtN5ZE/rKkWL/bqcK0hZRoYjqDQ+OUjKZYuisUCL9mR Ft5v8a3QU4vEQcf0qcoQKcPKCQbVjiDY+dJ2LVu+pPw0KECnsbAXK0MsFC2uF7OyCcKD Nes6dFqIThQZDWy16Plja6ATM3tCrAQb7Cl1O1exc97lygMG+bx/+kgpdlSIe9om6E40 d1cH3W6qBp/dGNvEp9YDESEaqLOtUSdF5Pv6YAgDYJhcV89Hrcic/hMVCvyZGia31ieb X1sQ== 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=/Ep8EwY+5kRVIff+2E0Ltubic9w2i8azB+87JxoIb8U=; b=G0QDagWyJW2+6IUSUGoMhHn5HJUWX9b+SInfc6gdhTYlKKEop0M9q0tcPC/Cy7zvaX DTEXVBmtkcxyBKB2cVr05kUxkPobYwdeG/xJ9kB8NCDlAVQ1NrPW8PgM2cHsm5x7xbM9 0fR7U8TuN8M4dFU9gT+6XWTJR0a8km+yupxymWFpedCQSMguYDtpMXp0x5bD6cINs35y 6oa5KQnwsn9YrNHpI5+VekAOTp/mSbkhhnHyMKrl1qweQvLtMisM/XRccaPD+4qPQL1l 8eXdMBAdMUMe1axTuIgscB//1G5v4E6ygoqBLIwdiYOupd/5nJFsk0o8LOsdpP94ys3W CFjQ== X-Gm-Message-State: AOAM532JwJ/X0LRjbZW1FXggRVImiMzWiASCdWb3hB9CoUkgMM2QsRBb y+sbxIxno6oiF4U8FkmNNuVtk8Ub71unhg== X-Google-Smtp-Source: ABdhPJztXodXywT9ziZqQOIpGlhiCtmDiLzn8rHcM/j+tMRqYR6YvQOcxYxhlJRY+5UwUncZtyIs2Q== X-Received: by 2002:a63:d250:: with SMTP id t16mr7377105pgi.51.1592984239025; Wed, 24 Jun 2020 00:37:19 -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 b19sm4281226pjo.57.2020.06.24.00.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 00:37:18 -0700 (PDT) From: Show Liu To: libcamera-devel@lists.libcamera.org Date: Wed, 24 Jun 2020 15:37:04 +0800 Message-Id: <20200624073705.14737-1-show.liu@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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: Wed, 24 Jun 2020 07:37:21 -0000 Hi, I would like to share my work for qcam utility. This patch is to render the NV family YUV formats by OpenGL shader. It's mainly improve the format convert performence and use the GPU to do the rendering stuff when the camera stream format is NV family YUV frame. I refine the fragment shader and got better pixel color than previous I posted. I tested on ROCK PI 4B with imx219 camera module and Manjaro distribution with 5.7.0 kernel. To enable GPU support on Rock Pi 4B, Kernel enable Panfrost support and require masa 20.2.0 installed. Show Liu (1): qcam: Render YUV formats frame by OpenGL shader src/qcam/main.cpp | 2 + src/qcam/main_window.cpp | 19 ++- src/qcam/main_window.h | 3 +- src/qcam/meson.build | 2 + src/qcam/shader.h | 104 ++++++++++++ src/qcam/viewfinder.cpp | 18 +- src/qcam/viewfinder.h | 23 ++- src/qcam/viewfinderGL.cpp | 335 ++++++++++++++++++++++++++++++++++++++ src/qcam/viewfinderGL.h | 101 ++++++++++++ 9 files changed, 593 insertions(+), 14 deletions(-) create mode 100644 src/qcam/shader.h create mode 100644 src/qcam/viewfinderGL.cpp create mode 100644 src/qcam/viewfinderGL.h