aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoevt <joevt@shaw.ca>2021-09-14 05:11:26 -0700
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-15 14:31:29 +0200
commit827d51f1812a34fdd55b9cf33f02fe1365cd3f9b (patch)
tree60d480b332a9aa4ae649ab91335448ca1d60e678
parent12a40495fe5dda3a9e46fcbaf6aecee296ff2011 (diff)
edid-decode: output full frequencies for 4:2:0
Don't half hfreq for 4:2:0 timings - the character clock is halved, but the number of characters per line is also halved (two luminance values per character for 4:2:0), so there's no change in hfreq. Don't half pixel clock because it looks weird. Character clock is halved but the number of pixels remains the same (two luminance values per character for 4:2:0). Continue to use the half hfreq and half pixel clock for the ranges calculations because some non-HDMI 2.0 displays have max pixel clock halved when they have 4:2:0 modes and because other reasons that lead to adding this code in the first place? Signed-off-by: Joe van Tunen <joevt@shaw.ca> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--edid-decode.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/edid-decode.cpp b/edid-decode.cpp
index 2316abc..d5062dd 100644
--- a/edid-decode.cpp
+++ b/edid-decode.cpp
@@ -513,6 +513,7 @@ bool edid_state::print_timings(const char *prefix, const struct timings *t,
if (t->interlaced)
vact /= 2;
+ double out_hor_freq_khz = hor_freq_khz;
if (t->ycbcr420)
hor_freq_khz /= 2;
@@ -558,6 +559,7 @@ bool edid_state::print_timings(const char *prefix, const struct timings *t,
dtd_max_vsize_mm = t->vsize_mm;
if (!s.empty())
s = " (" + s + ")";
+ unsigned out_pixclk_khz = t->pixclk_khz;
unsigned pixclk_khz = t->pixclk_khz / (t->ycbcr420 ? 2 : 1);
char buf[10];
@@ -568,8 +570,8 @@ bool edid_state::print_timings(const char *prefix, const struct timings *t,
t->hact, buf,
refresh,
t->hratio, t->vratio,
- hor_freq_khz,
- pixclk_khz / 1000.0,
+ out_hor_freq_khz,
+ out_pixclk_khz / 1000.0,
s.c_str());
unsigned len = strlen(prefix) + 2;

Privacy Policy