亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ibmcam.c

?? linux內核源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
			scanLength = 128;			scanHeight = 96;			order_uv = 1;	/* U Y V Y ... */			break;		case HDRSIG_MODEL1_176x144:			scanLength = 176;			scanHeight = 144;			order_uv = 1;	/* U Y V Y ... */			break;		case HDRSIG_MODEL1_352x288:			scanLength = 352;			scanHeight = 288;			order_uv = 0;	/* Y V Y V ... */			break;		default:			err("Unknown header signature 00 FF 00 %02lX", frame->header);			return scan_NextFrame;		}		/* order_yc: true=Yc false=cY ('c'=either U or V) */		order_yc = (IBMCAM_T(uvd)->camera_model == IBMCAM_MODEL_2);	}	len = scanLength * 3;	assert(len <= sizeof(lineBuffer));	/*	 * Lines are organized this way:	 *	 * I420:	 * ~~~~	 * <scanLength->	 * ___________________________________	 * |-----Y-----|---UVUVUV...UVUV-----| \	 * |-----------+---------------------|  \	 * |<-- 176 -->|<------ 176*2 ------>|  Total 72. lines (interlaced)	 * |...	   ... |        ...          |  /	 * |<-- 352 -->|<------ 352*2 ------>|  Total 144. lines (interlaced)	 * |___________|_____________________| /	 *  \           \	 *   lumaLine    chromaLine	 */	/* Make sure there's enough data for the entire line */	if (RingQueue_GetLength(&uvd->dp) < len)		return scan_Out;	/* Suck one line out of the ring queue */	RingQueue_Dequeue(&uvd->dp, lineBuffer, len);	/*	 * Make sure that our writing into output buffer	 * will not exceed the buffer. Mind that we may write	 * not into current output scanline but in several after	 * it as well (if we enlarge image vertically.)	 */	if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))		return scan_NextFrame;	/*	 * Now we are sure that entire line (representing all 'scanLength'	 * pixels from the camera) is available in the buffer. We	 * start copying the line left-aligned to the V4L buffer.	 * If the camera line is shorter then we should pad the V4L	 * buffer with something (black) to complete the line.	 */	assert(frame->data != NULL);	f = frame->data + (v4l_linesize * frame->curline);	/*	 * To obtain chrominance data from the 'chromaLine' use this:	 *   v = chromaLine[0]; // 0-1:[0], 2-3:[4], 4-5:[8]...	 *   u = chromaLine[2]; // 0-1:[2], 2-3:[6], 4-5:[10]...	 *	 * Indices must be calculated this way:	 * v_index = (i >> 1) << 2;	 * u_index = (i >> 1) << 2 + 2;	 *	 * where 'i' is the column number [0..VIDEOSIZE_X(frame->request)-1]	 */	lumaLine = lineBuffer;	chromaLine = lineBuffer + scanLength;	for (i = 0; i < VIDEOSIZE_X(frame->request); i++)	{		unsigned char rv, gv, bv;	/* RGB components */		/* Check for various visual debugging hints (colorized pixels) */		if ((flags & FLAGS_DISPLAY_HINTS) && (icam->has_hdr)) {			/*			 * This is bad and should not happen. This means that			 * we somehow overshoot the line and encountered new			 * frame! Obviously our camera/V4L frame size is out			 * of whack. This cyan dot will help you to figure			 * out where exactly the new frame arrived.			 */			if (icam->has_hdr == 1) {				bv = 0; /* Yellow marker */				gv = 0xFF;				rv = 0xFF;			} else {				bv = 0xFF; /* Cyan marker */				gv = 0xFF;				rv = 0;			}			icam->has_hdr = 0;			goto make_pixel;		}		/*		 * Check if we are still in range. We may be out of range if our		 * V4L canvas is wider or taller than the camera "native" image.		 * Then we quickly fill the remainder of the line with zeros to		 * make black color and quit the horizontal scanning loop.		 */		if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {			const int j = i * V4L_BYTES_PER_PIXEL;#if USES_IBMCAM_PUTPIXEL			/* Refresh 'f' because we don't use it much with PUTPIXEL */			f = frame->data + (v4l_linesize * frame->curline) + j;#endif			memset(f, 0, v4l_linesize - j);			break;		}		y = lumaLine[i];		if (flags & FLAGS_MONOCHROME) /* Use monochrome for debugging */			rv = gv = bv = y;		else {			int off_0, off_2;			off_0 = (i >> 1) << 2;			off_2 = off_0 + 2;			if (order_yc) {				off_0++;				off_2++;			}			if (!order_uv) {				off_0 += 2;				off_2 -= 2;			}			u = chromaLine[off_0] + hue_corr;			v = chromaLine[off_2] + hue2_corr;			/* Apply color correction */			if (color_corr != 0) {				/* Magnify up to 2 times, reduce down to zero saturation */				u = 128 + ((ccm + color_corr) * (u - 128)) / ccm;				v = 128 + ((ccm + color_corr) * (v - 128)) / ccm;			}			YUV_TO_RGB_BY_THE_BOOK(y, u, v, rv, gv, bv);		}	make_pixel:		/*		 * The purpose of creating the pixel here, in one,		 * dedicated place is that we may need to make the		 * pixel wider and taller than it actually is. This		 * may be used if camera generates small frames for		 * sake of frame rate (or any other reason.)		 *		 * The output data consists of B, G, R bytes		 * (in this order).		 */#if USES_IBMCAM_PUTPIXEL		RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);#else		*f++ = bv;		*f++ = gv;		*f++ = rv;#endif		/*		 * Typically we do not decide within a legitimate frame		 * that we want to end the frame. However debugging code		 * may detect marker of new frame within the data. Then		 * this condition activates. The 'data' pointer is already		 * pointing at the new marker, so we'd better leave it as is.		 */		if (frame_done)			break;	/* End scanning of lines */	}	/*	 * Account for number of bytes that we wrote into output V4L frame.	 * We do it here, after we are done with the scanline, because we	 * may fill more than one output scanline if we do vertical	 * enlargement.	 */	frame->curline += 2;	if (pcopylen != NULL)		*pcopylen += 2 * v4l_linesize;	frame->deinterlace = Deinterlace_FillOddLines;	if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))		return scan_NextFrame;	else		return scan_Continue;}/* * ibmcam_model2_320x240_parse_lines() * * This procedure deals with a weird RGB format that is produced by IBM * camera model 2 in modes 320x240 and above; 'x' below is 159 or 175, * depending on horizontal size of the picture: * * <--- 160 or 176 pairs of RA,RB bytes -----> * *-----------------------------------------* \ * | RA0 | RB0 | RA1 | RB1 | ... | RAx | RBx |  \   This is pair of horizontal lines, * |-----+-----+-----+-----+ ... +-----+-----|   *- or one interlaced line, total * | B0  | G0  | B1  | G1  | ... | Bx  | Gx  |  /   120 or 144 such pairs which yield * |=====+=====+=====+=====+ ... +=====+=====| /    240 or 288 lines after deinterlacing. * * Each group of FOUR bytes (RAi, RBi, Bi, Gi) where i=0..frame_width/2-1 * defines ONE pixel. Therefore this format yields 176x144 "decoded" * resolution at best. I do not know why camera sends such format - the * previous model (1) just used interlaced I420 and everyone was happy. * * I do not know what is the difference between RAi and RBi bytes. Both * seemingly represent R component, but slightly vary in value (so that * the picture looks a bit colored if one or another is used). I use * them both as R component in attempt to at least partially recover the * lost resolution. */static enum ParseState ibmcam_model2_320x240_parse_lines(	struct uvd *uvd,	struct usbvideo_frame *frame,	long *pcopylen){	unsigned char *f, *la, *lb;	unsigned int len;	int v4l_linesize; /* V4L line offset */	int i, j, frame_done=0, color_corr;	int scanLength, scanHeight;	static unsigned char lineBuffer[352*2];	switch (uvd->videosize) {	case VIDEOSIZE_320x240:	case VIDEOSIZE_352x240:	case VIDEOSIZE_352x288:		scanLength = VIDEOSIZE_X(uvd->videosize);		scanHeight = VIDEOSIZE_Y(uvd->videosize);		break;	default:		err("ibmcam_model2_320x240_parse_lines: Wrong mode.");		return scan_Out;	}	color_corr = (uvd->vpic.colour) >> 8; /* 0..+255 */	v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;	len = scanLength * 2; /* See explanation above */	assert(len <= sizeof(lineBuffer));	/* Make sure there's enough data for the entire line */	if (RingQueue_GetLength(&uvd->dp) < len)		return scan_Out;	/* Suck one line out of the ring queue */	RingQueue_Dequeue(&uvd->dp, lineBuffer, len);	/*	 * Make sure that our writing into output buffer	 * will not exceed the buffer. Mind that we may write	 * not into current output scanline but in several after	 * it as well (if we enlarge image vertically.)	 */	if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))		return scan_NextFrame;	la = lineBuffer;	lb = lineBuffer + scanLength;	/*	 * Now we are sure that entire line (representing all	 *         VIDEOSIZE_X(frame->request)	 * pixels from the camera) is available in the scratch buffer. We	 * start copying the line left-aligned to the V4L buffer (which	 * might be larger - not smaller, hopefully). If the camera	 * line is shorter then we should pad the V4L buffer with something	 * (black in this case) to complete the line.	 */	f = frame->data + (v4l_linesize * frame->curline);	/* Fill the 2-line strip */	for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {		int y, rv, gv, bv;	/* RGB components */		j = i & (~1);		/* Check for various visual debugging hints (colorized pixels) */		if ((flags & FLAGS_DISPLAY_HINTS) && (IBMCAM_T(uvd)->has_hdr)) {			if (IBMCAM_T(uvd)->has_hdr == 1) {				bv = 0; /* Yellow marker */				gv = 0xFF;				rv = 0xFF;			} else {				bv = 0xFF; /* Cyan marker */				gv = 0xFF;				rv = 0;			}			IBMCAM_T(uvd)->has_hdr = 0;			goto make_pixel;		}		/*		 * Check if we are still in range. We may be out of range if our		 * V4L canvas is wider or taller than the camera "native" image.		 * Then we quickly fill the remainder of the line with zeros to		 * make black color and quit the horizontal scanning loop.		 */		if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {			const int j = i * V4L_BYTES_PER_PIXEL;#if USES_IBMCAM_PUTPIXEL			/* Refresh 'f' because we don't use it much with PUTPIXEL */			f = frame->data + (v4l_linesize * frame->curline) + j;#endif			memset(f, 0, v4l_linesize - j);			break;		}		/*		 * Here I use RA and RB components, one per physical pixel.		 * This causes fine vertical grid on the picture but may improve		 * horizontal resolution. If you prefer replicating, use this:		 *   rv = la[j + 0];   ... or ... rv = la[j + 1];		 * then the pixel will be replicated.		 */		rv = la[i];		gv = lb[j + 1];		bv = lb[j + 0];		y = (rv + gv + bv) / 3; /* Brightness (badly calculated) */		if (flags & FLAGS_MONOCHROME) /* Use monochrome for debugging */			rv = gv = bv = y;		else if (color_corr != 128) {			/* Calculate difference between color and brightness */			rv -= y;			gv -= y;			bv -= y;			/* Scale differences */			rv = (rv * color_corr) / 128;			gv = (gv * color_corr) / 128;			bv = (bv * color_corr) / 128;			/* Reapply brightness */			rv += y;			gv += y;			bv += y;			/* Watch for overflows */			RESTRICT_TO_RANGE(rv, 0, 255);			RESTRICT_TO_RANGE(gv, 0, 255);			RESTRICT_TO_RANGE(bv, 0, 255);		}	make_pixel:		RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);	}	/*	 * Account for number of bytes that we wrote into output V4L frame.	 * We do it here, after we are done with the scanline, because we	 * may fill more than one output scanline if we do vertical	 * enlargement.	 */	frame->curline += 2;	*pcopylen += v4l_linesize * 2;	frame->deinterlace = Deinterlace_FillOddLines;	if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))		return scan_NextFrame;	else		return scan_Continue;}static enum ParseState ibmcam_model3_parse_lines(	struct uvd *uvd,	struct usbvideo_frame *frame,	long *pcopylen){	unsigned char *data;	const unsigned char *color;	unsigned int len;	int v4l_linesize; /* V4L line offset */	const int hue_corr  = (uvd->vpic.hue - 0x8000) >> 10;	/* -32..+31 */	const int hue2_corr = (hue_correction - 128) / 4;		/* -32..+31 */	const int ccm = 128; /* Color correction median - see below */	int i, u, v, rw, data_w=0, data_h=0, color_corr;	static unsigned char lineBuffer[640*3];	color_corr = (uvd->vpic.colour - 0x8000) >> 8; /* -128..+127 = -ccm..+(ccm-1)*/	RESTRICT_TO_RANGE(color_corr, -ccm, ccm+1);	v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;	/* The header tells us what sort of data is in this frame */	switch (frame->header) {		/*		 * Uncompressed modes (that are easy to decode).		 */	case 0x0308:		data_w = 640;		data_h = 480;		break;	case 0x0208:		data_w = 320;		data_h = 240;		break;	case 0x020A:		data_w = 160;		data_h = 120;		break;		/*		 * Compressed modes (ViCE - that I don't know how to decode).		 */	case 0x0328:	/* 640x480, best quality compression */	case 0x0368:	/* 640x480, best frame rate compression */	case 0x0228:	/* 320x240, best quality compression */	case 0x0268:	/* 320x240, best frame rate compression */	case 0x02CA:	/* 160x120, best quality compression */	case 0x02EA:	/* 160x120, best frame rate compression */		/* Do nothing with this - not supported */		err("Unsupported mode $%04lx", frame->header);		return scan_NextFrame;	default:		/* Catch unknown headers, may help in learning new headers */		err("Strange frame->header=$%08lx", frame->header);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人一级片在线观看| 色视频欧美一区二区三区| 热久久久久久久| 亚洲国产综合色| 亚洲一区在线播放| 亚洲在线成人精品| 亚洲一区二区免费视频| 亚洲综合精品久久| 亚洲一区二区在线视频| 一区二区免费在线播放| 亚洲精品高清在线| 亚洲国产精品一区二区www在线 | 亚洲人成影院在线观看| 中文字幕在线一区| 亚洲视频一区在线| 亚洲五码中文字幕| 日韩黄色免费电影| 精品一二三四区| 成人午夜免费av| 欧洲一区二区三区在线| 欧美日韩第一区日日骚| 91精品国产入口在线| 欧美大片日本大片免费观看| 精品国产一二三区| 国产精品色哟哟网站| 亚洲免费在线观看| 日韩影院免费视频| 国产一区二区三区黄视频 | 精品一区二区国语对白| 成人视屏免费看| 在线一区二区观看| 欧美一三区三区四区免费在线看| 精品日韩在线一区| 国产精品美女久久久久av爽李琼| 亚洲免费在线观看| 免费精品99久久国产综合精品| 国产伦精品一区二区三区免费| 成人中文字幕电影| 欧美亚洲一区三区| 精品国产伦一区二区三区观看体验 | 欧美aⅴ一区二区三区视频| 国产在线日韩欧美| 91网站在线观看视频| 4438成人网| 国产女同性恋一区二区| 亚洲一区二区美女| 国产成人精品一区二| 欧美午夜精品久久久| 337p日本欧洲亚洲大胆色噜噜| 国产精品久久国产精麻豆99网站| 午夜视黄欧洲亚洲| 成人一区二区三区视频| 91精品国产手机| 一区免费观看视频| 伦理电影国产精品| 在线视频一区二区免费| 亚洲精品一线二线三线无人区| 亚洲乱码日产精品bd| 久久97超碰国产精品超碰| 91丨九色丨尤物| 精品黑人一区二区三区久久| 亚洲一区在线观看免费| 国产成人av电影在线播放| 欧美日韩精品一二三区| 国产精品国产三级国产普通话蜜臀 | 青青草成人在线观看| 99久久精品国产导航| 精品国产sm最大网站| 亚洲午夜在线电影| 成人黄色一级视频| 精品久久久网站| 香蕉影视欧美成人| 91免费观看在线| 国产蜜臀av在线一区二区三区| 日本午夜精品一区二区三区电影| 99re这里只有精品6| 亚洲精品一线二线三线无人区| 午夜精品123| 色久综合一二码| 国产精品区一区二区三| 国产曰批免费观看久久久| 欧美一区二区三区在线视频| 亚洲图片欧美综合| 日本韩国欧美在线| 亚洲视频在线一区观看| 高清视频一区二区| 久久久久一区二区三区四区| 免费xxxx性欧美18vr| 欧美人妇做爰xxxⅹ性高电影| 亚洲免费在线视频一区 二区| 成人黄色小视频在线观看| 久久精品无码一区二区三区| 看电视剧不卡顿的网站| 3d成人动漫网站| 青草av.久久免费一区| 欧美日韩国产另类不卡| 亚洲综合图片区| 在线一区二区视频| 亚洲图片欧美视频| 欧美日韩精品电影| 视频在线观看国产精品| 欧美精品色综合| 午夜一区二区三区在线观看| 欧美三级中文字幕在线观看| 亚洲线精品一区二区三区| 欧美在线色视频| 亚洲成人av电影| 欧美猛男gaygay网站| 五月综合激情日本mⅴ| 欧美人与禽zozo性伦| 视频一区在线播放| 91精品国产综合久久福利| 看电影不卡的网站| 国产日韩在线不卡| 不卡的看片网站| 亚洲欧美激情一区二区| 欧美一a一片一级一片| 视频在线观看国产精品| 精品国产91亚洲一区二区三区婷婷 | 亚洲精品少妇30p| 欧美色爱综合网| 秋霞av亚洲一区二区三| 亚洲精品一区在线观看| 成人久久18免费网站麻豆| 亚洲三级免费观看| 欧美日韩色一区| 久久电影网电视剧免费观看| 国产人妖乱国产精品人妖| 91丨porny丨首页| 亚洲成人动漫在线观看| 欧美成人精品二区三区99精品| 国产一区二区三区蝌蚪| 国产精品电影一区二区三区| 欧美亚洲动漫精品| 久久丁香综合五月国产三级网站| 日本一区二区不卡视频| 在线视频综合导航| 美国一区二区三区在线播放| 欧美—级在线免费片| 欧美亚洲日本一区| 国产一区亚洲一区| 亚洲日本乱码在线观看| 在线播放一区二区三区| 成人影视亚洲图片在线| 亚洲夂夂婷婷色拍ww47 | 视频精品一区二区| 国产欧美一区二区精品忘忧草| 色久优优欧美色久优优| 麻豆专区一区二区三区四区五区| 中文字幕av不卡| 欧美日韩精品系列| 国产成人h网站| 天天色天天爱天天射综合| 国产欧美视频一区二区三区| 欧美亚洲国产bt| 国产成人一区二区精品非洲| 亚洲一区视频在线观看视频| 国产午夜亚洲精品理论片色戒| 欧美性高清videossexo| 国产成人免费av在线| 亚洲一区二区偷拍精品| 亚洲国产经典视频| 日韩一区二区三区视频在线 | 欧美日韩在线播放三区| 国产xxx精品视频大全| 午夜天堂影视香蕉久久| 国产精品青草久久| 久久在线观看免费| 欧美日韩高清在线| 色综合天天性综合| 国产毛片精品一区| 日韩av一区二区三区四区| 亚洲日本在线天堂| 久久久综合精品| 欧美一区二区三区视频在线| 91在线云播放| 国产精品1区2区3区| 日产国产欧美视频一区精品| 亚洲欧美日韩综合aⅴ视频| 久久久夜色精品亚洲| 91精品午夜视频| 欧美影院午夜播放| 色综合天天做天天爱| 高清国产一区二区三区| 久久激情五月婷婷| 午夜精品福利久久久| 一区二区三区丝袜| 中文字幕亚洲不卡| 国产日韩欧美精品综合| 欧美tickle裸体挠脚心vk| 欧美一区三区四区| 欧美精品乱码久久久久久| 色久综合一二码| 色乱码一区二区三区88| jlzzjlzz亚洲女人18| 国产一区视频导航| 久久不见久久见免费视频1 | 91精品国产日韩91久久久久久| 欧美日韩综合在线| 欧美三级视频在线播放|