1 .file "composite_line_yuv_mmx"
10 #if !defined(__MINGW32__) && !defined(__CYGWIN__)
11 .globl composite_line_yuv_mmx
12 .type composite_line_yuv_mmx,@function
13 composite_line_yuv_mmx:
15 .globl _composite_line_yuv_mmx
16 _composite_line_yuv_mmx:
42 movl 8(%ebp), %esi # get dest
47 movl $0xffff, %ecx # a = 255
48 cmpl $0, 20(%ebp) # if alpha == NULL
50 movl 20(%ebp), %edi # a = alpha[ j ]
53 movl %ecx, -24(%ebp) # save ecx
55 movl 24(%ebp), %eax # mix = weight
56 cmpl $0, 28(%ebp) # if luma == NULL
58 movl 28(%ebp), %edi # mix = ...
61 movw (%edi,%ebx), %bx # luma[ j*2 ]
65 addl 32(%ebp), %ecx # + softness
68 /* TODO: linear interpolate between edges */
84 movl %edx, %ebx # edx will be destroyed by mulw
85 movl -24(%ebp), %ecx # restore ecx
86 mull %ecx # mix = mix * a...
87 movl %ebx, %edx # restore edx
91 /* put alpha and (1-alpha) into mm0 */
92 /* 0 aa 0 1-a 0 aa 0 1-a */
101 /* (1 << 16) - mix */
102 movl $0x000000ff, %ecx
113 /* unpack words into double words */
116 /* put src yuv and dest yuv into mm1 */
117 /* 0 UVs 0 UVd 0 Ys 0 Yd */
119 movl 12(%ebp), %edi # get src
126 movb (%esi), %al # get dest
135 /* alpha composite */
142 pextrw $2, %mm0, %eax
148 cmpl 16(%ebp), %edx # if ( j == width_src )
167 /********************************************/
170 #if !defined(__MINGW32__) && !defined(__CYGWIN__)
171 .globl composite_have_mmx
172 .type composite_have_mmx,@function
175 .globl _composite_have_mmx
181 # Check if bit 21 in flags word is writeable
186 xorl $0x00200000, %eax
201 test $0x00800000, %edx