feat(draw/sw): make I1 luminance threshold configurable (#7616)
This commit is contained in:
6
Kconfig
6
Kconfig
@@ -269,6 +269,12 @@ menu "LVGL configuration"
|
||||
default y
|
||||
depends on LV_USE_DRAW_SW
|
||||
|
||||
config LV_DRAW_SW_I1_LUM_THRESHOLD
|
||||
int "Luminance threshold for a pixel to be active"
|
||||
default 127
|
||||
range 0 254
|
||||
depends on LV_DRAW_SW_SUPPORT_I1
|
||||
|
||||
config LV_DRAW_SW_DRAW_UNIT_CNT
|
||||
int "Number of draw units"
|
||||
default 1
|
||||
|
||||
@@ -174,6 +174,10 @@
|
||||
#define LV_DRAW_SW_SUPPORT_A8 1
|
||||
#define LV_DRAW_SW_SUPPORT_I1 1
|
||||
|
||||
/* The threshold of the luminance to consider a pixel as
|
||||
* active in indexed color format */
|
||||
#define LV_DRAW_SW_I1_LUM_THRESHOLD 127
|
||||
|
||||
/** Set number of draw units.
|
||||
* - > 1 requires operating system to be enabled in `LV_USE_OS`.
|
||||
* - > 1 means multiple threads will render the screen in parallel. */
|
||||
|
||||
@@ -82,7 +82,7 @@ static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * b
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#define I1_LUM_THRESHOLD 127
|
||||
#define I1_LUM_THRESHOLD LV_DRAW_SW_I1_LUM_THRESHOLD
|
||||
|
||||
#ifndef LV_DRAW_SW_I1_BLEND_NORMAL_TO_I1
|
||||
#define LV_DRAW_SW_I1_BLEND_NORMAL_TO_I1(...) LV_RESULT_INVALID
|
||||
|
||||
@@ -500,6 +500,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The threshold of the luminance to consider a pixel as
|
||||
* active in indexed color format */
|
||||
#ifndef LV_DRAW_SW_I1_LUM_THRESHOLD
|
||||
#ifdef CONFIG_LV_DRAW_SW_I1_LUM_THRESHOLD
|
||||
#define LV_DRAW_SW_I1_LUM_THRESHOLD CONFIG_LV_DRAW_SW_I1_LUM_THRESHOLD
|
||||
#else
|
||||
#define LV_DRAW_SW_I1_LUM_THRESHOLD 127
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** Set number of draw units.
|
||||
* - > 1 requires operating system to be enabled in `LV_USE_OS`.
|
||||
* - > 1 means multiple threads will render the screen in parallel. */
|
||||
|
||||
Reference in New Issue
Block a user