[FFmpeg-devel] [PATCH 2/2] lavc/lossless_audiodsp: revert various commits

Christophe Gisquet christophe.gisquet at gmail.com
Sat Feb 7 10:20:10 CET 2015


Their intent was to make the DSP work with wmalossless pro.
The later was fixed to work with the DSP.
---
 libavcodec/lossless_audiodsp.h          |  3 ++-
 libavcodec/x86/lossless_audiodsp_init.c | 26 ++------------------------
 2 files changed, 4 insertions(+), 25 deletions(-)

diff --git a/libavcodec/lossless_audiodsp.h b/libavcodec/lossless_audiodsp.h
index c3ee2be..9ce2e63 100644
--- a/libavcodec/lossless_audiodsp.h
+++ b/libavcodec/lossless_audiodsp.h
@@ -29,7 +29,8 @@ typedef struct LLAudDSPContext {
     /**
      * Calculate scalar product of v1 and v2,
      * and v1[i] += v3[i] * mul
-     * @param len length of vectors, should be multiple of 8
+     * @param len length of vectors, should be multiple of 16,
+     *            or padd v3 and v1 or v2 with zeros.
      */
     int32_t (*scalarproduct_and_madd_int16)(int16_t *v1 /* align 16 */,
                                             const int16_t *v2,
diff --git a/libavcodec/x86/lossless_audiodsp_init.c b/libavcodec/x86/lossless_audiodsp_init.c
index da1e9e8..197173c 100644
--- a/libavcodec/x86/lossless_audiodsp_init.c
+++ b/libavcodec/x86/lossless_audiodsp_init.c
@@ -31,28 +31,6 @@ int32_t ff_scalarproduct_and_madd_int16_ssse3(int16_t *v1, const int16_t *v2,
                                               const int16_t *v3,
                                               int order, int mul);
 
-#if HAVE_YASM
-static int32_t scalarproduct_and_madd_int16_sse2(int16_t *v1, const int16_t *v2,
-                                                 const int16_t *v3,
-                                                 int order, int mul)
-{
-    if (order & 8)
-        return ff_scalarproduct_and_madd_int16_mmxext(v1, v2, v3, order, mul);
-    else
-        return ff_scalarproduct_and_madd_int16_sse2(v1, v2, v3, order, mul);
-}
-
-static int32_t scalarproduct_and_madd_int16_ssse3(int16_t *v1, const int16_t *v2,
-                                                  const int16_t *v3,
-                                                  int order, int mul)
-{
-    if (order & 8)
-        return ff_scalarproduct_and_madd_int16_mmxext(v1, v2, v3, order, mul);
-    else
-        return ff_scalarproduct_and_madd_int16_ssse3(v1, v2, v3, order, mul);
-}
-#endif
-
 av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c)
 {
 #if HAVE_YASM
@@ -62,10 +40,10 @@ av_cold void ff_llauddsp_init_x86(LLAudDSPContext *c)
         c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmxext;
 
     if (EXTERNAL_SSE2(cpu_flags))
-        c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_sse2;
+        c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_sse2;
 
     if (EXTERNAL_SSSE3(cpu_flags) &&
         !(cpu_flags & (AV_CPU_FLAG_SSE42 | AV_CPU_FLAG_3DNOW))) // cachesplit
-        c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_ssse3;
+        c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_ssse3;
 #endif
 }
-- 
1.9.2.msysgit.0



More information about the ffmpeg-devel mailing list