Re: [libav-devel] [PATCH] dsputil: remove butterflies_float_interleave.

2013-01-20 Thread Justin Ruggles
On 01/20/2013 05:12 PM, Ronald S. Bultje wrote:
> From: "Ronald S. Bultje" 
> 
> The function is unused.
> ---
>  libavcodec/dsputil.c | 13 -
>  libavcodec/dsputil.h | 17 -
>  libavcodec/x86/dsputil.asm   | 44 
> 
>  libavcodec/x86/dsputil_mmx.c |  7 ---
>  4 files changed, 81 deletions(-)

fine. I think it was used for twinvq before that was switched to planar.

-Justin

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] dsputil: remove butterflies_float_interleave.

2013-01-20 Thread Ronald S. Bultje
From: "Ronald S. Bultje" 

The function is unused.
---
 libavcodec/dsputil.c | 13 -
 libavcodec/dsputil.h | 17 -
 libavcodec/x86/dsputil.asm   | 44 
 libavcodec/x86/dsputil_mmx.c |  7 ---
 4 files changed, 81 deletions(-)

diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 6a0c4cf..3903eeb 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2364,18 +2364,6 @@ static void butterflies_float_c(float *restrict v1, 
float *restrict v2,
 }
 }
 
-static void butterflies_float_interleave_c(float *dst, const float *src0,
-   const float *src1, int len)
-{
-int i;
-for (i = 0; i < len; i++) {
-float f1 = src0[i];
-float f2 = src1[i];
-dst[2*i] = f1 + f2;
-dst[2*i + 1] = f1 - f2;
-}
-}
-
 float ff_scalarproduct_float_c(const float *v1, const float *v2, int len)
 {
 float p = 0.0;
@@ -2719,7 +2707,6 @@ av_cold void ff_dsputil_init(DSPContext* c, 
AVCodecContext *avctx)
 c->vector_clip_int32 = vector_clip_int32_c;
 c->scalarproduct_float = ff_scalarproduct_float_c;
 c->butterflies_float = butterflies_float_c;
-c->butterflies_float_interleave = butterflies_float_interleave_c;
 
 c->shrink[0]= av_image_copy_plane;
 c->shrink[1]= ff_shrink22;
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 7d2a332..5d49083 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -359,23 +359,6 @@ typedef struct DSPContext {
  */
 void (*butterflies_float)(float *restrict v1, float *restrict v2, int len);
 
-/**
- * Calculate the sum and difference of two vectors of floats and interleave
- * results into a separate output vector of floats, with each sum
- * positioned before the corresponding difference.
- *
- * @param dst  output vector
- * constraints: 16-byte aligned
- * @param src0 first input vector
- * constraints: 32-byte aligned
- * @param src1 second input vector
- * constraints: 32-byte aligned
- * @param len  number of elements in the input
- * constraints: multiple of 8
- */
-void (*butterflies_float_interleave)(float *dst, const float *src0,
- const float *src1, int len);
-
 /* (I)DCT */
 void (*fdct)(DCTELEM *block/* align 16*/);
 void (*fdct248)(DCTELEM *block/* align 16*/);
diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
index f22fb19..27e77d5 100644
--- a/libavcodec/x86/dsputil.asm
+++ b/libavcodec/x86/dsputil.asm
@@ -567,50 +567,6 @@ VECTOR_CLIP_INT32 11, 1, 1, 0
 VECTOR_CLIP_INT32 6, 1, 0, 0
 %endif
 
-;-
-; void ff_butterflies_float_interleave(float *dst, const float *src0,
-;  const float *src1, int len);
-;-
-
-%macro BUTTERFLIES_FLOAT_INTERLEAVE 0
-cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len
-%if ARCH_X86_64
-movsxdlenq, lend
-%endif
-test  lenq, lenq
-jz .end
-shl   lenq, 2
-lea  src0q, [src0q +   lenq]
-lea  src1q, [src1q +   lenq]
-lea   dstq, [ dstq + 2*lenq]
-neg   lenq
-.loop:
-movam0, [src0q + lenq]
-movam1, [src1q + lenq]
-subps   m2, m0, m1
-addps   m0, m0, m1
-unpcklpsm1, m0, m2
-unpckhpsm0, m0, m2
-%if cpuflag(avx)
-vextractf128 [dstq + 2*lenq ], m1, 0
-vextractf128 [dstq + 2*lenq + 16], m0, 0
-vextractf128 [dstq + 2*lenq + 32], m1, 1
-vextractf128 [dstq + 2*lenq + 48], m0, 1
-%else
-mova [dstq + 2*lenq ], m1
-mova [dstq + 2*lenq + mmsize], m0
-%endif
-add   lenq, mmsize
-jl .loop
-.end:
-REP_RET
-%endmacro
-
-INIT_XMM sse
-BUTTERFLIES_FLOAT_INTERLEAVE
-INIT_YMM avx
-BUTTERFLIES_FLOAT_INTERLEAVE
-
 ; %1 = aligned/unaligned
 %macro BSWAP_LOOPS  1
 mov  r3, r2
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index fb1a801..5ac18f3 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -1854,11 +1854,6 @@ void ff_vector_clip_int32_int_sse2(int32_t *dst, const 
int32_t *src,
 void ff_vector_clip_int32_sse4(int32_t *dst, const int32_t *src,
int32_t min, int32_t max, unsigned int len);
 
-extern void ff_butterflies_float_interleave_sse(float *dst, const float *src0,
-const float *src1, int len);
-extern void ff_butterflies_float_interleave_avx(float *dst, const float *src0,
-const float *src1, int len);
-
 #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX)  \
 do {