comparison i386/dsputil_mmx_avg.h @ 954:13aec7e50c52 libavcodec

qpel in mmx2/3dnow qpel refinement quality parameter
author michaelni
date Sun, 05 Jan 2003 15:57:10 +0000
parents 45e8f39fda50
children b32afefe7d33
comparison
equal deleted inserted replaced
953:9eb066d6e0db 954:13aec7e50c52
51 :"+g"(h), "+S"(pixels), "+D"(block) 51 :"+g"(h), "+S"(pixels), "+D"(block)
52 :"r" (line_size) 52 :"r" (line_size)
53 :"%eax", "memory"); 53 :"%eax", "memory");
54 } 54 }
55 55
56 static void DEF(put_pixels8_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
57 {
58 __asm __volatile(
59 "1: \n\t"
60 "movq (%1), %%mm0 \n\t"
61 "addl %4, %1 \n\t"
62 "movq (%1), %%mm1 \n\t"
63 "addl %4, %1 \n\t"
64 PAVGB" (%2), %%mm0 \n\t"
65 PAVGB" 8(%2), %%mm1 \n\t"
66 "movq %%mm0, (%3) \n\t"
67 "addl %5, %3 \n\t"
68 "movq %%mm1, (%3) \n\t"
69 "addl %5, %3 \n\t"
70 "movq (%1), %%mm0 \n\t"
71 "addl %4, %1 \n\t"
72 "movq (%1), %%mm1 \n\t"
73 "addl %4, %1 \n\t"
74 PAVGB" 16(%2), %%mm0 \n\t"
75 PAVGB" 24(%2), %%mm1 \n\t"
76 "movq %%mm0, (%3) \n\t"
77 "addl %5, %3 \n\t"
78 "movq %%mm1, (%3) \n\t"
79 "addl %5, %3 \n\t"
80 "addl $32, %2 \n\t"
81 "subl $4, %0 \n\t"
82 "jnz 1b \n\t"
83 :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
84 :"r"(src1Stride), "r"(dstStride)
85 :"memory");
86 }
87
56 static void DEF(put_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) 88 static void DEF(put_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h)
57 { 89 {
58 __asm __volatile( 90 __asm __volatile(
59 "lea (%3, %3), %%eax \n\t" 91 "lea (%3, %3), %%eax \n\t"
60 "1: \n\t" 92 "1: \n\t"
89 "subl $4, %0 \n\t" 121 "subl $4, %0 \n\t"
90 "jnz 1b \n\t" 122 "jnz 1b \n\t"
91 :"+g"(h), "+S"(pixels), "+D"(block) 123 :"+g"(h), "+S"(pixels), "+D"(block)
92 :"r" (line_size) 124 :"r" (line_size)
93 :"%eax", "memory"); 125 :"%eax", "memory");
126 }
127
128 static void DEF(put_pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
129 {
130 __asm __volatile(
131 "1: \n\t"
132 "movq (%1), %%mm0 \n\t"
133 "movq 8(%1), %%mm1 \n\t"
134 "addl %4, %1 \n\t"
135 PAVGB" (%2), %%mm0 \n\t"
136 PAVGB" 8(%2), %%mm1 \n\t"
137 "movq %%mm0, (%3) \n\t"
138 "movq %%mm1, 8(%3) \n\t"
139 "addl %5, %3 \n\t"
140 "movq (%1), %%mm0 \n\t"
141 "movq 8(%1), %%mm1 \n\t"
142 "addl %4, %1 \n\t"
143 PAVGB" 16(%2), %%mm0 \n\t"
144 PAVGB" 24(%2), %%mm1 \n\t"
145 "movq %%mm0, (%3) \n\t"
146 "movq %%mm1, 8(%3) \n\t"
147 "addl %5, %3 \n\t"
148 "addl $32, %2 \n\t"
149 "subl $2, %0 \n\t"
150 "jnz 1b \n\t"
151 :"+g"(h), "+r"(src1), "+r"(src2), "+r"(dst)
152 :"r"(src1Stride), "r"(dstStride)
153 :"memory");
94 } 154 }
95 155
96 /* GL: this function does incorrect rounding if overflow */ 156 /* GL: this function does incorrect rounding if overflow */
97 static void DEF(put_no_rnd_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) 157 static void DEF(put_no_rnd_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h)
98 { 158 {