📄 mc_sse.asm
字号:
add esi, eax
movq mm4, [esi]
add esi, eax
pavgb mm0, mm1
pavgb mm1, mm2
pavgb mm2, mm3
pavgb mm3, mm4
movq [edi], mm0
add edi, ebx
movq [edi], mm1
add edi, ebx
movq [edi], mm2
add edi, ebx
movq [edi], mm3
add edi, ebx
movq mm0, mm4
;-------------------------------------------------------------------
; 儖乕僾廔抂僠僃僢僋
test ecx, ecx
jnz prediction_w8_fh_1st_loop
;-------------------------------------------------------------------
; 儗僕僗僞暅尦側偳屻巒枛
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret 20
_prediction_w8_fh_1st_sse@20 ENDP
;-------------------------------------------------------------------
; 廔椆
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 摦偒曗彏乮width 8, Full/Half, 2nd乯悈暯 Full, 悅捈 Half
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC C _prediction_w8_fh_2nd_sse@20
; void __stdcall prediction_w8_fh_2nd_sse(
; [esp+ 4] unsigned char *in,
; [esp+ 8] unsigned char *out,
; [esp+12] int in_step,
; [esp+16] int out_step,
; [esp+20] int height
; )
_prediction_w8_fh_2nd_sse@20 PROC
;-------------------------------------------------------------------
; 巊梡偡傞儗僕僗僞
; esi - 擖椡
; edi - 弌椡
; ecx - 儖乕僾僇僂儞僞
; eax - 擖椡僗僥僢僾
; ebx - 弌椡僗僥僢僾
;-------------------------------------------------------------------
; 儗僕僗僞偺戅旔
push esi
push edi
push ecx
push ebx
push eax
;-------------------------------------------------------------------
; 堷悢偐傜僨乕僞傪庴偗庢偭偰偍偔
mov esi, [esp+20+ 4]
mov edi, [esp+20+ 8]
mov eax, [esp+20+12]
mov ebx, [esp+20+16]
mov ecx, [esp+20+20]
;-------------------------------------------------------------------
; 壓弨旛
shr ecx, 2
movq mm0, [esi]
add esi, eax
;-------------------------------------------------------------------
; loop
prediction_w8_fh_2nd_loop:
dec ecx
;-------------------------------------------------------------------
; core
movq mm1, [esi]
add esi, eax
movq mm2, [esi]
add esi, eax
movq mm3, [esi]
add esi, eax
movq mm4, [esi]
add esi, eax
pavgb mm0, mm1
pavgb mm1, mm2
pavgb mm2, mm3
pavgb mm3, mm4
pavgb mm0, [edi]
pavgb mm1, [edi+ebx]
movq [edi], mm0
movq [edi+ebx], mm1
lea edi, [edi+ebx*2]
pavgb mm2, [edi]
pavgb mm3, [edi+ebx]
movq [edi], mm2
movq [edi+ebx], mm3
lea edi, [edi+ebx*2]
movq mm0, mm4
;-------------------------------------------------------------------
; 儖乕僾廔抂僠僃僢僋
test ecx, ecx
jnz prediction_w8_fh_2nd_loop
;-------------------------------------------------------------------
; 儗僕僗僞暅尦側偳屻巒枛
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret 20
_prediction_w8_fh_2nd_sse@20 ENDP
;-------------------------------------------------------------------
; 廔椆
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 摦偒曗彏乮width 8, Half/Full, 1st乯悈暯 Half, 悅捈 Full
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC C _prediction_w8_hf_1st_sse@20
; void __stdcall prediction_w8_hf_1st_sse(
; [esp+ 4] unsigned char *in,
; [esp+ 8] unsigned char *out,
; [esp+12] int in_step,
; [esp+16] int out_step,
; [esp+20] int height
; )
_prediction_w8_hf_1st_sse@20 PROC
;-------------------------------------------------------------------
; 巊梡偡傞儗僕僗僞
; esi - 擖椡
; edi - 弌椡
; ecx - 儖乕僾僇僂儞僞
; eax - 擖椡僗僥僢僾
; ebx - 弌椡僗僥僢僾
;-------------------------------------------------------------------
; 儗僕僗僞偺戅旔
push esi
push edi
push ecx
push ebx
push eax
;-------------------------------------------------------------------
; 堷悢偐傜僨乕僞傪庴偗庢偭偰偍偔
mov esi, [esp+20+ 4]
mov edi, [esp+20+ 8]
mov eax, [esp+20+12]
mov ebx, [esp+20+16]
mov ecx, [esp+20+20]
;-------------------------------------------------------------------
; 壓弨旛
shr ecx, 2
;-------------------------------------------------------------------
; loop
prediction_w8_hf_1st_loop:
dec ecx
;-------------------------------------------------------------------
; core
movq mm0, [esi]
movq mm1, [esi+eax]
pavgb mm0, [esi+1]
pavgb mm1, [esi+eax+1]
lea esi, [esi+eax*2]
movq mm2, [esi]
movq mm3, [esi+eax]
pavgb mm2, [esi+1]
pavgb mm3, [esi+eax+1]
lea esi, [esi+eax*2]
movq [edi], mm0
add edi, ebx
movq [edi], mm1
add edi, ebx
movq [edi], mm2
add edi, ebx
movq [edi], mm3
add edi, ebx
;-------------------------------------------------------------------
; 儖乕僾廔抂僠僃僢僋
test ecx, ecx
jnz prediction_w8_hf_1st_loop
;-------------------------------------------------------------------
; 儗僕僗僞暅尦側偳屻巒枛
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret 20
_prediction_w8_hf_1st_sse@20 ENDP
;-------------------------------------------------------------------
; 廔椆
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 摦偒曗彏乮width 8, Half/Full, 2nd乯悈暯 Half, 悅捈 Full
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PUBLIC C _prediction_w8_hf_2nd_sse@20
; void __stdcall prediction_w8_hf_2nd_sse(
; [esp+ 4] unsigned char *in,
; [esp+ 8] unsigned char *out,
; [esp+12] int in_step,
; [esp+16] int out_step,
; [esp+20] int height
; )
_prediction_w8_hf_2nd_sse@20 PROC
;-------------------------------------------------------------------
; 巊梡偡傞儗僕僗僞
; esi - 擖椡
; edi - 弌椡
; ecx - 儖乕僾僇僂儞僞
; eax - 擖椡僗僥僢僾
; ebx - 弌椡僗僥僢僾
;-------------------------------------------------------------------
; 儗僕僗僞偺戅旔
push esi
push edi
push ecx
push ebx
push eax
;-------------------------------------------------------------------
; 堷悢偐傜僨乕僞傪庴偗庢偭偰偍偔
mov esi, [esp+20+ 4]
mov edi, [esp+20+ 8]
mov eax, [esp+20+12]
mov ebx, [esp+20+16]
mov ecx, [esp+20+20]
;-------------------------------------------------------------------
; 壓弨旛
shr ecx, 2
;-------------------------------------------------------------------
; loop
prediction_w8_hf_2nd_loop:
dec ecx
;-------------------------------------------------------------------
; core
movq mm0, [esi]
movq mm1, [esi+eax]
pavgb mm0, [esi+1]
pavgb mm1, [esi+eax+1]
lea esi, [esi+eax*2]
movq mm2, [esi]
movq mm3, [esi+eax]
pavgb mm2, [esi+1]
pavgb mm3, [esi+eax+1]
lea esi, [esi+eax*2]
pavgb mm0, [edi]
pavgb mm1, [edi+ebx]
movq [edi], mm0
movq [edi+ebx], mm1
lea edi, [edi+ebx*2]
pavgb mm2, [edi]
pavgb mm3, [edi+ebx]
movq [edi], mm2
movq [edi+ebx], mm3
lea edi, [edi+ebx*2]
;-------------------------------------------------------------------
; 儖乕僾廔抂僠僃僢僋
test ecx, ecx
jnz prediction_w8_hf_2nd_loop
;-------------------------------------------------------------------
; 儗僕僗僞暅尦側偳屻巒枛
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret 20
_prediction_w8_hf_2nd_sse@20 ENDP
;-------------------------------------------------------------------
; 廔椆
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 摦偒曗彏乮width 8, Full/Full, 2nd乯悈暯 Full, 悅捈 Full
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 婎杮曽恓
;-------------------------------------------------------------------
PUBLIC C _prediction_w8_ff_2nd_sse@20
; void __stdcall prediction_w8_ff_2nd_sse(
; [esp+ 4] unsigned char *in,
; [esp+ 8] unsigned char *out,
; [esp+12] int in_step,
; [esp+16] int out_step,
; [esp+20] int height
; )
_prediction_w8_ff_2nd_sse@20 PROC
;-------------------------------------------------------------------
; 巊梡偡傞儗僕僗僞
; esi - 擖椡
; edi - 弌椡
; ecx - 儖乕僾僇僂儞僞
; eax - 擖椡僗僥僢僾
; ebx - 弌椡僗僥僢僾
;-------------------------------------------------------------------
; 儗僕僗僞偺戅旔
push esi
push edi
push ecx
push ebx
push eax
;-------------------------------------------------------------------
; 堷悢偐傜僨乕僞傪庴偗庢偭偰偍偔
mov esi, [esp+20+ 4]
mov edi, [esp+20+ 8]
mov eax, [esp+20+12]
mov ebx, [esp+20+16]
mov ecx, [esp+20+20]
;-------------------------------------------------------------------
;儖乕僾僷儔儊乕僞嶌惉
shr ecx, 2
;-------------------------------------------------------------------
; loop
prediction_w8_ff_2nd_loop:
dec ecx
;-------------------------------------------------------------------
; core
movq mm0, [esi]
add esi, eax
movq mm1, [esi]
add esi, eax
movq mm2, [esi]
add esi, eax
movq mm3, [esi]
add esi, eax
pavgb mm0, [edi]
pavgb mm1, [edi+ebx]
movq [edi], mm0
movq [edi+ebx], mm1
lea edi, [edi+ebx*2]
pavgb mm2, [edi]
pavgb mm3, [edi+ebx]
movq [edi], mm2
movq [edi+ebx], mm3
lea edi, [edi+ebx*2]
;-------------------------------------------------------------------
; 儖乕僾廔抂僠僃僢僋
test ecx, ecx
jnz prediction_w8_ff_2nd_loop
;-------------------------------------------------------------------
; 儗僕僗僞暅尦側偳屻巒枛
pop eax
pop ebx
pop ecx
pop edi
pop esi
ret 20
_prediction_w8_ff_2nd_sse@20 ENDP
;-------------------------------------------------------------------
; 廔椆
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -