Mercurial > libavcodec.hg
comparison x86/dsputil_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 |
---|---|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 * | 21 * |
22 * MMX optimization by Nick Kurshev <nickols_k@mail.ru> | 22 * MMX optimization by Nick Kurshev <nickols_k@mail.ru> |
23 */ | 23 */ |
24 | 24 |
25 #include "libavutil/cpu.h" | |
25 #include "libavutil/x86_cpu.h" | 26 #include "libavutil/x86_cpu.h" |
26 #include "libavcodec/dsputil.h" | 27 #include "libavcodec/dsputil.h" |
27 #include "libavcodec/h264dsp.h" | 28 #include "libavcodec/h264dsp.h" |
28 #include "libavcodec/mpegvideo.h" | 29 #include "libavcodec/mpegvideo.h" |
29 #include "libavcodec/simple_idct.h" | 30 #include "libavcodec/simple_idct.h" |
2523 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) | 2524 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) |
2524 { | 2525 { |
2525 int mm_flags = mm_support(); | 2526 int mm_flags = mm_support(); |
2526 | 2527 |
2527 if (avctx->dsp_mask) { | 2528 if (avctx->dsp_mask) { |
2528 if (avctx->dsp_mask & FF_MM_FORCE) | 2529 if (avctx->dsp_mask & AV_CPU_FLAG_FORCE) |
2529 mm_flags |= (avctx->dsp_mask & 0xffff); | 2530 mm_flags |= (avctx->dsp_mask & 0xffff); |
2530 else | 2531 else |
2531 mm_flags &= ~(avctx->dsp_mask & 0xffff); | 2532 mm_flags &= ~(avctx->dsp_mask & 0xffff); |
2532 } | 2533 } |
2533 | 2534 |
2534 #if 0 | 2535 #if 0 |
2535 av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); | 2536 av_log(avctx, AV_LOG_INFO, "libavcodec: CPU flags:"); |
2536 if (mm_flags & FF_MM_MMX) | 2537 if (mm_flags & AV_CPU_FLAG_MMX) |
2537 av_log(avctx, AV_LOG_INFO, " mmx"); | 2538 av_log(avctx, AV_LOG_INFO, " mmx"); |
2538 if (mm_flags & FF_MM_MMX2) | 2539 if (mm_flags & AV_CPU_FLAG_MMX2) |
2539 av_log(avctx, AV_LOG_INFO, " mmx2"); | 2540 av_log(avctx, AV_LOG_INFO, " mmx2"); |
2540 if (mm_flags & FF_MM_3DNOW) | 2541 if (mm_flags & AV_CPU_FLAG_3DNOW) |
2541 av_log(avctx, AV_LOG_INFO, " 3dnow"); | 2542 av_log(avctx, AV_LOG_INFO, " 3dnow"); |
2542 if (mm_flags & FF_MM_SSE) | 2543 if (mm_flags & AV_CPU_FLAG_SSE) |
2543 av_log(avctx, AV_LOG_INFO, " sse"); | 2544 av_log(avctx, AV_LOG_INFO, " sse"); |
2544 if (mm_flags & FF_MM_SSE2) | 2545 if (mm_flags & AV_CPU_FLAG_SSE2) |
2545 av_log(avctx, AV_LOG_INFO, " sse2"); | 2546 av_log(avctx, AV_LOG_INFO, " sse2"); |
2546 av_log(avctx, AV_LOG_INFO, "\n"); | 2547 av_log(avctx, AV_LOG_INFO, "\n"); |
2547 #endif | 2548 #endif |
2548 | 2549 |
2549 if (mm_flags & FF_MM_MMX) { | 2550 if (mm_flags & AV_CPU_FLAG_MMX) { |
2550 const int idct_algo= avctx->idct_algo; | 2551 const int idct_algo= avctx->idct_algo; |
2551 | 2552 |
2552 if(avctx->lowres==0){ | 2553 if(avctx->lowres==0){ |
2553 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){ | 2554 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){ |
2554 c->idct_put= ff_simple_idct_put_mmx; | 2555 c->idct_put= ff_simple_idct_put_mmx; |
2555 c->idct_add= ff_simple_idct_add_mmx; | 2556 c->idct_add= ff_simple_idct_add_mmx; |
2556 c->idct = ff_simple_idct_mmx; | 2557 c->idct = ff_simple_idct_mmx; |
2557 c->idct_permutation_type= FF_SIMPLE_IDCT_PERM; | 2558 c->idct_permutation_type= FF_SIMPLE_IDCT_PERM; |
2558 #if CONFIG_GPL | 2559 #if CONFIG_GPL |
2559 }else if(idct_algo==FF_IDCT_LIBMPEG2MMX){ | 2560 }else if(idct_algo==FF_IDCT_LIBMPEG2MMX){ |
2560 if(mm_flags & FF_MM_MMX2){ | 2561 if(mm_flags & AV_CPU_FLAG_MMX2){ |
2561 c->idct_put= ff_libmpeg2mmx2_idct_put; | 2562 c->idct_put= ff_libmpeg2mmx2_idct_put; |
2562 c->idct_add= ff_libmpeg2mmx2_idct_add; | 2563 c->idct_add= ff_libmpeg2mmx2_idct_add; |
2563 c->idct = ff_mmxext_idct; | 2564 c->idct = ff_mmxext_idct; |
2564 }else{ | 2565 }else{ |
2565 c->idct_put= ff_libmpeg2mmx_idct_put; | 2566 c->idct_put= ff_libmpeg2mmx_idct_put; |
2568 } | 2569 } |
2569 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; | 2570 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; |
2570 #endif | 2571 #endif |
2571 }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER) && | 2572 }else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER) && |
2572 idct_algo==FF_IDCT_VP3 && HAVE_YASM){ | 2573 idct_algo==FF_IDCT_VP3 && HAVE_YASM){ |
2573 if(mm_flags & FF_MM_SSE2){ | 2574 if(mm_flags & AV_CPU_FLAG_SSE2){ |
2574 c->idct_put= ff_vp3_idct_put_sse2; | 2575 c->idct_put= ff_vp3_idct_put_sse2; |
2575 c->idct_add= ff_vp3_idct_add_sse2; | 2576 c->idct_add= ff_vp3_idct_add_sse2; |
2576 c->idct = ff_vp3_idct_sse2; | 2577 c->idct = ff_vp3_idct_sse2; |
2577 c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; | 2578 c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; |
2578 }else{ | 2579 }else{ |
2582 c->idct_permutation_type= FF_PARTTRANS_IDCT_PERM; | 2583 c->idct_permutation_type= FF_PARTTRANS_IDCT_PERM; |
2583 } | 2584 } |
2584 }else if(idct_algo==FF_IDCT_CAVS){ | 2585 }else if(idct_algo==FF_IDCT_CAVS){ |
2585 c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; | 2586 c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; |
2586 }else if(idct_algo==FF_IDCT_XVIDMMX){ | 2587 }else if(idct_algo==FF_IDCT_XVIDMMX){ |
2587 if(mm_flags & FF_MM_SSE2){ | 2588 if(mm_flags & AV_CPU_FLAG_SSE2){ |
2588 c->idct_put= ff_idct_xvid_sse2_put; | 2589 c->idct_put= ff_idct_xvid_sse2_put; |
2589 c->idct_add= ff_idct_xvid_sse2_add; | 2590 c->idct_add= ff_idct_xvid_sse2_add; |
2590 c->idct = ff_idct_xvid_sse2; | 2591 c->idct = ff_idct_xvid_sse2; |
2591 c->idct_permutation_type= FF_SSE2_IDCT_PERM; | 2592 c->idct_permutation_type= FF_SSE2_IDCT_PERM; |
2592 }else if(mm_flags & FF_MM_MMX2){ | 2593 }else if(mm_flags & AV_CPU_FLAG_MMX2){ |
2593 c->idct_put= ff_idct_xvid_mmx2_put; | 2594 c->idct_put= ff_idct_xvid_mmx2_put; |
2594 c->idct_add= ff_idct_xvid_mmx2_add; | 2595 c->idct_add= ff_idct_xvid_mmx2_add; |
2595 c->idct = ff_idct_xvid_mmx2; | 2596 c->idct = ff_idct_xvid_mmx2; |
2596 }else{ | 2597 }else{ |
2597 c->idct_put= ff_idct_xvid_mmx_put; | 2598 c->idct_put= ff_idct_xvid_mmx_put; |
2604 c->put_pixels_clamped = ff_put_pixels_clamped_mmx; | 2605 c->put_pixels_clamped = ff_put_pixels_clamped_mmx; |
2605 c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx; | 2606 c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_mmx; |
2606 c->add_pixels_clamped = ff_add_pixels_clamped_mmx; | 2607 c->add_pixels_clamped = ff_add_pixels_clamped_mmx; |
2607 c->clear_block = clear_block_mmx; | 2608 c->clear_block = clear_block_mmx; |
2608 c->clear_blocks = clear_blocks_mmx; | 2609 c->clear_blocks = clear_blocks_mmx; |
2609 if ((mm_flags & FF_MM_SSE) && | 2610 if ((mm_flags & AV_CPU_FLAG_SSE) && |
2610 !(CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1)){ | 2611 !(CONFIG_MPEG_XVMC_DECODER && avctx->xvmc_acceleration > 1)){ |
2611 /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ | 2612 /* XvMCCreateBlocks() may not allocate 16-byte aligned blocks */ |
2612 c->clear_block = clear_block_sse; | 2613 c->clear_block = clear_block_sse; |
2613 c->clear_blocks = clear_blocks_sse; | 2614 c->clear_blocks = clear_blocks_sse; |
2614 } | 2615 } |
2647 | 2648 |
2648 c->put_rv40_chroma_pixels_tab[0]= ff_put_rv40_chroma_mc8_mmx; | 2649 c->put_rv40_chroma_pixels_tab[0]= ff_put_rv40_chroma_mc8_mmx; |
2649 c->put_rv40_chroma_pixels_tab[1]= ff_put_rv40_chroma_mc4_mmx; | 2650 c->put_rv40_chroma_pixels_tab[1]= ff_put_rv40_chroma_mc4_mmx; |
2650 #endif | 2651 #endif |
2651 | 2652 |
2652 if (mm_flags & FF_MM_MMX2) { | 2653 if (mm_flags & AV_CPU_FLAG_MMX2) { |
2653 c->prefetch = prefetch_mmx2; | 2654 c->prefetch = prefetch_mmx2; |
2654 | 2655 |
2655 c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2; | 2656 c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2; |
2656 c->put_pixels_tab[0][2] = put_pixels16_y2_mmx2; | 2657 c->put_pixels_tab[0][2] = put_pixels16_y2_mmx2; |
2657 | 2658 |
2738 c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_mmx2; | 2739 c->put_h264_chroma_pixels_tab[2]= ff_put_h264_chroma_mc2_mmx2; |
2739 | 2740 |
2740 c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2; | 2741 c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2; |
2741 #endif | 2742 #endif |
2742 #if HAVE_7REGS && HAVE_TEN_OPERANDS | 2743 #if HAVE_7REGS && HAVE_TEN_OPERANDS |
2743 if( mm_flags&FF_MM_3DNOW ) | 2744 if( mm_flags&AV_CPU_FLAG_3DNOW ) |
2744 c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov; | 2745 c->add_hfyu_median_prediction = add_hfyu_median_prediction_cmov; |
2745 #endif | 2746 #endif |
2746 | 2747 |
2747 if (CONFIG_VC1_DECODER) | 2748 if (CONFIG_VC1_DECODER) |
2748 ff_vc1dsp_init_mmx(c, avctx); | 2749 ff_vc1dsp_init_mmx(c, avctx); |
2749 | 2750 |
2750 c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2; | 2751 c->add_png_paeth_prediction= add_png_paeth_prediction_mmx2; |
2751 } else if (mm_flags & FF_MM_3DNOW) { | 2752 } else if (mm_flags & AV_CPU_FLAG_3DNOW) { |
2752 c->prefetch = prefetch_3dnow; | 2753 c->prefetch = prefetch_3dnow; |
2753 | 2754 |
2754 c->put_pixels_tab[0][1] = put_pixels16_x2_3dnow; | 2755 c->put_pixels_tab[0][1] = put_pixels16_x2_3dnow; |
2755 c->put_pixels_tab[0][2] = put_pixels16_y2_3dnow; | 2756 c->put_pixels_tab[0][2] = put_pixels16_y2_3dnow; |
2756 | 2757 |
2814 #define H264_QPEL_FUNCS(x, y, CPU)\ | 2815 #define H264_QPEL_FUNCS(x, y, CPU)\ |
2815 c->put_h264_qpel_pixels_tab[0][x+y*4] = put_h264_qpel16_mc##x##y##_##CPU;\ | 2816 c->put_h264_qpel_pixels_tab[0][x+y*4] = put_h264_qpel16_mc##x##y##_##CPU;\ |
2816 c->put_h264_qpel_pixels_tab[1][x+y*4] = put_h264_qpel8_mc##x##y##_##CPU;\ | 2817 c->put_h264_qpel_pixels_tab[1][x+y*4] = put_h264_qpel8_mc##x##y##_##CPU;\ |
2817 c->avg_h264_qpel_pixels_tab[0][x+y*4] = avg_h264_qpel16_mc##x##y##_##CPU;\ | 2818 c->avg_h264_qpel_pixels_tab[0][x+y*4] = avg_h264_qpel16_mc##x##y##_##CPU;\ |
2818 c->avg_h264_qpel_pixels_tab[1][x+y*4] = avg_h264_qpel8_mc##x##y##_##CPU; | 2819 c->avg_h264_qpel_pixels_tab[1][x+y*4] = avg_h264_qpel8_mc##x##y##_##CPU; |
2819 if((mm_flags & FF_MM_SSE2) && !(mm_flags & FF_MM_3DNOW)){ | 2820 if((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW)){ |
2820 // these functions are slower than mmx on AMD, but faster on Intel | 2821 // these functions are slower than mmx on AMD, but faster on Intel |
2821 c->put_pixels_tab[0][0] = put_pixels16_sse2; | 2822 c->put_pixels_tab[0][0] = put_pixels16_sse2; |
2822 c->avg_pixels_tab[0][0] = avg_pixels16_sse2; | 2823 c->avg_pixels_tab[0][0] = avg_pixels16_sse2; |
2823 H264_QPEL_FUNCS(0, 0, sse2); | 2824 H264_QPEL_FUNCS(0, 0, sse2); |
2824 } | 2825 } |
2825 if(mm_flags & FF_MM_SSE2){ | 2826 if(mm_flags & AV_CPU_FLAG_SSE2){ |
2826 H264_QPEL_FUNCS(0, 1, sse2); | 2827 H264_QPEL_FUNCS(0, 1, sse2); |
2827 H264_QPEL_FUNCS(0, 2, sse2); | 2828 H264_QPEL_FUNCS(0, 2, sse2); |
2828 H264_QPEL_FUNCS(0, 3, sse2); | 2829 H264_QPEL_FUNCS(0, 3, sse2); |
2829 H264_QPEL_FUNCS(1, 1, sse2); | 2830 H264_QPEL_FUNCS(1, 1, sse2); |
2830 H264_QPEL_FUNCS(1, 2, sse2); | 2831 H264_QPEL_FUNCS(1, 2, sse2); |
2835 H264_QPEL_FUNCS(3, 1, sse2); | 2836 H264_QPEL_FUNCS(3, 1, sse2); |
2836 H264_QPEL_FUNCS(3, 2, sse2); | 2837 H264_QPEL_FUNCS(3, 2, sse2); |
2837 H264_QPEL_FUNCS(3, 3, sse2); | 2838 H264_QPEL_FUNCS(3, 3, sse2); |
2838 } | 2839 } |
2839 #if HAVE_SSSE3 | 2840 #if HAVE_SSSE3 |
2840 if(mm_flags & FF_MM_SSSE3){ | 2841 if(mm_flags & AV_CPU_FLAG_SSSE3){ |
2841 H264_QPEL_FUNCS(1, 0, ssse3); | 2842 H264_QPEL_FUNCS(1, 0, ssse3); |
2842 H264_QPEL_FUNCS(1, 1, ssse3); | 2843 H264_QPEL_FUNCS(1, 1, ssse3); |
2843 H264_QPEL_FUNCS(1, 2, ssse3); | 2844 H264_QPEL_FUNCS(1, 2, ssse3); |
2844 H264_QPEL_FUNCS(1, 3, ssse3); | 2845 H264_QPEL_FUNCS(1, 3, ssse3); |
2845 H264_QPEL_FUNCS(2, 0, ssse3); | 2846 H264_QPEL_FUNCS(2, 0, ssse3); |
2857 c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_ssse3_rnd; | 2858 c->put_h264_chroma_pixels_tab[0]= ff_put_h264_chroma_mc8_ssse3_rnd; |
2858 c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_ssse3_rnd; | 2859 c->avg_h264_chroma_pixels_tab[0]= ff_avg_h264_chroma_mc8_ssse3_rnd; |
2859 c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_ssse3; | 2860 c->put_h264_chroma_pixels_tab[1]= ff_put_h264_chroma_mc4_ssse3; |
2860 c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_ssse3; | 2861 c->avg_h264_chroma_pixels_tab[1]= ff_avg_h264_chroma_mc4_ssse3; |
2861 c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_ssse3; | 2862 c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_ssse3; |
2862 if (mm_flags & FF_MM_SSE4) // not really sse4, just slow on Conroe | 2863 if (mm_flags & AV_CPU_FLAG_SSE4) // not really sse4, just slow on Conroe |
2863 c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; | 2864 c->add_hfyu_left_prediction = ff_add_hfyu_left_prediction_sse4; |
2864 #endif | 2865 #endif |
2865 } | 2866 } |
2866 #endif | 2867 #endif |
2867 | 2868 |
2868 if(mm_flags & FF_MM_3DNOW){ | 2869 if(mm_flags & AV_CPU_FLAG_3DNOW){ |
2869 c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow; | 2870 c->vorbis_inverse_coupling = vorbis_inverse_coupling_3dnow; |
2870 c->vector_fmul = vector_fmul_3dnow; | 2871 c->vector_fmul = vector_fmul_3dnow; |
2871 if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 2872 if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
2872 c->float_to_int16 = float_to_int16_3dnow; | 2873 c->float_to_int16 = float_to_int16_3dnow; |
2873 c->float_to_int16_interleave = float_to_int16_interleave_3dnow; | 2874 c->float_to_int16_interleave = float_to_int16_interleave_3dnow; |
2874 } | 2875 } |
2875 } | 2876 } |
2876 if(mm_flags & FF_MM_3DNOWEXT){ | 2877 if(mm_flags & AV_CPU_FLAG_3DNOWEXT){ |
2877 c->vector_fmul_reverse = vector_fmul_reverse_3dnow2; | 2878 c->vector_fmul_reverse = vector_fmul_reverse_3dnow2; |
2878 c->vector_fmul_window = vector_fmul_window_3dnow2; | 2879 c->vector_fmul_window = vector_fmul_window_3dnow2; |
2879 if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ | 2880 if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ |
2880 c->float_to_int16_interleave = float_to_int16_interleave_3dn2; | 2881 c->float_to_int16_interleave = float_to_int16_interleave_3dn2; |
2881 } | 2882 } |
2882 } | 2883 } |
2883 if(mm_flags & FF_MM_MMX2){ | 2884 if(mm_flags & AV_CPU_FLAG_MMX2){ |
2884 #if HAVE_YASM | 2885 #if HAVE_YASM |
2885 c->scalarproduct_int16 = ff_scalarproduct_int16_mmx2; | 2886 c->scalarproduct_int16 = ff_scalarproduct_int16_mmx2; |
2886 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmx2; | 2887 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmx2; |
2887 #endif | 2888 #endif |
2888 } | 2889 } |
2889 if(mm_flags & FF_MM_SSE){ | 2890 if(mm_flags & AV_CPU_FLAG_SSE){ |
2890 c->vorbis_inverse_coupling = vorbis_inverse_coupling_sse; | 2891 c->vorbis_inverse_coupling = vorbis_inverse_coupling_sse; |
2891 c->ac3_downmix = ac3_downmix_sse; | 2892 c->ac3_downmix = ac3_downmix_sse; |
2892 c->vector_fmul = vector_fmul_sse; | 2893 c->vector_fmul = vector_fmul_sse; |
2893 c->vector_fmul_reverse = vector_fmul_reverse_sse; | 2894 c->vector_fmul_reverse = vector_fmul_reverse_sse; |
2894 c->vector_fmul_add = vector_fmul_add_sse; | 2895 c->vector_fmul_add = vector_fmul_add_sse; |
2899 c->float_to_int16_interleave = float_to_int16_interleave_sse; | 2900 c->float_to_int16_interleave = float_to_int16_interleave_sse; |
2900 #if HAVE_YASM | 2901 #if HAVE_YASM |
2901 c->scalarproduct_float = ff_scalarproduct_float_sse; | 2902 c->scalarproduct_float = ff_scalarproduct_float_sse; |
2902 #endif | 2903 #endif |
2903 } | 2904 } |
2904 if(mm_flags & FF_MM_3DNOW) | 2905 if(mm_flags & AV_CPU_FLAG_3DNOW) |
2905 c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse | 2906 c->vector_fmul_add = vector_fmul_add_3dnow; // faster than sse |
2906 if(mm_flags & FF_MM_SSE2){ | 2907 if(mm_flags & AV_CPU_FLAG_SSE2){ |
2907 c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; | 2908 c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_sse2; |
2908 c->float_to_int16 = float_to_int16_sse2; | 2909 c->float_to_int16 = float_to_int16_sse2; |
2909 c->float_to_int16_interleave = float_to_int16_interleave_sse2; | 2910 c->float_to_int16_interleave = float_to_int16_interleave_sse2; |
2910 #if HAVE_YASM | 2911 #if HAVE_YASM |
2911 c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; | 2912 c->scalarproduct_int16 = ff_scalarproduct_int16_sse2; |
2912 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; | 2913 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2; |
2913 #endif | 2914 #endif |
2914 } | 2915 } |
2915 if((mm_flags & FF_MM_SSSE3) && !(mm_flags & (FF_MM_SSE42|FF_MM_3DNOW)) && HAVE_YASM) // cachesplit | 2916 if((mm_flags & AV_CPU_FLAG_SSSE3) && !(mm_flags & (AV_CPU_FLAG_SSE42|AV_CPU_FLAG_3DNOW)) && HAVE_YASM) // cachesplit |
2916 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; | 2917 c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3; |
2917 } | 2918 } |
2918 | 2919 |
2919 if (CONFIG_ENCODERS) | 2920 if (CONFIG_ENCODERS) |
2920 dsputilenc_init_mmx(c, avctx); | 2921 dsputilenc_init_mmx(c, avctx); |