From patchwork Tue Jun 22 13:46:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 12684 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8C9CAC321B for ; Tue, 22 Jun 2021 13:47:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0B29A60294; Tue, 22 Jun 2021 15:47:01 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cKYkjAMF"; dkim-atps=neutral Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 66CF860292 for ; Tue, 22 Jun 2021 15:46:59 +0200 (CEST) Received: by mail-lj1-x230.google.com with SMTP id z22so30196993ljh.8 for ; Tue, 22 Jun 2021 06:46:59 -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=ZTq8/06QldmiwIm3mjhHCMxENRg+Cvc3AeSeYmUdZlQ=; b=cKYkjAMF5QnALTn1NkFlS0DoRFk/xHjsw4XAg684UOvfafNM0WmMLxwxsQAimvIAL8 WUUzZw4SasCTnDR1Nfy2xrAExmxRb3y8V0AVtOj7j/FPrRjv+9pGck3EuP0EbAxA1SFa D/qL3wEbKh+XgNEJk/WFOTn5CaXYznsGyna0Q+4ildOeubfRI34Hgi2TKilN/n0mJPJV zk+zJHXuPRIpDdy1X7dQOSdXJ3hn/BVIOKhx/e9jnANK+erpTAMZf7ETVELWkd99XJ5b rtI3H9qKIcp4dSJNhQANhvj6MS1oBOxxwj3d+ddWaSsn7P+CmYJWiP1ixWw0F6i93eRR EMXg== 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=ZTq8/06QldmiwIm3mjhHCMxENRg+Cvc3AeSeYmUdZlQ=; b=Lp8DwUem6K2W2a/mFSKY1nyZVHrQafmAhNaKqZHG3PZfp9HTzfnywRW/0I1eJu7ATN xfl+zK+nPzR2OMnGPx+gI/26/nEvLqItMHVImAvqr9h024ps9r/ZCoda/pfhQiY6ohrj e0EJFxpuh8WRC0xPlSD3E5nSiRfQV3chzE2LvO/bac/O3IKen8eKPX+5lb9gW9d9mMbw QfNdUKOyqgKJSECu3ZSCEBdKEyklroEDal9YNf0IxbEqPJGzMFBKllEZzHsURu8HuB28 u6ZZJhRFn6ocdfzq5+zdDF5r9HEWceuFQLsCQ8ceodpJLXITdC2iaSbSuIXp6zBFUrLj SRjg== X-Gm-Message-State: AOAM531+wrlSJWsTXGr0dkKVLIreUamKmSbq9WwGj+1q1WxlQzAGpp1N PRIejT+Tf2VuSwC5/xsOnTLIE8CenVWo2w== X-Google-Smtp-Source: ABdhPJynq4CnHpzDv5i+q/vV+jbdxw+VmWneKwhwKKRHd+tIfmnYUnRsJZfxpQvh5gdMHDM1LERhaw== X-Received: by 2002:a2e:9e17:: with SMTP id e23mr3267440ljk.177.1624369618756; Tue, 22 Jun 2021 06:46:58 -0700 (PDT) Received: from localhost.localdomain ([85.249.44.185]) by smtp.googlemail.com with ESMTPSA id b19sm163125ljo.37.2021.06.22.06.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 06:46:58 -0700 (PDT) From: Andrey Konovalov To: libcamera-devel@lists.libcamera.org, laurent.pinchart@ideasonboard.com Date: Tue, 22 Jun 2021 16:46:43 +0300 Message-Id: <20210622134652.1279260-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 0/9] qcam: viewfinder_gl: add RAW8, RAW10P and RAW12P formats 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: , Cc: morgan@casual-effects.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patchset adds support for both 10-bit, and 12-bit raw Bayer packed and 8-bit raw Bayer formats. GL_RED texture is used to store the image data. Not only this allows to use the same shader code in 10-bit and 12-bit cases. But it also turned out that sampling from GL_RED texture is easier (less "patterns") than from GL_RGB - even though we loose the "auto-skipping the LS bytes of pixel values" feature in the 12-bit case. Changes in v5 vs v4 [1]: * 8-bit raw Bayer format is back, but it is now split into several patches (4/9 to 8/9) to make it easier to see the particular changes done to the original shader code. With the first 8 of the total 9 patches applied I am seeing some artifacts (note the horizontal colour lines which change when the viewfinder window height is changed) [2]. Patch 9/9 fixes that, but the root cause of the issue isn't currently known. That's why 9/9 comes as RFC, and the series can be merged without it. * s/tex_raw/tex_y in the shaders to match the uniform name used in the cpp code. [1] https://patchwork.libcamera.org/cover/12629/ [2] https://people.linaro.org/~andrey.konovalov/cam-56/20210622.imx219-RAW8-artifacts.viewfinder_gl-add-RAW1xP-and-RAW8-support-v4.1-raw8.0.mp4