[{"id":36960,"web_url":"https://patchwork.libcamera.org/comment/36960/","msgid":"<20251121031445.GT10711@pendragon.ideasonboard.com>","date":"2025-11-21T03:14:45","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"You're mixing tabs and spaces for indentation in the file.\n\nOn Thu, Nov 20, 2025 at 11:33:30PM +0000, Bryan O'Donoghue wrote:\n> Extend out the bayer fragment shaders to take 3 x 256 byte inputs as\n> textures from the CPU.\n> \n> We then use an index to the table to recover the colour-corrected values\n> provided by the SoftIPA thread.\n> \n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>  .../internal/shaders/bayer_1x_packed.frag     | 56 +++++++++++++++++\n>  .../internal/shaders/bayer_unpacked.frag      | 62 ++++++++++++++++++-\n>  2 files changed, 117 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> index 19b13ad08..90bd64570 100644\n> --- a/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> +++ b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> @@ -65,6 +65,10 @@ uniform vec2 tex_step;\n>  uniform vec2 tex_bayer_first_red;\n>  \n>  uniform sampler2D tex_y;\n> +uniform sampler2D red_param;\n> +uniform sampler2D green_param;\n> +uniform sampler2D blue_param;\n> +uniform mat3 ccm;\n>  \n>  void main(void)\n>  {\n> @@ -212,5 +216,57 @@ void main(void)\n>  \t\t\tvec3(patterns.y, C, patterns.x) :\n>  \t\t\tvec3(patterns.wz, C));\n>  \n> +#if defined(APPLY_CCM_PARAMETERS)\n> +\t/*\n> +\t *   CCM is a 3x3 in the format\n> +\t *\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | RedRedGain   | RedGreenGain   | RedBlueGain   |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | GreenRedGain | GreenGreenGain | GreenBlueGain |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | BlueRedGain  |  BlueGreenGain | BlueBlueGain  |\n> +\t *   +--------------+----------------+---------------+\n> +\t *\n> +\t *   Rout = RedRedGain * Rin + RedGreenGain * Gin + RedBlueGain * Bin\n> +\t *   Gout = GreenRedGain * Rin + GreenGreenGain * Gin + GreenBlueGain * Bin\n> +\t *   Bout = BlueRedGain * Rin + BlueGreenGain * Gin + BlueBlueGain * Bin\n> +\t *\n> +\t *   We upload to the GPU without transposition glUniformMatrix3f(.., .., GL_FALSE, ccm);\n> +\t *\n> +\t *   CPU\n> +\t *   float ccm [] = {\n> +\t *             RedRedGain,   RedGreenGain,   RedBlueGain,\n> +\t *             GreenRedGain, GreenGreenGain, GreenBlueGain,\n> +\t *             BlueRedGain,  BlueGreenGain,  BlueBlueGain,\n> +\t *   };\n> +\t *\n> +\t *   GPU\n> +\t *   ccm = {\n> +\t *             RedRedGain,   GreenRedGain,   BlueRedGain,\n> +\t *             RedGreenGain, GreenGreenGain, BlueGreenGain,\n> +\t *             RedBlueGain,  GreenBlueGain,  BlueBlueGain,\n> +\t *   }\n> +\t *\n> +\t *   However the indexing for the mat data-type is column major hence\n> +\t *   ccm[0][0] = RedRedGain, ccm[0][1] = RedGreenGain, ccm[0][2] = RedBlueGain\n> +\t *\n> +\t */\n> +\tfloat rin, gin, bin;\n> +\trin = rgb.r;\n> +\tgin = rgb.g;\n> +\tbin = rgb.b;\n> +\n> +\trgb.r = (rin * ccm[0][0]) + (gin * ccm[0][1]) + (bin * ccm[0][2]);\n> +\trgb.g = (rin * ccm[1][0]) + (gin * ccm[1][1]) + (bin * ccm[1][2]);\n> +\trgb.b = (rin * ccm[2][0]) + (gin * ccm[2][1]) + (bin * ccm[2][2]);\n> +\n> +#elif defined(APPLY_RGB_PARAMETERS)\n> +\t/* Apply bayer params */\n> +\trgb.r = texture2D(red_param, vec2(rgb.r, 0.5)).r;\n> +\trgb.g = texture2D(green_param, vec2(rgb.g, 0.5)).g;\n> +\trgb.b = texture2D(blue_param, vec2(rgb.b, 0.5)).b;\n> +#endif\n> +\n>  \tgl_FragColor = vec4(rgb, 1.0);\n>  }\n> diff --git a/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> index aa7a1b004..7c3d12b03 100644\n> --- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n> +++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> @@ -21,11 +21,17 @@ precision highp float;\n>  \n>  /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/\n>  uniform sampler2D       tex_y;\n> +uniform sampler2D\tred_param;\n> +uniform sampler2D\tgreen_param;\n> +uniform sampler2D\tblue_param;\n>  varying vec4            center;\n>  varying vec4            yCoord;\n>  varying vec4            xCoord;\n> +uniform mat3\t\tccm;\n>  \n>  void main(void) {\n> +    vec3 rgb;\n> +\n>      #define fetch(x, y) texture2D(tex_y, vec2(x, y)).r\n>  \n>      float C = texture2D(tex_y, center.xy).r; // ( 0, 0)\n> @@ -97,11 +103,65 @@ void main(void) {\n>      PATTERN.xw  += kB.xw * B;\n>      PATTERN.xz  += kF.xz * F;\n>  \n> -    gl_FragColor.rgb = (alternate.y == 0.0) ?\n> +    rgb =  (alternate.y == 0.0) ?\n>          ((alternate.x == 0.0) ?\n>              vec3(C, PATTERN.xy) :\n>              vec3(PATTERN.z, C, PATTERN.w)) :\n>          ((alternate.x == 0.0) ?\n>              vec3(PATTERN.w, C, PATTERN.z) :\n>              vec3(PATTERN.yx, C));\n> +\n> +#if defined(APPLY_CCM_PARAMETERS)\n> +\t/*\n> +\t *   CCM is a 3x3 in the format\n> +\t *\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | RedRedGain   | RedGreenGain   | RedBlueGain   |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | GreenRedGain | GreenGreenGain | GreenBlueGain |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | BlueRedGain  |  BlueGreenGain | BlueBlueGain  |\n> +\t *   +--------------+----------------+---------------+\n> +\t *\n> +\t *   Rout = RedRedGain * Rin + RedGreenGain * Gin + RedBlueGain * Bin\n> +\t *   Gout = GreenRedGain * Rin + GreenGreenGain * Gin + GreenBlueGain * Bin\n> +\t *   Bout = BlueRedGain * Rin + BlueGreenGain * Gin + BlueBlueGain * Bin\n> +\t *\n> +\t *   We upload to the GPU without transposition glUniformMatrix3f(.., .., GL_FALSE, ccm);\n> +\t *\n> +\t *   CPU\n> +\t *   float ccm [] = {\n> +\t *             RedRedGain,   RedGreenGain,   RedBlueGain,\n> +\t *             GreenRedGain, GreenGreenGain, GreenBlueGain,\n> +\t *             BlueRedGain,  BlueGreenGain,  BlueBlueGain,\n> +\t *   };\n> +\t *\n> +\t *   GPU\n> +\t *   ccm = {\n> +\t *             RedRedGain,   GreenRedGain,   BlueRedGain,\n> +\t *             RedGreenGain, GreenGreenGain, BlueGreenGain,\n> +\t *             RedBlueGain,  GreenBlueGain,  BlueBlueGain,\n> +\t *   }\n> +\t *\n> +\t *   However the indexing for the mat data-type is column major hence\n> +\t *   ccm[0][0] = RedRedGain, ccm[0][1] = RedGreenGain, ccm[0][2] = RedBlueGain\n> +\t *\n> +\t */\n> +\tfloat rin, gin, bin;\n> +\trin = rgb.r;\n> +\tgin = rgb.g;\n> +\tbin = rgb.b;\n> +\n> +\trgb.r = (rin * ccm[0][0]) + (gin * ccm[0][1]) + (bin * ccm[0][2]);\n> +\trgb.g = (rin * ccm[1][0]) + (gin * ccm[1][1]) + (bin * ccm[1][2]);\n> +\trgb.b = (rin * ccm[2][0]) + (gin * ccm[2][1]) + (bin * ccm[2][2]);\n> +\n> +#elif defined(APPLY_RGB_PARAMETERS)\n> +\t/* Apply bayer params */\n> +\trgb.r = texture2D(red_param, vec2(rgb.r, 0.5)).r;\n> +\trgb.g = texture2D(green_param, vec2(rgb.g, 0.5)).g;\n> +\trgb.b = texture2D(blue_param, vec2(rgb.b, 0.5)).b;\n> +#endif\n> +\n> +    gl_FragColor.rgb = rgb;\n>  }\n> -- \n> 2.51.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 70943C3335\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 03:15:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 95FD060A81;\n\tFri, 21 Nov 2025 04:15:11 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C8F32609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 04:15:10 +0100 (CET)","from pendragon.ideasonboard.com (fs276ed015.tkyc509.ap.nuro.jp\n\t[39.110.208.21])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9353FEAE;\n\tFri, 21 Nov 2025 04:13:03 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MMKUtNdM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763694784;\n\tbh=o1ZG4o6abGsQL0w9rhX2CzszLS2XpVTiJF3CDp3PbJs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MMKUtNdMQ143UF/lgjALa1zlPWKC/nSkC9sIccI2+eN1cZ4nc2QJcXRHHqHJTxYDm\n\tKhgtTzlEC//syGoCdt5nv/cYseETUhFDlIVBbD7YR/Q7BkG2qGZCY0byU6S8z4kFSH\n\t43NeJX7jw4hbyjlN4EHae+nn5W4NxN0bVt4IRiS0=","Date":"Fri, 21 Nov 2025 12:14:45 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","Message-ID":"<20251121031445.GT10711@pendragon.ideasonboard.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251120233347.5046-7-bryan.odonoghue@linaro.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36961,"web_url":"https://patchwork.libcamera.org/comment/36961/","msgid":"<20251121031829.GU10711@pendragon.ideasonboard.com>","date":"2025-11-21T03:18:29","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Nov 20, 2025 at 11:33:30PM +0000, Bryan O'Donoghue wrote:\n> Extend out the bayer fragment shaders to take 3 x 256 byte inputs as\n> textures from the CPU.\n> \n> We then use an index to the table to recover the colour-corrected values\n> provided by the SoftIPA thread.\n> \n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>  .../internal/shaders/bayer_1x_packed.frag     | 56 +++++++++++++++++\n>  .../internal/shaders/bayer_unpacked.frag      | 62 ++++++++++++++++++-\n>  2 files changed, 117 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/internal/shaders/bayer_1x_packed.frag b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> index 19b13ad08..90bd64570 100644\n> --- a/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> +++ b/include/libcamera/internal/shaders/bayer_1x_packed.frag\n> @@ -65,6 +65,10 @@ uniform vec2 tex_step;\n>  uniform vec2 tex_bayer_first_red;\n>  \n>  uniform sampler2D tex_y;\n> +uniform sampler2D red_param;\n> +uniform sampler2D green_param;\n> +uniform sampler2D blue_param;\n> +uniform mat3 ccm;\n>  \n>  void main(void)\n>  {\n> @@ -212,5 +216,57 @@ void main(void)\n>  \t\t\tvec3(patterns.y, C, patterns.x) :\n>  \t\t\tvec3(patterns.wz, C));\n>  \n> +#if defined(APPLY_CCM_PARAMETERS)\n\nIf the goal of sharing shaders between qcam and the soft ISP is to allow\ntesting of the shaders in qcam for development, this should be done\nunconditionally. It's fine to set the parameters to hardcoded defaults\nin qcam as a first step.\n\nIf controlling the processing parameters of the shader from qcam isn't\ndesired, then I don't see why we should share the shaders.\n\n> +\t/*\n> +\t *   CCM is a 3x3 in the format\n> +\t *\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | RedRedGain   | RedGreenGain   | RedBlueGain   |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | GreenRedGain | GreenGreenGain | GreenBlueGain |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | BlueRedGain  |  BlueGreenGain | BlueBlueGain  |\n> +\t *   +--------------+----------------+---------------+\n> +\t *\n> +\t *   Rout = RedRedGain * Rin + RedGreenGain * Gin + RedBlueGain * Bin\n> +\t *   Gout = GreenRedGain * Rin + GreenGreenGain * Gin + GreenBlueGain * Bin\n> +\t *   Bout = BlueRedGain * Rin + BlueGreenGain * Gin + BlueBlueGain * Bin\n> +\t *\n> +\t *   We upload to the GPU without transposition glUniformMatrix3f(.., .., GL_FALSE, ccm);\n> +\t *\n> +\t *   CPU\n> +\t *   float ccm [] = {\n> +\t *             RedRedGain,   RedGreenGain,   RedBlueGain,\n> +\t *             GreenRedGain, GreenGreenGain, GreenBlueGain,\n> +\t *             BlueRedGain,  BlueGreenGain,  BlueBlueGain,\n> +\t *   };\n> +\t *\n> +\t *   GPU\n> +\t *   ccm = {\n> +\t *             RedRedGain,   GreenRedGain,   BlueRedGain,\n> +\t *             RedGreenGain, GreenGreenGain, BlueGreenGain,\n> +\t *             RedBlueGain,  GreenBlueGain,  BlueBlueGain,\n> +\t *   }\n> +\t *\n> +\t *   However the indexing for the mat data-type is column major hence\n> +\t *   ccm[0][0] = RedRedGain, ccm[0][1] = RedGreenGain, ccm[0][2] = RedBlueGain\n> +\t *\n> +\t */\n> +\tfloat rin, gin, bin;\n> +\trin = rgb.r;\n> +\tgin = rgb.g;\n> +\tbin = rgb.b;\n> +\n> +\trgb.r = (rin * ccm[0][0]) + (gin * ccm[0][1]) + (bin * ccm[0][2]);\n> +\trgb.g = (rin * ccm[1][0]) + (gin * ccm[1][1]) + (bin * ccm[1][2]);\n> +\trgb.b = (rin * ccm[2][0]) + (gin * ccm[2][1]) + (bin * ccm[2][2]);\n> +\n> +#elif defined(APPLY_RGB_PARAMETERS)\n> +\t/* Apply bayer params */\n> +\trgb.r = texture2D(red_param, vec2(rgb.r, 0.5)).r;\n> +\trgb.g = texture2D(green_param, vec2(rgb.g, 0.5)).g;\n> +\trgb.b = texture2D(blue_param, vec2(rgb.b, 0.5)).b;\n> +#endif\n> +\n>  \tgl_FragColor = vec4(rgb, 1.0);\n>  }\n> diff --git a/include/libcamera/internal/shaders/bayer_unpacked.frag b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> index aa7a1b004..7c3d12b03 100644\n> --- a/include/libcamera/internal/shaders/bayer_unpacked.frag\n> +++ b/include/libcamera/internal/shaders/bayer_unpacked.frag\n> @@ -21,11 +21,17 @@ precision highp float;\n>  \n>  /** Monochrome RGBA or GL_LUMINANCE Bayer encoded texture.*/\n>  uniform sampler2D       tex_y;\n> +uniform sampler2D\tred_param;\n> +uniform sampler2D\tgreen_param;\n> +uniform sampler2D\tblue_param;\n>  varying vec4            center;\n>  varying vec4            yCoord;\n>  varying vec4            xCoord;\n> +uniform mat3\t\tccm;\n>  \n>  void main(void) {\n> +    vec3 rgb;\n> +\n>      #define fetch(x, y) texture2D(tex_y, vec2(x, y)).r\n>  \n>      float C = texture2D(tex_y, center.xy).r; // ( 0, 0)\n> @@ -97,11 +103,65 @@ void main(void) {\n>      PATTERN.xw  += kB.xw * B;\n>      PATTERN.xz  += kF.xz * F;\n>  \n> -    gl_FragColor.rgb = (alternate.y == 0.0) ?\n> +    rgb =  (alternate.y == 0.0) ?\n>          ((alternate.x == 0.0) ?\n>              vec3(C, PATTERN.xy) :\n>              vec3(PATTERN.z, C, PATTERN.w)) :\n>          ((alternate.x == 0.0) ?\n>              vec3(PATTERN.w, C, PATTERN.z) :\n>              vec3(PATTERN.yx, C));\n> +\n> +#if defined(APPLY_CCM_PARAMETERS)\n> +\t/*\n> +\t *   CCM is a 3x3 in the format\n> +\t *\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | RedRedGain   | RedGreenGain   | RedBlueGain   |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | GreenRedGain | GreenGreenGain | GreenBlueGain |\n> +\t *   +--------------+----------------+---------------+\n> +\t *   | BlueRedGain  |  BlueGreenGain | BlueBlueGain  |\n> +\t *   +--------------+----------------+---------------+\n> +\t *\n> +\t *   Rout = RedRedGain * Rin + RedGreenGain * Gin + RedBlueGain * Bin\n> +\t *   Gout = GreenRedGain * Rin + GreenGreenGain * Gin + GreenBlueGain * Bin\n> +\t *   Bout = BlueRedGain * Rin + BlueGreenGain * Gin + BlueBlueGain * Bin\n> +\t *\n> +\t *   We upload to the GPU without transposition glUniformMatrix3f(.., .., GL_FALSE, ccm);\n> +\t *\n> +\t *   CPU\n> +\t *   float ccm [] = {\n> +\t *             RedRedGain,   RedGreenGain,   RedBlueGain,\n> +\t *             GreenRedGain, GreenGreenGain, GreenBlueGain,\n> +\t *             BlueRedGain,  BlueGreenGain,  BlueBlueGain,\n> +\t *   };\n> +\t *\n> +\t *   GPU\n> +\t *   ccm = {\n> +\t *             RedRedGain,   GreenRedGain,   BlueRedGain,\n> +\t *             RedGreenGain, GreenGreenGain, BlueGreenGain,\n> +\t *             RedBlueGain,  GreenBlueGain,  BlueBlueGain,\n> +\t *   }\n> +\t *\n> +\t *   However the indexing for the mat data-type is column major hence\n> +\t *   ccm[0][0] = RedRedGain, ccm[0][1] = RedGreenGain, ccm[0][2] = RedBlueGain\n> +\t *\n> +\t */\n> +\tfloat rin, gin, bin;\n> +\trin = rgb.r;\n> +\tgin = rgb.g;\n> +\tbin = rgb.b;\n> +\n> +\trgb.r = (rin * ccm[0][0]) + (gin * ccm[0][1]) + (bin * ccm[0][2]);\n> +\trgb.g = (rin * ccm[1][0]) + (gin * ccm[1][1]) + (bin * ccm[1][2]);\n> +\trgb.b = (rin * ccm[2][0]) + (gin * ccm[2][1]) + (bin * ccm[2][2]);\n> +\n> +#elif defined(APPLY_RGB_PARAMETERS)\n> +\t/* Apply bayer params */\n> +\trgb.r = texture2D(red_param, vec2(rgb.r, 0.5)).r;\n> +\trgb.g = texture2D(green_param, vec2(rgb.g, 0.5)).g;\n> +\trgb.b = texture2D(blue_param, vec2(rgb.b, 0.5)).b;\n> +#endif\n> +\n> +    gl_FragColor.rgb = rgb;\n>  }","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 68466C3336\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 03:18:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BDEB2609DE;\n\tFri, 21 Nov 2025 04:18:57 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 494DD609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 04:18:55 +0100 (CET)","from pendragon.ideasonboard.com (fs276ed015.tkyc509.ap.nuro.jp\n\t[39.110.208.21])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 36D17E7C;\n\tFri, 21 Nov 2025 04:16:47 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"m/myGLz4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763695009;\n\tbh=q9pnWlYrCkM5goC/wJh+4KvACHvoWfHwTqBzHuoH1oc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m/myGLz4cWQDsb/06sp+bp9R24NudrXF09S7HuV7GLg6DvBKPrY/72cm90KkX05Yj\n\tXzWGDKXtpCA94qGAJ22KT3lIEq/bWXh4KTetBstNO7O8VGH90BbaTLKvRRQfTKK4/m\n\tumV72DPgmkpWQXzUjPEhi4kxs6YIhjAXlPwqVceg=","Date":"Fri, 21 Nov 2025 12:18:29 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","Message-ID":"<20251121031829.GU10711@pendragon.ideasonboard.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251120233347.5046-7-bryan.odonoghue@linaro.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36966,"web_url":"https://patchwork.libcamera.org/comment/36966/","msgid":"<d289d887-467f-4c8f-b8f7-54f1663e4374@linaro.org>","date":"2025-11-21T08:43:11","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 21/11/2025 03:14, Laurent Pinchart wrote:\n> You're mixing tabs and spaces for indentation in the file.\n> \n\nAh damnit you're right.\n\nI develop in packed and then copy/paste to unpacked.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 06EB1C3330\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 08:43:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F0F9160A80;\n\tFri, 21 Nov 2025 09:43:15 +0100 (CET)","from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20462608CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 09:43:14 +0100 (CET)","by mail-wm1-x32d.google.com with SMTP id\n\t5b1f17b1804b1-477563e28a3so12208045e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 00:43:14 -0800 (PST)","from [192.168.0.27] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-477bf1f365fsm31922825e9.8.2025.11.21.00.43.12\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 21 Nov 2025 00:43:12 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"MtA1HnY4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763714593; x=1764319393;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=rQGlhB3TvWSHk7t6VmTH/bbarw5CV7nDLOTxqQrg6zY=;\n\tb=MtA1HnY4YEUfXuYh4RzIYxIYh+G0TFw9PtuNvTygfwB8sAJC0exzCGXhcEsc8LODvg\n\t/CuBtc4FO+IyiUehA8gH8imouI3qW7F1NVzdFFeA54fqtJ7hK5pXeEQWRcUf3YU9mcPE\n\tJed7EUkNxWOPMbvDGCg1V2peKGkelVK1Kuo9xJ8AxPdNInBcD2Gadw4FjrNU3JAqjdcN\n\tmid78RjHlOej4uiIeOkhFDTZoTGgFgnsNwwpVG3uYzVv/gvwGmYLAz7IK02sYcr6ERgX\n\trrxZXJH4tCWfSauqPASPV5aafMxOyu+4wgc7wlbfZFrxsnj7LPxY5iPCfhOiECU3CKfY\n\t3DUg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763714593; x=1764319393;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=rQGlhB3TvWSHk7t6VmTH/bbarw5CV7nDLOTxqQrg6zY=;\n\tb=i5zPCwVGg5s9V4VNC7fMDk42GFz3b5hbvRtgXp5QAc0r5cLht96Z0yPeuzYfyu3Ufu\n\thTjLxyHSKS/B1BqJA4XPpk1eXsEHc68WnTonBNdBrYVvCBH736OK+gBMU7Y+hXX4UGMl\n\t+yurCQzYhC3Gnl5Vwy2ZMqnWPDnRetoYleYIYtig9uBJkMNwGAqO015sYatYYfCvGz7M\n\tjj6ESOh4u4PnYOlt5Z79d9CpIdLD/JANzTuTMq+emRaONi6FjqHs99pRxAsb0Um2uOSp\n\tPcAniGAsn048UMY4DyIbfBX9bv8blrs72yYpCGLe3SEtkGN2S9c6+iQJY1BgFaaG2ETt\n\tSx8A==","X-Gm-Message-State":"AOJu0YzuStnheIYxhlqc7xj0DjtuTmUNNXjTJdJ3LYJJClff+MiseDpK\n\twqALJvMF+voMaxlZw7zqa/f9Lv8OtVWYeD7GM1FlN3RQVd1KdfcgJ/wAo2ng6kTQDqc=","X-Gm-Gg":"ASbGncuiE4M6QzAMSWNzfuL+W2fhlhga9G2vJOjl3j6bXFZrtLEyBffq6+vOgiu7aqn\n\tKmgk2xQVZZ5t5c8mk43Xb4BcITV09E5w4JJYWaZnfqHNE3Y5YhvGH5A9ItNRkuZJ3JuvLrYdpOt\n\t66thLhIdTAdWjP8woeAtva5xR30N23d0Q/GJO5YQklJPfnXSw7JC6tBKkzatkXOd40xMgmwMDLr\n\tNU3CveW6R4+b5z7ifCb+wBFYsSfX+jLAwngYxKio5QN2xjiRnxaTiPYvS18t6Oz9hy708sN58qk\n\t+U5fpjlajAAE803AiTeFkpZmZJg4I8rUXLRIC335CRyuC0kg78tIOSM7njeGFCDg9VUzU+4FN0w\n\taY8lCmv9R7hMPvc3CWo7zlLkiu+lUNeVftOgkic1MOdDcDSoMHE4kWmEYRnpbjKMeC+DHOPL1z3\n\t+HWOu+4j0Et7fcxIq4O2MRaOvjWhU5+pYgUnV6TnMdshmqQFXKeymK","X-Google-Smtp-Source":"AGHT+IH2hivgFf8s1LhhLY0y5V/TUtkJyIjq+HK7+S1RtpKHUEgkfLiUbXC1JgRyKlRKmhuCk6ariA==","X-Received":"by 2002:a05:600c:1d14:b0:477:9d88:2da6 with SMTP id\n\t5b1f17b1804b1-477c026ed62mr14992005e9.0.1763714593409; \n\tFri, 21 Nov 2025 00:43:13 -0800 (PST)","Message-ID":"<d289d887-467f-4c8f-b8f7-54f1663e4374@linaro.org>","Date":"Fri, 21 Nov 2025 08:43:11 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031445.GT10711@pendragon.ideasonboard.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<20251121031445.GT10711@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":36978,"web_url":"https://patchwork.libcamera.org/comment/36978/","msgid":"<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>","date":"2025-11-21T11:37:44","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 21/11/2025 03:18, Laurent Pinchart wrote:\n>> +#if defined(APPLY_CCM_PARAMETERS)\n> If the goal of sharing shaders between qcam and the soft ISP is to allow\n> testing of the shaders in qcam for development, this should be done\n> unconditionally. It's fine to set the parameters to hardcoded defaults\n> in qcam as a first step.\n\nIts application logic - so for example qcam can do this unconditionally.\n\nThere's also the ability to use the ISP RGB lookup tables as textures.\n\nThe idea I had here was.\n\n1. No colour correction - which is the pre gpuisp baseline\n2. RGB lookup\n3. CCM\n\nsupporting all three modes - proves nothing breaks from #1, allows you \nto test #2 and leaves up to the application to make #3 the default.\n\n?\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C4893BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 11:37:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7EC7260A80;\n\tFri, 21 Nov 2025 12:37:47 +0100 (CET)","from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 62BC960805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 12:37:46 +0100 (CET)","by mail-wr1-x431.google.com with SMTP id\n\tffacd0b85a97d-42b3720e58eso1534413f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 03:37:46 -0800 (PST)","from [192.168.0.35] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42cb7f2e556sm10446880f8f.5.2025.11.21.03.37.44\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 21 Nov 2025 03:37:45 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"AQUhEgEu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1763725066; x=1764329866;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=XgmnD/p6yh0xP+5NZ6/AS4lEhriCihqsAq/ItVjoqlI=;\n\tb=AQUhEgEud9W7+gv1o8i6lHwiEZ/yXqb29H7b8GYXNgI34+FwQirm6abu0KGumsqxVd\n\tD9dR/lFHT/ynvx9JCoWRiUhgLLdF2lM9ZL35QRTy6RV1YNNue0lVsS6u/Tq2E2si0PZa\n\tCdyYSF/AvCWCnCv1Ll68ggO2D9SqvKLs5GvPhxlAAdPYvbgyzv86jeA1X8Qq2PCkgVnK\n\te6ECxy5XSJjD3EbTW1Zxaa8xhCruLJOpS4/IBWKlgn+RCkP1yZpN8RqtqooiuGqpryLq\n\tgLUBLOBteEnIjq8iNfpkZ1fbKNrLisfhN+kE3VYU9AOuHG/GwrHB6ZaDX9A/FmmcXf+z\n\t3YUQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1763725066; x=1764329866;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=XgmnD/p6yh0xP+5NZ6/AS4lEhriCihqsAq/ItVjoqlI=;\n\tb=LKAyasLI+IYwAUJ4l6/irdU/gaA4cCsWNdnK/LeW7JaNDnh7XpmjzXEJN9KkbdYi6T\n\to7Q2n1u4E++UHkfcGwDapDLtqUFj1SlhwX924qx8iWcg27qJSwD0UBNADxor7VOcHz4y\n\tff6xCTndG5cVH9OevrIsWNNHoIbtvZHIATz2aDW7tAC6k95fPFIPJ6csawmilHZRUd+u\n\tZBew0MNYr6Cak9pnFjGS/DKTboLjkiAPOgqei0f0pLFKgA1hBVGPS0VpLzAStZZTl+a0\n\tllc1RnvEptx+XzdnXC37upYwMGY+mF5Z1TUfuqV31AAcerxms27bzVYGRiAkiuLAL+io\n\tbZXg==","X-Gm-Message-State":"AOJu0Yx3OK91Q0QkkGh/o76hzR8+6P2qHO2eDZgqVJuh0Nvtzynp23R0\n\tqS0umQyeUIMuMBwoVo3j2q7USaFlwUuwvF8c5CG6cjCxEd5qHuB+UDNiqdXRTUTwIKaXZ0Dmtcy\n\tZ+EzN0RM=","X-Gm-Gg":"ASbGncskmztv1fXsE6omW8SXsj2y7LIk5gW9nQfMzDdK/KfnYIqyGMtjQPBT8sZfROI\n\tJfCn1SfXdBmN+/oJc0A+n5nLD6tMIKneOHifiPAPs7wjnxRkE0LaqEWtq7Q5ynP1gPeoG9jOm2A\n\tPrZSVu71IBPqStnU6NdTGDckZDXrxtivzV8dPGRQn4ZFHCN+5JY+q4oQvbaQya+NZQWPdNqW8Vh\n\tojusuWxNegpRItqNC70iKSvi2FCRRKWcL7YLKTpCqBAhsyLp+isJAIf88a/ZIG63Da9QHgqFRh3\n\tNk4Qmxqzt6brYGQKBbh3XQUtLyQrnMFWpz1Fo2GG+YinjJS4S3nrO8GtRhpEZoZBwXMjLTjWyGS\n\tvVlO6zH31FpnQnXzTJL0qbcz0rkfhmEQ0OpzY0mIFDB4swVAzy0SFa+Emulu0RqjPIyjpdI2Bst\n\t+V952JM7PoN3QFXVY4j3h2/z0TaKkv2kNRYuxjlaOMdMWfSTV0ZRNU","X-Google-Smtp-Source":"AGHT+IH16GfM1cwzubFO16zWZs+Z5+hUbNiQApkWguee0lf/DQxXJgeeowCug7rUOGs/0X3z6cyc5Q==","X-Received":"by 2002:a05:6000:230b:b0:42b:3b62:cd86 with SMTP id\n\tffacd0b85a97d-42cc1cd5cedmr1942320f8f.6.1763725065944; \n\tFri, 21 Nov 2025 03:37:45 -0800 (PST)","Message-ID":"<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>","Date":"Fri, 21 Nov 2025 11:37:44 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<20251121031829.GU10711@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37017,"web_url":"https://patchwork.libcamera.org/comment/37017/","msgid":"<20251124000322.GH15447@pendragon.ideasonboard.com>","date":"2025-11-24T00:03:22","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Nov 21, 2025 at 11:37:44AM +0000, Bryan O'Donoghue wrote:\n> On 21/11/2025 03:18, Laurent Pinchart wrote:\n> >> +#if defined(APPLY_CCM_PARAMETERS)\n> > If the goal of sharing shaders between qcam and the soft ISP is to allow\n> > testing of the shaders in qcam for development, this should be done\n> > unconditionally. It's fine to set the parameters to hardcoded defaults\n> > in qcam as a first step.\n> \n> Its application logic - so for example qcam can do this unconditionally.\n> \n> There's also the ability to use the ISP RGB lookup tables as textures.\n> \n> The idea I had here was.\n> \n> 1. No colour correction - which is the pre gpuisp baseline\n> 2. RGB lookup\n> 3. CCM\n> \n> supporting all three modes - proves nothing breaks from #1, allows you \n> to test #2 and leaves up to the application to make #3 the default.\n> \n> ?\n\nThe shaders are internal to libcamera, I don't want to make them part of\nthe public API. qcam is cheating there. That's acceptable for now I\nthink, it's an internal application for development and testing purpose.\nThis means that qcam can be developed in sync with the GPU ISP.\n\nWe can decide to make qcam a test application for the GPU ISP, or keep\nit as-is and use OpenGL only for format conversion. If we decide to go\nfor the latter, then I think we should duplicate the shaders. Otherwise\n(which I think is my preferred option), I think we should avoid\nconditional compilation that would result in different shaders between\nthe GPU ISP and qcam.\n\nAnd now that I wrote this, I realize that the series makes use of the\nconditional compilation in the GPU ISP as well, to support both the\nlookup table (2) and CCM (3) configurations. What do you envision as use\ncases for supporting lookup table in the GPU ISP ?","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 125C7C3334\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Nov 2025 00:03:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0C12660A80;\n\tMon, 24 Nov 2025 01:03:50 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E08B606E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 01:03:48 +0100 (CET)","from pendragon.ideasonboard.com (unknown [210.170.118.136])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 8C359524;\n\tMon, 24 Nov 2025 01:01:39 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"dBpaTqm1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763942500;\n\tbh=CWKQkN43OnCAkt7TFNO4SEW3rMkIguuSJt07qoUazuQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dBpaTqm1r79xDySEIBTeW2BPg9y6NW+1pegoP3D6pGgY9G052aMebKh2P6qIyE65H\n\tNMw9X+8gvx8x+W+ou26Ot23X3KIbRTf6W/xuv/H+56jE7QmepupvW9ZdRDMV+ksXej\n\t/2z0SZoLT6wKCJeHCyqkTFCo9KTR+E6ARDpj0wYc=","Date":"Mon, 24 Nov 2025 09:03:22 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","Message-ID":"<20251124000322.GH15447@pendragon.ideasonboard.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>\n\t<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37078,"web_url":"https://patchwork.libcamera.org/comment/37078/","msgid":"<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>","date":"2025-11-26T13:46:27","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 24/11/2025 00:03, Laurent Pinchart wrote:\n> And now that I wrote this, I realize that the series makes use of the\n> conditional compilation in the GPU ISP as well, to support both the\n> lookup table (2) and CCM (3) configurations. What do you envision as use\n> cases for supporting lookup table in the GPU ISP ?\n\nWe discussed @ softisp meeting keeping the lookup tables as example code.\n\nAt least that's what I thought you wanted. Probably useful for people \nadding the LSC code.\n\nPerhaps they can also remove the lookup tables in the same series.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AF9ADC32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Nov 2025 13:46:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 33FA160A9E;\n\tWed, 26 Nov 2025 14:46:32 +0100 (CET)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 24B0A606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 14:46:30 +0100 (CET)","by mail-wr1-x429.google.com with SMTP id\n\tffacd0b85a97d-42b32900c8bso3967532f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 05:46:30 -0800 (PST)","from [192.168.0.27] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42cb7fa3a6bsm40344759f8f.28.2025.11.26.05.46.28\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tWed, 26 Nov 2025 05:46:28 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"B+kMj7Hr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764164789; x=1764769589;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=xR2ZuBgE6V+mpyYOdIXHZuP2zVPGGE8ULozNjPU5NwE=;\n\tb=B+kMj7Hr21y2QB19AZzz5HOEDwQy5mdV/hkLQnurwSBb4VPYac68VILC094eFxTDTz\n\tKEOmzvtQC21IrRw5lEtu8BEp3UhqRkYyG5u2HYee0ktedZ4wZQCUTGIcdgHJgJU/zsMy\n\tUaUqmLQIe1/KHul2bZ8XQXmkIIYhdxmuqTsz4nSR1klqKqzwjVvcCWPqoIvOYUfz+wkw\n\t0SaFbaA4SOMkx560jG63aNXQBMhbs1yd6cwn5iBO7rQBZYz4E1bf4jM4sJwUWfEoOewV\n\t04hGBTxhoCBL4fVaORxu9zi4kMo1A2rJm/16fPtdOogbYpfUk1hmlf0D1ZG/F2JgFrj4\n\tMu0g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764164789; x=1764769589;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=xR2ZuBgE6V+mpyYOdIXHZuP2zVPGGE8ULozNjPU5NwE=;\n\tb=rKZ1rSeNnzDBDcpt3rIm4kKZk1+LD586bK8s4O8qa0rc0LCD92+W92oJaggmSgyK1x\n\tFCc26mNNBzkptx7yj/yIXgMO12h9xAT8iBkZxTP639S1bDsYGfjQ/EjnCAUMMtsurswm\n\tOxz1Z0pV1eNCeCc2e2EmhuX7pqPFstVmme44du362xA9LKjHdL4W9ktuRVnm4vPd/evU\n\tMNgOelnPM88IcvJdZl0F6V4HRlNnMIBOWZIn2cv+SOi3BKBxruVkmDaKul8Pz04gX4N+\n\tdWJulsQvBTM8H5B8RmvpHpiVvyVsZgwSkDG6icmpQkep8hkN7fM5HAo4ZtovjRII02An\n\tPwSg==","X-Gm-Message-State":"AOJu0YyioVktRKOnu4aWrVwoXthMYu6mz/8MDlpioR3nbnw+lWDOUFsJ\n\tf3gZ16DbkLQwt8nj94O8rkhH1FHz0vNcgyBPxda/RTa+bIsaUs6eXYmp5taTF7cQ6EY=","X-Gm-Gg":"ASbGncsfu7j38KiVZ3QwFdLBpHg5bzUfxcCqzvBJMZPhxfK1FhCDr5YTIcZwgpq2CyH\n\t1i/rv+CmNcGH19GeqHiAmSdPa6LgdPFb7kggiW2VQJ/hrg8W8HWi88U81NDpAUbYn1LlejHr1JI\n\tv88vItedcZA2alr/jMJmCaWzZkJpVfeP8tad5RGWl7WZLsDBTfENztEl+Q0hDCdzuWbJcoFpIQs\n\tbGWcTOnbMujBNkCu1oU9E2VkX9e5d6U6wmF82wJ6b040WpVUUNJUYstdYXVwbG7vq+Nd44Ipt3r\n\tUW6T6BJ5gNCrAHI4JTpej3W2rtutqq4hCdrXLKOc2FamqF+K6Dh4AVjY8WMh5rkN6ScTzGdbxb3\n\tb4stHWb88cN9m5F5l8/T7hwvNyfNVBpE0AtadoAIfFoE0CTWNUtJAY7RH/RVj5c2RrUUBg4Ue3F\n\tCZuMUoNwVRgv8PAf3NS2AJqpIDvLGfAr+7rsE1HrRojTQvxtbVHBgL","X-Google-Smtp-Source":"AGHT+IG7+SpSyKqJOTbO+SA+8eYjZmL5zypyqlcNzxUkyPkh7Fr+8PAS4SdPSSnErF9eOTfBsM72Xw==","X-Received":"by 2002:a05:6000:400f:b0:42b:3c3e:5d53 with SMTP id\n\tffacd0b85a97d-42cc1cedbf7mr22057734f8f.16.1764164789485; \n\tWed, 26 Nov 2025 05:46:29 -0800 (PST)","Message-ID":"<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>","Date":"Wed, 26 Nov 2025 13:46:27 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>\n\t<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>\n\t<20251124000322.GH15447@pendragon.ideasonboard.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<20251124000322.GH15447@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37083,"web_url":"https://patchwork.libcamera.org/comment/37083/","msgid":"<7740a9a7-2e1e-4fee-8003-82d2917796f9@linaro.org>","date":"2025-11-26T22:19:58","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 26/11/2025 13:46, Bryan O'Donoghue wrote:\n> On 24/11/2025 00:03, Laurent Pinchart wrote:\n>> And now that I wrote this, I realize that the series makes use of the\n>> conditional compilation in the GPU ISP as well, to support both the\n>> lookup table (2) and CCM (3) configurations. What do you envision as use\n>> cases for supporting lookup table in the GPU ISP ?\n> \n> We discussed @ softisp meeting keeping the lookup tables as example code.\n> \n> At least that's what I thought you wanted. Probably useful for people \n> adding the LSC code.\n> \n> Perhaps they can also remove the lookup tables in the same series.\n> \n> ---\n> bod\n\nThe main reason to have conditional compilation here is when running the \nshaders in qcam without softisp we can verify the core demosaic stuff works.\n\nThen when switching to softisp - we run the shaders with all of the good \nstuff switched on CCM, etc.\n\nRe: the tables, let me know if you want them dropped. As I say I thought \nwe had discussed keeping them as reference code for some amount of time.\n\nFor me anyway, I like to be able to run the shaders in their original \nmode - no ccm, contrast etc, so that I can verify the basic demosaic \nworks when making changes.\n\nMaybe at this point we don't need to be so cautious but, it was very \nuseful for me this far.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DECB1C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 Nov 2025 22:20:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BFDF960A9E;\n\tWed, 26 Nov 2025 23:20:02 +0100 (CET)","from mail-wm1-x330.google.com (mail-wm1-x330.google.com\n\t[IPv6:2a00:1450:4864:20::330])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4479A606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 23:20:01 +0100 (CET)","by mail-wm1-x330.google.com with SMTP id\n\t5b1f17b1804b1-47778b23f64so1020415e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 14:20:01 -0800 (PST)","from [192.168.0.27] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4790add2c98sm62306135e9.5.2025.11.26.14.19.59\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tWed, 26 Nov 2025 14:19:59 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"DoabaWWz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764195601; x=1764800401;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:references\n\t:cc:to:from:subject:user-agent:mime-version:date:message-id:from:to\n\t:cc:subject:date:message-id:reply-to;\n\tbh=s5kTEPuHrYm9eAFBSnw7kiwsI0J+dQfbFkrrRr8DEI4=;\n\tb=DoabaWWzs2VeVScSbrbh6pwdH1FEb5f/itBK9frMDgdHL+IaIEhhVTJQO1bULrdTTa\n\tFhkLPt2ReVV8e28gblVmM6p+RoGKahTAPjBgIt6MdQbwJRYy+NdZIum6NZ4hdRC1BA46\n\tEMk/OfaPSLY0ppGua0wP205PRHl2M6mpJooLSmpQAMeGVzHp6J00DQtxH36e0AWEQtp/\n\tfgFfA9JdzoOV8JLcEF5YNBagD3txagHPEaKmiA8EgrnyhfAkiHID5r/8MtSaaDrRPKJD\n\tYjdA0i6z67l2EJoVtopUG4HC45clFSmwqaAhcWIhHryMUnE2KUpv5mNBWrHef586fQGm\n\tyJPw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764195601; x=1764800401;\n\th=content-transfer-encoding:in-reply-to:content-language:references\n\t:cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=s5kTEPuHrYm9eAFBSnw7kiwsI0J+dQfbFkrrRr8DEI4=;\n\tb=RQrwqM+s6wW2oOKiUGlq5gdzs9Dmxk5FhAEWW9frG8gHFw1F5GzhxEWXICO82CWzCC\n\tBMHK09qZLoTco98D4a5uxkgmfmfPc9adJXubFMEY/fVmRMq0/1/xnFQ9gjKU93Z6HGO8\n\twCLWFNdZWmE6UZr9Lv89ZFD/rl5Q+I0xcRksjOZbqyOcdXQXVk5eT+mwlzN/6Fdv5aJD\n\t/RnFZyyp/euvXIgtXHETQPIr8uPuvBZABqGGXaRLSo3mi7zqxyj1TjGqqXIxh3YatrKW\n\tjul+tb5Q7EudG7jMLrqGynVygQuYwcC763I74+TfLS8CaQs4HEvE4XsyZ9hYWdxnGrPB\n\tCpJQ==","X-Gm-Message-State":"AOJu0YxL9Fnrfxo67nZdB1LCjn0c5Ic5YjNprhGFJeyhaeCwO2g2nY9r\n\tjGHo+6Oyu5nCKhrBWjscxZuPizw39PBfNtRYmcjIyDKN5Ew4pWeHS91EQj6SF7nSlHI=","X-Gm-Gg":"ASbGncu8WuT09mGnQf3Yx7mJmwXf6zkEZAwfWY5ljrP3Gx9tRrULdD98CVOZp1XVWzj\n\t00qQt33uMe7W4DIj2a6OCIiKgGRfoAUVXgVBFNdjRE/HYxLuJx/JUpJlOT1yeccCiaKpDNIa6u1\n\tnKcd+E7RRpmAkjL22PnICYp4dpkTTbffwzJ1vnI86wZRNntLFicykUVZsxL0pm+DUMtmEX3tnH/\n\tRcu9bn8ip4V+65NGuWH9W6H7XhiuMQiP0UyagEy/m7am3T2Pu/QChQQZ/RiGq3ZFE7/u7ygQnt5\n\tdhidFaTRwZlzD3xCMcCRc/SfhfOoHYbGSKZWOiJbfGXdn8JfsEVOdggFzRr9ZkT/JElUgsvrHz7\n\t0gC5/ynoGcWE7WqtZYB/YHdWUsvLLFGpWzlZ4eRb2mBUp1a3SXNFIGef19J7G6LiUZFCPAgSRSW\n\tUOWG+hzZAb3jGIkvzhju/ysD4J/ME/nwmar6obGexNTBspbgZUxqHi","X-Google-Smtp-Source":"AGHT+IEQ/PAg9u8BiREQStsDMsrZ9FnN43LigTNGwWP2VzTcMugi0l6OxkLDSEoEEADMizk5eUegIw==","X-Received":"by 2002:a05:600c:474e:b0:477:7523:da8c with SMTP id\n\t5b1f17b1804b1-477c111d3f8mr243545165e9.15.1764195600557; \n\tWed, 26 Nov 2025 14:20:00 -0800 (PST)","Message-ID":"<7740a9a7-2e1e-4fee-8003-82d2917796f9@linaro.org>","Date":"Wed, 26 Nov 2025 22:19:58 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>\n\t<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>\n\t<20251124000322.GH15447@pendragon.ideasonboard.com>\n\t<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>","Content-Language":"en-US","In-Reply-To":"<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37088,"web_url":"https://patchwork.libcamera.org/comment/37088/","msgid":"<20251127080012.GC4301@pendragon.ideasonboard.com>","date":"2025-11-27T08:00:12","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Bryan,\n\nOn Wed, Nov 26, 2025 at 10:19:58PM +0000, Bryan O'Donoghue wrote:\n> On 26/11/2025 13:46, Bryan O'Donoghue wrote:\n> > On 24/11/2025 00:03, Laurent Pinchart wrote:\n> >> And now that I wrote this, I realize that the series makes use of the\n> >> conditional compilation in the GPU ISP as well, to support both the\n> >> lookup table (2) and CCM (3) configurations. What do you envision as use\n> >> cases for supporting lookup table in the GPU ISP ?\n> > \n> > We discussed @ softisp meeting keeping the lookup tables as example code.\n> > \n> > At least that's what I thought you wanted. Probably useful for people \n> > adding the LSC code.\n> > \n> > Perhaps they can also remove the lookup tables in the same series.\n> \n> The main reason to have conditional compilation here is when running the \n> shaders in qcam without softisp we can verify the core demosaic stuff works.\n> \n> Then when switching to softisp - we run the shaders with all of the good \n> stuff switched on CCM, etc.\n> \n> Re: the tables, let me know if you want them dropped. As I say I thought \n> we had discussed keeping them as reference code for some amount of time.\n\nIf you think it's useful we can keep them for the time being, but I'd\nlike to simplify the implementation at some point.\n\n> For me anyway, I like to be able to run the shaders in their original \n> mode - no ccm, contrast etc, so that I can verify the basic demosaic \n> works when making changes.\n> \n> Maybe at this point we don't need to be so cautious but, it was very \n> useful for me this far.\n\nCan't we achieve the same by setting all parameters to identify values ?","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4D72EC3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 08:00:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F44460A85;\n\tThu, 27 Nov 2025 09:00:37 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF44460805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 09:00:35 +0100 (CET)","from pendragon.ideasonboard.com\n\t(202-81-12-167.fp-d.ii-okinawa.ne.jp [202.81.12.167])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 0EFAB593;\n\tThu, 27 Nov 2025 08:58:23 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cxr2VNBY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764230305;\n\tbh=oyl6fR70KjgTuw2DUtq2KJo58a3RTdIL91OEUqRPAiw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cxr2VNBYd6+dFuABy8IzVzVcA/mziiSEDw1NWEaEHEdFAhUliYqI3mNcKB5GjBYxB\n\t6ADWc0Zgoy60PBALKtHOKY+f+zs4ZADyKpGekdKxU9izWSBJVX6fvAzA/z7wY5wsid\n\tD+1rVQNNb+1lh1htRJNrCiU18Y3Kft1JbSrwxdn4=","Date":"Thu, 27 Nov 2025 17:00:12 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","Message-ID":"<20251127080012.GC4301@pendragon.ideasonboard.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>\n\t<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>\n\t<20251124000322.GH15447@pendragon.ideasonboard.com>\n\t<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>\n\t<7740a9a7-2e1e-4fee-8003-82d2917796f9@linaro.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<7740a9a7-2e1e-4fee-8003-82d2917796f9@linaro.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":37096,"web_url":"https://patchwork.libcamera.org/comment/37096/","msgid":"<eef23a41-e95e-4405-ba70-760555584567@linaro.org>","date":"2025-11-27T11:55:04","subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"content":"On 27/11/2025 08:00, Laurent Pinchart wrote:\n>> Re: the tables, let me know if you want them dropped. As I say I thought\n>> we had discussed keeping them as reference code for some amount of time.\n> If you think it's useful we can keep them for the time being, but I'd\n> like to simplify the implementation at some point.\n> \n>> For me anyway, I like to be able to run the shaders in their original\n>> mode - no ccm, contrast etc, so that I can verify the basic demosaic\n>> works when making changes.\n>>\n>> Maybe at this point we don't need to be so cautious but, it was very\n>> useful for me this far.\n> Can't we achieve the same by setting all parameters to identify values ?\n\nIn theory I suppose so...\n\nIt should \"only\" be a matter of\n\n- An identity matrix for the CCM\n- Setting all other parameters to 1.0f\n\nSomething x 1 == Something\n\nI'm happy enough to drop the lookup tables, after all we have several \nbranches with the reference code so if we leave those branches in a git \nrepo, the information hasn't been lost.\n\n---\nbod","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 47016C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 11:55:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4581C60A85;\n\tThu, 27 Nov 2025 12:55:08 +0100 (CET)","from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C18EB606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 12:55:06 +0100 (CET)","by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-477a1c28778so8071315e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:55:06 -0800 (PST)","from [192.168.0.27] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42e1caa767dsm3262076f8f.38.2025.11.27.03.55.05\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 27 Nov 2025 03:55:05 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Oso9acpd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764244506; x=1764849306;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=MSy4VUTWGJt3yZwWKsnQtvbEvLmUmpRXbgqLG4w9Fuw=;\n\tb=Oso9acpdFwIgYDkJZzulJQQE2zoa+pKstq97ntPMlNtQRe9M7PPzZx5IihnXLh4oMe\n\tym80Rh1fgqUHTcFaEhtRRTot9Wm1D7Ia9NFmQhmMwdKiYenlrksVVpzJY9S2YHNxFdmU\n\tF+2Ejv9OeyqbUK0g5jDr6axa/qSFpG9Cd3OuSjumaXQjfolsCJsAdljoiVZ4qRJb0M2i\n\tWdLXC15IRvcBBJIOZx6bJCiF+StQl7rOVIihnUId9XRckSHoYf97t+0nJR+skKRX2qcS\n\tXchLSm1T71/k+7QJNjQyttmyymHw3uv7BqR/IEvDF/p0cGNg5Xy6l3FzHnqBHX8C9RJl\n\t7hGA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764244506; x=1764849306;\n\th=content-transfer-encoding:in-reply-to:content-language:from\n\t:references:cc:to:subject:user-agent:mime-version:date:message-id\n\t:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=MSy4VUTWGJt3yZwWKsnQtvbEvLmUmpRXbgqLG4w9Fuw=;\n\tb=t53wQtsuabLxkgTdcnNRnAPbX8xJhIKrOvDqDTVpuk8eU/YzU156k7/4ea1SBd8ncf\n\tx6l3uACjv7frpuoRHUt7mqy/vu4HaD5ghI3OIycAG8iGEuUUisLYrzZRyihAoY/SpOzx\n\t+LCT+cHml1kGZ++PCni9avZx98P/LoE60rA1MWyjdxxDvtZ/c2fQ37YRA2njeYwwS0CE\n\ttysh9zXq02DdpmMDVdWZFePosLcXHdHkXQrHkQLdRVZ/wkWe5fU6OJ5e3qaAjXFtse8n\n\tDmdoqNJZGHYiIWCllWrtmHnCdNzPkJQPOnSqCJZICOaLryLRet/PoxpTFpQC5Eld4YwG\n\t7SMA==","X-Gm-Message-State":"AOJu0Yw6+UskQcRAsQkZbKnLt+Xq+0XaK2Z1FVhU8GTo6Ve8lTy+V8vC\n\tk7aM6dbxwljusVgnDIMKb1oUjY8al2qWh68tb4Jn2YGdCJLIGaO2pCIzE32jXeEsSu4=","X-Gm-Gg":"ASbGnctAi7CiUdrRv8+kDk/YDWBW8/jin7XbhERmiTmY7l0YmYf3MAHhVfEvCCIoVnl\n\tMhjGDlokkmUzwh78h0bhdoaprJfbxqxiw1yChlssKgvelldXykOeuJa24JXXLwEQJFoGeI+VwwZ\n\t8Hosfty+rFwKgDKGfQ7SPKKkOWECoT7Dmi+sIBP/gn4bYvXzjWjcONoGSqx69pNIv+mO7fzp7vi\n\t7AVfgwPA9tabyNXLDcYvFRkRIX6oluI/iF81zpYdAfgN+9SnSBI34jO+kT7e0yPzjq02+I8wcT5\n\tA0N5mPddcSSO1PV9QU/M9T2l6bYlXADajTD7YI0B4SZE/NEXYWSBWM5fNWJhGS2xI12uwfxOvWD\n\trICT7DN9ZPhWiLGpwyzY0cWBUyNv41ViO+tDnYooILnOaMsnAEozlJEWg+A2QXFk8RNaCKBDnsN\n\tGkfWDiM0ZbdHzEWdWTw2MFDUR+axsUIijzSaXGfUWqKOUWXGuD2Uou","X-Google-Smtp-Source":"AGHT+IHa4VW2kd0L4fePZU7rUGtBG1lvsw0BK7JWPXEE09Tqm5vp8YELcrus9uS2dDHJQfDftH9H5A==","X-Received":"by 2002:a05:600c:8b37:b0:477:6374:6347 with SMTP id\n\t5b1f17b1804b1-47904b1e86emr88065065e9.22.1764244506182; \n\tThu, 27 Nov 2025 03:55:06 -0800 (PST)","Message-ID":"<eef23a41-e95e-4405-ba70-760555584567@linaro.org>","Date":"Thu, 27 Nov 2025 11:55:04 +0000","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 06/23] libcamera: shaders: Extend debayer shaders to\n\tapply RGB gain values on output","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, pavel@ucw.cz,\n\tMilan Zamazal <mzamazal@redhat.com>","References":"<20251120233347.5046-1-bryan.odonoghue@linaro.org>\n\t<20251120233347.5046-7-bryan.odonoghue@linaro.org>\n\t<20251121031829.GU10711@pendragon.ideasonboard.com>\n\t<85afde2f-42a7-4447-bd55-434747ec5bf9@linaro.org>\n\t<20251124000322.GH15447@pendragon.ideasonboard.com>\n\t<d75f231c-17d7-4d95-88d9-ab248c947f52@linaro.org>\n\t<7740a9a7-2e1e-4fee-8003-82d2917796f9@linaro.org>\n\t<20251127080012.GC4301@pendragon.ideasonboard.com>","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Content-Language":"en-US","In-Reply-To":"<20251127080012.GC4301@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]