diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-04-14 14:47:30 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-04-30 12:19:45 +0200 |
commit | 38282149b6ce8f4b8361e3b84542ba9aa8a1f32f (patch) | |
tree | 028b5282288a6849233274851112fff4e2d0d25b /libavcodec/ppc/vp8dsp_altivec.c | |
parent | 42b9150b0d4f0a130c1d93dc991fd5412743a8cf (diff) | |
download | ffmpeg-38282149b6ce8f4b8361e3b84542ba9aa8a1f32f.tar.gz |
ppc: More consistent arch initialization
Diffstat (limited to 'libavcodec/ppc/vp8dsp_altivec.c')
-rw-r--r-- | libavcodec/ppc/vp8dsp_altivec.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 4336453f50..504139da97 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include "libavutil/cpu.h" #include "libavutil/mem.h" #include "libavutil/ppc/types_altivec.h" @@ -27,6 +28,7 @@ #include "libavcodec/vp8dsp.h" #include "dsputil_altivec.h" +#if HAVE_ALTIVEC #define REPT4(...) { __VA_ARGS__, __VA_ARGS__, __VA_ARGS__, __VA_ARGS__ } // h subpel filter uses msum to multiply+add 4 pixel taps at once @@ -272,8 +274,11 @@ static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t stride, uint8_t *sr ff_put_pixels16_altivec(dst, src, stride, h); } -av_cold void ff_vp8dsp_init_altivec(VP8DSPContext *c) +#endif /* HAVE_ALTIVEC */ + +av_cold void ff_vp8dsp_init_ppc(VP8DSPContext *c) { +#if HAVE_ALTIVEC if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; @@ -301,4 +306,5 @@ av_cold void ff_vp8dsp_init_altivec(VP8DSPContext *c) c->put_vp8_epel_pixels_tab[2][1][1] = put_vp8_epel4_h4v4_altivec; c->put_vp8_epel_pixels_tab[2][1][2] = put_vp8_epel4_h6v4_altivec; c->put_vp8_epel_pixels_tab[2][2][1] = put_vp8_epel4_h4v6_altivec; +#endif /* HAVE_ALTIVEC */ } |