aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-22 20:38:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-22 20:40:36 +0100
commit4327088da355509b9f97e4bdb658456ee56de72b (patch)
tree427b036667704cf182955f5e8b35f4bc80449654
parent2f6550bb9a8d71f56fefbdbf849f17de22b57e66 (diff)
downloadffmpeg-4327088da355509b9f97e4bdb658456ee56de72b.tar.gz
avcodec/x86/lossless_audiodsp: support len %16 == 8 in scalarproduct_and_madd_int16()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/lossless_audiodsp.h2
-rw-r--r--libavcodec/x86/lossless_audiodsp.asm6
2 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/lossless_audiodsp.h b/libavcodec/lossless_audiodsp.h
index 4c27502841..c3ee2bec54 100644
--- a/libavcodec/lossless_audiodsp.h
+++ b/libavcodec/lossless_audiodsp.h
@@ -29,7 +29,7 @@ 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 16
+ * @param len length of vectors, should be multiple of 8
*/
int32_t (*scalarproduct_and_madd_int16)(int16_t *v1 /* align 16 */,
const int16_t *v2,
diff --git a/libavcodec/x86/lossless_audiodsp.asm b/libavcodec/x86/lossless_audiodsp.asm
index 64b769f7d4..cc5e5e5fac 100644
--- a/libavcodec/x86/lossless_audiodsp.asm
+++ b/libavcodec/x86/lossless_audiodsp.asm
@@ -26,6 +26,10 @@ SECTION_TEXT
; int ff_scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3,
; int order, int mul)
cglobal scalarproduct_and_madd_int16, 4,4,8, v1, v2, v3, order, mul
+%if mmsize == 16
+ test orderq, 8
+ jnz scalarproduct_and_madd_int16_mmxext;
+%endif
shl orderq, 1
movd m7, mulm
%if mmsize == 16
@@ -117,6 +121,8 @@ align 16
; int order, int mul)
INIT_XMM ssse3
cglobal scalarproduct_and_madd_int16, 4,5,10, v1, v2, v3, order, mul
+ test orderq, 8
+ jnz scalarproduct_and_madd_int16_mmxext;
shl orderq, 1
movd m7, mulm
pshuflw m7, m7, 0