1 .file "scale_line_22_33_mmx.S"
7 #if !defined(__MINGW32__) && !defined(__CYGWIN__)
9 .globl pixops_scale_line_22_33_mmx
10 .type pixops_scale_line_22_33_mmx,@function
11 pixops_scale_line_22_33_mmx:
15 .globl _pixops_scale_line_22_33_mmx
16 _pixops_scale_line_22_33_mmx:
43 * int x_scaled -24(%ebp)
49 /* Initialize variables */
58 /* For the body of this loop, %mm01, %mm1, %mm2, %mm3 hold the 4 adjoining
59 * points we are interpolating between, as:
64 /* Load initial values into %mm1, %mm3 */
65 leal (%edx,%edx,2),%edx # Multiply by 3
69 movzbl 2(%edi,%edx),%ecx
71 movzwl (%edi,%edx),%eax
77 movzbl 2(%edi,%edx),%ecx
79 movzwl (%edi,%edx),%eax
91 /* short *pixel_weights = weights + ((x >> (SCALE_SHIFT - SUBSAMPLE_BITS)) & SUBSAMPLE_MASK) * n_x * n_y
98 /* At this point, %edi holds weights. Load the 4 weights into %mm4,%mm5,%mm6,%mm7, multiply and
101 movq (%edi,%eax),%mm4
103 movq 8(%edi,%eax),%mm5
105 movq 16(%edi,%eax),%mm6
106 movq 24(%edi,%eax),%mm7
113 /* %mm7 holds the accumulated sum. Compute (C + 0x80) / 256
116 movl $8421504, %eax # 0x00808080
122 /* Pack into %eax and store result
137 /* x_scaled = x >> 16; */
147 * Load the two new values into %mm1, %mm3, move old values into %mm0, %mm2
152 leal (%edx,%edx,2),%edx # Multiply by 3
155 movzbl 2(%edi,%edx),%ecx
157 movzwl (%edi,%edx),%eax
163 movzbl 2(%edi,%edx),%ecx
165 movzwl (%edi,%edx),%eax