utils: libtuning: Correct GBRG Image parsing
diff mbox series

Message ID 20240613150950.1035299-2-dan.scally@ideasonboard.com
State Accepted
Commit 7e3a351a29aa55c06c8e17782bcc33d153784068
Headers show
Series
  • utils: libtuning: Correct GBRG Image parsing
Related show

Commit Message

Dan Scally June 13, 2024, 3:09 p.m. UTC
The Image class incorrectly parses data in GBRG bayer formats as the
indices to the channels are set incorrectly - fix it.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
---
 utils/tuning/libtuning/image.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart June 13, 2024, 4:10 p.m. UTC | #1
Hi Dan,

Thank you for the patch.

On Thu, Jun 13, 2024 at 04:09:50PM +0100, Daniel Scally wrote:
> The Image class incorrectly parses data in GBRG bayer formats as the
> indices to the channels are set incorrectly - fix it.
> 
> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  utils/tuning/libtuning/image.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/tuning/libtuning/image.py b/utils/tuning/libtuning/image.py
> index e2181b11..6ff60ec1 100644
> --- a/utils/tuning/libtuning/image.py
> +++ b/utils/tuning/libtuning/image.py
> @@ -79,7 +79,7 @@ class Image:
>          # is R, then G, then G, then B.
>          bayer_case = {
>              '0 1 1 2': (lt.Color.R, lt.Color.GR, lt.Color.GB, lt.Color.B),
> -            '1 2 0 1': (lt.Color.GB, lt.Color.R, lt.Color.B, lt.Color.GR),
> +            '1 2 0 1': (lt.Color.GB, lt.Color.B, lt.Color.R, lt.Color.GR),
>              '2 1 1 0': (lt.Color.B, lt.Color.GB, lt.Color.GR, lt.Color.R),
>              '1 0 2 1': (lt.Color.GR, lt.Color.R, lt.Color.B, lt.Color.GB)
>          }
Stefan Klug June 13, 2024, 4:15 p.m. UTC | #2
Hi Daniel,

Thank you for the patch.

On Thu, Jun 13, 2024 at 04:09:50PM +0100, Daniel Scally wrote:
> The Image class incorrectly parses data in GBRG bayer formats as the
> indices to the channels are set incorrectly - fix it.
> 
> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>

Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> 

Cheers,
Stefan

> ---
>  utils/tuning/libtuning/image.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utils/tuning/libtuning/image.py b/utils/tuning/libtuning/image.py
> index e2181b11..6ff60ec1 100644
> --- a/utils/tuning/libtuning/image.py
> +++ b/utils/tuning/libtuning/image.py
> @@ -79,7 +79,7 @@ class Image:
>          # is R, then G, then G, then B.
>          bayer_case = {
>              '0 1 1 2': (lt.Color.R, lt.Color.GR, lt.Color.GB, lt.Color.B),
> -            '1 2 0 1': (lt.Color.GB, lt.Color.R, lt.Color.B, lt.Color.GR),
> +            '1 2 0 1': (lt.Color.GB, lt.Color.B, lt.Color.R, lt.Color.GR),
>              '2 1 1 0': (lt.Color.B, lt.Color.GB, lt.Color.GR, lt.Color.R),
>              '1 0 2 1': (lt.Color.GR, lt.Color.R, lt.Color.B, lt.Color.GB)
>          }
> -- 
> 2.30.2
>

Patch
diff mbox series

diff --git a/utils/tuning/libtuning/image.py b/utils/tuning/libtuning/image.py
index e2181b11..6ff60ec1 100644
--- a/utils/tuning/libtuning/image.py
+++ b/utils/tuning/libtuning/image.py
@@ -79,7 +79,7 @@  class Image:
         # is R, then G, then G, then B.
         bayer_case = {
             '0 1 1 2': (lt.Color.R, lt.Color.GR, lt.Color.GB, lt.Color.B),
-            '1 2 0 1': (lt.Color.GB, lt.Color.R, lt.Color.B, lt.Color.GR),
+            '1 2 0 1': (lt.Color.GB, lt.Color.B, lt.Color.R, lt.Color.GR),
             '2 1 1 0': (lt.Color.B, lt.Color.GB, lt.Color.GR, lt.Color.R),
             '1 0 2 1': (lt.Color.GR, lt.Color.R, lt.Color.B, lt.Color.GB)
         }