Revision 12802ec0 libavcodec/x86/vc1dsp_mmx.c
libavcodec/x86/vc1dsp_mmx.c | ||
---|---|---|
28 | 28 |
#include "libavutil/x86_cpu.h" |
29 | 29 |
#include "libavcodec/dsputil.h" |
30 | 30 |
#include "dsputil_mmx.h" |
31 |
#include "libavcodec/vc1dsp.h" |
|
31 | 32 |
|
32 | 33 |
#define OP_PUT(S,D) |
33 | 34 |
#define OP_AVG(S,D) "pavgb " #S ", " #D " \n\t" |
... | ... | |
712 | 713 |
ff_vc1_h_loop_filter8_sse4(src, stride, pq); |
713 | 714 |
ff_vc1_h_loop_filter8_sse4(src+8*stride, stride, pq); |
714 | 715 |
} |
716 |
|
|
715 | 717 |
#endif |
716 | 718 |
|
717 |
void ff_vc1dsp_init_mmx(DSPContext* dsp, AVCodecContext *avctx) { |
|
719 |
void ff_put_vc1_chroma_mc8_mmx_nornd (uint8_t *dst, uint8_t *src, |
|
720 |
int stride, int h, int x, int y); |
|
721 |
void ff_avg_vc1_chroma_mc8_mmx2_nornd (uint8_t *dst, uint8_t *src, |
|
722 |
int stride, int h, int x, int y); |
|
723 |
void ff_avg_vc1_chroma_mc8_3dnow_nornd(uint8_t *dst, uint8_t *src, |
|
724 |
int stride, int h, int x, int y); |
|
725 |
void ff_put_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src, |
|
726 |
int stride, int h, int x, int y); |
|
727 |
void ff_avg_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src, |
|
728 |
int stride, int h, int x, int y); |
|
729 |
|
|
730 |
void ff_vc1dsp_init_mmx(VC1DSPContext *dsp) |
|
731 |
{ |
|
718 | 732 |
int mm_flags = av_get_cpu_flags(); |
719 | 733 |
|
720 |
dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx; |
|
721 |
dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx; |
|
722 |
dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_mmx; |
|
723 |
dsp->put_vc1_mspel_pixels_tab[12] = put_vc1_mspel_mc03_mmx; |
|
724 |
|
|
725 |
dsp->put_vc1_mspel_pixels_tab[ 1] = put_vc1_mspel_mc10_mmx; |
|
726 |
dsp->put_vc1_mspel_pixels_tab[ 5] = put_vc1_mspel_mc11_mmx; |
|
727 |
dsp->put_vc1_mspel_pixels_tab[ 9] = put_vc1_mspel_mc12_mmx; |
|
728 |
dsp->put_vc1_mspel_pixels_tab[13] = put_vc1_mspel_mc13_mmx; |
|
729 |
|
|
730 |
dsp->put_vc1_mspel_pixels_tab[ 2] = put_vc1_mspel_mc20_mmx; |
|
731 |
dsp->put_vc1_mspel_pixels_tab[ 6] = put_vc1_mspel_mc21_mmx; |
|
732 |
dsp->put_vc1_mspel_pixels_tab[10] = put_vc1_mspel_mc22_mmx; |
|
733 |
dsp->put_vc1_mspel_pixels_tab[14] = put_vc1_mspel_mc23_mmx; |
|
734 |
|
|
735 |
dsp->put_vc1_mspel_pixels_tab[ 3] = put_vc1_mspel_mc30_mmx; |
|
736 |
dsp->put_vc1_mspel_pixels_tab[ 7] = put_vc1_mspel_mc31_mmx; |
|
737 |
dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_mmx; |
|
738 |
dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_mmx; |
|
734 |
if (mm_flags & AV_CPU_FLAG_MMX) { |
|
735 |
dsp->put_vc1_mspel_pixels_tab[ 0] = ff_put_vc1_mspel_mc00_mmx; |
|
736 |
dsp->put_vc1_mspel_pixels_tab[ 4] = put_vc1_mspel_mc01_mmx; |
|
737 |
dsp->put_vc1_mspel_pixels_tab[ 8] = put_vc1_mspel_mc02_mmx; |
|
738 |
dsp->put_vc1_mspel_pixels_tab[12] = put_vc1_mspel_mc03_mmx; |
|
739 |
|
|
740 |
dsp->put_vc1_mspel_pixels_tab[ 1] = put_vc1_mspel_mc10_mmx; |
|
741 |
dsp->put_vc1_mspel_pixels_tab[ 5] = put_vc1_mspel_mc11_mmx; |
|
742 |
dsp->put_vc1_mspel_pixels_tab[ 9] = put_vc1_mspel_mc12_mmx; |
|
743 |
dsp->put_vc1_mspel_pixels_tab[13] = put_vc1_mspel_mc13_mmx; |
|
744 |
|
|
745 |
dsp->put_vc1_mspel_pixels_tab[ 2] = put_vc1_mspel_mc20_mmx; |
|
746 |
dsp->put_vc1_mspel_pixels_tab[ 6] = put_vc1_mspel_mc21_mmx; |
|
747 |
dsp->put_vc1_mspel_pixels_tab[10] = put_vc1_mspel_mc22_mmx; |
|
748 |
dsp->put_vc1_mspel_pixels_tab[14] = put_vc1_mspel_mc23_mmx; |
|
749 |
|
|
750 |
dsp->put_vc1_mspel_pixels_tab[ 3] = put_vc1_mspel_mc30_mmx; |
|
751 |
dsp->put_vc1_mspel_pixels_tab[ 7] = put_vc1_mspel_mc31_mmx; |
|
752 |
dsp->put_vc1_mspel_pixels_tab[11] = put_vc1_mspel_mc32_mmx; |
|
753 |
dsp->put_vc1_mspel_pixels_tab[15] = put_vc1_mspel_mc33_mmx; |
|
754 |
} |
|
739 | 755 |
|
740 | 756 |
if (mm_flags & AV_CPU_FLAG_MMX2){ |
741 | 757 |
dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmx2; |
... | ... | |
775 | 791 |
#if HAVE_YASM |
776 | 792 |
if (mm_flags & AV_CPU_FLAG_MMX) { |
777 | 793 |
ASSIGN_LF(mmx); |
794 |
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_mmx_nornd; |
|
778 | 795 |
} |
779 | 796 |
return; |
780 | 797 |
if (mm_flags & AV_CPU_FLAG_MMX2) { |
781 | 798 |
ASSIGN_LF(mmx2); |
799 |
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_mmx2_nornd; |
|
800 |
} else if (mm_flags & AV_CPU_FLAG_3DNOW) { |
|
801 |
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_3dnow_nornd; |
|
782 | 802 |
} |
803 |
|
|
783 | 804 |
if (mm_flags & AV_CPU_FLAG_SSE2) { |
784 | 805 |
dsp->vc1_v_loop_filter8 = ff_vc1_v_loop_filter8_sse2; |
785 | 806 |
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse2; |
... | ... | |
788 | 809 |
} |
789 | 810 |
if (mm_flags & AV_CPU_FLAG_SSSE3) { |
790 | 811 |
ASSIGN_LF(ssse3); |
812 |
dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_ssse3_nornd; |
|
813 |
dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_ssse3_nornd; |
|
791 | 814 |
} |
792 | 815 |
if (mm_flags & AV_CPU_FLAG_SSE4) { |
793 | 816 |
dsp->vc1_h_loop_filter8 = ff_vc1_h_loop_filter8_sse4; |
Also available in: Unified diff