Mercurial > libavcodec.hg
comparison x86/vp8dsp-init.c @ 12209:9eef00a43280 libavcodec
Make mmx VP8 WHT faster
Avoid pextrw, since it's slow on many older CPUs.
Now it doesn't require mmxext either.
author | darkshikari |
---|---|
date | Wed, 21 Jul 2010 20:51:01 +0000 |
parents | d38e8565ba05 |
children | baf13deed97e |
comparison
equal
deleted
inserted
replaced
12208:5d73c4b4cd37 | 12209:9eef00a43280 |
---|---|
218 HVBILIN(ssse3, 8, 8, 16) | 218 HVBILIN(ssse3, 8, 8, 16) |
219 HVBILIN(ssse3, 8, 16, 16) | 219 HVBILIN(ssse3, 8, 16, 16) |
220 | 220 |
221 extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], int stride); | 221 extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], int stride); |
222 extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], int stride); | 222 extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], int stride); |
223 extern void ff_vp8_luma_dc_wht_mmxext(DCTELEM block[4][4][16], DCTELEM dc[16]); | 223 extern void ff_vp8_luma_dc_wht_mmx(DCTELEM block[4][4][16], DCTELEM dc[16]); |
224 extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], int stride); | 224 extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], int stride); |
225 | 225 |
226 extern void ff_vp8_v_loop_filter_simple_mmx (uint8_t *dst, int stride, int flim); | 226 extern void ff_vp8_v_loop_filter_simple_mmx (uint8_t *dst, int stride, int flim); |
227 extern void ff_vp8_v_loop_filter_simple_mmxext(uint8_t *dst, int stride, int flim); | 227 extern void ff_vp8_v_loop_filter_simple_mmxext(uint8_t *dst, int stride, int flim); |
228 extern void ff_vp8_v_loop_filter_simple_sse2 (uint8_t *dst, int stride, int flim); | 228 extern void ff_vp8_v_loop_filter_simple_sse2 (uint8_t *dst, int stride, int flim); |
313 | 313 |
314 #if HAVE_YASM | 314 #if HAVE_YASM |
315 if (mm_flags & FF_MM_MMX) { | 315 if (mm_flags & FF_MM_MMX) { |
316 c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; | 316 c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx; |
317 c->vp8_idct_add = ff_vp8_idct_add_mmx; | 317 c->vp8_idct_add = ff_vp8_idct_add_mmx; |
318 c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_mmx; | |
318 c->put_vp8_epel_pixels_tab[0][0][0] = | 319 c->put_vp8_epel_pixels_tab[0][0][0] = |
319 c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx; | 320 c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx; |
320 c->put_vp8_epel_pixels_tab[1][0][0] = | 321 c->put_vp8_epel_pixels_tab[1][0][0] = |
321 c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx; | 322 c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx; |
322 | 323 |
335 } | 336 } |
336 | 337 |
337 /* note that 4-tap width=16 functions are missing because w=16 | 338 /* note that 4-tap width=16 functions are missing because w=16 |
338 * is only used for luma, and luma is always a copy or sixtap. */ | 339 * is only used for luma, and luma is always a copy or sixtap. */ |
339 if (mm_flags & FF_MM_MMX2) { | 340 if (mm_flags & FF_MM_MMX2) { |
340 c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_mmxext; | |
341 VP8_LUMA_MC_FUNC(0, 16, mmxext); | 341 VP8_LUMA_MC_FUNC(0, 16, mmxext); |
342 VP8_MC_FUNC(1, 8, mmxext); | 342 VP8_MC_FUNC(1, 8, mmxext); |
343 VP8_MC_FUNC(2, 4, mmxext); | 343 VP8_MC_FUNC(2, 4, mmxext); |
344 VP8_BILINEAR_MC_FUNC(0, 16, mmxext); | 344 VP8_BILINEAR_MC_FUNC(0, 16, mmxext); |
345 VP8_BILINEAR_MC_FUNC(1, 8, mmxext); | 345 VP8_BILINEAR_MC_FUNC(1, 8, mmxext); |