Mercurial > libavcodec.hg
comparison x86/vp8dsp-init.c @ 11992:da388061b227 libavcodec
Add x86 asm functions for VP8 put_pixels
author | darkshikari |
---|---|
date | Mon, 28 Jun 2010 19:14:40 +0000 |
parents | a6d24fc1deb7 |
children | c15e87b9767b |
comparison
equal
deleted
inserted
replaced
11991:a6d24fc1deb7 | 11992:da388061b227 |
---|---|
84 uint8_t *src, int srcstride, | 84 uint8_t *src, int srcstride, |
85 int height, int mx, int my); | 85 int height, int mx, int my); |
86 extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, int dststride, | 86 extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, int dststride, |
87 uint8_t *src, int srcstride, | 87 uint8_t *src, int srcstride, |
88 int height, int mx, int my); | 88 int height, int mx, int my); |
89 | |
90 extern void ff_put_vp8_pixels8_mmx (uint8_t *dst, int dststride, | |
91 uint8_t *src, int srcstride, | |
92 int height, int mx, int my); | |
93 extern void ff_put_vp8_pixels16_mmx(uint8_t *dst, int dststride, | |
94 uint8_t *src, int srcstride, | |
95 int height, int mx, int my); | |
96 extern void ff_put_vp8_pixels16_sse(uint8_t *dst, int dststride, | |
97 uint8_t *src, int srcstride, | |
98 int height, int mx, int my); | |
89 | 99 |
90 #define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ | 100 #define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ |
91 static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ | 101 static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ |
92 uint8_t *dst, int dststride, uint8_t *src, \ | 102 uint8_t *dst, int dststride, uint8_t *src, \ |
93 int srcstride, int height, int mx, int my) \ | 103 int srcstride, int height, int mx, int my) \ |
216 mm_flags = mm_support(); | 226 mm_flags = mm_support(); |
217 | 227 |
218 #if HAVE_YASM | 228 #if HAVE_YASM |
219 if (mm_flags & FF_MM_MMX) { | 229 if (mm_flags & FF_MM_MMX) { |
220 c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; | 230 c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
231 c->put_vp8_epel_pixels_tab[0][0][0] = | |
232 c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx; | |
233 c->put_vp8_epel_pixels_tab[1][0][0] = | |
234 c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx; | |
221 } | 235 } |
222 | 236 |
223 /* note that 4-tap width=16 functions are missing because w=16 | 237 /* note that 4-tap width=16 functions are missing because w=16 |
224 * is only used for luma, and luma is always a copy or sixtap. */ | 238 * is only used for luma, and luma is always a copy or sixtap. */ |
225 if (mm_flags & FF_MM_MMXEXT) { | 239 if (mm_flags & FF_MM_MMXEXT) { |
229 VP8_BILINEAR_MC_FUNC(0, 16, mmxext); | 243 VP8_BILINEAR_MC_FUNC(0, 16, mmxext); |
230 VP8_BILINEAR_MC_FUNC(1, 8, mmxext); | 244 VP8_BILINEAR_MC_FUNC(1, 8, mmxext); |
231 VP8_BILINEAR_MC_FUNC(1, 4, mmxext); | 245 VP8_BILINEAR_MC_FUNC(1, 4, mmxext); |
232 } | 246 } |
233 | 247 |
248 if (mm_flags & FF_MM_SSE) { | |
249 c->put_vp8_epel_pixels_tab[0][0][0] = | |
250 c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse; | |
251 } | |
252 | |
234 if (mm_flags & FF_MM_SSE2) { | 253 if (mm_flags & FF_MM_SSE2) { |
235 VP8_LUMA_MC_FUNC(0, 16, sse2); | 254 VP8_LUMA_MC_FUNC(0, 16, sse2); |
236 VP8_MC_FUNC(1, 8, sse2); | 255 VP8_MC_FUNC(1, 8, sse2); |
237 VP8_BILINEAR_MC_FUNC(0, 16, sse2); | 256 VP8_BILINEAR_MC_FUNC(0, 16, sse2); |
238 VP8_BILINEAR_MC_FUNC(1, 8, sse2); | 257 VP8_BILINEAR_MC_FUNC(1, 8, sse2); |