drm/tests/modetest
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: introduce Android.common.mk to reduce boilerplate 2017-01-27 15:48:16 +00:00
Makefile.sources modetest: move sources lists to makefiles.sources 2014-09-28 17:09:34 +01:00
buffers.c modetest: add support for DRM_FORMAT_NV{24,42} 2023-09-08 17:42:38 +00:00
buffers.h modetest: add support for writeback connector 2023-09-08 16:27:39 +00:00
cursor.c meson,configure: include config.h automatically 2018-03-20 18:19:26 +00:00
cursor.h modetest: add cursor support 2014-04-22 11:14:12 -04:00
meson.build modetest: custom mode support 2023-09-08 18:19:31 +00:00
modetest.c util: factor out and optimize C8 SMPTE color LUT 2023-10-24 09:44:04 +02:00