This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: edid-decode: improve detection of wrong DTD image sizes
Author:  Hans Verkuil <[email protected]>
Date:    Thu May 21 13:32:37 2026 +0200

Correctly detect if the image should be pillarboxed vs letterboxed.
It was possible to suggest a size out of bound of the actual display
size, and this fixes that.

Signed-off-by: Hans Verkuil <[email protected]>

 utils/edid-decode/edid-decode.cpp | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=bdb20d356c333feebff00edc9a0f32e6f08af5ec
diff --git a/utils/edid-decode/edid-decode.cpp 
b/utils/edid-decode/edid-decode.cpp
index b25ea663e7ea..55ce29d56f56 100644
--- a/utils/edid-decode/edid-decode.cpp
+++ b/utils/edid-decode/edid-decode.cpp
@@ -781,10 +781,18 @@ bool edid_state::print_timings(const char *prefix, const 
struct timings *t,
                             t->hsize_mm, t->vsize_mm);
                } else if (t->hratio && t->vratio) {
                        unsigned vsize = (t->hsize_mm * t->vratio) / t->hratio;
+                       unsigned hsize = (t->vsize_mm * t->hratio) / t->vratio;
 
-                       if (vsize < t->vsize_mm - 10 || vsize > t->vsize_mm + 
10)
-                               warn("Image size is %dx%d mm, but based on the 
picture AR it should be %dx%d mm.\n",
-                                    t->hsize_mm, t->vsize_mm, t->hsize_mm, 
vsize);
+                       if (vsize > t->vsize_mm + 10 && hsize < t->hsize_mm + 
10) {
+
+                               if (hsize < t->hsize_mm - 10 || hsize > 
t->hsize_mm + 10)
+                                       warn("Image size is %dx%d mm, but based 
on the picture AR it should be %dx%d mm.\n",
+                                            t->hsize_mm, t->vsize_mm, hsize, 
t->vsize_mm);
+                       } else {
+                               if (vsize < t->vsize_mm - 10 || vsize > 
t->vsize_mm + 10)
+                                       warn("Image size is %dx%d mm, but based 
on the picture AR it should be %dx%d mm.\n",
+                                            t->hsize_mm, t->vsize_mm, 
t->hsize_mm, vsize);
+                       }
                }
        }
        return ok;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to