From patchwork Thu May 27 10:55:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 12447 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 92DD5C3203 for ; Thu, 27 May 2021 10:55:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A15B268920; Thu, 27 May 2021 12:55:27 +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="gz0JZnjz"; dkim-atps=neutral Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 95ECD602AA for ; Thu, 27 May 2021 12:55:25 +0200 (CEST) Received: by mail-lj1-x22f.google.com with SMTP id w15so173381ljo.10 for ; Thu, 27 May 2021 03:55:25 -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=lYZxCv6thTMjIf8hVbistBJ9yq7vomtrRu1vAm7TjNI=; b=gz0JZnjzSUQgaQosC8QWq5A4VbyNS8LasbNp4yFfeiuMAmM8B5xxdp2MZ9AX+AtuvY RD5uMOhIfqwwO7DmEmGyfEyulENsgqo3X0CLqkFsUKtst9TOeNAvdZrn+/l+16NZFVkq gGFMuTJeAQiwESW28GYYGOE4nbilqXADZv+miQd55Hanp86Xdnq1vkMKcJBQYMTEiSNB /ARoBqXEDyjdFZy0xDLca5WfyJ3dgouYPwr2Nv2a1W7iJAgUGFBoZkqpzaM2O7cmlMi9 5uzKEW21SjYQ2OtVNGyaOd9E7VNeAKrmSYnJ1u764KCf97Bxqgsu1uyq591bR4VfMmYI f5lg== 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=lYZxCv6thTMjIf8hVbistBJ9yq7vomtrRu1vAm7TjNI=; b=YhAzskjNIYMGEcw+6qgUZ97WolxI1+2GwOFhsc26iosmR1nSACCWuxDmC8uF+IJqim 1mIZT7bFkZmslJJqO7gPFdla1lNnrAYOlzu5PRVO4X8SlWA5mJcuSmIfR3f7fP4WdlG3 1SWGoiHbgcGv7ng0a48FCtF0RwX+LgMIuD6VqkEH4l2Cr9hGvnZxnST1ojOaLq6LW1qx gdqDrGsgeppIS2aRXfEcsY6E4G26BANqKCIAWOp9XpbeO75kGQ0HBEEJav9PqdGWwuzo mnQ3KT1n7aCqCYcO6so82jV3apO3p9jroIyVfkhEV09EYoWhYF1slVAQi99aBqR3XEC4 bLjw== X-Gm-Message-State: AOAM532UA7tIQLCPX6oHkS/TNd1wVtl1OsBl0UpvtSYrPwQYo3HhUGbA Xk6upz/Ah1cECWKM9BiTj0um9Sy8gU+chw== X-Google-Smtp-Source: ABdhPJy+nX6tUgRCyZuIjSOn2h3XWM1egLFLi5+/kftbs7WjcA6caERQsXbb2ggT1JK1Qc3X6xSh9g== X-Received: by 2002:a2e:8086:: with SMTP id i6mr2051560ljg.135.1622112924665; Thu, 27 May 2021 03:55:24 -0700 (PDT) Received: from localhost.localdomain ([85.249.41.56]) by smtp.googlemail.com with ESMTPSA id h23sm170148lfc.52.2021.05.27.03.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 03:55:24 -0700 (PDT) From: Andrey Konovalov To: libcamera-devel@lists.libcamera.org, laurent.pinchart@ideasonboard.com Date: Thu, 27 May 2021 13:55:06 +0300 Message-Id: <20210527105511.447089-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/5] 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 v2 vs v1 [1]: * bayer_8.frag: fixed a bug of using F1 value instead of E1, and E1 value instead of F1. This error is present in the pixel shader listing in [2], and seems to have got into at least one project [3] from there. [1] https://patchwork.libcamera.org/cover/11387/ [2] https://casual-effects.com/research/McGuire2009Bayer/index.html [3] https://github.com/motmot/libcamiface/blob/master/demo/demosaic.frg