Mercurial > libavcodec.hg
comparison x86/h264dsp_mmx.c @ 12456:a5ddb39627fd libavcodec
Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.
author | stefano |
---|---|
date | Sat, 04 Sep 2010 09:59:08 +0000 |
parents | f4355cd85faa |
children | 9fef0a8ddd63 |
comparison
equal
deleted
inserted
replaced
12455:14f85520cd02 | 12456:a5ddb39627fd |
---|---|
742 | 742 |
743 void ff_h264dsp_init_x86(H264DSPContext *c) | 743 void ff_h264dsp_init_x86(H264DSPContext *c) |
744 { | 744 { |
745 int mm_flags = mm_support(); | 745 int mm_flags = mm_support(); |
746 | 746 |
747 if (mm_flags & FF_MM_MMX) { | 747 if (mm_flags & AV_CPU_FLAG_MMX) { |
748 c->h264_idct_dc_add= | 748 c->h264_idct_dc_add= |
749 c->h264_idct_add= ff_h264_idct_add_mmx; | 749 c->h264_idct_add= ff_h264_idct_add_mmx; |
750 c->h264_idct8_dc_add= | 750 c->h264_idct8_dc_add= |
751 c->h264_idct8_add= ff_h264_idct8_add_mmx; | 751 c->h264_idct8_add= ff_h264_idct8_add_mmx; |
752 | 752 |
753 c->h264_idct_add16 = ff_h264_idct_add16_mmx; | 753 c->h264_idct_add16 = ff_h264_idct_add16_mmx; |
754 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx; | 754 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx; |
755 c->h264_idct_add8 = ff_h264_idct_add8_mmx; | 755 c->h264_idct_add8 = ff_h264_idct_add8_mmx; |
756 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx; | 756 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx; |
757 | 757 |
758 if (mm_flags & FF_MM_MMX2) { | 758 if (mm_flags & AV_CPU_FLAG_MMX2) { |
759 c->h264_idct_dc_add= ff_h264_idct_dc_add_mmx2; | 759 c->h264_idct_dc_add= ff_h264_idct_dc_add_mmx2; |
760 c->h264_idct8_dc_add= ff_h264_idct8_dc_add_mmx2; | 760 c->h264_idct8_dc_add= ff_h264_idct8_dc_add_mmx2; |
761 c->h264_idct_add16 = ff_h264_idct_add16_mmx2; | 761 c->h264_idct_add16 = ff_h264_idct_add16_mmx2; |
762 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx2; | 762 c->h264_idct8_add4 = ff_h264_idct8_add4_mmx2; |
763 c->h264_idct_add8 = ff_h264_idct_add8_mmx2; | 763 c->h264_idct_add8 = ff_h264_idct_add8_mmx2; |
764 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx2; | 764 c->h264_idct_add16intra= ff_h264_idct_add16intra_mmx2; |
765 | 765 |
766 c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; | 766 c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; |
767 } | 767 } |
768 if(mm_flags & FF_MM_SSE2){ | 768 if(mm_flags & AV_CPU_FLAG_SSE2){ |
769 c->h264_idct8_add = ff_h264_idct8_add_sse2; | 769 c->h264_idct8_add = ff_h264_idct8_add_sse2; |
770 c->h264_idct8_add4= ff_h264_idct8_add4_sse2; | 770 c->h264_idct8_add4= ff_h264_idct8_add4_sse2; |
771 } | 771 } |
772 | 772 |
773 #if HAVE_YASM | 773 #if HAVE_YASM |
774 if (mm_flags & FF_MM_MMX2){ | 774 if (mm_flags & AV_CPU_FLAG_MMX2){ |
775 c->h264_v_loop_filter_chroma= ff_x264_deblock_v_chroma_mmxext; | 775 c->h264_v_loop_filter_chroma= ff_x264_deblock_v_chroma_mmxext; |
776 c->h264_h_loop_filter_chroma= ff_x264_deblock_h_chroma_mmxext; | 776 c->h264_h_loop_filter_chroma= ff_x264_deblock_h_chroma_mmxext; |
777 c->h264_v_loop_filter_chroma_intra= ff_x264_deblock_v_chroma_intra_mmxext; | 777 c->h264_v_loop_filter_chroma_intra= ff_x264_deblock_v_chroma_intra_mmxext; |
778 c->h264_h_loop_filter_chroma_intra= ff_x264_deblock_h_chroma_intra_mmxext; | 778 c->h264_h_loop_filter_chroma_intra= ff_x264_deblock_h_chroma_intra_mmxext; |
779 #if ARCH_X86_32 | 779 #if ARCH_X86_32 |
798 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2; | 798 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2; |
799 c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2; | 799 c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2; |
800 c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2; | 800 c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2; |
801 c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2; | 801 c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2; |
802 | 802 |
803 if( mm_flags&FF_MM_SSE2 ){ | 803 if (mm_flags&AV_CPU_FLAG_SSE2) { |
804 c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2; | 804 c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_sse2; |
805 c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2; | 805 c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_sse2; |
806 c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2; | 806 c->weight_h264_pixels_tab[2]= ff_h264_weight_8x16_sse2; |
807 c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_sse2; | 807 c->weight_h264_pixels_tab[3]= ff_h264_weight_8x8_sse2; |
808 c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_sse2; | 808 c->weight_h264_pixels_tab[4]= ff_h264_weight_8x4_sse2; |
823 c->h264_idct_add16 = ff_h264_idct_add16_sse2; | 823 c->h264_idct_add16 = ff_h264_idct_add16_sse2; |
824 c->h264_idct_add8 = ff_h264_idct_add8_sse2; | 824 c->h264_idct_add8 = ff_h264_idct_add8_sse2; |
825 c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2; | 825 c->h264_idct_add16intra = ff_h264_idct_add16intra_sse2; |
826 #endif | 826 #endif |
827 } | 827 } |
828 if ( mm_flags&FF_MM_SSSE3 ){ | 828 if (mm_flags&AV_CPU_FLAG_SSSE3) { |
829 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; | 829 c->biweight_h264_pixels_tab[0]= ff_h264_biweight_16x16_ssse3; |
830 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3; | 830 c->biweight_h264_pixels_tab[1]= ff_h264_biweight_16x8_ssse3; |
831 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3; | 831 c->biweight_h264_pixels_tab[2]= ff_h264_biweight_8x16_ssse3; |
832 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3; | 832 c->biweight_h264_pixels_tab[3]= ff_h264_biweight_8x8_ssse3; |
833 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3; | 833 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_ssse3; |