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

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

?? spcadecoder.c

?? 這是一個usb驅動源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
	t1 = tmp[j + 1];	t2 = tmp[j + 2];	t3 = tmp[j + 3];	t4 = tmp[j + 4];	t5 = tmp[j + 5];	t6 = tmp[j + 6];	t7 = tmp[j + 7];	if ((t1 | t2 | t3 | t4 | t5 | t6 | t7) == 0) {	    te = ITOINT(t0);	    out[j + 0] = te;	    out[j + 1] = te;	    out[j + 2] = te;	    out[j + 3] = te;	    out[j + 4] = te;	    out[j + 5] = te;	    out[j + 6] = te;	    out[j + 7] = te;	    j += 8;	    continue;	}	//IDCT;	tmp0 = t0 + t1;	t1 = t0 - t1;	tmp2 = t2 - t3;	t3 = t2 + t3;	tmp2 = IMULT(tmp2, IC4) - t3;	tmp3 = tmp0 + t3;	t3 = tmp0 - t3;	tmp1 = t1 + tmp2;	tmp2 = t1 - tmp2;	tmp4 = t4 - t7;	t7 = t4 + t7;	tmp5 = t5 + t6;	t6 = t5 - t6;	tmp6 = tmp5 - t7;	t7 = tmp5 + t7;	tmp5 = IMULT(tmp6, IC4);	tmp6 = IMULT((tmp4 + t6), S22);	tmp4 = IMULT(tmp4, (C22 - S22)) + tmp6;	t6 = IMULT(t6, (C22 + S22)) - tmp6;	t6 = t6 - t7;	t5 = tmp5 - t6;	t4 = tmp4 - t5;	out[j + 0] = ITOINT(tmp3 + t7);	out[j + 1] = ITOINT(tmp1 + t6);	out[j + 2] = ITOINT(tmp2 + t5);	out[j + 3] = ITOINT(t3 + t4);	out[j + 4] = ITOINT(t3 - t4);	out[j + 5] = ITOINT(tmp2 - t5);	out[j + 6] = ITOINT(tmp1 - t6);	out[j + 7] = ITOINT(tmp3 - t7);	j += 8;    }}static unsigned char zig[64] = {    0, 1, 5, 6, 14, 15, 27, 28,    2, 4, 7, 13, 16, 26, 29, 42,    3, 8, 12, 17, 25, 30, 41, 43,    9, 11, 18, 24, 31, 40, 44, 53,    10, 19, 23, 32, 39, 45, 52, 54,    20, 22, 33, 38, 46, 51, 55, 60,    21, 34, 37, 47, 50, 56, 59, 61,    35, 36, 48, 49, 57, 58, 62, 63};static int aaidct[8] = {    IFIX(0.3535533906), IFIX(0.4903926402),    IFIX(0.4619397663), IFIX(0.4157348062),    IFIX(0.3535533906), IFIX(0.2777851165),    IFIX(0.1913417162), IFIX(0.0975451610)};inline static void idctqtab(unsigned char *qin, int *qout){    int i, j;    for (i = 0; i < 8; i++)	for (j = 0; j < 8; j++)	    qout[zig[i * 8 + j]] = qin[zig[i * 8 + j]] *		IMULT(aaidct[i], aaidct[j]);}inline static void scaleidctqtab(int *q, int sc){    int i;    for (i = 0; i < 64; i++)	q[i] = IMULT(q[i], sc);}/* Reduce to the necessary minimum. FIXME */void init_qTable(struct usb_spca50x *spca50x, unsigned int qIndex){    int i, j;    /* set up a quantization table */    for (i = 0; i < 2; i++) {	for (j = 0; j < 64; j++) {	    spca50x->maindecode.quant[i][j] =		GsmartQTable[qIndex * 2 + i][j];	}    }    idctqtab(spca50x->maindecode.	     quant[spca50x->maindecode.dscans[0].tq],	     spca50x->maindecode.dquant[0]);    idctqtab(spca50x->maindecode.	     quant[spca50x->maindecode.dscans[1].tq],	     spca50x->maindecode.dquant[1]);    idctqtab(spca50x->maindecode.	     quant[spca50x->maindecode.dscans[2].tq],	     spca50x->maindecode.dquant[2]);    /* rescale qtab */    //scaleidctqtab (spca50x->maindecode.dquant[0], IFIX (0.7));    //scaleidctqtab (spca50x->maindecode.dquant[1], IFIX (0.7));    //scaleidctqtab (spca50x->maindecode.dquant[2], IFIX (0.7));    }void init_jpeg_decoder(struct usb_spca50x *spca50x){    unsigned int i, j, k, l;    int tc, th, tt, tac, tdc;    unsigned char *ptr;    unsigned int qIndex = spca50x->qindex;    memcpy(spca50x->maindecode.comps, comp_template,	   MAXCOMP * sizeof(struct comp));    /* set up the huffman table */    ptr = (unsigned char *) GsmartJPEGHuffmanTable;    l = GSMART_JPG_HUFFMAN_TABLE_LENGTH;    while (l > 0) {	int hufflen[16];	unsigned char huffvals[256];	tc = *ptr++;	th = tc & 15;	tc >>= 4;	tt = tc * 2 + th;	if (tc > 1 || th > 1) {	    //printf("died whilst setting up huffman table.\n");	    //abort();	}	for (i = 0; i < 16; i++)	    hufflen[i] = *ptr++;	l -= 1 + 16;	k = 0;	for (i = 0; i < 16; i++) {	    for (j = 0; j < (unsigned int) hufflen[i]; j++)		huffvals[k++] = *ptr++;	    l -= hufflen[i];	}	dec_makehuff(dhuff + tt, hufflen, huffvals);    }    /* set up the scan table */    ptr = (unsigned char *) GsmartJPEGScanTable;    for (i = 0; i < 3; i++) {	spca50x->maindecode.dscans[i].cid = *ptr++;	tdc = *ptr++;	tac = tdc & 15;	tdc >>= 4;	if (tdc > 1 || tac > 1) {	    //printf("died whilst setting up scan table.\n");	    //abort();	}	/* for each component */	for (j = 0; j < 3; j++)	    if (spca50x->maindecode.comps[j].cid ==		spca50x->maindecode.dscans[i].cid)		break;	spca50x->maindecode.dscans[i].hv = spca50x->maindecode.comps[j].hv;	spca50x->maindecode.dscans[i].tq = spca50x->maindecode.comps[j].tq;	spca50x->maindecode.dscans[i].hudc.dhuff = dec_huffdc + tdc;	spca50x->maindecode.dscans[i].huac.dhuff = dec_huffac + tac;    }    if (spca50x->maindecode.dscans[0].cid != 1 ||	spca50x->maindecode.dscans[1].cid != 2 ||	spca50x->maindecode.dscans[2].cid != 3) {	//printf("invalid cid found.\n");	//abort();    }    if (spca50x->maindecode.dscans[0].hv != 0x22 ||	spca50x->maindecode.dscans[1].hv != 0x11 ||	spca50x->maindecode.dscans[2].hv != 0x11) {	//printf("invalid hv found.\n");	//abort();    }    spca50x->maindecode.dscans[0].next = 6 - 4;    spca50x->maindecode.dscans[1].next = 6 - 4 - 1;    spca50x->maindecode.dscans[2].next = 6 - 4 - 1 - 1;	/* 411 encoding */    /* set up a quantization table */    init_qTable(spca50x, qIndex);}static int bgr = 0;/* Gamma correction setting *//*	Gtable[0][n] -> 2.2*	Gtable[1][n] -> 1.7*	Gtable[2][n] -> 1.45*	Gtable[3][n] -> 1*	Gtable[4][n] -> 0.6896*	Gtable[5][n] -> 0.5882*	Gtable[6][n] -> 0.4545*	gCor coeff 0..6*/int spca50x_outpicture(struct spca50x_frame *myframe){				/* general idea keep a frame in the temporary buffer from the tasklet */    /* decode with native format at input and asked format at output */    /* myframe->cameratype is the native input format */    /* myframe->format is the asked format */    struct pictparam *gCorrect = &myframe->pictsetting;    unsigned char *red = myframe->decoder->Red;    unsigned char *green = myframe->decoder->Green;    unsigned char *blue = myframe->decoder->Blue;    int width = 0;    int height = 0;    int done = 0;    int i;    if (gCorrect->change) {	if (gCorrect->change == 0x01) {	    /* Gamma setting change compute all case */	    memcpy(red, &GTable[gCorrect->gamma], 256);	    memcpy(green, &GTable[gCorrect->gamma], 256);	    memcpy(blue, &GTable[gCorrect->gamma], 256);	    for (i = 0; i < 256; i++) {		red[i] =		    CLIP(((red[i] +			   gCorrect->OffRed) * gCorrect->GRed) >> 8);		green[i] =		    CLIP(((green[i] +			   gCorrect->OffGreen) * gCorrect->GGreen) >> 8);		blue[i] =		    CLIP(((blue[i] +			   gCorrect->OffBlue) * gCorrect->GBlue) >> 8);	    }	    bgr = gCorrect->force_rgb;	    gCorrect->change = 0x00;	}	if (gCorrect->change == 0x02) {	    /* Red setting change compute Red Value */	    memcpy(red, &GTable[gCorrect->gamma], 256);	    for (i = 0; i < 256; i++) {		red[i] =		    CLIP(((red[i] +			   gCorrect->OffRed) * gCorrect->GRed) >> 8);	    }	    gCorrect->change &= ~0x02;	}	if (gCorrect->change == 0x04) {	    /* Green setting change compute Green Value */	    memcpy(green, &GTable[gCorrect->gamma], 256);	    for (i = 0; i < 256; i++) {		green[i] =		    CLIP(((green[i] +			   gCorrect->OffGreen) * gCorrect->GGreen) >> 8);	    }	    gCorrect->change &= ~0x04;	}	if (gCorrect->change == 0x08) {	    /* Blue setting change compute Blue Value */	    memcpy(blue, &GTable[gCorrect->gamma], 256);	    for (i = 0; i < 256; i++) {		blue[i] =		    CLIP(((blue[i] +			   gCorrect->OffBlue) * gCorrect->GBlue) >> 8);	    }	    gCorrect->change &= ~0x08;	}	if (gCorrect->change == 0x10) {	    /* force_rgb setting change   */	    bgr = gCorrect->force_rgb;	    gCorrect->change &= ~0x10;	}    }    switch (myframe->cameratype) {    case JPGC:	height = (myframe->data[11] << 8) | myframe->data[12];	width = (myframe->data[13] << 8) | myframe->data[14];	if (myframe->hdrheight != height || myframe->hdrwidth != width)	    done = ERR_CORRUPTFRAME;	else {	    //set info.dri struct should be kmalloc with the	    // instance camera	    myframe->decoder->info.dri = myframe->data[5];	    if (myframe->format == VIDEO_PALETTE_JPEG) {		memcpy(myframe->tmpbuffer, myframe->data,		       myframe->scanlength);		done = make_jpeg_conexant(myframe);	    } else {		memcpy(myframe->tmpbuffer,		       myframe->data + 39, myframe->scanlength - 39);		done = jpeg_decode422(myframe, bgr);	    }	}	break;    case JPGH:	width = (myframe->data[10] << 8) | myframe->data[11];	height = (myframe->data[12] << 8) | myframe->data[13];	/* some camera did not respond with the good height ie:Labtec Pro 240 -> 232 */	if (myframe->hdrwidth != width)	    done = ERR_CORRUPTFRAME;	else {	    // reset info.dri	    myframe->decoder->info.dri = 0;	    memcpy(myframe->tmpbuffer, myframe->data + 16,		   myframe->scanlength - 16);	    if (myframe->format == VIDEO_PALETTE_JPEG)		done = make_jpeg(myframe);	    else		done = jpeg_decode422(myframe, bgr);	}	break;    case JPGM:    case JPGS:	// reset info.dri	myframe->decoder->info.dri = 0;	memcpy(myframe->tmpbuffer, myframe->data, myframe->scanlength);	if (myframe->format == VIDEO_PALETTE_JPEG)	    done = make_jpeg(myframe);	else	    done = jpeg_decode422(myframe, bgr);	break;    case JPEG:	memcpy(myframe->tmpbuffer, myframe->data, myframe->scanlength);	if (myframe->format == VIDEO_PALETTE_JPEG)	    done = make_jpeg(myframe);	else	    done = jpeg_decode411(myframe, bgr);	break;    case YUVY:    case YUYV:    case YYUV:	memcpy(myframe->tmpbuffer, myframe->data, myframe->scanlength);	done = yuv_decode(myframe, bgr);	break;    case PGBRG:	done = pixart_decompress(myframe);	if (done < 0)	    break;	done = bayer_decode(myframe, bgr);	break;    case GBGR:	/* translate the tv8532 stream into GBRG stream */	tv8532_preprocess(myframe);	done = bayer_decode(myframe, bgr);	break;    case GBRG:	memcpy(myframe->tmpbuffer, myframe->data, myframe->scanlength);	done = bayer_decode(myframe, bgr);	break;    case S561:	if (myframe->data[1] & 0x10)	    decode_spca561(myframe->data, myframe->tmpbuffer,			   myframe->width, myframe->height);	else	    memcpy(myframe->tmpbuffer, myframe->data + 20,		   myframe->scanlength);	done = bayer_decode(myframe, bgr);	break;    case SN9C:	sonix_decompress(myframe);	done = bayer_decode(myframe, bgr);	break;    default:	done = -1;	break;    }    return done;}static int yuv_decode(struct spca50x_frame *myframe, int force_rgb){    int r_offset, g_offset, b_offset;    int my, mx;			/* scan input surface */    unsigned char *pic1;	/* output surface */    __u16 *pix1, *pix2;		/* same for 16 bits output */    unsigned char *U, *V;	/* chroma output pointer */    int inuv, inv, pocx;	/* offset chroma input */    int iny, iny1;		/* offset luma input */    int nextinline, nextoutline;    int u1, v1, rg;    unsigned char y, y1;    char u, v;    unsigned char *pic = myframe->data;	/* output surface */    unsigned char *buf = myframe->tmpbuffer;	/* input surface */    int width = myframe->hdrwidth;    int height = myframe->hdrheight;    int softwidth = myframe->width;    int softheight = myframe->height;    //int method = myframe->method;    int format = myframe->format;    int cropx1 = myframe->cropx1;    int cropx2 = myframe->cropx2;    int cropy1 = myframe->cropy1;    int cropy2 = myframe->cropy2;    unsigned char *red = myframe->decoder->Red;    unsigned char *green = myframe->decoder->Green;    unsigned char *blue = myframe->decoder->Blue;    int bpp;    int framesize, frameUsize;    framesize = softwidth * softheight;    frameUsize = framesize >> 2;    /* rgb or bgr like U or V that's the question */    if (force_rgb) {	U = pic + framesize;	V = U + frameUsize;	r_offset = 2;	g_offset = 1;	b_offset = 0;    } else {	V = pic + framesize;	U = V + frameUsize;	r_offset = 0;	g_offset = 1;	b_offset = 2;    }    switch (myframe->cameratype) {    case YUVY:{	    iny = 0;			   /********* iny **********/	    inuv = width;		   /*** inuv **** inv ******/	    nextinline = 3 * width;	    inv = (nextinline >> 1);	    iny1 = width << 1;		   /********* in

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区人| 日本不卡视频在线观看| 成人激情校园春色| 日韩精品电影一区亚洲| 国产三区在线成人av| 色综合久久久久综合体桃花网| 亚洲一区在线观看视频| 久久久久久久综合色一本| 欧美日韩精品系列| 不卡的电影网站| 久久99国产精品久久99| 亚洲人精品午夜| 国产精品麻豆网站| 亚洲成人中文在线| 97精品电影院| 美女一区二区三区在线观看| 91丨九色丨国产丨porny| 免费在线观看成人| 中文字幕中文字幕一区| 在线不卡中文字幕| 99久久精品国产毛片| 天堂蜜桃一区二区三区| 中文av字幕一区| 日韩欧美国产精品| 91精品国产综合久久福利| 91亚洲精华国产精华精华液| 日本视频一区二区三区| 一区二区在线看| 国产精品欧美精品| 国产欧美日韩在线看| 欧美日韩成人综合在线一区二区| 成人午夜私人影院| 粉嫩高潮美女一区二区三区| 亚洲sss视频在线视频| 中文字幕一区二区三区乱码在线| 亚洲精品一区在线观看| 91精品国产综合久久精品性色| 91浏览器打开| 97se亚洲国产综合在线| 成人动漫av在线| av欧美精品.com| 99久久久精品免费观看国产蜜| 国产夫妻精品视频| 国产黑丝在线一区二区三区| 国产精品99精品久久免费| 成人午夜精品一区二区三区| 成人教育av在线| 99久久伊人精品| 欧美美女bb生活片| 国产女人18水真多18精品一级做| 中文字幕一区二区三区在线播放 | 综合亚洲深深色噜噜狠狠网站| 欧美成人一区二区三区在线观看| 欧美成人官网二区| 欧美国产一区在线| 美洲天堂一区二卡三卡四卡视频| 国产二区国产一区在线观看| 在线观看一区二区视频| 欧美不卡在线视频| 天天色图综合网| 国产一区二区网址| 久久综合狠狠综合| 国产成人综合在线| 国产欧美在线观看一区| 成人黄色777网| 国产精品嫩草久久久久| 91国产精品成人| 亚洲综合免费观看高清完整版在线| 不卡的av网站| 亚洲一区二区精品3399| 欧美日韩一区小说| 国产一区二三区| 精品免费国产一区二区三区四区| 男人的j进女人的j一区| 欧美精品亚洲二区| 国产精品1区2区3区| 亚洲欧美日韩在线不卡| 欧美一区二区国产| 国产精品系列在线观看| 亚洲免费看黄网站| 精品国产一区久久| 成人av在线播放网站| 日本网站在线观看一区二区三区 | av亚洲精华国产精华精华 | 久久电影国产免费久久电影| 久久久久久夜精品精品免费| 国产乱人伦偷精品视频免下载| 日韩一区日韩二区| 久久久久国产免费免费| 日本韩国欧美一区| 国产在线精品不卡| 美脚の诱脚舐め脚责91 | 日本不卡一二三| 亚洲成av人在线观看| 中文字幕免费观看一区| 日韩免费电影网站| 欧美一区三区四区| 91国模大尺度私拍在线视频| eeuss鲁片一区二区三区| 另类中文字幕网| 免费在线看一区| 国产精品理论片| 亚洲一区二区在线播放相泽 | 亚洲一区二区在线视频| 中文字幕一区av| 一区二区三区免费看视频| zzijzzij亚洲日本少妇熟睡| 国产亚洲精品福利| 久久这里都是精品| 69堂亚洲精品首页| 91网站黄www| 成人国产一区二区三区精品| 国内精品视频666| 蜜臀av性久久久久蜜臀aⅴ| 亚洲自拍偷拍av| 亚洲不卡在线观看| 亚洲大片精品永久免费| 亚洲日本在线天堂| 26uuu国产电影一区二区| 欧美精品一区二区高清在线观看| 欧美色综合网站| 日韩一区二区不卡| 久久午夜色播影院免费高清 | 不卡高清视频专区| 色综合中文字幕国产 | 国产一区二区精品在线观看| 蜜桃精品视频在线观看| 日本va欧美va精品发布| 激情综合色播五月| 91麻豆福利精品推荐| 日韩网站在线看片你懂的| 久久久久久一级片| 一区二区三区在线观看视频| 狠狠色丁香婷综合久久| 成人一区二区视频| 在线不卡免费av| 亚洲精品成人精品456| 一区二区三区四区蜜桃| 一区二区三区日韩在线观看| 亚洲va欧美va国产va天堂影院| 国产精品亚洲专一区二区三区 | 国产中文一区二区三区| 欧美四级电影在线观看| 久久色视频免费观看| 九九视频精品免费| 精品国产成人在线影院| 久久伊人中文字幕| 日韩av中文在线观看| 国产精品综合网| 日韩欧美一卡二卡| 日韩一区在线看| 国产99久久久国产精品免费看| 欧美日本一区二区在线观看| 国产精品全国免费观看高清| 国产日韩欧美麻豆| 国产精品久久久久久久久免费桃花| 日韩欧美在线123| 日韩高清在线电影| 91精品国产一区二区三区| 午夜一区二区三区视频| 欧美一区二区在线看| 激情综合网激情| 自拍偷拍欧美激情| 欧美图区在线视频| 国产一区二区三区久久久| 国产欧美日韩麻豆91| 欧美最新大片在线看| 黄色日韩三级电影| 亚洲人午夜精品天堂一二香蕉| 91精品久久久久久久99蜜桃| 成人高清视频在线| 久久成人av少妇免费| 成人欧美一区二区三区小说| 欧美欧美欧美欧美首页| 成人综合在线视频| 午夜精品久久久久久久99水蜜桃| 日韩精品一区二区三区三区免费| 久久精品视频在线看| 97久久精品人人爽人人爽蜜臀| 亚洲一级二级三级在线免费观看| 欧美日韩免费一区二区三区| 美女任你摸久久| 精品卡一卡二卡三卡四在线| 国产一区二区在线视频| 国产欧美一区二区精品仙草咪| 成人av影视在线观看| 亚洲成人综合网站| 欧美大片在线观看一区| 极品少妇一区二区三区精品视频| 久久久另类综合| 欧美最新大片在线看| 精品无人区卡一卡二卡三乱码免费卡| 欧美电影免费观看高清完整版在线 | 精品福利一区二区三区| 99久久久免费精品国产一区二区 | 91亚洲永久精品| 亚洲日本一区二区| 精品噜噜噜噜久久久久久久久试看 | 国产日韩三级在线| 欧美精品久久久久久久久老牛影院|