Lines Matching +full:3 +full:- +full:axis
1 // SPDX-License-Identifier: GPL-2.0+
26 cnt--; in draw_unencoded_bitmap()
36 cnt--; in draw_encoded_bitmap()
53 width = get_unaligned_le32(&bmp->header.width); in video_display_rle8_bitmap()
54 height = get_unaligned_le32(&bmp->header.height); in video_display_rle8_bitmap()
55 bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset); in video_display_rle8_bitmap()
58 y = height - 1; in video_display_rle8_bitmap()
67 y--; in video_display_rle8_bitmap()
68 /* 16bpix, 2-byte per pixel, width should *2 */ in video_display_rle8_bitmap()
69 fb -= (width * 2 + priv->line_length); in video_display_rle8_bitmap()
78 y -= bmap[3]; in video_display_rle8_bitmap()
79 /* 16bpix, 2-byte per pixel, x should *2 */ in video_display_rle8_bitmap()
80 fb = (uchar *)(priv->fb + (y + y_off - 1) in video_display_rle8_bitmap()
81 * priv->line_length + (x + x_off) * 2); in video_display_rle8_bitmap()
91 cnt = width - x; in video_display_rle8_bitmap()
112 bmap[1] == bmap[3]) { in video_display_rle8_bitmap()
117 cnt = width - x; in video_display_rle8_bitmap()
145 * video_splash_align_axis() - Align a single coordinate
147 *- if a coordinate is 0x7fff then the image will be centred in
149 *- if a coordinate is -ve then it will be offset to the
151 *- if a coordinate is positive it will be used unchnaged.
153 * @axis: Input and output coordinate
154 * @panel_size: Size of panel in pixels for that axis
155 * @picture_size: Size of bitmap in pixels for that axis
157 static void video_splash_align_axis(int *axis, unsigned long panel_size, in video_splash_align_axis() argument
160 unsigned long panel_picture_delta = panel_size - picture_size; in video_splash_align_axis()
163 if (*axis == BMP_ALIGN_CENTER) in video_splash_align_axis()
165 else if (*axis < 0) in video_splash_align_axis()
166 axis_alignment = panel_picture_delta + *axis + 1; in video_splash_align_axis()
170 *axis = max(0, (int)axis_alignment); in video_splash_align_axis()
178 ushort *cmap = priv->cmap; in video_set_cmap()
182 *cmap = ((cte->red << 8) & 0xf800) | in video_set_cmap()
183 ((cte->green << 3) & 0x07e0) | in video_set_cmap()
184 ((cte->blue >> 3) & 0x001f); in video_set_cmap()
201 unsigned long pwidth = priv->xsize; in video_bmp_display()
206 if (!bmp || !(bmp->header.signature[0] == 'B' && in video_bmp_display()
207 bmp->header.signature[1] == 'M')) { in video_bmp_display()
210 return -EINVAL; in video_bmp_display()
213 width = get_unaligned_le32(&bmp->header.width); in video_bmp_display()
214 height = get_unaligned_le32(&bmp->header.height); in video_bmp_display()
215 bmp_bpix = get_unaligned_le16(&bmp->header.bit_count); in video_bmp_display()
216 hdr_size = get_unaligned_le16(&bmp->header.size); in video_bmp_display()
222 bpix = VNBITS(priv->bpix); in video_bmp_display()
228 return -EINVAL; in video_bmp_display()
240 bpix, get_unaligned_le16(&bmp->header.bit_count)); in video_bmp_display()
241 return -EPERM; in video_bmp_display()
244 debug("Display-bmp: %d x %d with %d colours, display %d\n", in video_bmp_display()
253 video_splash_align_axis(&x, priv->xsize, width); in video_bmp_display()
254 video_splash_align_axis(&y, priv->ysize, height); in video_bmp_display()
258 width = pwidth - x; in video_bmp_display()
259 if ((y + height) > priv->ysize) in video_bmp_display()
260 height = priv->ysize - y; in video_bmp_display()
262 bmap = (uchar *)bmp + get_unaligned_le32(&bmp->header.data_offset); in video_bmp_display()
263 fb = (uchar *)(priv->fb + in video_bmp_display()
264 (y + height - 1) * priv->line_length + x * bpix / 8); in video_bmp_display()
269 cmap_base = priv->cmap; in video_bmp_display()
271 u32 compression = get_unaligned_le32(&bmp->header.compression); in video_bmp_display()
277 return -EPROTONOSUPPORT; in video_bmp_display()
301 bmap += (padded_width - width); in video_bmp_display()
302 fb -= byte_width + priv->line_length; in video_bmp_display()
313 bmap += (padded_width - width) * 2; in video_bmp_display()
314 fb -= width * 2 + priv->line_length; in video_bmp_display()
324 *(u16 *)fb = ((bmap[2] >> 3) << 10) | in video_bmp_display()
325 ((bmap[1] >> 3) << 5) | in video_bmp_display()
326 (bmap[0] >> 3); in video_bmp_display()
327 bmap += 3; in video_bmp_display()
336 fb -= priv->line_length + width * (bpix / 8); in video_bmp_display()
337 bmap += (padded_width - width) * 3; in video_bmp_display()
350 fb -= priv->line_length + width * (bpix / 8); in video_bmp_display()