kernels/linux-2.4.0/drivers/usb/ov511.c
/*
 * For 640x480 RAW BW images, data shows up in 1200 256 byte segments.
 * The segments represent 4 squares of 8x8 pixels as follows:
 *
 *      0  1 ...  7    64  65 ...  71   ...  192 193 ... 199
 *      8  9 ... 15    72  73 ...  79        200 201 ... 207
 *           ...              ...                    ...
 *     56 57 ... 63   120 121 ... 127        248 249 ... 255
 *
 */
For 640x480 RAW BW images, data shows up in 1200 256 byte segments.
The segments represent 4 squares of 8x8 pixels as follows.

0  1 ...
For 640x480 RAW BW images data shows up in 1200 256 byte segments . The segments represent 4 squares of 8x8 pixels as follows . 0 1 ...
static void
ov511_parse_data_grey(unsigned char *pIn0, unsigned char *pOut0,
		      int iOutY, int iWidth)		    
{
	int k, l, m;
	unsigned char *pIn;
	unsigned char *pOut, *pOut1;
	pIn = pIn0;
	pOut = pOut0 + iOutY;
	for (k = 0; k < 4; k++) {
		pOut1 = pOut;
		for (l = 0; l < 8; l++) {
			for (m = 0; m < 8; m++) {
				*pOut1++ = *pIn++;
			}
			pOut1 += iWidth - 8;
		}
		pOut += 8;
	}
}
static void ov511_parse_data_grey ( unsigned char * pIn0 , unsigned char * pOut0 , int iOutY , int iWidth ) { int k , l , m ; unsigned char * pIn ; unsigned char * pOut , * pOut1 ; pIn = pIn0 ; pOut = pOut0 + iOutY ; for ( k = 0 ; k < 4 ; k ++ ) { pOut1 = pOut ; for ( l = 0 ; l < 8 ; l ++ ) { for ( m = 0 ; m < 8 ; m ++ ) { * pOut1 ++ = * pIn ++ ; } pOut1 += iWidth - 8 ; } pOut += 8 ; } }
For 640x480 RAW BW images, data shows up in 1200 256 byte segments.
For 640x480 RAW BW images data shows up in 1200 256 byte segments .