Commit 4327088d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/x86/lossless_audiodsp: support len %16 == 8 in scalarproduct_and_madd_int16()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2f6550bb
...@@ -29,7 +29,7 @@ typedef struct LLAudDSPContext { ...@@ -29,7 +29,7 @@ typedef struct LLAudDSPContext {
/** /**
* Calculate scalar product of v1 and v2, * Calculate scalar product of v1 and v2,
* and v1[i] += v3[i] * mul * 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 */, int32_t (*scalarproduct_and_madd_int16)(int16_t *v1 /* align 16 */,
const int16_t *v2, const int16_t *v2,
......
...@@ -26,6 +26,10 @@ SECTION_TEXT ...@@ -26,6 +26,10 @@ SECTION_TEXT
; int ff_scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3, ; int ff_scalarproduct_and_madd_int16(int16_t *v1, int16_t *v2, int16_t *v3,
; int order, int mul) ; int order, int mul)
cglobal scalarproduct_and_madd_int16, 4,4,8, v1, v2, v3, order, 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 shl orderq, 1
movd m7, mulm movd m7, mulm
%if mmsize == 16 %if mmsize == 16
...@@ -117,6 +121,8 @@ align 16 ...@@ -117,6 +121,8 @@ align 16
; int order, int mul) ; int order, int mul)
INIT_XMM ssse3 INIT_XMM ssse3
cglobal scalarproduct_and_madd_int16, 4,5,10, v1, v2, v3, order, mul 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 shl orderq, 1
movd m7, mulm movd m7, mulm
pshuflw m7, m7, 0 pshuflw m7, m7, 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment