comparison x86/h264dsp_mmx.c @ 12480:14896fa76003 libavcodec

LGPL SSE2 H.264 iDCT This leaves no more GPL-only H.264 decoding asm code. Approved by Loren.
author darkshikari
date Fri, 10 Sep 2010 02:25:12 +0000
parents 9fef0a8ddd63
children 58a960d6e34c
comparison
equal deleted inserted replaced
12479:ca1896830b44 12480:14896fa76003
473 else if(block[i*16]) 473 else if(block[i*16])
474 ff_h264_idct_dc_add_mmx2(dest[(i&4)>>2] + block_offset[i], block + i*16, stride); 474 ff_h264_idct_dc_add_mmx2(dest[(i&4)>>2] + block_offset[i], block + i*16, stride);
475 } 475 }
476 } 476 }
477 477
478 #if CONFIG_GPL && HAVE_YASM 478 #if HAVE_YASM
479 static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride) 479 static void ff_h264_idct_dc_add8_mmx2(uint8_t *dst, int16_t *block, int stride)
480 { 480 {
481 __asm__ volatile( 481 __asm__ volatile(
482 "movd %0, %%mm0 \n\t" // 0 0 X D 482 "movd %0, %%mm0 \n\t" // 0 0 X D
483 "punpcklwd %1, %%mm0 \n\t" // x X d D 483 "punpcklwd %1, %%mm0 \n\t" // x X d D
818 c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2; 818 c->h264_v_loop_filter_luma = ff_x264_deblock_v_luma_sse2;
819 c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2; 819 c->h264_h_loop_filter_luma = ff_x264_deblock_h_luma_sse2;
820 c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2; 820 c->h264_v_loop_filter_luma_intra = ff_x264_deblock_v_luma_intra_sse2;
821 c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_sse2; 821 c->h264_h_loop_filter_luma_intra = ff_x264_deblock_h_luma_intra_sse2;
822 #endif 822 #endif
823 #if CONFIG_GPL
824 c->h264_idct_add16 = ff_h264_idct_add16_sse2; 823 c->h264_idct_add16 = ff_h264_idct_add16_sse2;
825 c->h264_idct_add8 = ff_h264_idct_add8_sse2; 824 c->h264_idct_add8 = ff_h264_idct_add8_sse2;
826 c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2; 825 c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2;
827 #endif
828 } 826 }
829 if (mm_flags&AV_CPU_FLAG_SSSE3) { 827 if (mm_flags&AV_CPU_FLAG_SSSE3) {
830 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; 828 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3;
831 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3; 829 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3;
832 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3; 830 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3;