[PATCH] Add special case for 16:10 aspect ratio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mathematical aspect ratio is 8:5 but people use 16:10. For
instance:

    > git grep 16:10
    parse-base-block.cpp:749:                      x[14] & 0x20 ? " 16:10" : "",
    parse-base-block.cpp:764:                       printf("16:10");
    parse-displayid-block.cpp:284:          s += "16:10";
    parse-displayid-block.cpp:471:          s += "16:10";

Signed-off-by: Simon Ser <contact@xxxxxxxxxxx>
---
 edid-decode.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/edid-decode.cpp b/edid-decode.cpp
index 96f095ce80de..a30165319cac 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -291,6 +291,11 @@ void calc_ratio(struct timings *t)
 	}
 	t->hratio = t->hact / d;
 	t->vratio = t->vact / d;
+
+	if (t->hratio == 8 && t->vratio == 5) {
+		t->hratio = 16;
+		t->vratio = 10;
+	}
 }
 
 std::string edid_state::dtd_type(unsigned cnt)
-- 
2.38.1






[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux