#define VIDEO_COLS VIDEO_VISIBLE_COLS
#define VIDEO_ROWS VIDEO_VISIBLE_ROWS
-#define VIDEO_SIZE (VIDEO_ROWS*VIDEO_COLS*VIDEO_PIXEL_SIZE)
-#define VIDEO_PIX_BLOCKS (VIDEO_SIZE >> 2)
-#define VIDEO_LINE_LEN (VIDEO_COLS*VIDEO_PIXEL_SIZE)
+#ifndef VIDEO_LINE_LEN
+#define VIDEO_LINE_LEN (VIDEO_COLS * VIDEO_PIXEL_SIZE)
+#endif
+#define VIDEO_SIZE (VIDEO_ROWS * VIDEO_LINE_LEN)
#define VIDEO_BURST_LEN (VIDEO_COLS/8)
#ifdef CONFIG_VIDEO_LOGO
struct palette p[256];
struct bmp_color_table_entry cte;
int green_shift, red_off;
- int limit = VIDEO_COLS * VIDEO_ROWS;
+ int limit = (VIDEO_LINE_LEN / VIDEO_PIXEL_SIZE) * VIDEO_ROWS;
int pixels = 0;
x = 0;
ncolors = __le32_to_cpu(img->header.colors_used);
bpp = VIDEO_PIXEL_SIZE;
fbp = (unsigned char *) ((unsigned int) video_fb_address +
- (((y + yoff) * VIDEO_COLS) + xoff) * bpp);
+ (y + yoff) * VIDEO_LINE_LEN +
+ xoff * bpp);
bm = (uchar *) img + __le32_to_cpu(img->header.data_offset);
y--;
fbp = (unsigned char *)
((unsigned int) video_fb_address +
- (((y + yoff) * VIDEO_COLS) +
- xoff) * bpp);
+ (y + yoff) * VIDEO_LINE_LEN +
+ xoff * bpp);
continue;
case 1:
/* end of bitmap data marker */
y -= bm[3];
fbp = (unsigned char *)
((unsigned int) video_fb_address +
- (((y + yoff) * VIDEO_COLS) +
- x + xoff) * bpp);
+ (y + yoff) * VIDEO_LINE_LEN +
+ xoff * bpp);
bm += 4;
break;
default:
bmap = (uchar *) bmp + le32_to_cpu(bmp->header.data_offset);
fb = (uchar *) (video_fb_address +
- ((y + height - 1) * VIDEO_COLS * VIDEO_PIXEL_SIZE) +
+ ((y + height - 1) * VIDEO_LINE_LEN) +
x * VIDEO_PIXEL_SIZE);
#ifdef CONFIG_VIDEO_BMP_RLE8
cte.blue);
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
+ fb -= VIDEO_LINE_LEN + width *
VIDEO_PIXEL_SIZE;
}
break;
*fb++ = *bmap++;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF__8BIT_332RGB:
cte.blue);
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_15BIT_555RGB:
#endif
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_16BIT_565RGB:
cte.blue);
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_32BIT_X888RGB:
cte.blue);
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_24BIT_888RGB:
cte.blue);
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
}
bmap += 3;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_15BIT_555RGB:
bmap += 3;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_16BIT_565RGB:
bmap += 3;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_32BIT_X888RGB:
bmap += 3;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
case GDF_24BIT_888RGB:
bmap += 3;
}
bmap += padded_line;
- fb -= (VIDEO_VISIBLE_COLS + width) *
- VIDEO_PIXEL_SIZE;
+ fb -= VIDEO_LINE_LEN + width *
+ VIDEO_PIXEL_SIZE;
}
break;
default:
{
int xcount, i;
- int skip = (VIDEO_COLS - VIDEO_LOGO_WIDTH) * VIDEO_PIXEL_SIZE;
+ int skip = VIDEO_LINE_LEN - VIDEO_LOGO_WIDTH * VIDEO_PIXEL_SIZE;
int ycount = video_logo_height;
unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
unsigned char *source;
y = max(0, (int)(VIDEO_VISIBLE_ROWS - VIDEO_LOGO_HEIGHT + y + 1));
#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
- dest = (unsigned char *)screen + (y * VIDEO_COLS + x) * VIDEO_PIXEL_SIZE;
+ dest = (unsigned char *)screen + y * VIDEO_LINE_LEN + x * VIDEO_PIXEL_SIZE;
#ifdef CONFIG_VIDEO_BMP_LOGO
source = bmp_logo_bitmap;