📄 hq4x32.asm
字号:
%macro PIXEL31_83 0 Interp8 [ecx+ebx+4],[c8],[c4]%endmacro%macro PIXEL32_0 0 mov [ecx+ebx+8],eax%endmacro%macro PIXEL32_10 0 Interp1 [ecx+ebx+8],eax,[c9]%endmacro%macro PIXEL32_12 0 Interp1 [ecx+ebx+8],eax,[c8]%endmacro%macro PIXEL32_14 0 Interp1 [ecx+ebx+8],[c8],eax%endmacro%macro PIXEL32_21 0 Interp2 [ecx+ebx+8],[c8],eax,[c6]%endmacro%macro PIXEL32_31 0 Interp3 [ecx+ebx+8],[c6]%endmacro%macro PIXEL32_50 0 Interp5 [ecx+ebx+8],[c8],eax%endmacro%macro PIXEL32_60 0 Interp6 [ecx+ebx+8],[c8],[c6]%endmacro%macro PIXEL32_61 0 Interp6 [ecx+ebx+8],[c8],[c9]%endmacro%macro PIXEL32_82 0 Interp8 [ecx+ebx+8],eax,[c8]%endmacro%macro PIXEL32_83 0 Interp8 [ecx+ebx+8],[c8],[c6]%endmacro%macro PIXEL33_0 0 mov [ecx+ebx+12],eax%endmacro%macro PIXEL33_11 0 Interp1 [ecx+ebx+12],eax,[c6]%endmacro%macro PIXEL33_12 0 Interp1 [ecx+ebx+12],eax,[c8]%endmacro%macro PIXEL33_20 0 Interp2 [ecx+ebx+12],eax,[c8],[c6]%endmacro%macro PIXEL33_50 0 Interp5 [ecx+ebx+12],[c8],[c6]%endmacro%macro PIXEL33_80 0 Interp8 [ecx+ebx+12],eax,[c9]%endmacro%macro PIXEL33_81 0 Interp8 [ecx+ebx+12],eax,[c6]%endmacro%macro PIXEL33_82 0 Interp8 [ecx+ebx+12],eax,[c8]%endmacroNEWSYM hq4x_32b cmp byte[curblank],40h jne .startcopy ret.startcopy pushad mov ax,ds mov es,ax mov esi,[vidbuffer] mov edi,[WinVidMemStart] add esi,16*2+256*2+32*2 mov ecx,[vidbufferofsb] mov [deltaptr],ecx cmp byte[FilteredGUI],0 jne .filtergui cmp byte[GUIOn2],1 je nointerp.filtergui cmp byte[MMXSupport],0 je nointerp cmp byte[hqFilter],0 jne near hq4x;----------------------------;nointerp: mov dl,[resolutn] mov [lineleft],dl mov ebx,[NumBytesPerLine].loopy mov ecx,256.loopx movzx eax,word[esi] mov edx,[BitConv32Ptr] mov eax,[edx+eax*4] mov [edi],eax mov [edi+4],eax mov [edi+8],eax mov [edi+12],eax mov [edi+ebx],eax mov [edi+ebx+4],eax mov [edi+ebx+8],eax mov [edi+ebx+12],eax mov edx,edi add edx,ebx add edx,ebx mov [edx],eax mov [edx+4],eax mov [edx+8],eax mov [edx+12],eax mov [edx+ebx],eax mov [edx+ebx+4],eax mov [edx+ebx+8],eax mov [edx+ebx+12],eax add esi,2 add edi,16 dec ecx jnz .loopx add edi,[AddEndBytes] add edi,ebx add edi,ebx add edi,ebx add esi,64 dec byte[lineleft] jnz near .loopy popad ret;----------------------------;hq4x: mov dl,[resolutn] mov [lineleft],dl mov dword[prevline],0 mov dword[nextline],576 mov ebx,hirestiledat+1 cmp byte[GUIOn],1 je .loopy cmp byte[newengen],0 je .loopy mov ebx,SpecialLine+1.loopy mov [InterPtr],ebx cmp byte[ebx],1 jbe .nohires call HighResProc mov edx,[deltaptr] mov ecx,128 mov eax,0xAAAAAAAA.a mov [edx],eax add edx,4 dec ecx jnz .a mov [deltaptr],edx jmp .nexty.nohires mov dword[xcounter],254 ; x={Xres-2, Xres-1} are special cases. ; x=0 - special case mov edx,[deltaptr] mov ecx,[prevline] mov eax,[nextline] movq mm2,[esi+ecx] movq mm3,[esi] movq mm4,[esi+eax] movq mm5,mm2 movq mm6,mm3 movq mm7,mm4 pcmpeqw mm2,[edx+ecx] pcmpeqw mm3,[edx] pcmpeqw mm4,[edx+eax] pand mm2,mm3 pand mm2,mm4 movd eax,mm2 inc eax jz near .loopx_end movd eax,mm5 movzx edx,ax mov [w1],edx mov [w2],edx shr eax,16 mov [w3],eax movd eax,mm6 movzx edx,ax mov [w4],edx mov [w5],edx shr eax,16 mov [w6],eax movd eax,mm7 movzx edx,ax mov [w7],edx mov [w8],edx shr eax,16 mov [w9],eax jmp .flags.loopx mov edx,[deltaptr] mov ecx,[prevline] mov eax,[nextline] movq mm2,[esi+ecx-2] movq mm3,[esi-2] movq mm4,[esi+eax-2] movq mm5,mm2 movq mm6,mm3 movq mm7,mm4 pcmpeqw mm2,[edx+ecx-2] pcmpeqw mm3,[edx-2] pcmpeqw mm4,[edx+eax-2] pand mm2,mm3 pand mm2,mm4 movd ebx,mm2 psrlq mm2,32 movd eax,mm2 cwde and eax,ebx inc eax jz near .loopx_end movd eax,mm5 mov [edx+ecx-2],ax movzx edx,ax mov [w1],edx shr eax,16 mov [w2],eax psrlq mm5,32 movd eax,mm5 movzx edx,ax mov [w3],edx movd eax,mm6 movzx edx,ax mov [w4],edx shr eax,16 mov [w5],eax psrlq mm6,32 movd eax,mm6 movzx edx,ax mov [w6],edx movd eax,mm7 movzx edx,ax mov [w7],edx shr eax,16 mov [w8],eax psrlq mm7,32 movd eax,mm7 movzx edx,ax mov [w9],edx.flags mov ebx,[RGBtoYUVPtr] mov eax,[w5] xor ecx,ecx movd mm5,[ebx+eax*4] mov dword[cross],0 mov edx,[w2] cmp eax,edx je .noflag2 or dword[cross],1 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag2 or ecx,2.noflag2 mov edx,[w4] cmp eax,edx je .noflag4 or dword[cross],2 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag4 or ecx,8.noflag4 mov edx,[w6] cmp eax,edx je .noflag6 or dword[cross],4 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag6 or ecx,16.noflag6 mov edx,[w8] cmp eax,edx je .noflag8 or dword[cross],8 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag8 or ecx,64.noflag8 cmp dword[cross],0 jnz .testflag1 mov ebx,[BitConv32Ptr] mov eax,[ebx+eax*4] mov ebx,[NumBytesPerLine] AUXADDRESS mov [edi],eax mov [edi+4],eax mov [edi+8],eax mov [edi+12],eax mov [edi+ebx],eax mov [edi+ebx+4],eax mov [edi+ebx+8],eax mov [edi+ebx+12],eax mov [ecx],eax mov [ecx+4],eax mov [ecx+8],eax mov [ecx+12],eax mov [ecx+ebx],eax mov [ecx+ebx+4],eax mov [ecx+ebx+8],eax mov [ecx+ebx+12],eax jmp .loopx_end.testflag1 mov edx,[w1] cmp eax,edx je .noflag1 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag1 or ecx,1.noflag1 mov edx,[w3] cmp eax,edx je .noflag3 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag3 or ecx,4.noflag3 mov edx,[w7] cmp eax,edx je .noflag7 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag7 or ecx,32.noflag7 mov edx,[w9] cmp eax,edx je .noflag9 movq mm1,mm5 movd mm2,[ebx+edx*4] psubusb mm1,mm2 psubusb mm2,mm5 por mm1,mm2 psubusb mm1,[threshold] movd edx,mm1 test edx,edx jz .noflag9 or ecx,128.noflag9 mov ebx,[BitConv32Ptr] mov eax,[ebx+eax*4] mov edx,[w2] mov edx,[ebx+edx*4] mov [c2],edx mov edx,[w4] mov edx,[ebx+edx*4] mov [c4],edx mov edx,[w6] mov edx,[ebx+edx*4] mov [c6],edx mov edx,[w8] mov edx,[ebx+edx*4] mov [c8],edx test ecx,0x005A jz .switch mov edx,[w1] mov edx,[ebx+edx*4] mov [c1],edx mov edx,[w3] mov edx,[ebx+edx*4] mov [c3],edx mov edx,[w7] mov edx,[ebx+edx*4] mov [c7],edx mov edx,[w9] mov edx,[ebx+edx*4] mov [c9],edx.switch mov ebx,[NumBytesPerLine] jmp [FuncTable+ecx*4]..@flag0..@flag1..@flag4..@flag32..@flag128..@flag5..@flag132..@flag160..@flag33..@flag129..@flag36..@flag133..@flag164..@flag161..@flag37..@flag165 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_60 PIXEL03_20 PIXEL10_60 PIXEL11_70 PIXEL12_70 PIXEL13_60 PIXEL20_60 PIXEL21_70 PIXEL22_70 PIXEL23_60 PIXEL30_20 PIXEL31_60 PIXEL32_60 PIXEL33_20 jmp .loopx_end..@flag2..@flag34..@flag130..@flag162 AUXADDRESS PIXEL00_80 PIXEL01_10 PIXEL02_10 PIXEL03_80 PIXEL10_61 PIXEL11_30 PIXEL12_30 PIXEL13_61 PIXEL20_60 PIXEL21_70 PIXEL22_70 PIXEL23_60 PIXEL30_20 PIXEL31_60 PIXEL32_60 PIXEL33_20 jmp .loopx_end..@flag16..@flag17..@flag48..@flag49 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_61 PIXEL03_80 PIXEL10_60 PIXEL11_70 PIXEL12_30 PIXEL13_10 PIXEL20_60 PIXEL21_70 PIXEL22_30 PIXEL23_10 PIXEL30_20 PIXEL31_60 PIXEL32_61 PIXEL33_80 jmp .loopx_end..@flag64..@flag65..@flag68..@flag69 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_60 PIXEL03_20 PIXEL10_60 PIXEL11_70 PIXEL12_70 PIXEL13_60 PIXEL20_61 PIXEL21_30 PIXEL22_30 PIXEL23_61 PIXEL30_80 PIXEL31_10 PIXEL32_10 PIXEL33_80 jmp .loopx_end..@flag8..@flag12..@flag136..@flag140 AUXADDRESS PIXEL00_80 PIXEL01_61 PIXEL02_60 PIXEL03_20 PIXEL10_10 PIXEL11_30 PIXEL12_70 PIXEL13_60 PIXEL20_10 PIXEL21_30 PIXEL22_70 PIXEL23_60 PIXEL30_80 PIXEL31_61 PIXEL32_60 PIXEL33_20 jmp .loopx_end..@flag3..@flag35..@flag131..@flag163 AUXADDRESS PIXEL00_81 PIXEL01_31 PIXEL02_10 PIXEL03_80 PIXEL10_81 PIXEL11_31 PIXEL12_30 PIXEL13_61 PIXEL20_60 PIXEL21_70 PIXEL22_70 PIXEL23_60 PIXEL30_20 PIXEL31_60 PIXEL32_60 PIXEL33_20 jmp .loopx_end..@flag6..@flag38..@flag134..@flag166 AUXADDRESS PIXEL00_80 PIXEL01_10 PIXEL02_32 PIXEL03_82 PIXEL10_61 PIXEL11_30 PIXEL12_32 PIXEL13_82 PIXEL20_60 PIXEL21_70 PIXEL22_70 PIXEL23_60 PIXEL30_20 PIXEL31_60 PIXEL32_60 PIXEL33_20 jmp .loopx_end..@flag20..@flag21..@flag52..@flag53 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_81 PIXEL03_81 PIXEL10_60 PIXEL11_70 PIXEL12_31 PIXEL13_31 PIXEL20_60 PIXEL21_70 PIXEL22_30 PIXEL23_10 PIXEL30_20 PIXEL31_60 PIXEL32_61 PIXEL33_80 jmp .loopx_end..@flag144..@flag145..@flag176..@flag177 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_61 PIXEL03_80 PIXEL10_60 PIXEL11_70 PIXEL12_30 PIXEL13_10 PIXEL20_60 PIXEL21_70 PIXEL22_32 PIXEL23_32 PIXEL30_20 PIXEL31_60 PIXEL32_82 PIXEL33_82 jmp .loopx_end..@flag192..@flag193..@flag196..@flag197 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_60 PIXEL03_20 PIXEL10_60 PIXEL11_70 PIXEL12_70 PIXEL13_60 PIXEL20_61 PIXEL21_30 PIXEL22_31 PIXEL23_81 PIXEL30_80 PIXEL31_10 PIXEL32_31 PIXEL33_81 jmp .loopx_end..@flag96..@flag97..@flag100..@flag101 AUXADDRESS PIXEL00_20 PIXEL01_60 PIXEL02_60 PIXEL03_20 PIXEL10_60 PIXEL11_70 PIXEL12_70
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -