Mercurial > libavcodec.hg
comparison x86/dsputil_mmx.c @ 8519:cc64e1343397 libavcodec
Use H264 MMX chroma functions to accelerate RV40 decoding.
Patch by Mathieu Velten (matmaul A gmail)
author | cehoyos |
---|---|
date | Sun, 04 Jan 2009 01:36:11 +0000 |
parents | cea216e44ee3 |
children | f8bf438c6000 |
comparison
equal
deleted
inserted
replaced
8518:f2c406b05158 | 8519:cc64e1343397 |
---|---|
1731 PREFETCH(prefetch_mmx2, prefetcht0) | 1731 PREFETCH(prefetch_mmx2, prefetcht0) |
1732 PREFETCH(prefetch_3dnow, prefetch) | 1732 PREFETCH(prefetch_3dnow, prefetch) |
1733 #undef PREFETCH | 1733 #undef PREFETCH |
1734 | 1734 |
1735 #include "h264dsp_mmx.c" | 1735 #include "h264dsp_mmx.c" |
1736 #include "rv40dsp_mmx.c" | |
1736 | 1737 |
1737 /* CAVS specific */ | 1738 /* CAVS specific */ |
1738 void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx); | 1739 void ff_cavsdsp_init_mmx2(DSPContext* c, AVCodecContext *avctx); |
1739 void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx); | 1740 void ff_cavsdsp_init_3dnow(DSPContext* c, AVCodecContext *avctx); |
1740 | 1741 |
2636 } | 2637 } |
2637 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; |
2638 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; |
2639 c->put_no_rnd_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_nornd; | 2640 c->put_no_rnd_h264_chroma_pixels_tab[0]= put_h264_chroma_mc8_mmx_nornd; |
2640 | 2641 |
2642 c->put_rv40_chroma_pixels_tab[0]= put_rv40_chroma_mc8_mmx; | |
2643 c->put_rv40_chroma_pixels_tab[1]= put_rv40_chroma_mc4_mmx; | |
2644 | |
2641 c->h264_idct_dc_add= | 2645 c->h264_idct_dc_add= |
2642 c->h264_idct_add= ff_h264_idct_add_mmx; | 2646 c->h264_idct_add= ff_h264_idct_add_mmx; |
2643 c->h264_idct8_dc_add= | 2647 c->h264_idct8_dc_add= |
2644 c->h264_idct8_add= ff_h264_idct8_add_mmx; | 2648 c->h264_idct8_add= ff_h264_idct8_add_mmx; |
2645 | 2649 |
2721 SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2); | 2725 SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2); |
2722 SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2); | 2726 SET_QPEL_FUNCS(put_2tap_qpel, 1, 8, mmx2); |
2723 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2); | 2727 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2); |
2724 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2); | 2728 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, mmx2); |
2725 | 2729 |
2730 c->avg_rv40_chroma_pixels_tab[0]= avg_rv40_chroma_mc8_mmx2; | |
2731 c->avg_rv40_chroma_pixels_tab[1]= avg_rv40_chroma_mc4_mmx2; | |
2732 | |
2726 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2_rnd; | 2733 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_mmx2_rnd; |
2727 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2; | 2734 c->avg_h264_chroma_pixels_tab[1]= avg_h264_chroma_mc4_mmx2; |
2728 c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2; | 2735 c->avg_h264_chroma_pixels_tab[2]= avg_h264_chroma_mc2_mmx2; |
2729 c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2; | 2736 c->put_h264_chroma_pixels_tab[2]= put_h264_chroma_mc2_mmx2; |
2730 c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_mmx2; | 2737 c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_mmx2; |
2805 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow); | 2812 SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, 3dnow); |
2806 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow); | 2813 SET_QPEL_FUNCS(avg_2tap_qpel, 1, 8, 3dnow); |
2807 | 2814 |
2808 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow_rnd; | 2815 c->avg_h264_chroma_pixels_tab[0]= avg_h264_chroma_mc8_3dnow_rnd; |
2809 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 | |
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; | |
2810 | 2820 |
2811 if (ENABLE_CAVS_DECODER) | 2821 if (ENABLE_CAVS_DECODER) |
2812 ff_cavsdsp_init_3dnow(c, avctx); | 2822 ff_cavsdsp_init_3dnow(c, avctx); |
2813 } | 2823 } |
2814 | 2824 |