void pwc_set_image_buffer_size(struct pwc_device *pdev)
static void pwc_set_image_buffer_size(struct pwc_device *pdev)
void pwc_set_image_buffer_size(struct pwc_device *pdev){	int i, factor = 0, filler = 0;	/* for PALETTE_YUV420P */	switch(pdev->vpalette)	{	case VIDEO_PALETTE_YUV420P:		factor = 6;		filler = 128;		break;	case VIDEO_PALETTE_RAW:		factor = 6; /* can be uncompressed YUV420P */		filler = 0;		break;	}	/* Set sizes in bytes */	pdev->image.size = pdev->image.x * pdev->image.y * factor / 4;	pdev->view.size  = pdev->view.x  * pdev->view.y  * factor / 4;	/* Align offset, or you'll get some very weird results in	   YUV420 mode... x must be multiple of 4 (to get the Y's in	   place), and y even (or you'll mixup U & V). This is less of a	   problem for YUV420P.	 */	pdev->offset.x = ((pdev->view.x - pdev->image.x) / 2) & 0xFFFC;	pdev->offset.y = ((pdev->view.y - pdev->image.y) / 2) & 0xFFFE;	/* Fill buffers with gray or black */	for (i = 0; i < MAX_IMAGES; i++) {		if (pdev->image_ptr[i] != NULL)			memset(pdev->image_ptr[i], filler, pdev->view.size);	}}