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

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

?? transferidct_mmx.c

?? MPEG4編解C源代碼-已移植到ARM和DSP上
?? C
字號:
/**************************************************************************
 *                                                                        *
 * This code has been developed by John Funnell. This software is an      *
 * implementation of a part of one or more MPEG-4 Video tools as          *
 * specified in ISO/IEC 14496-2 standard.  Those intending to use this    *
 * software module in hardware or software products are advised that its  *
 * use may infringe existing patents or copyrights, and any such use      *
 * would be at such party's own risk.  The original developer of this     *
 * software module and his/her company, and subsequent editors and their  *
 * companies (including Project Mayo), will have no liability for use of  *
 * this software or modifications or derivatives thereof.                 *
 *                                                                        *
 * Project Mayo gives users of the Codec a license to this software       *
 * module or modifications thereof for use in hardware or software        *
 * products claiming conformance to the MPEG-4 Video Standard as          *
 * described in the Open DivX license.                                    *
 *                                                                        *
 * The complete Open DivX license can be found at                         *
 * http://www.projectmayo.com/opendivx/license.php                        *
 *                                                                        *
 **************************************************************************/
/**
*  Copyright (C) 2001 - Project Mayo
 *
 * John Funnell
 *
 * DivX Advanced Research Center <darc@projectmayo.com>
**/
// transferIDCT_mmx.c //

/* routines to transfer iDCT block result into the output picture */

/* this routine still needs to be optimised for pipelining        */
/* just haven't got time to finish the optimisations here ;-)     */

/* inline masm is used here so not compatible with gnu            */



//#define _TEST_TRANSFER

#ifdef _TEST_TRANSFER
#include <stdio.h>
#endif


#include "portab.h"

void transferIDCT_add(int16_t *sourceS16, uint8_t *destU8, int stride) {
	#ifdef _TEST_TRANSFER
	uint8_t reference_dest[64];
	int x, y, sum16;

	/* populate reference_dest[] with the correct result... */
	for (y=0; y<8; y++) {
		for (x=0; x<8; x++) {
			sum16 = (destU8[stride*y + x] + sourceS16[8*y + x]);
			if      (sum16 > 255) reference_dest[8*y + x] = 255;
			else if (sum16 <   0) reference_dest[8*y + x] =   0;
			else                  reference_dest[8*y + x] = (uint8_t)sum16;
		}
	}
	#endif

	_asm {

	; not sure about the state handling here - there must be a better way
	push eax
	push ebx
	push edi

	mov eax, sourceS16           ;  parameter 1, *sourceS16
	mov ebx, destU8              ;  parameter 2, *destU8
	mov edi, stride              ;  parameter 3, stride
	pxor mm7, mm7                ;  set mm7 = 0

; lines 0 to 7 all scheduled in together
	movq mm0,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm1,  mm0               ;  eight bytes of destination into mm0
	punpcklbw mm0, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm1, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm0, qword ptr [eax]  ;  add source and destination
	paddsw mm1, qword ptr [eax+8];  add source and destination
	packuswb mm0, mm1            ;  pack mm0 and mm1 into mm0
	movq  qword ptr  [ebx], mm0  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm2,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm3,  mm2               ;  eight bytes of destination into mm3
	punpcklbw mm2, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm3, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm2, qword ptr [eax+16]  ;  add source and destination
	paddsw mm3, qword ptr [eax+24];  add source and destination
	packuswb mm2, mm3            ;  pack mm0 and mm1 into mm0
	movq  qword ptr  [ebx], mm2  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm4,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm5,  mm4               ;  eight bytes of destination into mm5
	punpcklbw mm4, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm5, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm4, qword ptr [eax+32]  ;  add source and destination
	paddsw mm5, qword ptr [eax+40];  add source and destination
	packuswb mm4, mm5            ;  pack mm0 and mm1 into mm0
	movq  qword ptr  [ebx], mm4  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm0,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm1,  qword ptr [ebx]   ;  eight bytes of destination into mm5
	punpcklbw mm0, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm1, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm0, qword ptr [eax+48]  ;  add source and destination
	paddsw mm1, qword ptr [eax+56];  add source and destination
	packuswb mm0, mm1            ;  pack mm0 and mm1 into mm0
	add eax, 64                  ;  add +64 to source ptr                
	movq  qword ptr  [ebx], mm0  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm2,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm3,  mm2               ;  eight bytes of destination into mm3
	punpcklbw mm2, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm3, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm2, qword ptr [eax]  ;  add source and destination
	paddsw mm3, qword ptr [eax+8];  add source and destination
	packuswb mm2, mm3            ;  pack mm0 and mm1 into mm0
	add eax, 16                  ;  add +16 to source ptr                
	movq  qword ptr  [ebx], mm2  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm4,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm5,  mm4               ;  eight bytes of destination into mm5
	punpcklbw mm4, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm5, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm4, qword ptr [eax]  ;  add source and destination
	paddsw mm5, qword ptr [eax+8];  add source and destination
	packuswb mm4, mm5            ;  pack mm0 and mm1 into mm0
	add eax, 16                  ;  add +16 to source ptr                
	movq  qword ptr  [ebx], mm4  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm0,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm1,  mm0               ;  eight bytes of destination into mm1
	punpcklbw mm0, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm1, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm0, qword ptr [eax]  ;  add source and destination
	paddsw mm1, qword ptr [eax+8];  add source and destination
	packuswb mm0, mm1            ;  pack mm0 and mm1 into mm0
	add eax, 16                  ;  add +16 to source ptr                
	movq  qword ptr  [ebx], mm0  ;  copy output to destination
	add ebx, edi                 ;  add +stride to dest ptr

	movq mm2,  qword ptr [ebx]   ;  eight bytes of destination into mm4
	movq mm3,  mm2               ;  eight bytes of destination into mm3
	punpcklbw mm2, mm7           ;  unpack first 4 bytes from dest into mm4
	punpckhbw mm3, mm7           ;  unpack next 4 bytes from dest into mm5
	paddsw mm2, qword ptr [eax]  ;  add source and destination
	paddsw mm3, qword ptr [eax+8];  add source and destination
	packuswb mm2, mm3            ;  pack mm0 and mm1 into mm0
	movq  qword ptr  [ebx], mm2  ;  copy output to destination

	pop edi
	pop ebx 
	pop eax

	emms


	}

	#ifdef _TEST_TRANSFER
	/* check destination against reference_dest[]... */
	for (y=0; y<8; y++) {
		for (x=0; x<8; x++) {
			if (reference_dest[8*y + x] != destU8[stride*y + x]) printf("transferIDCT_add() is broken\n");
		}
	}
	#endif
  
}

void transferIDCT_copy(int16_t *sourceS16, uint8_t *destU8, int stride) {
	#ifdef _TEST_TRANSFER
	int x, y, clipped;
	#endif
	
	_asm {

	; not sure about the state handling here - there must be a better way
	push eax
	push ebx
	push edi

	mov eax, sourceS16           ;  parameter 1, *sourceS16
	mov ebx, destU8              ;  parameter 2, *destU8
	mov edi, stride              ;  parameter 3, stride

; lines 0 to 7 schedueled into each other...
	movq mm0, qword ptr [eax]       ;  move first four words into mm0

	packuswb mm0, qword ptr [eax+8] ;  pack mm0 and the next four words into mm0

	movq mm1, qword ptr [eax+16]    ;  move first four words into mm1

	packuswb mm1, qword ptr [eax+24];  pack mm0 and the next four words into mm1

	movq mm2, qword ptr [eax+32]    ;  move first four words into mm2

	packuswb mm2, qword ptr [eax+40];  pack mm0 and the next four words into mm2

	movq mm3, qword ptr [eax+48]    ;  move first four words into mm3

	packuswb mm3, qword ptr [eax+56] ;  pack mm3 and the next four words into mm3

	movq qword ptr [ebx], mm0       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm1       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm2       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm3       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr
	
	movq mm0, qword ptr [eax+64]    ;  move first four words into mm0
	add eax, 64                     ;  add 64 to source ptr                

	packuswb mm0, qword ptr [eax+8] ;  pack mm0 and the next four words into mm0

	movq mm1, qword ptr [eax+16]    ;  move first four words into mm1

	packuswb mm1, qword ptr [eax+24];  pack mm0 and the next four words into mm1

	movq mm2, qword ptr [eax+32]    ;  move first four words into mm2

	packuswb mm2, qword ptr [eax+40];  pack mm0 and the next four words into mm2

	movq mm3, qword ptr [eax+48]    ;  move first four words into mm3

	packuswb mm3, qword ptr [eax+56];  pack mm3 and the next four words into mm3

	movq qword ptr [ebx], mm0       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm1       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm2       ;  copy output to destination
	add ebx, edi                    ;  add +stride to dest ptr

	movq qword ptr [ebx], mm3       ;  copy output to destination

	pop edi
	pop ebx 
	pop eax

	emms

	}

	#ifdef _TEST_TRANSFER
	for (y=0; y<8; y++) {
		for (x=0; x<8; x++) {
			clipped = sourceS16[8*y + x];
			if (clipped > 255) clipped = 255;
			if (clipped <   0) clipped =   0;
			if (clipped != destU8[stride*y+x]) printf("transferIDCT_copy() is broken\n");
		}
	}
	#endif

}




?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产毛片aaaaa无费看| 欧美日韩亚洲综合在线 | 91精品国产综合久久小美女| 一区二区三区四区五区视频在线观看| 在线看国产一区二区| 日韩国产高清影视| 国产午夜亚洲精品理论片色戒 | 91成人免费网站| 青青国产91久久久久久| 日本一区二区三区在线不卡| 色婷婷av一区二区三区gif | 国产精品一区二区x88av| 欧美国产激情二区三区| 91激情在线视频| 日本韩国精品在线| 在线精品国精品国产尤物884a| 一本在线高清不卡dvd| 欧美特级限制片免费在线观看| 国内成人免费视频| 亚洲成av人**亚洲成av**| 国产日韩欧美亚洲| 一区视频在线播放| 久久一区二区视频| 9191精品国产综合久久久久久| 欧美日韩一区二区电影| 91精品国产黑色紧身裤美女| 成人高清免费在线播放| 精品一区二区三区免费视频| 亚洲一线二线三线久久久| √…a在线天堂一区| 亚洲猫色日本管| 中文字幕一区二区三区不卡在线| 亚洲日本在线看| 国产精品福利一区| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲柠檬福利资源导航| 香蕉av福利精品导航| 国产一区二区在线视频| 美女任你摸久久| 秋霞av亚洲一区二区三| 成人午夜激情视频| 国产成人精品三级麻豆| 国内成+人亚洲+欧美+综合在线| 成人app下载| 欧美大片国产精品| 精品国产一二三| 久久综合九色综合欧美98 | 91福利区一区二区三区| 欧美岛国在线观看| 亚洲综合在线观看视频| 国内外精品视频| 在线不卡a资源高清| 欧美猛男男办公室激情| 在线播放一区二区三区| 亚洲视频香蕉人妖| 国产在线视频精品一区| 欧美精品久久99| 亚洲女子a中天字幕| 国产精品 日产精品 欧美精品| 欧美丝袜丝交足nylons图片| 国产欧美一区二区精品性色 | 丁香网亚洲国际| av在线这里只有精品| 91网站最新地址| 日本韩国欧美一区二区三区| 久久精品亚洲精品国产欧美kt∨ | 免费人成黄页网站在线一区二区| 波多野结衣亚洲| 久久天天做天天爱综合色| 日韩福利视频导航| 在线观看91视频| 亚洲人成网站精品片在线观看| 丁香亚洲综合激情啪啪综合| 久久亚洲精品国产精品紫薇| 美女www一区二区| 欧美一区二区三区免费观看视频 | 国产精品正在播放| 日韩欧美亚洲国产精品字幕久久久 | 日产国产高清一区二区三区| 欧美性一二三区| 亚洲美女在线国产| 91在线观看地址| 国产精品对白交换视频| a亚洲天堂av| 亚洲人精品一区| 91黄视频在线观看| 亚洲国产欧美日韩另类综合| 欧美日韩卡一卡二| 水蜜桃久久夜色精品一区的特点| 狠狠狠色丁香婷婷综合久久五月| 日韩小视频在线观看专区| 中文字幕不卡在线| 99久久er热在这里只有精品15| 欧美一区二区三区免费视频| 老司机免费视频一区二区| 91日韩精品一区| 亚洲综合视频在线| 91精品国产黑色紧身裤美女| 久久99精品久久久久久久久久久久 | 亚洲成人免费在线| 欧美一级国产精品| 高清国产一区二区| 亚洲一区二区三区自拍| 在线不卡中文字幕播放| 久久99九九99精品| 亚洲欧美另类在线| 欧美一区二区三区在| 国产剧情在线观看一区二区| 日本一二三不卡| 欧美日韩一级二级三级| 狠狠狠色丁香婷婷综合激情 | 91麻豆免费看| 免费观看一级欧美片| 中文字幕 久热精品 视频在线| 色激情天天射综合网| 久久aⅴ国产欧美74aaa| 一区二区三区在线视频观看| 日韩欧美www| 91热门视频在线观看| 麻豆精品在线播放| 国产精品国产三级国产有无不卡| 欧美疯狂做受xxxx富婆| 99久久99久久精品国产片果冻| 婷婷综合五月天| 91麻豆精品国产91久久久资源速度| 韩国精品主播一区二区在线观看 | 天天综合色天天综合色h| 欧美日韩成人综合在线一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 精品盗摄一区二区三区| 色网站国产精品| 精品一区二区三区免费| 国产精品欧美久久久久无广告| 亚洲欧美另类在线| 久久新电视剧免费观看| 在线不卡的av| 成人中文字幕合集| 日本在线观看不卡视频| 亚洲欧美日韩一区二区| 欧美巨大另类极品videosbest | 亚洲另类在线制服丝袜| jlzzjlzz亚洲日本少妇| 亚洲第一电影网| 国产欧美综合在线观看第十页| 日韩一级片在线观看| 色成人在线视频| 国产成人av电影免费在线观看| 天天综合天天做天天综合| 欧美tickling网站挠脚心| 久久精品国产99| 国产综合久久久久久久久久久久| 亚洲欧美怡红院| 国产校园另类小说区| 99国产精品久| 大白屁股一区二区视频| 久久精品国产精品亚洲红杏| 亚洲一级二级在线| 中文字幕一区二区三| 综合网在线视频| 国产精品水嫩水嫩| 久久久久久电影| 精品91自产拍在线观看一区| 欧美一区二区高清| 欧美老女人第四色| 欧美日韩另类一区| 欧美无砖砖区免费| 不卡av在线网| 欧亚洲嫩模精品一区三区| 9色porny自拍视频一区二区| 国产精品一区二区你懂的| 黄一区二区三区| www.在线欧美| 91视频免费观看| 欧美亚洲日本国产| 欧美亚洲尤物久久| 欧美岛国在线观看| 精品国产精品网麻豆系列| 精品国产欧美一区二区| 日韩欧美在线影院| 久久伊人中文字幕| 欧美经典一区二区三区| 国产精品女同互慰在线看 | 三级在线观看一区二区| 日本不卡视频在线观看| 蜜臀av亚洲一区中文字幕| 久久99精品久久久久久动态图 | 中文字幕日韩精品一区| 国产精品国产三级国产有无不卡| 国产午夜精品在线观看| 亚洲激情一二三区| 亚洲第一综合色| 九九精品视频在线看| 国产精品中文字幕日韩精品 | 成人激情动漫在线观看| 一本色道亚洲精品aⅴ| 欧洲视频一区二区| 日韩精品一区国产麻豆| 久久亚洲一区二区三区明星换脸| 国产精品另类一区| 午夜国产精品一区|