diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-05-12 02:38:56 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-05-31 12:07:11 +0200 |
commit | d0bf20a4f25ac5de021c860a0c8ad05638ee2078 (patch) | |
tree | ce14776b49b3ba74a37378d4dadea09ea12529d4 /libavutil | |
parent | eecd29b3fd7fee221580798346d6582b75c7ade4 (diff) | |
download | ffmpeg-d0bf20a4f25ac5de021c860a0c8ad05638ee2078.tar.gz |
ppc: vsx: Implement diff_pixels and get_pixels
Use a macro to abstract the endianness.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/ppc/util_altivec.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/ppc/util_altivec.h b/libavutil/ppc/util_altivec.h index 8b31327ef4..02cff186f9 100644 --- a/libavutil/ppc/util_altivec.h +++ b/libavutil/ppc/util_altivec.h @@ -111,4 +111,16 @@ static inline vec_u8 load_with_perm_vec(int offset, uint8_t *src, vec_u8 perm_ve #endif /* HAVE_ALTIVEC */ +#if HAVE_VSX +#if HAVE_BIGENDIAN +#define vsx_ld_u8_s16(off, p) \ + ((vec_s16)vec_mergeh((vec_u8)vec_splat_u8(0), \ + (vec_u8)vec_vsx_ld((off), (p)))) +#else +#define vsx_ld_u8_s16(off, p) \ + ((vec_s16)vec_mergeh((vec_u8)vec_vsx_ld((off), (p)), \ + (vec_u8)vec_splat_u8(0))) +#endif /* HAVE_BIGENDIAN */ +#endif /* HAVE_VSX */ + #endif /* AVUTIL_PPC_UTIL_ALTIVEC_H */ |