History

Merge pull request #2677 from saamas/x86-32-picasm-improvements

X86_32_PICASM improvements

ruil2 committed 9 years ago

Commit c4636c32 parents 3b37280 f711d0a18 files · +774 −2821Browse files

Showing the changes to codec/decoder (1 of 18 files). Show all

Unified · Split

codec/decoder/core/x86/intra_pred.asm+63−317
@@ -49,7 +49,11 @@ · 48 unmodified lines
49; Local Data (Read Only)49; Local Data (Read Only)
50;*******************************************************************************50;*******************************************************************************
51 51
52%ifdef X86_32_PICASM
53SECTION .text align=16
54%else
52SECTION .rodata align=1655SECTION .rodata align=16
56%endif
53 57
54align 1658align 16
55sse2_plane_inc_minus dw -7, -6, -5, -4, -3, -2, -1, 059sse2_plane_inc_minus dw -7, -6, -5, -4, -3, -2, -1, 0
@@ -132,40 +136,14 @@ sse2_wd_0x02: times 8 dw 0x02 · 76 unmodified lines
132%macro COPY_16_TIMES 2136%macro COPY_16_TIMES 2
133 movdqa %2, [%1-16]137 movdqa %2, [%1-16]
134 psrldq %2, 15138 psrldq %2, 15
135%ifdef X86_32_PICASM139 pmuludq %2, [pic(mmx_01bytes)]
136 push r5
137 mov r5, esp
138 and esp, 0xfffffff0
139 push 0x01010101 ;mmx_01bytes
140 push 0x01010101
141 push 0x01010101
142 push 0x01010101
143 pmuludq %2, [esp]
144 mov esp, r5
145 pop r5
146%else
147 pmuludq %2, [mmx_01bytes]
148%endif
149 pshufd %2, %2, 0140 pshufd %2, %2, 0
150%endmacro141%endmacro
151 142
152%macro COPY_16_TIMESS 3143%macro COPY_16_TIMESS 3
153 movdqa %2, [%1+%3-16]144 movdqa %2, [%1+%3-16]
154 psrldq %2, 15145 psrldq %2, 15
155%ifdef X86_32_PICASM146 pmuludq %2, [pic(mmx_01bytes)]
156 push r5
157 mov r5, esp
158 and esp, 0xfffffff0
159 push 0x01010101 ;mmx_01bytes
160 push 0x01010101
161 push 0x01010101
162 push 0x01010101
163 pmuludq %2, [esp]
164 mov esp, r5
165 pop r5
166%else
167 pmuludq %2, [mmx_01bytes]
168%endif
169 pshufd %2, %2, 0147 pshufd %2, %2, 0
170%endmacro148%endmacro
171 149
@@ -203,52 +181,26 @@ SECTION .text · 31 unmodified lines
203;*******************************************************************************181;*******************************************************************************
204WELS_EXTERN WelsDecoderI4x4LumaPredH_sse2182WELS_EXTERN WelsDecoderI4x4LumaPredH_sse2
205 %assign push_num 0183 %assign push_num 0
184 INIT_X86_32_PIC r3
206 LOAD_2_PARA185 LOAD_2_PARA
207 SIGN_EXTENSION r1, r1d186 SIGN_EXTENSION r1, r1d
208%ifdef X86_32_PICASM
209 push r3
210 mov r3, esp
211 and esp, 0xfffffff0
212 push 0x01010101 ;mmx_01bytes
213 push 0x01010101
214 push 0x01010101
215 push 0x01010101
216%endif
217 187
218 movzx r2, byte [r0-1]188 movzx r2, byte [r0-1]
219 movd xmm0, r2d189 movd xmm0, r2d
220%ifdef X86_32_PICASM190 pmuludq xmm0, [pic(mmx_01bytes)]
221 pmuludq xmm0, [esp]
222%else
223 pmuludq xmm0, [mmx_01bytes]
224%endif
225 191
226 movzx r2, byte [r0+r1-1]192 movzx r2, byte [r0+r1-1]
227 movd xmm1, r2d193 movd xmm1, r2d
228%ifdef X86_32_PICASM194 pmuludq xmm1, [pic(mmx_01bytes)]
229 pmuludq xmm1, [esp]
230%else
231 pmuludq xmm1, [mmx_01bytes]
232%endif
233 195
234 lea r0, [r0+r1]196 lea r0, [r0+r1]
235 movzx r2, byte [r0+r1-1]197 movzx r2, byte [r0+r1-1]
236 movd xmm2, r2d198 movd xmm2, r2d
237%ifdef X86_32_PICASM199 pmuludq xmm2, [pic(mmx_01bytes)]
238 pmuludq xmm2, [esp]
239%else
240 pmuludq xmm2, [mmx_01bytes]
241%endif
242 200
243 movzx r2, byte [r0+2*r1-1]201 movzx r2, byte [r0+2*r1-1]
244 movd xmm3, r2d202 movd xmm3, r2d
245%ifdef X86_32_PICASM203 pmuludq xmm3, [pic(mmx_01bytes)]
246 pmuludq xmm3, [esp]
247 mov esp, r3
248 pop r3
249%else
250 pmuludq xmm3, [mmx_01bytes]
251%endif
252 204
253 sub r0, r1205 sub r0, r1
254 movd [r0], xmm0206 movd [r0], xmm0
@@ -257,6 +209,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredH_sse2 · 2 unmodified lines
257 movd [r0], xmm2209 movd [r0], xmm2
258 movd [r0+r1], xmm3210 movd [r0+r1], xmm3
259 211
212 DEINIT_X86_32_PIC
260 ret213 ret
261 214
262;*******************************************************************************215;*******************************************************************************
@@ -266,6 +219,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 3 unmodified lines
266 push r3219 push r3
267 push r4220 push r4
268 %assign push_num 2221 %assign push_num 2
222 INIT_X86_32_PIC r5
269 LOAD_2_PARA223 LOAD_2_PARA
270 PUSH_XMM 8224 PUSH_XMM 8
271 SIGN_EXTENSION r1, r1d225 SIGN_EXTENSION r1, r1d
@@ -276,37 +230,11 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 4 unmodified lines
276 ;for H230 ;for H
277 pxor xmm7, xmm7231 pxor xmm7, xmm7
278 movq xmm0, [r0]232 movq xmm0, [r0]
279%ifdef X86_32_PICASM233 movdqa xmm5, [pic(sse2_plane_dec)]
280 push r0
281 mov r0, esp
282 and esp, 0xfffffff0
283 push 0x00010002
284 push 0x00030004
285 push 0x00050006
286 push 0x00070008
287 movdqa xmm5, [esp]
288 mov esp, r0
289 pop r0
290%else
291 movdqa xmm5, [sse2_plane_dec]
292%endif
293 punpcklbw xmm0, xmm7234 punpcklbw xmm0, xmm7
294 pmullw xmm0, xmm5235 pmullw xmm0, xmm5
295 movq xmm1, [r0 + 9]236 movq xmm1, [r0 + 9]
296%ifdef X86_32_PICASM237 movdqa xmm6, [pic(sse2_plane_inc)]
297 push r0
298 mov r0, esp
299 and esp, 0xfffffff0
300 push 0x00080007 ;sse2_plane_inc
301 push 0x00060005
302 push 0x00040003
303 push 0x00020001
304 movdqa xmm6, [esp]
305 mov esp, r0
306 pop r0
307%else
308 movdqa xmm6, [sse2_plane_inc]
309%endif
310 punpcklbw xmm1, xmm7238 punpcklbw xmm1, xmm7
311 pmullw xmm1, xmm6239 pmullw xmm1, xmm6
312 psubw xmm1, xmm0240 psubw xmm1, xmm0
@@ -361,19 +289,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredPlane_sse2 · 48 unmodified lines
361 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s289 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s
362 290
363 xor r2, r2291 xor r2, r2
364%ifdef X86_32_PICASM292 movdqa xmm5, [pic(sse2_plane_inc_minus)]
365 mov r2, esp
366 and esp, 0xfffffff0
367 push 0x0000ffff ;sse2_plane_inc_minus
368 push 0xfffefffd
369 push 0xfffcfffb
370 push 0xfffafff9
371 movdqa xmm5, [esp]
372 mov esp, r2
373 xor r2, r2
374%else
375 movdqa xmm5, [sse2_plane_inc_minus]
376%endif
377 293
378get_i16x16_luma_pred_plane_sse2_1:294get_i16x16_luma_pred_plane_sse2_1:
379 movdqa xmm2, xmm1295 movdqa xmm2, xmm1
@@ -393,6 +309,7 @@ get_i16x16_luma_pred_plane_sse2_1: · 13 unmodified lines
393 jnz get_i16x16_luma_pred_plane_sse2_1309 jnz get_i16x16_luma_pred_plane_sse2_1
394 310
395 POP_XMM311 POP_XMM
312 DEINIT_X86_32_PIC
396 pop r4313 pop r4
397 pop r3314 pop r3
398 ret315 ret
@@ -414,6 +331,7 @@ get_i16x16_luma_pred_plane_sse2_1: · 15 unmodified lines
414 331
415WELS_EXTERN WelsDecoderI16x16LumaPredH_sse2332WELS_EXTERN WelsDecoderI16x16LumaPredH_sse2
416 %assign push_num 0333 %assign push_num 0
334 INIT_X86_32_PIC_NOPRESERVE r2
417 LOAD_2_PARA335 LOAD_2_PARA
418 SIGN_EXTENSION r1, r1d336 SIGN_EXTENSION r1, r1d
419 337
@@ -430,6 +348,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredH_sse2 · 10 unmodified lines
430 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1348 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1
431 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1349 SSE2_PRED_H_16X16_TWO_LINE_DEC r0, r1
432 350
351 DEINIT_X86_32_PIC
433 ret352 ret
434 353
435;*******************************************************************************354;*******************************************************************************
@@ -477,6 +396,7 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 41 unmodified lines
477 push r3396 push r3
478 push r4397 push r4
479 %assign push_num 2398 %assign push_num 2
399 INIT_X86_32_PIC r5
480 LOAD_2_PARA400 LOAD_2_PARA
481 PUSH_XMM 8401 PUSH_XMM 8
482 SIGN_EXTENSION r1, r1d402 SIGN_EXTENSION r1, r1d
@@ -486,30 +406,11 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 3 unmodified lines
486 406
487 pxor mm7, mm7407 pxor mm7, mm7
488 movq mm0, [r0]408 movq mm0, [r0]
489%ifdef X86_32_PICASM409 movq mm5, [pic(sse2_plane_dec_c)]
490 push r5
491 mov r5, esp
492 and esp, 0xfffffff0
493 push 0x00010002 ;sse2_plane_dec_c
494 push 0x00030004
495 push 0x00040003 ;sse2_plane_inc_c
496 push 0x00020001
497 push 0x00040003 ;
498 push 0x00020001
499 push 0x0000ffff
500 push 0xfffefffd
501 movq mm5, [esp+24]
502%else
503 movq mm5, [sse2_plane_dec_c]
504%endif
505 punpcklbw mm0, mm7410 punpcklbw mm0, mm7
506 pmullw mm0, mm5411 pmullw mm0, mm5
507 movq mm1, [r0 + 5]412 movq mm1, [r0 + 5]
508%ifdef X86_32_PICASM413 movq mm6, [pic(sse2_plane_inc_c)]
509 movq mm6, [esp+16]
510%else
511 movq mm6, [sse2_plane_inc_c]
512%endif
513 punpcklbw mm1, mm7414 punpcklbw mm1, mm7
514 pmullw mm1, mm6415 pmullw mm1, mm6
515 psubw mm1, mm0416 psubw mm1, mm0
@@ -561,13 +462,7 @@ WELS_EXTERN WelsDecoderIChromaPredPlane_sse2 · 45 unmodified lines
561 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s462 SSE2_Copy8Times xmm0, r3d ; xmm0 = s,s,s,s,s,s,s,s
562 463
563 xor r2, r2464 xor r2, r2
564%ifdef X86_32_PICASM465 movdqa xmm5, [pic(sse2_plane_mul_b_c)]
565 movdqa xmm5, [esp]
566 mov esp, r5
567 pop r5
568%else
569 movdqa xmm5, [sse2_plane_mul_b_c]
570%endif
571 466
572get_i_chroma_pred_plane_sse2_1:467get_i_chroma_pred_plane_sse2_1:
573 movdqa xmm2, xmm1468 movdqa xmm2, xmm1
@@ -583,6 +478,7 @@ get_i_chroma_pred_plane_sse2_1: · 9 unmodified lines
583 jnz get_i_chroma_pred_plane_sse2_1478 jnz get_i_chroma_pred_plane_sse2_1
584 479
585 POP_XMM480 POP_XMM
481 DEINIT_X86_32_PIC
586 pop r4482 pop r4
587 pop r3483 pop r3
588 WELSEMMS484 WELSEMMS
@@ -602,6 +498,7 @@ get_i_chroma_pred_plane_sse2_1: · 13 unmodified lines
602;*******************************************************************************498;*******************************************************************************
603WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx499WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx
604 %assign push_num 0500 %assign push_num 0
501 INIT_X86_32_PIC r3
605 LOAD_2_PARA502 LOAD_2_PARA
606 SIGN_EXTENSION r1, r1d503 SIGN_EXTENSION r1, r1d
607 mov r2, r0504 mov r2, r0
@@ -629,20 +526,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 21 unmodified lines
629 movq mm4,mm3 ;mm4[8]=[3],mm4[7]=[2],mm4[6]=[1],mm4[5]=[0],mm4[4]=[6],mm4[3]=[11],mm4[2]=[16],mm4[1]=[21]526 movq mm4,mm3 ;mm4[8]=[3],mm4[7]=[2],mm4[6]=[1],mm4[5]=[0],mm4[4]=[6],mm4[3]=[11],mm4[2]=[16],mm4[1]=[21]
630 pavgb mm3,mm1 ;mm3=([11]+[21]+1)/2527 pavgb mm3,mm1 ;mm3=([11]+[21]+1)/2
631 pxor mm1,mm4 ;find odd value in the lowest bit of each byte528 pxor mm1,mm4 ;find odd value in the lowest bit of each byte
632%ifdef X86_32_PICASM529 pand mm1,[pic(mmx_01bytes)] ;set the odd bit
633 push r0
634 mov r0, esp
635 and esp, 0xfffffff0
636 push 0x01010101
637 push 0x01010101
638 push 0x01010101
639 push 0x01010101
640 pand mm1,[esp] ;set the odd bit
641 mov esp, r0
642 pop r0
643%else
644 pand mm1,[mmx_01bytes] ;set the odd bit
645%endif
646 psubusb mm3,mm1 ;decrease 1 from odd bytes530 psubusb mm3,mm1 ;decrease 1 from odd bytes
647 pavgb mm2,mm3 ;mm2=(([11]+[21]+1)/2+1+[16])/2531 pavgb mm2,mm3 ;mm2=(([11]+[21]+1)/2+1+[16])/2
648 532
@@ -655,6 +539,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 6 unmodified lines
655 movd [r0+r1],mm2539 movd [r0+r1],mm2
656 psrlq mm2,8540 psrlq mm2,8
657 movd [r0],mm2541 movd [r0],mm2
542 DEINIT_X86_32_PIC
658 WELSEMMS543 WELSEMMS
659 ret544 ret
660 545
@@ -667,20 +552,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 6 unmodified lines
667 movq %1, [%3-8]552 movq %1, [%3-8]
668 psrlq %1, 38h553 psrlq %1, 38h
669 554
670%ifdef X86_32_PICASM555 pmullw %1, [pic(mmx_01bytes)]
671 push r0
672 mov r0, esp
673 and esp, 0xfffffff0
674 push 0x01010101
675 push 0x01010101
676 push 0x01010101
677 push 0x01010101
678 pmullw %1, [esp]
679 mov esp, r0
680 pop r0
681%else
682 pmullw %1, [mmx_01bytes]
683%endif
684 pshufw %1, %1, 0556 pshufw %1, %1, 0
685 movq [%4], %1557 movq [%4], %1
686%endmacro558%endmacro
@@ -689,26 +561,14 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDR_mmx · 2 unmodified lines
689 movq %1, [%3+r1-8]561 movq %1, [%3+r1-8]
690 psrlq %1, 38h562 psrlq %1, 38h
691 563
692%ifdef X86_32_PICASM564 pmullw %1, [pic(mmx_01bytes)]
693 push r0
694 mov r0, esp
695 and esp, 0xfffffff0
696 push 0x01010101
697 push 0x01010101
698 push 0x01010101
699 push 0x01010101
700 pmullw %1, [esp]
701 mov esp, r0
702 pop r0
703%else
704 pmullw %1, [mmx_01bytes]
705%endif
706 pshufw %1, %1, 0565 pshufw %1, %1, 0
707 movq [%4], %1566 movq [%4], %1
708%endmacro567%endmacro
709 568
710WELS_EXTERN WelsDecoderIChromaPredH_mmx569WELS_EXTERN WelsDecoderIChromaPredH_mmx
711 %assign push_num 0570 %assign push_num 0
571 INIT_X86_32_PIC r3
712 LOAD_2_PARA572 LOAD_2_PARA
713 SIGN_EXTENSION r1, r1d573 SIGN_EXTENSION r1, r1d
714 mov r2, r0574 mov r2, r0
@@ -716,20 +576,7 @@ WELS_EXTERN WelsDecoderIChromaPredH_mmx · 1 unmodified line
716 movq mm0, [r2-8]576 movq mm0, [r2-8]
717 psrlq mm0, 38h577 psrlq mm0, 38h
718 578
719%ifdef X86_32_PICASM579 pmullw mm0, [pic(mmx_01bytes)]
720 push r0
721 mov r0, esp
722 and esp, 0xfffffff0
723 push 0x01010101
724 push 0x01010101
725 push 0x01010101
726 push 0x01010101
727 pmullw mm0, [esp]
728 mov esp, r0
729 pop r0
730%else
731 pmullw mm0, [mmx_01bytes]
732%endif
733 pshufw mm0, mm0, 0580 pshufw mm0, mm0, 0
734 movq [r0], mm0581 movq [r0], mm0
735 582
@@ -753,6 +600,7 @@ WELS_EXTERN WelsDecoderIChromaPredH_mmx · 17 unmodified lines
753 lea r0, [r0+2*r1]600 lea r0, [r0+2*r1]
754 MMX_PRED_H_8X8_ONE_LINEE mm0, mm1, r2, r0+r1601 MMX_PRED_H_8X8_ONE_LINEE mm0, mm1, r2, r0+r1
755 602
603 DEINIT_X86_32_PIC
756 WELSEMMS604 WELSEMMS
757 ret605 ret
758 606
@@ -816,6 +664,7 @@ WELS_EXTERN WelsDecoderIChromaPredV_mmx · 57 unmodified lines
816;*******************************************************************************664;*******************************************************************************
817WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx665WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx
818 %assign push_num 0666 %assign push_num 0
667 INIT_X86_32_PIC r3
819 LOAD_2_PARA668 LOAD_2_PARA
820 SIGN_EXTENSION r1, r1d669 SIGN_EXTENSION r1, r1d
821 mov r2, r0670 mov r2, r0
@@ -841,18 +690,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 19 unmodified lines
841 pavgb mm1, mm0690 pavgb mm1, mm0
842 691
843 pxor mm4, mm0 ; find odd value in the lowest bit of each byte692 pxor mm4, mm0 ; find odd value in the lowest bit of each byte
844%ifdef X86_32_PICASM693 pand mm4, [pic(mmx_01bytes)] ; set the odd bit
845 push r0
846 mov r0, esp
847 and esp, 0xfffffff0
848 push 0x01010101
849 push 0x01010101
850 pand mm4, [esp]
851 mov esp, r0
852 pop r0
853%else
854 pand mm4, [mmx_01bytes] ; set the odd bit
855%endif
856 psubusb mm1, mm4 ; decrease 1 from odd bytes694 psubusb mm1, mm4 ; decrease 1 from odd bytes
857 695
858 pavgb mm2, mm1 ; mm2 = [xx xx d c b f h j]696 pavgb mm2, mm1 ; mm2 = [xx xx d c b f h j]
@@ -876,6 +714,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 17 unmodified lines
876 movd [r0+2*r1], mm3714 movd [r0+2*r1], mm3
877 psrlq mm3, 10h715 psrlq mm3, 10h
878 movd [r0+r1], mm3716 movd [r0+r1], mm3
717 DEINIT_X86_32_PIC
879 WELSEMMS718 WELSEMMS
880 ret719 ret
881 720
@@ -909,6 +748,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHD_mmx · 27 unmodified lines
909;*******************************************************************************748;*******************************************************************************
910WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx749WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx
911 %assign push_num 0750 %assign push_num 0
751 INIT_X86_32_PIC r3
912 LOAD_2_PARA752 LOAD_2_PARA
913 SIGN_EXTENSION r1, r1d753 SIGN_EXTENSION r1, r1d
914 mov r2, r0754 mov r2, r0
@@ -937,18 +777,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 22 unmodified lines
937 pavgb mm2, mm0777 pavgb mm2, mm0
938 778
939 pxor mm5, mm0 ; find odd value in the lowest bit of each byte779 pxor mm5, mm0 ; find odd value in the lowest bit of each byte
940%ifdef X86_32_PICASM780 pand mm5, [pic(mmx_01bytes)] ; set the odd bit
941 push r0
942 mov r0, esp
943 and esp, 0xfffffff0
944 push 0x01010101
945 push 0x01010101
946 pand mm5, [esp] ; set the odd bit
947 mov esp, r0
948 pop r0
949%else
950 pand mm5, [mmx_01bytes] ; set the odd bit
951%endif
952 psubusb mm2, mm5 ; decrease 1 from odd bytes781 psubusb mm2, mm5 ; decrease 1 from odd bytes
953 782
954 pavgb mm2, mm3 ; mm2 = [f d b xx xx xx xx xx]783 pavgb mm2, mm3 ; mm2 = [f d b xx xx xx xx xx]
@@ -970,6 +799,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 15 unmodified lines
970 movd [r0+r1], mm1799 movd [r0+r1], mm1
971 psrlq mm1, 10h800 psrlq mm1, 10h
972 movd [r0+2*r1], mm1801 movd [r0+2*r1], mm1
802 DEINIT_X86_32_PIC
973 WELSEMMS803 WELSEMMS
974 ret804 ret
975 805
@@ -1005,6 +835,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredHU_mmx · 29 unmodified lines
1005;*******************************************************************************835;*******************************************************************************
1006WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx836WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx
1007 %assign push_num 0837 %assign push_num 0
838 INIT_X86_32_PIC r3
1008 LOAD_2_PARA839 LOAD_2_PARA
1009 SIGN_EXTENSION r1, r1d840 SIGN_EXTENSION r1, r1d
1010 mov r2, r0841 mov r2, r0
@@ -1030,18 +861,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 19 unmodified lines
1030 pavgb mm2, mm0861 pavgb mm2, mm0
1031 862
1032 pxor mm3, mm0 ; find odd value in the lowest bit of each byte863 pxor mm3, mm0 ; find odd value in the lowest bit of each byte
1033%ifdef X86_32_PICASM864 pand mm3, [pic(mmx_01bytes)] ; set the odd bit
1034 push r0
1035 mov r0, esp
1036 and esp, 0xfffffff0
1037 push 0x01010101
1038 push 0x01010101
1039 pand mm3, [esp] ; set the odd bit
1040 mov esp, r0
1041 pop r0
1042%else
1043 pand mm3, [mmx_01bytes] ; set the odd bit
1044%endif
1045 psubusb mm2, mm3 ; decrease 1 from odd bytes865 psubusb mm2, mm3 ; decrease 1 from odd bytes
1046 866
1047 movq mm3, mm0867 movq mm3, mm0
@@ -1071,6 +891,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 23 unmodified lines
1071 pxor mm5, mm2 ; mm5 = [xx xx xx xx g f e j]891 pxor mm5, mm2 ; mm5 = [xx xx xx xx g f e j]
1072 lea r0, [r0+2*r1]892 lea r0, [r0+2*r1]
1073 movd [r0+r1], mm5893 movd [r0+r1], mm5
894 DEINIT_X86_32_PIC
1074 WELSEMMS895 WELSEMMS
1075 ret896 ret
1076 897
@@ -1102,6 +923,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVR_mmx · 25 unmodified lines
1102;*******************************************************************************923;*******************************************************************************
1103WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx924WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx
1104 %assign push_num 0925 %assign push_num 0
926 INIT_X86_32_PIC r3
1105 LOAD_2_PARA927 LOAD_2_PARA
1106 SIGN_EXTENSION r1, r1d928 SIGN_EXTENSION r1, r1d
1107 mov r2, r0929 mov r2, r0
@@ -1121,18 +943,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 13 unmodified lines
1121 movq mm3, mm1943 movq mm3, mm1
1122 pavgb mm1, mm2944 pavgb mm1, mm2
1123 pxor mm3, mm2 ; find odd value in the lowest bit of each byte945 pxor mm3, mm2 ; find odd value in the lowest bit of each byte
1124%ifdef X86_32_PICASM946 pand mm3, [pic(mmx_01bytes)] ; set the odd bit
1125 push r0
1126 mov r0, esp
1127 and esp, 0xfffffff0
1128 push 0x01010101
1129 push 0x01010101
1130 pand mm3, [esp] ; set the odd bit
1131 mov esp, r0
1132 pop r0
1133%else
1134 pand mm3, [mmx_01bytes] ; set the odd bit
1135%endif
1136 psubusb mm1, mm3 ; decrease 1 from odd bytes947 psubusb mm1, mm3 ; decrease 1 from odd bytes
1137 948
1138 pavgb mm0, mm1 ; mm0 = [g f e d c b a xx]949 pavgb mm0, mm1 ; mm0 = [g f e d c b a xx]
@@ -1146,6 +957,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 7 unmodified lines
1146 psrlq mm0, 8h957 psrlq mm0, 8h
1147 lea r0, [r0+2*r1]958 lea r0, [r0+2*r1]
1148 movd [r0+r1], mm0959 movd [r0+r1], mm0
960 DEINIT_X86_32_PIC
1149 WELSEMMS961 WELSEMMS
1150 ret962 ret
1151 963
@@ -1181,6 +993,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredDDL_mmx · 29 unmodified lines
1181;*******************************************************************************993;*******************************************************************************
1182WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx994WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx
1183 %assign push_num 0995 %assign push_num 0
996 INIT_X86_32_PIC r3
1184 LOAD_2_PARA997 LOAD_2_PARA
1185 SIGN_EXTENSION r1, r1d998 SIGN_EXTENSION r1, r1d
1186 mov r2, r0999 mov r2, r0
@@ -1199,18 +1012,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx · 12 unmodified lines
1199 movq mm4, mm21012 movq mm4, mm2
1200 pavgb mm2, mm01013 pavgb mm2, mm0
1201 pxor mm4, mm0 ; find odd value in the lowest bit of each byte1014 pxor mm4, mm0 ; find odd value in the lowest bit of each byte
1202%ifdef X86_32_PICASM1015 pand mm4, [pic(mmx_01bytes)] ; set the odd bit
1203 push r0
1204 mov r0, esp
1205 and esp, 0xfffffff0
1206 push 0x01010101
1207 push 0x01010101
1208 pand mm4, [esp] ; set the odd bit
1209 mov esp, r0
1210 pop r0
1211%else
1212 pand mm4, [mmx_01bytes] ; set the odd bit
1213%endif
1214 psubusb mm2, mm4 ; decrease 1 from odd bytes1016 psubusb mm2, mm4 ; decrease 1 from odd bytes
1215 1017
1216 pavgb mm2, mm1 ; mm2 = [xx xx xx j h g f e]1018 pavgb mm2, mm1 ; mm2 = [xx xx xx j h g f e]
@@ -1223,6 +1025,7 @@ WELS_EXTERN WelsDecoderI4x4LumaPredVL_mmx · 6 unmodified lines
1223 psrlq mm2, 8h1025 psrlq mm2, 8h
1224 lea r0, [r0+2*r1]1026 lea r0, [r0+2*r1]
1225 movd [r0+r1], mm21027 movd [r0+r1], mm2
1028 DEINIT_X86_32_PIC
1226 WELSEMMS1029 WELSEMMS
1227 ret1030 ret
1228 1031
@@ -1234,6 +1037,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 5 unmodified lines
1234 push r31037 push r3
1235 push r41038 push r4
1236 %assign push_num 21039 %assign push_num 2
1040 INIT_X86_32_PIC r5
1237 LOAD_2_PARA1041 LOAD_2_PARA
1238 SIGN_EXTENSION r1, r1d1042 SIGN_EXTENSION r1, r1d
1239 mov r4, r01043 mov r4, r0
@@ -1275,18 +1079,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 35 unmodified lines
1275 movq mm1, mm21079 movq mm1, mm2
1276 paddq mm1, mm0; ; sum1 = mm3, sum2 = mm0, sum3 = mm2, sum4 = mm11080 paddq mm1, mm0; ; sum1 = mm3, sum2 = mm0, sum3 = mm2, sum4 = mm1
1277 1081
1278%ifdef X86_32_PICASM1082 movq mm4, [pic(mmx_0x02)]
1279 push r0
1280 mov r0, esp
1281 and esp, 0xfffffff0
1282 push 0x00000000
1283 push 0x00000002
1284 movq mm4, [esp]
1285 mov esp, r0
1286 pop r0
1287%else
1288 movq mm4, [mmx_0x02]
1289%endif
1290 1083
1291 paddq mm0, mm41084 paddq mm0, mm4
1292 psrlq mm0, 0x021085 psrlq mm0, 0x02
@@ -1302,30 +1095,13 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 9 unmodified lines
1302 paddq mm1, mm41095 paddq mm1, mm4
1303 psrlq mm1, 0x031096 psrlq mm1, 0x03
1304 1097
1305%ifdef X86_32_PICASM1098 pmuludq mm0, [pic(mmx_01bytes)]
1306 push r51099 pmuludq mm3, [pic(mmx_01bytes)]
1307 mov r5, esp
1308 and esp, 0xfffffff0
1309 push 0x01010101
1310 push 0x01010101
1311 pmuludq mm0, [esp]
1312 pmuludq mm3, [esp]
1313%else
1314 pmuludq mm0, [mmx_01bytes]
1315 pmuludq mm3, [mmx_01bytes]
1316%endif
1317 psllq mm0, 0x201100 psllq mm0, 0x20
1318 pxor mm0, mm3 ; mm0 = m_up1101 pxor mm0, mm3 ; mm0 = m_up
1319 1102
1320%ifdef X86_32_PICASM1103 pmuludq mm2, [pic(mmx_01bytes)]
1321 pmuludq mm2, [esp]1104 pmuludq mm1, [pic(mmx_01bytes)]
1322 pmuludq mm1, [esp]
1323 mov esp, r5
1324 pop r5
1325%else
1326 pmuludq mm2, [mmx_01bytes]
1327 pmuludq mm1, [mmx_01bytes]
1328%endif
1329 psllq mm1, 0x201105 psllq mm1, 0x20
1330 pxor mm1, mm2 ; mm2 = m_down1106 pxor mm1, mm2 ; mm2 = m_down
1331 1107
@@ -1342,6 +1118,7 @@ WELS_EXTERN WelsDecoderIChromaPredDc_sse2 · 10 unmodified lines
1342 lea r4, [r4+2*r1]1118 lea r4, [r4+2*r1]
1343 movq [r4+r1], mm11119 movq [r4+r1], mm1
1344 1120
1121 DEINIT_X86_32_PIC
1345 pop r41122 pop r4
1346 pop r31123 pop r3
1347 WELSEMMS1124 WELSEMMS
@@ -1357,6 +1134,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 9 unmodified lines
1357 push r31134 push r3
1358 push r41135 push r4
1359 %assign push_num 21136 %assign push_num 2
1137 INIT_X86_32_PIC r5
1360 LOAD_2_PARA1138 LOAD_2_PARA
1361 SIGN_EXTENSION r1, r1d1139 SIGN_EXTENSION r1, r1d
1362 mov r4, r01140 mov r4, r0
@@ -1385,20 +1163,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 22 unmodified lines
1385 movd xmm1, r2d1163 movd xmm1, r2d
1386 paddw xmm0, xmm11164 paddw xmm0, xmm1
1387 psrld xmm0, 0x051165 psrld xmm0, 0x05
1388%ifdef X86_32_PICASM1166 pmuludq xmm0, [pic(mmx_01bytes)]
1389 push r0
1390 mov r0, esp
1391 and esp, 0xfffffff0
1392 push 0x01010101
1393 push 0x01010101
1394 push 0x01010101
1395 push 0x01010101
1396 pmuludq xmm0, [esp]
1397 mov esp, r0
1398 pop r0
1399%else
1400 pmuludq xmm0, [mmx_01bytes]
1401%endif
1402 pshufd xmm0, xmm0, 01167 pshufd xmm0, xmm0, 0
1403 1168
1404 movdqa [r4], xmm01169 movdqa [r4], xmm0
@@ -1432,6 +1197,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDc_sse2 · 27 unmodified lines
1432 1197
1433 movdqa [r4+r1], xmm01198 movdqa [r4+r1], xmm0
1434 1199
1200 DEINIT_X86_32_PIC
1435 pop r41201 pop r4
1436 pop r31202 pop r3
1437 1203
@@ -1518,24 +1284,12 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDcTop_sse2 · 80 unmodified lines
1518;*******************************************************************************1284;*******************************************************************************
1519WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse21285WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse2
1520 %assign push_num 01286 %assign push_num 0
1287 INIT_X86_32_PIC r3
1521 LOAD_2_PARA1288 LOAD_2_PARA
1522 SIGN_EXTENSION r1, r1d1289 SIGN_EXTENSION r1, r1d
1523 lea r2, [2*r1+r1] ; 3*kiStride1290 lea r2, [2*r1+r1] ; 3*kiStride
1524 1291
1525%ifdef X86_32_PICASM1292 movdqa xmm0, [pic(sse2_dc_0x80)]
1526 push r0
1527 mov r0, esp
1528 and esp, 0xfffffff0
1529 push 0x80808080
1530 push 0x80808080
1531 push 0x80808080
1532 push 0x80808080
1533 movdqa xmm0, [esp]
1534 mov esp, r0
1535 pop r0
1536%else
1537 movdqa xmm0, [sse2_dc_0x80]
1538%endif
1539 movdqa xmm1, xmm01293 movdqa xmm1, xmm0
1540 movdqa [r0], xmm01294 movdqa [r0], xmm0
1541 movdqa [r0+r1], xmm11295 movdqa [r0+r1], xmm1
@@ -1557,6 +1311,7 @@ WELS_EXTERN WelsDecoderI16x16LumaPredDcNA_sse2 · 15 unmodified lines
1557 movdqa [r0+2*r1], xmm01311 movdqa [r0+2*r1], xmm0
1558 movdqa [r0+r2], xmm11312 movdqa [r0+r2], xmm1
1559 1313
1314 DEINIT_X86_32_PIC
1560 ret1315 ret
1561 1316
1562;*******************************************************************************1317;*******************************************************************************
@@ -1680,21 +1435,11 @@ WELS_EXTERN WelsDecoderIChromaPredDcTop_sse2 · 117 unmodified lines
1680;*******************************************************************************1435;*******************************************************************************
1681WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx1436WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx
1682 %assign push_num 01437 %assign push_num 0
1438 INIT_X86_32_PIC r3
1683 LOAD_2_PARA1439 LOAD_2_PARA
1684 SIGN_EXTENSION r1, r1d1440 SIGN_EXTENSION r1, r1d
1685 lea r2, [2*r1+r1]1441 lea r2, [2*r1+r1]
1686%ifdef X86_32_PICASM1442 movq mm0, [pic(sse2_dc_0x80)]
1687 push r0
1688 mov r0, esp
1689 and esp, 0xfffffff0
1690 push 0x80808080
1691 push 0x80808080
1692 movq mm0, [esp]
1693 mov esp, r0
1694 pop r0
1695%else
1696 movq mm0, [sse2_dc_0x80]
1697%endif
1698 movq mm1, mm01443 movq mm1, mm0
1699 movq [r0], mm01444 movq [r0], mm0
1700 movq [r0+r1], mm11445 movq [r0+r1], mm1
@@ -1705,6 +1450,7 @@ WELS_EXTERN WelsDecoderIChromaPredDcNA_mmx · 4 unmodified lines
1705 movq [r0+r1], mm11450 movq [r0+r1], mm1
1706 movq [r0+2*r1], mm01451 movq [r0+2*r1], mm0
1707 movq [r0+r2], mm11452 movq [r0+r2], mm1
1453 DEINIT_X86_32_PIC
1708 emms1454 emms
1709 ret1455 ret
1710 1456

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t