summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/ppc/h264chroma_init.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/ppc/h264chroma_init.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/ppc/h264chroma_init.c')
-rw-r--r--ffmpeg/libavcodec/ppc/h264chroma_init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ffmpeg/libavcodec/ppc/h264chroma_init.c b/ffmpeg/libavcodec/ppc/h264chroma_init.c
index f9e2a76..921f2de 100644
--- a/ffmpeg/libavcodec/ppc/h264chroma_init.c
+++ b/ffmpeg/libavcodec/ppc/h264chroma_init.c
@@ -20,15 +20,14 @@
#include "config.h"
#include "libavutil/attributes.h"
-#include "libavcodec/h264chroma.h"
-
-#if HAVE_ALTIVEC
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
+#include "libavcodec/h264chroma.h"
#include "dsputil_altivec.h"
+#if HAVE_ALTIVEC
#define PUT_OP_U8_ALTIVEC(d, s, dst) d = s
#define AVG_OP_U8_ALTIVEC(d, s, dst) d = vec_avg(dst, s)
@@ -54,11 +53,12 @@ av_cold void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth)
#if HAVE_ALTIVEC
const int high_bit_depth = bit_depth > 8;
- if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
+ if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
+ return;
+
if (!high_bit_depth) {
c->put_h264_chroma_pixels_tab[0] = put_h264_chroma_mc8_altivec;
c->avg_h264_chroma_pixels_tab[0] = avg_h264_chroma_mc8_altivec;
}
- }
#endif /* HAVE_ALTIVEC */
}