X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/74032daeb88c104c67738774827440f4264b371e..789ebb2d04033053b3cfeaa73648e3a1c3b3d8f5:/video/generic.c?ds=inline diff --git a/video/generic.c b/video/generic.c deleted file mode 100644 index d8b320b..0000000 --- a/video/generic.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include - -uint32_t checksum_rect_generic32(int x, int y, int width, int height) { - - /* Generic checksum_rect function for video modes with 32-bit pixels - * (i.e. fb->curmode.bytestride = 4). - */ - - int scanline = fb->curmode.xres * 4; - unsigned char * lineaddr; - int i; - - uint32_t sum = 0; - - for (i = 0; i < height; i++) { - lineaddr = fb->fbaddr + (i + y) * scanline; - - sum ^= crc32(lineaddr, width * 4); - } - - return sum; -} - -void copy_pixels_generic32(char *buf, int x, int y, int width, int height) -{ - int cx, cy; - unsigned int *ibuf = (unsigned int *)buf; - unsigned int *fbuf; - for (cy = y; cy < (y + height); cy++) - { - fbuf = (unsigned int *)fb->fbaddr; - fbuf += cy * (fb->curmode.xres) + x; - for (cx = x; cx < (x + width); cx++) - *(ibuf++) = *(fbuf++); - } -}