Go to the documentation of this file.
22 #ifndef AVCODEC_X86_DSPUTIL_X86_H
23 #define AVCODEC_X86_DSPUTIL_X86_H
32 #define MOVQ_WONE(regd) \
34 "pcmpeqd %%" #regd ", %%" #regd " \n\t" \
35 "psrlw $15, %%" #regd ::)
37 #define JUMPALIGN() __asm__ volatile (".p2align 3"::)
38 #define MOVQ_ZERO(regd) __asm__ volatile ("pxor %%"#regd", %%"#regd ::)
40 #define MOVQ_BFE(regd) \
42 "pcmpeqd %%"#regd", %%"#regd" \n\t" \
43 "paddb %%"#regd", %%"#regd" \n\t" ::)
46 #define MOVQ_WTWO(regd) __asm__ volatile ("movq %0, %%"#regd" \n\t" :: "m"(ff_wtwo))
50 #define MOVQ_WTWO(regd) \
52 "pcmpeqd %%"#regd", %%"#regd" \n\t" \
53 "psrlw $15, %%"#regd" \n\t" \
54 "psllw $1, %%"#regd" \n\t"::)
61 #define PAVGB_MMX_NO_RND(rega, regb, regr, regfe) \
62 "movq "#rega", "#regr" \n\t" \
63 "pand "#regb", "#regr" \n\t" \
64 "pxor "#rega", "#regb" \n\t" \
65 "pand "#regfe", "#regb" \n\t" \
66 "psrlq $1, "#regb" \n\t" \
67 "paddb "#regb", "#regr" \n\t"
69 #define PAVGB_MMX(rega, regb, regr, regfe) \
70 "movq "#rega", "#regr" \n\t" \
71 "por "#regb", "#regr" \n\t" \
72 "pxor "#rega", "#regb" \n\t" \
73 "pand "#regfe", "#regb" \n\t" \
74 "psrlq $1, "#regb" \n\t" \
75 "psubb "#regb", "#regr" \n\t"
78 #define PAVGBP_MMX_NO_RND(rega, regb, regr, regc, regd, regp) \
79 "movq "#rega", "#regr" \n\t" \
80 "movq "#regc", "#regp" \n\t" \
81 "pand "#regb", "#regr" \n\t" \
82 "pand "#regd", "#regp" \n\t" \
83 "pxor "#rega", "#regb" \n\t" \
84 "pxor "#regc", "#regd" \n\t" \
85 "pand %%mm6, "#regb" \n\t" \
86 "pand %%mm6, "#regd" \n\t" \
87 "psrlq $1, "#regb" \n\t" \
88 "psrlq $1, "#regd" \n\t" \
89 "paddb "#regb", "#regr" \n\t" \
90 "paddb "#regd", "#regp" \n\t"
92 #define PAVGBP_MMX(rega, regb, regr, regc, regd, regp) \
93 "movq "#rega", "#regr" \n\t" \
94 "movq "#regc", "#regp" \n\t" \
95 "por "#regb", "#regr" \n\t" \
96 "por "#regd", "#regp" \n\t" \
97 "pxor "#rega", "#regb" \n\t" \
98 "pxor "#regc", "#regd" \n\t" \
99 "pand %%mm6, "#regb" \n\t" \
100 "pand %%mm6, "#regd" \n\t" \
101 "psrlq $1, "#regd" \n\t" \
102 "psrlq $1, "#regb" \n\t" \
103 "psubb "#regb", "#regr" \n\t" \
104 "psubb "#regd", "#regp" \n\t"
122 int *left,
int *left_top);
125 int w,
int h,
int sides);
128 int stride,
int h,
int ox,
int oy,
129 int dxx,
int dxy,
int dyx,
int dyy,
133 int stride,
int h,
int ox,
int oy,
134 int dxx,
int dxy,
int dyx,
int dyy,
138 float min,
float max,
int len);
141 ptrdiff_t line_size,
int h);
143 ptrdiff_t line_size,
int h);
145 ptrdiff_t line_size,
int h);
147 ptrdiff_t line_size,
int h);
149 ptrdiff_t line_size,
int h);
151 ptrdiff_t line_size,
int h);
153 ptrdiff_t line_size,
int h);
155 ptrdiff_t line_size,
int h);
158 ptrdiff_t line_size,
int h);
161 ptrdiff_t line_size,
int h);
163 ptrdiff_t line_size,
int h);
166 ptrdiff_t line_size,
int h);
168 ptrdiff_t line_size,
int h);
186 #define PIXELS16(STATIC, PFX1, PFX2, TYPE, CPUEXT) \
187 STATIC void PFX1 ## _pixels16 ## TYPE ## CPUEXT(uint8_t *block, \
188 const uint8_t *pixels, \
189 ptrdiff_t line_size, \
192 PFX2 ## PFX1 ## _pixels8 ## TYPE ## CPUEXT(block, pixels, \
194 PFX2 ## PFX1 ## _pixels8 ## TYPE ## CPUEXT(block + 8, pixels + 8, \