aboutsummaryrefslogtreecommitdiffstats
path: root/edid-decode.h
diff options
context:
space:
mode:
Diffstat (limited to 'edid-decode.h')
-rw-r--r--edid-decode.h51
1 files changed, 38 insertions, 13 deletions
diff --git a/edid-decode.h b/edid-decode.h
index 612d22a..fdd0d41 100644
--- a/edid-decode.h
+++ b/edid-decode.h
@@ -130,6 +130,7 @@ struct edid_state {
warnings = failures = 0;
has_cta = has_dispid = false;
hide_serial_numbers = false;
+ image_width = image_height = diagonal = 0;
// Base block state
base.edid_minor = 0;
@@ -153,8 +154,10 @@ struct edid_state {
// CTA-861 block state
cta.has_vic_1 = cta.first_svd_might_be_preferred = cta.has_sldb =
cta.has_hdmi = cta.has_vcdb = cta.has_vfpdb = false;
- cta.last_block_was_hdmi_vsdb = cta.have_hf_vsdb = cta.have_hf_scdb = false;
- cta.first_block = cta.first_svd = true;
+ cta.previous_cta_tag = 0xfff;
+ cta.have_hf_vsdb = cta.have_hf_scdb = false;
+ cta.block_number = 0;
+ cta.first_svd = true;
cta.supported_hdmi_vic_codes = cta.supported_hdmi_vic_vsb_codes = 0;
memset(cta.vics, 0, sizeof(cta.vics));
memset(cta.preparsed_has_vic, 0, sizeof(cta.preparsed_has_vic));
@@ -175,6 +178,8 @@ struct edid_state {
dispid.is_display = dispid.has_product_identification =
dispid.has_display_parameters = dispid.has_type_1_7 =
dispid.has_display_interface_features = false;
+ dispid.block_number = 0;
+ dispid.image_width = dispid.image_height = 0;
// Block Map block state
block_map.saw_block_1 = false;
@@ -199,6 +204,11 @@ struct edid_state {
unsigned dtd_max_hsize_mm;
unsigned dtd_max_vsize_mm;
+ // in 0.1 mm units
+ unsigned image_width, image_height;
+ // in inches
+ double diagonal;
+
unsigned warnings;
unsigned failures;
@@ -242,8 +252,8 @@ struct edid_state {
vec_timings_ext preferred_timings;
bool preparsed_has_t8vtdb;
// Keep track of the found Tag/Extended Tag pairs.
- // The unsigned value is equal to: (tag << 8) | ext_tag
- std::set<unsigned> found_tags;
+ // The unsigned value is equal to: (tag) | (OUI enum << 12) or (extended tag) | (tag << 8) | (OUI enum << 12)
+ std::vector<unsigned> found_tags;
timings_ext t8vtdb;
vec_timings_ext native_timings;
bool has_vic_1;
@@ -257,9 +267,9 @@ struct edid_state {
bool preparsed_sld;
bool has_sldb;
unsigned short preparsed_phys_addr;
- bool last_block_was_hdmi_vsdb;
+ unsigned previous_cta_tag;
bool have_hf_vsdb, have_hf_scdb;
- bool first_block;
+ unsigned block_number;
bool first_svd;
unsigned supported_hdmi_vic_codes;
unsigned supported_hdmi_vic_vsb_codes;
@@ -282,9 +292,12 @@ struct edid_state {
bool has_display_interface_features;
vec_timings_ext preferred_timings;
unsigned native_width, native_height;
+ // in 0.1 mm units
+ unsigned image_width, image_height;
+ unsigned block_number;
// Keep track of the found CTA-861 Tag/Extended Tag pairs.
- // The unsigned value is equal to: (tag << 8) | ext_tag
- std::set<unsigned> found_tags;
+ // The unsigned value is equal to: (tag) | (OUI enum << 12) or (extended tag) | (tag << 8) | (OUI enum << 12)
+ std::vector<unsigned> found_tags;
} dispid;
// Block Map block state
@@ -314,9 +327,10 @@ struct edid_state {
timings calc_cvt_mode(unsigned h_pixels, unsigned v_lines,
double ip_freq_rqd, unsigned rb, bool int_rqd = false,
bool margins_rqd = false, bool alt = false,
- unsigned rb_h_blank = 0, double add_vert_time = 0);
+ unsigned rb_h_blank = 0, unsigned rb_v_blank = 460,
+ bool early_vsync_rqd = false);
void edid_cvt_mode(unsigned refresh, struct timings &t, unsigned rb_h_blank = 0,
- double add_vert_time = 0);
+ unsigned rb_v_blank = 460, bool early_vsync_rqd = false);
void detailed_cvt_descriptor(const char *prefix, const unsigned char *x, bool first);
void print_standard_timing(const char *prefix, unsigned char b1, unsigned char b2,
bool gtf_only = false, bool show_both = false);
@@ -331,11 +345,15 @@ struct edid_state {
void list_dmts();
void list_established_timings();
+ void data_block_oui(std::string block_name, const unsigned char *x, unsigned length, unsigned *ouinum,
+ bool ignorezeros = false, bool do_ascii = false, bool big_endian = false);
+
void print_vic_index(const char *prefix, unsigned idx, const char *suffix, bool ycbcr420 = false);
void hdmi_latency(unsigned char vid_lat, unsigned char aud_lat, bool is_ilaced);
void cta_vcdb(const unsigned char *x, unsigned length);
void cta_svd(const unsigned char *x, unsigned n, bool for_ycbcr420);
void cta_y420cmdb(const unsigned char *x, unsigned length);
+ void cta_print_svr(unsigned char svr, vec_timings_ext &vec_tim);
void cta_vfpdb(const unsigned char *x, unsigned length);
void cta_rcdb(const unsigned char *x, unsigned length);
void cta_sldb(const unsigned char *x, unsigned length);
@@ -344,8 +362,7 @@ struct edid_state {
void cta_displayid_type_7(const unsigned char *x, unsigned length);
void cta_displayid_type_8(const unsigned char *x, unsigned length);
void cta_displayid_type_10(const unsigned char *x, unsigned length);
- void cta_ext_block(const unsigned char *x, unsigned length, bool duplicate);
- void cta_block(const unsigned char *x, bool duplicate);
+ void cta_block(const unsigned char *x, std::vector<unsigned> &found_tags);
void preparse_cta_block(const unsigned char *x);
void parse_cta_block(const unsigned char *x);
void cta_resolve_svr(vec_timings_ext::iterator iter);
@@ -354,6 +371,7 @@ struct edid_state {
void cta_list_vics();
void cta_list_hdmi_vics();
+ void set_displayid_native_res(unsigned w, unsigned h);
void parse_digital_interface(const unsigned char *x);
void parse_display_device(const unsigned char *x);
void parse_display_caps(const unsigned char *x);
@@ -387,9 +405,11 @@ struct edid_state {
void parse_displayid_type_9_timing(const unsigned char *x);
void parse_displayid_dynamic_video_timings_range_limits(const unsigned char *x);
void parse_displayid_ContainerID(const unsigned char *x);
+ void parse_displayid_adaptive_sync(const unsigned char *x);
void parse_displayid_type_10_timing(const unsigned char *x, unsigned sz,
bool is_cta = false);
void preparse_displayid_block(const unsigned char *x);
+ unsigned displayid_block(const unsigned version, const unsigned char *x, unsigned length);
void parse_displayid_block(const unsigned char *x);
void parse_displayid_vesa(const unsigned char *x);
void parse_displayid_cta_data_block(const unsigned char *x);
@@ -404,6 +424,8 @@ struct edid_state {
void preparse_extension(const unsigned char *x);
void parse_extension(const unsigned char *x);
+ void print_preferred_timings();
+ void print_native_res();
int parse_edid();
};
@@ -454,7 +476,7 @@ void hex_block(const char *prefix, const unsigned char *x, unsigned length,
bool show_ascii = true, unsigned step = 16);
std::string block_name(unsigned char block);
void calc_ratio(struct timings *t);
-const char *oui_name(unsigned oui, bool reverse = false);
+const char *oui_name(unsigned oui, unsigned *ouinum = NULL);
bool timings_close_match(const timings &t1, const timings &t2);
const struct timings *find_dmt_id(unsigned char dmt_id);
@@ -465,4 +487,7 @@ const struct timings *cta_close_match_to_vic(const timings &t, unsigned &vic);
unsigned char hdmi_vic_to_vic(unsigned char hdmi_vic);
char *extract_string(const unsigned char *x, unsigned len);
+#define oneoui(c,k,n) const unsigned kOUI_##k = __LINE__<<12;
+#include "oui.h"
+
#endif

Privacy Policy