This is an automatic generated email to let you know that the following patch were queued:
Subject: edid-decode: extend print_timings with ntsc argument Author: Hans Verkuil <hverkuil-ci...@xs4all.nl> Date: Wed Jul 31 16:05:40 2024 +0200 If ntsc == 2 and options[OptNTSC] is 1, or ntsc == 1, then print the timing in ntsc format (i.e. with pixelclock factor 1000/1001). This is needed for the InfoFrame parsing that will be added later. Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl> edid-decode.cpp | 4 ++-- edid-decode.h | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) --- diff --git a/edid-decode.cpp b/edid-decode.cpp index 4f39ee544598..70454812e205 100644 --- a/edid-decode.cpp +++ b/edid-decode.cpp @@ -532,7 +532,7 @@ static void print_detailed_timing(unsigned indent, const struct timings *t) bool edid_state::print_timings(const char *prefix, const struct timings *t, const char *type, const char *flags, - bool detailed, bool do_checks) + bool detailed, bool do_checks, unsigned ntsc) { if (!t) { // Should not happen @@ -582,7 +582,7 @@ bool edid_state::print_timings(const char *prefix, const struct timings *t, double refresh = t->pixclk_khz * 1000.0 / (htotal * vtotal); double pixclk = t->pixclk_khz * 1000.0; - if (options[OptNTSC] && fmod(refresh, 6.0) == 0) { + if (((ntsc > 1 && options[OptNTSC]) || ntsc == 1) && fmod(refresh, 6.0) == 0) { const double ntsc_fact = 1000.0 / 1001.0; pixclk *= ntsc_fact; refresh *= ntsc_fact; diff --git a/edid-decode.h b/edid-decode.h index 2a06563f0c0b..6f828ab9d8ea 100644 --- a/edid-decode.h +++ b/edid-decode.h @@ -374,12 +374,14 @@ struct edid_state { std::string dtd_type() { return dtd_type(base.dtd_cnt); } bool print_timings(const char *prefix, const struct timings *t, const char *type, const char *flags = "", - bool detailed = false, bool do_checks = true); + bool detailed = false, bool do_checks = true, + unsigned ntsc = 2); bool print_timings(const char *prefix, const struct timings_ext &t, - bool detailed = false, bool do_checks = true) + bool detailed = false, bool do_checks = true, + unsigned ntsc = 2) { return print_timings(prefix, &t.t, t.type.c_str(), t.flags.c_str(), - detailed, do_checks); + detailed, do_checks, ntsc); }; timings calc_gtf_mode(unsigned h_pixels, unsigned v_lines, double ip_freq_rqd, bool int_rqd = false,