zenilib: zenilib/jni/external/sdl/src/video/x11/edid-parse.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
edid-parse.c File Reference
`#include "edid.h"`
`#include <stdlib.h>`
`#include <string.h>`
`#include <math.h>`
`#include <stdio.h>`

Go to the source code of this file.

## Macros

#define | FALSE 0
#define | TRUE 1

## Functions

static void | decode_check_sum (const uchar *edid, MonitorInfo *info)
static int | decode_color_characteristics (const uchar *edid, MonitorInfo *info)
static int | decode_descriptors (const uchar *edid, MonitorInfo *info)
static void | decode_detailed_timing (const uchar *timing, DetailedTiming *detailed)
static void | decode_display_descriptor (const uchar *desc, MonitorInfo *info)
static int | decode_display_parameters (const uchar *edid, MonitorInfo *info)
MonitorInfo * | decode_edid (const uchar *edid)
static int | decode_edid_version (const uchar *edid, MonitorInfo *info)
static int | decode_established_timings (const uchar *edid, MonitorInfo *info)
static double | decode_fraction (int high, int low)
static int | decode_header (const uchar *edid)
static void | decode_lf_string (const uchar *s, int n_chars, char *result)
static int | decode_standard_timings (const uchar *edid, MonitorInfo *info)
static int | decode_vendor_and_product_identification (const uchar *edid, MonitorInfo *info)
void | dump_monitor_info (MonitorInfo *info)
static int | get_bit (int in, int bit)
static int | get_bits (int in, int begin, int end)
static const char * | yesno (int v)

## Macro Definition Documentation

#define FALSE 0

Definition at line 32 of file edid-parse.c.

Referenced by decode_detailed_timing(), decode_header(), and decode_vendor_and_product_identification().

#define TRUE 1

Definition at line 31 of file edid-parse.c.

Referenced by decode_color_characteristics(), decode_descriptors(), decode_display_parameters(), decode_edid_version(), decode_established_timings(), decode_header(), decode_standard_timings(), and decode_vendor_and_product_identification().

## Function Documentation

static void decode_check_sum | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 508 of file edid-parse.c.

References MonitorInfo::checksum, and i.

Referenced by decode_edid().

static int decode_color_characteristics | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 256 of file edid-parse.c.

References MonitorInfo::blue_x, MonitorInfo::blue_y, decode_fraction(), get_bits(), MonitorInfo::green_x, MonitorInfo::green_y, MonitorInfo::red_x, MonitorInfo::red_y, TRUE, MonitorInfo::white_x, and MonitorInfo::white_y.

Referenced by decode_edid().

static int decode_descriptors | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 480 of file edid-parse.c.

References decode_detailed_timing(), decode_display_descriptor(), MonitorInfo::detailed_timings, i, MonitorInfo::n_detailed_timings, and TRUE.

Referenced by decode_edid().

static void decode_detailed_timing | ( | const uchar * | timing,
|  | DetailedTiming * | detailed
| ) |  |

static

Definition at line 417 of file edid-parse.c.

References DetailedTiming::analog, bits, DetailedTiming::digital, DetailedTiming::digital_sync, FALSE, FIELD_LEFT, FIELD_RIGHT, FOUR_WAY_INTERLEAVED, get_bit(), get_bits(), DetailedTiming::h_addr, DetailedTiming::h_blank, DetailedTiming::h_front_porch, DetailedTiming::h_sync, DetailedTiming::height_mm, DetailedTiming::interlaced, NO_STEREO, DetailedTiming::pixel_clock, DetailedTiming::right_border, SIDE_BY_SIDE, DetailedTiming::stereo, DetailedTiming::top_border, TWO_WAY_LEFT_ON_EVEN, TWO_WAY_RIGHT_ON_EVEN, DetailedTiming::v_addr, DetailedTiming::v_blank, DetailedTiming::v_front_porch, DetailedTiming::v_sync, and DetailedTiming::width_mm.

Referenced by decode_descriptors().

static void decode_display_descriptor | ( | const uchar * | desc,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 379 of file edid-parse.c.

References decode_lf_string(), MonitorInfo::dsc_product_name, MonitorInfo::dsc_serial_number, and MonitorInfo::dsc_string.

Referenced by decode_descriptors().

static int decode_display_parameters | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 121 of file edid-parse.c.

References MonitorInfo::active_off, MonitorInfo::analog, MonitorInfo::aspect_ratio, bits, MonitorInfo::continuous_frequency, MonitorInfo::digital, DISPLAY_PORT, DVI, MonitorInfo::gamma, get_bit(), get_bits(), HDMI_A, HDMI_B, MonitorInfo::height_mm, MonitorInfo::is_digital, MDDI, MONOCHROME, OTHER_COLOR, MonitorInfo::preferred_timing_includes_native, RGB, MonitorInfo::srgb_is_standard, MonitorInfo::standby, MonitorInfo::suspend, TRUE, UNDEFINED, UNDEFINED_COLOR, and MonitorInfo::width_mm.

Referenced by decode_edid().

MonitorInfo* decode_edid | ( | const uchar * | edid | ) |

Definition at line 521 of file edid-parse.c.

References calloc, decode_check_sum(), decode_color_characteristics(), decode_descriptors(), decode_display_parameters(), decode_edid_version(), decode_established_timings(), decode_header(), decode_standard_timings(), decode_vendor_and_product_identification(), free, and NULL.

static int decode_edid_version | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 112 of file edid-parse.c.

References MonitorInfo::major_version, MonitorInfo::minor_version, and TRUE.

Referenced by decode_edid().

static int decode_established_timings | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 271 of file edid-parse.c.

References MonitorInfo::established, get_bit(), i, idx, j, and TRUE.

Referenced by decode_edid().

static double decode_fraction | ( | int | high,
|  | int | low
| ) |  |

static

Definition at line 242 of file edid-parse.c.

References get_bit(), and i.

Referenced by decode_color_characteristics().

static int decode_header | ( | const uchar * | edid | ) |

static

Definition at line 49 of file edid-parse.c.

References FALSE, and TRUE.

Referenced by decode_edid().

static void decode_lf_string | ( | const uchar * | s,
|  | int | n_chars,
|  | char * | result
| ) |  |

static

Definition at line 356 of file edid-parse.c.

References i.

Referenced by decode_display_descriptor().

static int decode_standard_timings | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 324 of file edid-parse.c.

References Timing::frequency, get_bits(), Timing::height, i, MonitorInfo::standard, TRUE, and Timing::width.

Referenced by decode_edid().

static int decode_vendor_and_product_identification | ( | const uchar * | edid,
|  | MonitorInfo * | info
| ) |  |

static

Definition at line 57 of file edid-parse.c.

References FALSE, get_bits(), MonitorInfo::manufacturer_code, MonitorInfo::model_year, MonitorInfo::product_code, MonitorInfo::production_week, MonitorInfo::production_year, MonitorInfo::serial_number, and TRUE.

Referenced by decode_edid().

void dump_monitor_info | ( | MonitorInfo * | info | ) |

Definition at line 549 of file edid-parse.c.

References MonitorInfo::active_off, DetailedTiming::analog, MonitorInfo::analog, MonitorInfo::aspect_ratio, MonitorInfo::blue_x, MonitorInfo::blue_y, MonitorInfo::checksum, MonitorInfo::continuous_frequency, MonitorInfo::detailed_timings, DetailedTiming::digital, MonitorInfo::digital, DetailedTiming::digital_sync, DISPLAY_PORT, MonitorInfo::dsc_product_name, MonitorInfo::dsc_serial_number, MonitorInfo::dsc_string, DVI, MonitorInfo::established, FIELD_LEFT, FIELD_RIGHT, FOUR_WAY_INTERLEAVED, Timing::frequency, MonitorInfo::gamma, MonitorInfo::green_x, MonitorInfo::green_y, DetailedTiming::h_addr, DetailedTiming::h_blank, DetailedTiming::h_front_porch, DetailedTiming::h_sync, HDMI_A, HDMI_B, Timing::height, DetailedTiming::height_mm, MonitorInfo::height_mm, i, MonitorInfo::is_digital, MonitorInfo::major_version, MonitorInfo::manufacturer_code, MDDI, MonitorInfo::minor_version, MonitorInfo::model_year, MONOCHROME, MonitorInfo::n_detailed_timings, NO_STEREO, OTHER_COLOR, DetailedTiming::pixel_clock, MonitorInfo::preferred_timing_includes_native, MonitorInfo::product_code, MonitorInfo::production_week, MonitorInfo::production_year, MonitorInfo::red_x, MonitorInfo::red_y, RGB, DetailedTiming::right_border, MonitorInfo::serial_number, SIDE_BY_SIDE, MonitorInfo::srgb_is_standard, MonitorInfo::standard, MonitorInfo::standby, DetailedTiming::stereo, MonitorInfo::suspend, DetailedTiming::top_border, TWO_WAY_LEFT_ON_EVEN, TWO_WAY_RIGHT_ON_EVEN, UNDEFINED, UNDEFINED_COLOR, DetailedTiming::v_addr, DetailedTiming::v_blank, DetailedTiming::v_front_porch, DetailedTiming::v_sync, MonitorInfo::white_x, MonitorInfo::white_y, Timing::width, DetailedTiming::width_mm, MonitorInfo::width_mm, and yesno().

static int get_bit | ( | int | in,
|  | int | bit
| ) |  |

static

Definition at line 35 of file edid-parse.c.

Referenced by decode_detailed_timing(), decode_display_parameters(), decode_established_timings(), and decode_fraction().

static int get_bits | ( | int | in,
|  | int | begin,
|  | int | end
| ) |  |

static

Definition at line 41 of file edid-parse.c.

Referenced by decode_color_characteristics(), decode_detailed_timing(), decode_display_parameters(), decode_standard_timings(), and decode_vendor_and_product_identification().

static const char* yesno | ( | int | v | ) |

static

Definition at line 543 of file edid-parse.c.

Referenced by dump_monitor_info().