Lines Matching +full:- +full:q
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()
49 …3. It means that a pixel i,j only depends on the value of a pixel i-7, j-7 to i,j and no other one. in lv_dither_ordered_hor()
54 int8_t factor = dither_ordered_threshold_matrix[(y & 7) * 8 + ((j) & 7)] - 32; in lv_dither_ordered_hor()
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()
72 …3. It means that a pixel i,j only depends on the value of a pixel i-7, j-7 to i,j and no other one. in lv_dither_ordered_ver()
76 lv_color32_t tmp = grad->hmap[LV_CLAMP(0, y - 4, grad->size)]; in lv_dither_ordered_ver()
80 int8_t factor = dither_ordered_threshold_matrix[(y & 7) * 8 + ((j + x) & 7)] - 32; in lv_dither_ordered_ver()
86 grad->map[j] = lv_color_hex(t.full); in lv_dither_ordered_ver()
90 for(; j < w - 8; j += 8) { 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()
110 Can be implemented as: x (x<<3 - x) in lv_dither_err_diff_hor()
111 (x<<2 - x) (x<<2+x) x in lv_dither_err_diff_hor()
114 #define FS_COMPUTE_ERROR(e) { coef[0] = (e<<3) - e; coef[1] = (e<<2) - e; coef[2] = (e<<2) + e; coe… in lv_dither_err_diff_hor()
116 …q) { lv_color32_t u; u.full = lv_color_to32(q); e.r = (int8_t)(t.ch.red - u.ch.red); e.g = (int8_t… 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()
122 lv_color_t q; in lv_dither_err_diff_hor() local
125 next_l = grad->error_acc[x + 1]; in lv_dither_err_diff_hor()
127 q = lv_color_hex(t.full); in lv_dither_err_diff_hor()
129 FS_QUANT_ERROR(error, t, q); 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()
157 …Since the given hi-resolution gradient (in src) is vertical, the Floyd Steinberg algorithm pass ne… in lv_dither_err_diff_ver()
166 e(i,j) = 1/16 * [ e(i-1,j) * 5 + e(i-1,j+1) * 3 + e(i-1,j-1) * 1 + e(i,j-1) * 7] in lv_dither_err_diff_ver()
172 Let's remove it and re-dispatch the error factor accordingly so they stays normalized: in lv_dither_err_diff_ver()
173 e(i,j) ~= 1/16 * [ e(i-1,j) * 6 + e(i-1,j-1) * 1 + e(i,j-1) * 9] in lv_dither_err_diff_ver()
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()
198 lv_color_t q; in lv_dither_err_diff_ver() local
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()
203 q = lv_color_hex(t.full); in lv_dither_err_diff_ver()
204 FS_QUANT_ERROR(next_px_err, t, q); 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()