libcamera: shaders: Add support for black level compensation
Add the ability to apply a int blacklevel subtraction against the demosaiced data prior to application of colour correction data. Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Robert Mader <robert.mader@collabora.com> Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # ThinkPad T14s gen 6 (arm64) ov02c10 + X1c gen 12 ov08x40 Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # Lenovo X13s Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
58823cbf68
commit
6029dcf9a6
@@ -66,6 +66,7 @@ uniform vec2 tex_bayer_first_red;
|
||||
|
||||
uniform sampler2D tex_y;
|
||||
uniform mat3 ccm;
|
||||
uniform vec3 blacklevel;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
@@ -213,6 +214,8 @@ void main(void)
|
||||
vec3(patterns.y, C, patterns.x) :
|
||||
vec3(patterns.wz, C));
|
||||
|
||||
rgb = rgb - blacklevel;
|
||||
|
||||
/*
|
||||
* CCM is a 3x3 in the format
|
||||
*
|
||||
|
||||
@@ -25,6 +25,7 @@ varying vec4 center;
|
||||
varying vec4 yCoord;
|
||||
varying vec4 xCoord;
|
||||
uniform mat3 ccm;
|
||||
uniform vec3 blacklevel;
|
||||
|
||||
void main(void) {
|
||||
vec3 rgb;
|
||||
@@ -108,6 +109,8 @@ void main(void) {
|
||||
vec3(PATTERN.w, C, PATTERN.z) :
|
||||
vec3(PATTERN.yx, C));
|
||||
|
||||
rgb = rgb - blacklevel;
|
||||
|
||||
/*
|
||||
* CCM is a 3x3 in the format
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user