All of lore.kernel.org
 help / color / mirror / Atom feed
From: joevt <joevt@shaw.ca>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: [PATCH 08/11] edid-decode: output full frequencies for 4:2:0
Date: Tue, 14 Sep 2021 05:11:26 -0700	[thread overview]
Message-ID: <20210914121129.51451-9-joevt@shaw.ca> (raw)
In-Reply-To: <20210914121129.51451-1-joevt@shaw.ca>

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>
---
 edid-decode.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/edid-decode.cpp b/edid-decode.cpp
index 6aa93fb..0c83e0e 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;
-- 
2.24.3 (Apple Git-128)


  parent reply	other threads:[~2021-09-14 12:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 12:11 [PATCH 00/11] edid-decode: bug fixes, additions, changes joevt
2021-09-14 12:11 ` [PATCH 01/11] edid-decode: add more example EDIDs joevt
2021-09-14 12:11 ` [PATCH 02/11] edid-decode: ignore dSYM joevt
2021-09-14 12:11 ` [PATCH 03/11] edid-decode: change install directories for macOS joevt
2021-09-15 10:06   ` Hans Verkuil
2021-09-15 15:25     ` Joe van Tunen
2021-09-14 12:11 ` [PATCH 04/11] edid-decode: add bounds checking joevt
2021-09-15 10:07   ` Hans Verkuil
2021-09-14 12:11 ` [PATCH 05/11] edid-decode: fix standard timing vertical pixels joevt
2021-09-15 10:08   ` Hans Verkuil
2021-09-15 11:10     ` Hans Verkuil
2021-09-15 18:28       ` Joe van Tunen
2021-09-14 12:11 ` [PATCH 06/11] edid-decode: linefeed before fail joevt
2021-09-14 12:11 ` [PATCH 07/11] edid-decode: always linefeed after hex_block joevt
2021-09-15 10:10   ` Hans Verkuil
2021-09-15 15:43     ` Joe van Tunen
2021-09-15 18:27       ` Joe van Tunen
2021-09-14 12:11 ` joevt [this message]
2021-09-14 12:11 ` [PATCH 09/11] edid-decode: allow undefined aspect ratio joevt
2021-09-14 12:11 ` [PATCH 10/11] edid-decode: add warnings to VESA VSDB joevt
2021-09-14 12:11 ` [PATCH 11/11] edid-decode: cta and displayid changes joevt
2021-09-15 13:37   ` Hans Verkuil
2021-09-16  9:15     ` Joe van Tunen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210914121129.51451-9-joevt@shaw.ca \
    --to=joevt@shaw.ca \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.