comparison x86/dsputil_mmx.c @ 8596:68e959302527 libavcodec

replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_ and remove all ENABLE_ definitions.
author aurel
date Wed, 14 Jan 2009 17:19:17 +0000
parents 7a463923ecd1
children 04423b2f6e0b
comparison
equal deleted inserted replaced
8595:2f476018b4ac 8596:68e959302527
618 "movq %3, %%mm6 \n\t"\ 618 "movq %3, %%mm6 \n\t"\
619 "psubb %%mm1, %%mm5 \n\t"\ 619 "psubb %%mm1, %%mm5 \n\t"\
620 "paddb %%mm1, %%mm6 \n\t" 620 "paddb %%mm1, %%mm6 \n\t"
621 621
622 static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){ 622 static void h263_v_loop_filter_mmx(uint8_t *src, int stride, int qscale){
623 if(ENABLE_ANY_H263) { 623 if(CONFIG_ANY_H263) {
624 const int strength= ff_h263_loop_filter_strength[qscale]; 624 const int strength= ff_h263_loop_filter_strength[qscale];
625 625
626 __asm__ volatile( 626 __asm__ volatile(
627 627
628 H263_LOOP_FILTER 628 H263_LOOP_FILTER
668 "m" (*(uint32_t*)(src + 3*src_stride)) 668 "m" (*(uint32_t*)(src + 3*src_stride))
669 ); 669 );
670 } 670 }
671 671
672 static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){ 672 static void h263_h_loop_filter_mmx(uint8_t *src, int stride, int qscale){
673 if(ENABLE_ANY_H263) { 673 if(CONFIG_ANY_H263) {
674 const int strength= ff_h263_loop_filter_strength[qscale]; 674 const int strength= ff_h263_loop_filter_strength[qscale];
675 DECLARE_ALIGNED(8, uint64_t, temp[4]); 675 DECLARE_ALIGNED(8, uint64_t, temp[4]);
676 uint8_t *btemp= (uint8_t*)temp; 676 uint8_t *btemp= (uint8_t*)temp;
677 677
678 src -= 2; 678 src -= 2;
2566 c->idct_add= ff_libmpeg2mmx_idct_add; 2566 c->idct_add= ff_libmpeg2mmx_idct_add;
2567 c->idct = ff_mmx_idct; 2567 c->idct = ff_mmx_idct;
2568 } 2568 }
2569 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; 2569 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
2570 #endif 2570 #endif
2571 }else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER) && 2571 }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER) &&
2572 idct_algo==FF_IDCT_VP3){ 2572 idct_algo==FF_IDCT_VP3){
2573 if(mm_flags & FF_MM_SSE2){ 2573 if(mm_flags & FF_MM_SSE2){
2574 c->idct_put= ff_vp3_idct_put_sse2; 2574 c->idct_put= ff_vp3_idct_put_sse2;
2575 c->idct_add= ff_vp3_idct_add_sse2; 2575 c->idct_add= ff_vp3_idct_add_sse2;
2576 c->idct = ff_vp3_idct_sse2; 2576 c->idct = ff_vp3_idct_sse2;
2629 c->add_bytes= add_bytes_mmx; 2629 c->add_bytes= add_bytes_mmx;
2630 c->add_bytes_l2= add_bytes_l2_mmx; 2630 c->add_bytes_l2= add_bytes_l2_mmx;
2631 2631
2632 c->draw_edges = draw_edges_mmx; 2632 c->draw_edges = draw_edges_mmx;
2633 2633
2634 if (ENABLE_ANY_H263) { 2634 if (CONFIG_ANY_H263) {
2635 c->h263_v_loop_filter= h263_v_loop_filter_mmx; 2635 c->h263_v_loop_filter= h263_v_loop_filter_mmx;
2636 c->h263_h_loop_filter= h263_h_loop_filter_mmx; 2636 c->h263_h_loop_filter= h263_h_loop_filter_mmx;
2637 } 2637 }
2638 c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_rnd; 2638 c->put_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_rnd;
2639 c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_mmx; 2639 c->put_h264_chroma_pixels_tab[1]= put_h264_chroma_mc4_mmx;
2682 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx2; 2682 c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx2;
2683 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx2; 2683 c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx2;
2684 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2; 2684 c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2;
2685 c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2; 2685 c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2;
2686 2686
2687 if (ENABLE_VP3_DECODER || ENABLE_THEORA_DECODER) { 2687 if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
2688 c->vp3_v_loop_filter= ff_vp3_v_loop_filter_mmx2; 2688 c->vp3_v_loop_filter= ff_vp3_v_loop_filter_mmx2;
2689 c->vp3_h_loop_filter= ff_vp3_h_loop_filter_mmx2; 2689 c->vp3_h_loop_filter= ff_vp3_h_loop_filter_mmx2;
2690 } 2690 }
2691 } 2691 }
2692 2692
2758 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2; 2758 c->biweight_h264_pixels_tab[4]= ff_h264_biweight_8x4_mmx2;
2759 c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2; 2759 c->biweight_h264_pixels_tab[5]= ff_h264_biweight_4x8_mmx2;
2760 c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2; 2760 c->biweight_h264_pixels_tab[6]= ff_h264_biweight_4x4_mmx2;
2761 c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2; 2761 c->biweight_h264_pixels_tab[7]= ff_h264_biweight_4x2_mmx2;
2762 2762
2763 if (ENABLE_CAVS_DECODER) 2763 if (CONFIG_CAVS_DECODER)
2764 ff_cavsdsp_init_mmx2(c, avctx); 2764 ff_cavsdsp_init_mmx2(c, avctx);
2765 2765
2766 if (ENABLE_VC1_DECODER || ENABLE_WMV3_DECODER) 2766 if (CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER)
2767 ff_vc1dsp_init_mmx(c, avctx); 2767 ff_vc1dsp_init_mmx(c, avctx);
2768 2768
2769 c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2; 2769 c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2;
2770 } else if (mm_flags & FF_MM_3DNOW) { 2770 } else if (mm_flags & FF_MM_3DNOW) {
2771 c->prefetch = prefetch_3dnow; 2771 c->prefetch = prefetch_3dnow;
2816 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow; 2816 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_3dnow;
2817 2817
2818 c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_3dnow; 2818 c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_3dnow;
2819 c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_3dnow; 2819 c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_3dnow;
2820 2820
2821 if (ENABLE_CAVS_DECODER) 2821 if (CONFIG_CAVS_DECODER)
2822 ff_cavsdsp_init_3dnow(c, avctx); 2822 ff_cavsdsp_init_3dnow(c, avctx);
2823 } 2823 }
2824 2824
2825 2825
2826 #define H264_QPEL_FUNCS(x, y, CPU)\ 2826 #define H264_QPEL_FUNCS(x, y, CPU)\
2951 c->sub_int16 = sub_int16_sse2; 2951 c->sub_int16 = sub_int16_sse2;
2952 c->scalarproduct_int16 = scalarproduct_int16_sse2; 2952 c->scalarproduct_int16 = scalarproduct_int16_sse2;
2953 } 2953 }
2954 } 2954 }
2955 2955
2956 if (ENABLE_ENCODERS) 2956 if (CONFIG_ENCODERS)
2957 dsputilenc_init_mmx(c, avctx); 2957 dsputilenc_init_mmx(c, avctx);
2958 2958
2959 #if 0 2959 #if 0
2960 // for speed testing 2960 // for speed testing
2961 get_pixels = just_return; 2961 get_pixels = just_return;