[v2,2/4] egl: Remove bpp variable
diff mbox series

Message ID 20260112103740.18360-3-robert.mader@collabora.com
State New
Headers show
Series
  • GPUISP cleanups
Related show

Commit Message

Robert Mader Jan. 12, 2026, 10:37 a.m. UTC
It's unused and, in one case, was set wrongly.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
---
 include/libcamera/internal/egl.h           | 6 ++----
 src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

Comments

Kieran Bingham Jan. 12, 2026, 12:23 p.m. UTC | #1
Quoting Robert Mader (2026-01-12 10:37:38)
> It's unused and, in one case, was set wrongly.
> 
> Signed-off-by: Robert Mader <robert.mader@collabora.com>
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  include/libcamera/internal/egl.h           | 6 ++----
>  src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
> index 7b810773c..21e2aa9df 100644
> --- a/include/libcamera/internal/egl.h
> +++ b/include/libcamera/internal/egl.h
> @@ -49,14 +49,13 @@ public:
>          * \brief Construct an eGLImage with explicit stride
>          * \param[in] width Image width in pixels
>          * \param[in] height Image height in pixels
> -        * \param[in] bpp Bytes per pixel
>          * \param[in] stride Row stride in bytes
>          * \param[in] texture_unit OpenGL texture unit
>          * \param[in] texture_unit_uniform_id Shader uniform ID
>          */
> -       eGLImage(uint32_t width, uint32_t height, uint32_t bpp, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
> +       eGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
>                 : width_(width), height_(height), stride_(stride),
> -                 framesize_(stride * height), bpp_(bpp),
> +                 framesize_(stride * height),
>                   texture_unit_uniform_id_(texture_unit_uniform_id),
>                   texture_unit_(texture_unit)
>         {
> @@ -81,7 +80,6 @@ public:
>         uint32_t stride_; /**< Row stride in bytes */
>         uint32_t offset_; /**< Buffer offset (reserved for future use) */
>         uint32_t framesize_; /**< Total frame size in bytes (stride * height) */
> -       uint32_t bpp_; /**< Bytes per pixel */
>         uint32_t texture_unit_uniform_id_; /**< Shader uniform id for texture unit */
>         GLenum texture_unit_; /**< Texture unit associated with this image eg (GL_TEXTURE0) */
>         GLuint texture_; /**< OpenGL texture object ID */
> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
> index 1c13b72a5..9693d7252 100644
> --- a/src/libcamera/software_isp/debayer_egl.cpp
> +++ b/src/libcamera/software_isp/debayer_egl.cpp
> @@ -597,10 +597,10 @@ int DebayerEGL::start()
>         LOG(Debayer, Debug) << "Available fragment shader texture units " << maxTextureImageUnits;
>  
>         /* Raw bayer input as texture */
> -       eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, 32, inputConfig_.stride, GL_TEXTURE0, 0);
> +       eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, inputConfig_.stride, GL_TEXTURE0, 0);
>  
>         /* Texture we will render to */
> -       eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, 31, outputConfig_.stride, GL_TEXTURE1, 1);
> +       eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);
>  
>         if (initBayerShaders(inputPixelFormat_, outputPixelFormat_))
>                 return -EINVAL;
> -- 
> 2.52.0
>
Bryan O'Donoghue Jan. 12, 2026, 12:32 p.m. UTC | #2
On 12/01/2026 10:37, Robert Mader wrote:
> It's unused and, in one case, was set wrongly.
> 
> Signed-off-by: Robert Mader <robert.mader@collabora.com>
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> ---
>   include/libcamera/internal/egl.h           | 6 ++----
>   src/libcamera/software_isp/debayer_egl.cpp | 4 ++--
>   2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
> index 7b810773c..21e2aa9df 100644
> --- a/include/libcamera/internal/egl.h
> +++ b/include/libcamera/internal/egl.h
> @@ -49,14 +49,13 @@ public:
>   	 * \brief Construct an eGLImage with explicit stride
>   	 * \param[in] width Image width in pixels
>   	 * \param[in] height Image height in pixels
> -	 * \param[in] bpp Bytes per pixel
>   	 * \param[in] stride Row stride in bytes
>   	 * \param[in] texture_unit OpenGL texture unit
>   	 * \param[in] texture_unit_uniform_id Shader uniform ID
>   	 */
> -	eGLImage(uint32_t width, uint32_t height, uint32_t bpp, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
> +	eGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
>   		: width_(width), height_(height), stride_(stride),
> -		  framesize_(stride * height), bpp_(bpp),
> +		  framesize_(stride * height),
>   		  texture_unit_uniform_id_(texture_unit_uniform_id),
>   		  texture_unit_(texture_unit)
>   	{
> @@ -81,7 +80,6 @@ public:
>   	uint32_t stride_; /**< Row stride in bytes */
>   	uint32_t offset_; /**< Buffer offset (reserved for future use) */
>   	uint32_t framesize_; /**< Total frame size in bytes (stride * height) */
> -	uint32_t bpp_; /**< Bytes per pixel */
>   	uint32_t texture_unit_uniform_id_; /**< Shader uniform id for texture unit */
>   	GLenum texture_unit_; /**< Texture unit associated with this image eg (GL_TEXTURE0) */
>   	GLuint texture_; /**< OpenGL texture object ID */
> diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
> index 1c13b72a5..9693d7252 100644
> --- a/src/libcamera/software_isp/debayer_egl.cpp
> +++ b/src/libcamera/software_isp/debayer_egl.cpp
> @@ -597,10 +597,10 @@ int DebayerEGL::start()
>   	LOG(Debayer, Debug) << "Available fragment shader texture units " << maxTextureImageUnits;
> 
>   	/* Raw bayer input as texture */
> -	eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, 32, inputConfig_.stride, GL_TEXTURE0, 0);
> +	eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, inputConfig_.stride, GL_TEXTURE0, 0);
> 
>   	/* Texture we will render to */
> -	eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, 31, outputConfig_.stride, GL_TEXTURE1, 1);
> +	eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);
> 
>   	if (initBayerShaders(inputPixelFormat_, outputPixelFormat_))
>   		return -EINVAL;
> --
> 2.52.0
> 
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Patch
diff mbox series

diff --git a/include/libcamera/internal/egl.h b/include/libcamera/internal/egl.h
index 7b810773c..21e2aa9df 100644
--- a/include/libcamera/internal/egl.h
+++ b/include/libcamera/internal/egl.h
@@ -49,14 +49,13 @@  public:
 	 * \brief Construct an eGLImage with explicit stride
 	 * \param[in] width Image width in pixels
 	 * \param[in] height Image height in pixels
-	 * \param[in] bpp Bytes per pixel
 	 * \param[in] stride Row stride in bytes
 	 * \param[in] texture_unit OpenGL texture unit
 	 * \param[in] texture_unit_uniform_id Shader uniform ID
 	 */
-	eGLImage(uint32_t width, uint32_t height, uint32_t bpp, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
+	eGLImage(uint32_t width, uint32_t height, uint32_t stride, GLenum texture_unit, uint32_t texture_unit_uniform_id)
 		: width_(width), height_(height), stride_(stride),
-		  framesize_(stride * height), bpp_(bpp),
+		  framesize_(stride * height),
 		  texture_unit_uniform_id_(texture_unit_uniform_id),
 		  texture_unit_(texture_unit)
 	{
@@ -81,7 +80,6 @@  public:
 	uint32_t stride_; /**< Row stride in bytes */
 	uint32_t offset_; /**< Buffer offset (reserved for future use) */
 	uint32_t framesize_; /**< Total frame size in bytes (stride * height) */
-	uint32_t bpp_; /**< Bytes per pixel */
 	uint32_t texture_unit_uniform_id_; /**< Shader uniform id for texture unit */
 	GLenum texture_unit_; /**< Texture unit associated with this image eg (GL_TEXTURE0) */
 	GLuint texture_; /**< OpenGL texture object ID */
diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp
index 1c13b72a5..9693d7252 100644
--- a/src/libcamera/software_isp/debayer_egl.cpp
+++ b/src/libcamera/software_isp/debayer_egl.cpp
@@ -597,10 +597,10 @@  int DebayerEGL::start()
 	LOG(Debayer, Debug) << "Available fragment shader texture units " << maxTextureImageUnits;
 
 	/* Raw bayer input as texture */
-	eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, 32, inputConfig_.stride, GL_TEXTURE0, 0);
+	eglImageBayerIn_ = std::make_unique<eGLImage>(width_, height_, inputConfig_.stride, GL_TEXTURE0, 0);
 
 	/* Texture we will render to */
-	eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, 31, outputConfig_.stride, GL_TEXTURE1, 1);
+	eglImageBayerOut_ = std::make_unique<eGLImage>(outputSize_.width, outputSize_.height, outputConfig_.stride, GL_TEXTURE1, 1);
 
 	if (initBayerShaders(inputPixelFormat_, outputPixelFormat_))
 		return -EINVAL;