drm/tests/util
Geert Uytterhoeven 6d9645bb3b util: factor out and optimize C8 SMPTE color LUT
The color LUT for the SMPTE pattern in indexed mode contains 22 entries,
although only 13 are non-unique.

Reduce the size of the color LUT by dropping duplicate entries, so it
can be reused for formats supporting e.g. 16 colors.  Rename the
function util_smpte_c8_gamma() to util_smpte_fill_lut(), and its first
parameter size to ncolors, to match their actual use.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Rename util_smpte_index_gamma() to util_smpte_fill_lut(), and its
    first parameter from size to ncolors,
  - Move smpte_color_lut[] down,
  - Kill FILL_COLOR() macro,
  - Add and use EXPAND_COLOR() macro,

v3:
  - Add Acked-by,

v2:
  - Factor out smpte color LUT.
2023-10-24 09:44:04 +02:00
..
Android.mk Android: fix building of modetest and proptest 2017-04-03 17:46:06 +01:00
Makefile.sources tests: Move name tables to libutil 2015-12-18 17:44:01 +00:00
common.h tests: Split helpers into library 2015-12-18 17:43:40 +00:00
format.c util: add NV24 and NV42 frame buffer formats 2023-09-08 17:42:38 +00:00
format.h tests: Split helpers into library 2015-12-18 17:43:40 +00:00
kms.c tests/util: Add vkms driver 2023-02-10 05:22:52 +00:00
kms.h tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
meson.build Add meson build system 2018-01-12 09:40:48 -08:00
pattern.c util: factor out and optimize C8 SMPTE color LUT 2023-10-24 09:44:04 +02:00
pattern.h util: factor out and optimize C8 SMPTE color LUT 2023-10-24 09:44:04 +02:00