Lines Matching refs:grad

19 void LV_ATTRIBUTE_FAST_MEM lv_dither_none(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t …  in lv_dither_none()  argument
23 if(grad == NULL || grad->filled) return; in lv_dither_none()
25 grad->map[i] = lv_color_hex(grad->hmap[i].full); in lv_dither_none()
27 grad->filled = 1; in lv_dither_none()
41 void LV_ATTRIBUTE_FAST_MEM lv_dither_ordered_hor(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_c… in lv_dither_ordered_hor() argument
55 lv_color32_t tmp = grad->hmap[LV_CLAMP(0, j - 4, grad->size)]; in lv_dither_ordered_hor()
61 grad->map[j] = lv_color_hex(t.full); in lv_dither_ordered_hor()
65 void LV_ATTRIBUTE_FAST_MEM lv_dither_ordered_ver(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_c… in lv_dither_ordered_ver() argument
76 lv_color32_t tmp = grad->hmap[LV_CLAMP(0, y - 4, grad->size)]; in lv_dither_ordered_ver()
86 grad->map[j] = lv_color_hex(t.full); in lv_dither_ordered_ver()
91 lv_memcpy(grad->map + j, grad->map, 8 * sizeof(*grad->map)); in lv_dither_ordered_ver()
95 grad->map[j] = grad->map[j & 7]; in lv_dither_ordered_ver()
100 void LV_ATTRIBUTE_FAST_MEM lv_dither_err_diff_hor(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv… in lv_dither_err_diff_hor() argument
119 grad->map[0] = lv_color_hex(grad->hmap[0].full); in lv_dither_err_diff_hor()
120 for(lv_coord_t x = 1; x < grad->size - 1; x++) { in lv_dither_err_diff_hor()
121 lv_color32_t t = grad->hmap[x]; in lv_dither_err_diff_hor()
125 next_l = grad->error_acc[x + 1]; in lv_dither_err_diff_hor()
133 grad->error_acc[x - 1].r += coef[1] >> 4; in lv_dither_err_diff_hor()
134 grad->error_acc[x].r += coef[2] >> 4; in lv_dither_err_diff_hor()
135 grad->error_acc[x + 1].r = coef[3] >> 4; in lv_dither_err_diff_hor()
139 grad->error_acc[x - 1].g += coef[1] >> 4; in lv_dither_err_diff_hor()
140 grad->error_acc[x].g += coef[2] >> 4; in lv_dither_err_diff_hor()
141 grad->error_acc[x + 1].g = coef[3] >> 4; in lv_dither_err_diff_hor()
145 grad->error_acc[x - 1].b += coef[1] >> 4; in lv_dither_err_diff_hor()
146 grad->error_acc[x].b += coef[2] >> 4; in lv_dither_err_diff_hor()
147 grad->error_acc[x + 1].b = coef[3] >> 4; in lv_dither_err_diff_hor()
149 grad->map[x] = q; in lv_dither_err_diff_hor()
151 grad->map[grad->size - 1] = lv_color_hex(grad->hmap[grad->size - 1].full); in lv_dither_err_diff_hor()
154 void LV_ATTRIBUTE_FAST_MEM lv_dither_err_diff_ver(lv_grad_t * grad, lv_coord_t xs, lv_coord_t y, lv… in lv_dither_err_diff_ver() argument
182 lv_scolor24_t next_px_err, prev_l = grad->error_acc[0]; in lv_dither_err_diff_ver()
185 grad->map[0] = lv_color_hex(grad->hmap[y].full); in lv_dither_err_diff_ver()
186 FS_QUANT_ERROR(next_px_err, grad->hmap[y], grad->map[0]); in lv_dither_err_diff_ver()
189 lv_color_t tmp = lv_color_hex(grad->hmap[y].full); in lv_dither_err_diff_ver()
190 lv_color32_t t = grad->hmap[y]; in lv_dither_err_diff_ver()
191 FS_QUANT_ERROR(next_px_err, grad->hmap[y], tmp); in lv_dither_err_diff_ver()
192 FS_COMPONENTS3(t, +, next_px_err, 6, prev_l, 1, grad->error_acc[0], 9); in lv_dither_err_diff_ver()
193 grad->map[0] = lv_color_hex(t.full); in lv_dither_err_diff_ver()
197 lv_color32_t t = grad->hmap[y]; in lv_dither_err_diff_ver()
200 FS_COMPONENTS3(t, +, next_px_err, 6, prev_l, 1, grad->error_acc[x], 9); in lv_dither_err_diff_ver()
201 prev_l = grad->error_acc[x]; in lv_dither_err_diff_ver()
206 grad->error_acc[x] = next_px_err; in lv_dither_err_diff_ver()
207 grad->map[x] = q; in lv_dither_err_diff_ver()