mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
video/edid/edid_sort.c: Add logic to sort video modes by how close they are to the preferred mode. This is part of the logic to pick the best possible video mode.
This commit is contained in:
@@ -601,10 +601,13 @@ int edid_parse(FAR const uint8_t *data, FAR struct edid_info_s *edid);
|
||||
* Name: edid_sort_modes
|
||||
*
|
||||
* Description:
|
||||
* Sort video modes by refresh rate, aspect ratio (*), then resolution.
|
||||
* Sort video modes by refresh rate, aspect ratio, then resolution.
|
||||
* Preferred mode or largest mode is first in the list and other modes
|
||||
* are sorted on closest match to that mode.
|
||||
*
|
||||
* Note that the aspect ratio calculation treats "close" aspect ratios
|
||||
* (within 12.5%) as the same for this purpose.
|
||||
*
|
||||
* Input Parameters:
|
||||
* modes - A reference to the first entry in a list of video modes
|
||||
* preferred - A pointer to the pointer to the preferred mode in the list
|
||||
|
||||
Reference in New Issue
Block a user