Message ID | 20250611013245.133785-28-bryan.odonoghue@linaro.org |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes: > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > src/libcamera/software_isp/debayer_egl.cpp | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index 824cd6d3..b30d2107 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -293,7 +293,7 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, > inputConfig_.stride = inputCfg.stride; > width_ = inputCfg.size.width; > height_ = inputCfg.size.height; > - ccmEnabled_ = ccmEnabled = true; > + ccmEnabled_ = ccmEnabled; > > if (outputCfgs.size() != 1) { > LOG(Debayer, Error) > @@ -511,10 +511,10 @@ void DebayerEGL::debayerGPU(MappedFrameBuffer &in, MappedFrameBuffer &out, Debay > > // Populate bayer parameters > if (ccmEnabled_) { > - GLfloat ccm[] = { > - 1, 0, 0, > - 0, 1, 0, > - 0, 0, 1, > + GLfloat ccm[9] = { > + params.ccm[0][0], params.ccm[0][1], params.ccm[0][2], > + params.ccm[1][0], params.ccm[1][1], params.ccm[1][2], > + params.ccm[2][0], params.ccm[2][1], params.ccm[2][2], I thought there must be a /nicer/ way to get ccm from params.ccm.data() but I couldn't find any. Anyway, waiting with my ack until the patches settle down a bit, to be sure the element ordering is correct. > }; > glUniformMatrix3fv(ccmUniformDataIn_, 1, GL_FALSE, ccm); > } else {
diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 824cd6d3..b30d2107 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -293,7 +293,7 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, inputConfig_.stride = inputCfg.stride; width_ = inputCfg.size.width; height_ = inputCfg.size.height; - ccmEnabled_ = ccmEnabled = true; + ccmEnabled_ = ccmEnabled; if (outputCfgs.size() != 1) { LOG(Debayer, Error) @@ -511,10 +511,10 @@ void DebayerEGL::debayerGPU(MappedFrameBuffer &in, MappedFrameBuffer &out, Debay // Populate bayer parameters if (ccmEnabled_) { - GLfloat ccm[] = { - 1, 0, 0, - 0, 1, 0, - 0, 0, 1, + GLfloat ccm[9] = { + params.ccm[0][0], params.ccm[0][1], params.ccm[0][2], + params.ccm[1][0], params.ccm[1][1], params.ccm[1][2], + params.ccm[2][0], params.ccm[2][1], params.ccm[2][2], }; glUniformMatrix3fv(ccmUniformDataIn_, 1, GL_FALSE, ccm); } else {
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/libcamera/software_isp/debayer_egl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)