summaryrefslogtreecommitdiff
path: root/libavcodec/ppc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-28 23:56:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-28 23:58:29 +0100
commit5c17377e28e818d3074a608d42821d66f1d26e8d (patch)
tree20d4cdffb7b87b8122e0e0a9ceb6b2089d75da53 /libavcodec/ppc
parente82b0e612607d652c1519ee31d30272113775679 (diff)
parentd74a8cb7e42f703be5796eeb485f06af710ae8ca (diff)
Merge commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca'
* commit 'd74a8cb7e42f703be5796eeb485f06af710ae8ca': fmtconvert: drop unused functions Conflicts: libavcodec/arm/fmtconvert_vfp_armv6.S libavcodec/x86/fmtconvert.asm libavcodec/x86/fmtconvert_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r--libavcodec/ppc/fmtconvert_altivec.c111
1 files changed, 0 insertions, 111 deletions
diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c
index 10a7169d1b..7323eff0bd 100644
--- a/libavcodec/ppc/fmtconvert_altivec.c
+++ b/libavcodec/ppc/fmtconvert_altivec.c
@@ -52,113 +52,6 @@ static void int32_to_float_fmul_scalar_altivec(float *dst, const int32_t *src,
}
}
-
-static vector signed short float_to_int16_one_altivec(const float *src)
-{
- vector float s0 = vec_ld(0, src);
- vector float s1 = vec_ld(16, src);
- vector signed int t0 = vec_cts(s0, 0);
- vector signed int t1 = vec_cts(s1, 0);
- return vec_packs(t0,t1);
-}
-
-static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
-{
- int i;
- vector signed short d0, d1, d;
- vector unsigned char align;
- if (((long)dst) & 15) { //FIXME
- for (i = 0; i < len - 7; i += 8) {
- d0 = vec_ld(0, dst+i);
- d = float_to_int16_one_altivec(src + i);
- d1 = vec_ld(15, dst+i);
- d1 = vec_perm(d1, d0, vec_lvsl(0, dst + i));
- align = vec_lvsr(0, dst + i);
- d0 = vec_perm(d1, d, align);
- d1 = vec_perm(d, d1, align);
- vec_st(d0, 0, dst + i);
- vec_st(d1, 15, dst + i);
- }
- } else {
- for (i = 0; i < len - 7; i += 8) {
- d = float_to_int16_one_altivec(src + i);
- vec_st(d, 0, dst + i);
- }
- }
-}
-
-#define VSTE_INC(dst, v, elem, inc) do { \
- vector signed short s = vec_splat(v, elem); \
- vec_ste(s, 0, dst); \
- dst += inc; \
- } while (0)
-
-static void float_to_int16_stride_altivec(int16_t *dst, const float *src,
- long len, int stride)
-{
- int i;
- vector signed short d;
-
- for (i = 0; i < len - 7; i += 8) {
- d = float_to_int16_one_altivec(src + i);
- VSTE_INC(dst, d, 0, stride);
- VSTE_INC(dst, d, 1, stride);
- VSTE_INC(dst, d, 2, stride);
- VSTE_INC(dst, d, 3, stride);
- VSTE_INC(dst, d, 4, stride);
- VSTE_INC(dst, d, 5, stride);
- VSTE_INC(dst, d, 6, stride);
- VSTE_INC(dst, d, 7, stride);
- }
-}
-
-static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
- long len, int channels)
-{
- int i;
- vector signed short d0, d1, d2, c0, c1, t0, t1;
- vector unsigned char align;
-
- if (channels == 1)
- float_to_int16_altivec(dst, src[0], len);
- else {
- if (channels == 2) {
- if (((long)dst) & 15) {
- for (i = 0; i < len - 7; i += 8) {
- d0 = vec_ld(0, dst + i);
- t0 = float_to_int16_one_altivec(src[0] + i);
- d1 = vec_ld(31, dst + i);
- t1 = float_to_int16_one_altivec(src[1] + i);
- c0 = vec_mergeh(t0, t1);
- c1 = vec_mergel(t0, t1);
- d2 = vec_perm(d1, d0, vec_lvsl(0, dst + i));
- align = vec_lvsr(0, dst + i);
- d0 = vec_perm(d2, c0, align);
- d1 = vec_perm(c0, c1, align);
- vec_st(d0, 0, dst + i);
- d0 = vec_perm(c1, d2, align);
- vec_st(d1, 15, dst + i);
- vec_st(d0, 31, dst + i);
- dst += 8;
- }
- } else {
- for (i = 0; i < len - 7; i += 8) {
- t0 = float_to_int16_one_altivec(src[0] + i);
- t1 = float_to_int16_one_altivec(src[1] + i);
- d0 = vec_mergeh(t0, t1);
- d1 = vec_mergel(t0, t1);
- vec_st(d0, 0, dst + i);
- vec_st(d1, 16, dst + i);
- dst += 8;
- }
- }
- } else {
- for (i = 0; i < channels; i++)
- float_to_int16_stride_altivec(dst + i, src[i], len, channels);
- }
- }
-}
-
#endif /* HAVE_ALTIVEC */
av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c,
@@ -169,9 +62,5 @@ av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c,
return;
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec;
- if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
- c->float_to_int16 = float_to_int16_altivec;
- c->float_to_int16_interleave = float_to_int16_interleave_altivec;
- }
#endif /* HAVE_ALTIVEC */
}