Mercurial > libavcodec.hg
comparison ppc/h264_altivec.c @ 12473:06abedae2906 libavcodec
Merge has_altivec() function into mm_support(), remove it and use
mm_support() instead.
Reduce complexity and simplify pending move to libavutil.
author | stefano |
---|---|
date | Wed, 08 Sep 2010 10:02:40 +0000 |
parents | 3cd4cd0509cd |
children | 9fef0a8ddd63 |
comparison
equal
deleted
inserted
replaced
12472:9c9be94124f8 | 12473:06abedae2906 |
---|---|
967 H264_WEIGHT( 8, 8) | 967 H264_WEIGHT( 8, 8) |
968 H264_WEIGHT( 8, 4) | 968 H264_WEIGHT( 8, 4) |
969 | 969 |
970 void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) { | 970 void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx) { |
971 | 971 |
972 if (has_altivec()) { | 972 if (mm_support() & AV_CPU_FLAG_ALTIVEC) { |
973 c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec; | 973 c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec; |
974 c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec; | 974 c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec; |
975 c->put_no_rnd_vc1_chroma_pixels_tab[0] = put_no_rnd_vc1_chroma_mc8_altivec; | 975 c->put_no_rnd_vc1_chroma_pixels_tab[0] = put_no_rnd_vc1_chroma_mc8_altivec; |
976 c->avg_no_rnd_vc1_chroma_pixels_tab[0] = avg_no_rnd_vc1_chroma_mc8_altivec; | 976 c->avg_no_rnd_vc1_chroma_pixels_tab[0] = avg_no_rnd_vc1_chroma_mc8_altivec; |
977 | 977 |
999 } | 999 } |
1000 } | 1000 } |
1001 | 1001 |
1002 void ff_h264dsp_init_ppc(H264DSPContext *c) | 1002 void ff_h264dsp_init_ppc(H264DSPContext *c) |
1003 { | 1003 { |
1004 if (has_altivec()) { | 1004 if (mm_support() & AV_CPU_FLAG_ALTIVEC) { |
1005 c->h264_idct_add = ff_h264_idct_add_altivec; | 1005 c->h264_idct_add = ff_h264_idct_add_altivec; |
1006 c->h264_idct_add8 = ff_h264_idct_add8_altivec; | 1006 c->h264_idct_add8 = ff_h264_idct_add8_altivec; |
1007 c->h264_idct_add16 = ff_h264_idct_add16_altivec; | 1007 c->h264_idct_add16 = ff_h264_idct_add16_altivec; |
1008 c->h264_idct_add16intra = ff_h264_idct_add16intra_altivec; | 1008 c->h264_idct_add16intra = ff_h264_idct_add16intra_altivec; |
1009 c->h264_idct_dc_add= h264_idct_dc_add_altivec; | 1009 c->h264_idct_dc_add= h264_idct_dc_add_altivec; |