You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lossless audio dsp: unroll
The loops are guaranteed to be at least multiples of 8, so this unrolling is safe but allows exploiting execution ports. For int32 version: 68 -> 58c. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
bf29794022
commit
9ca16bdd3f
@@ -29,10 +29,12 @@ static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, const int16_t *v2,
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
while (order--) {
|
do {
|
||||||
res += *v1 * *v2++;
|
res += *v1 * *v2++;
|
||||||
*v1++ += mul * *v3++;
|
*v1++ += mul * *v3++;
|
||||||
}
|
res += *v1 * *v2++;
|
||||||
|
*v1++ += mul * *v3++;
|
||||||
|
} while (order-=2);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,10 +44,12 @@ static int32_t scalarproduct_and_madd_int32_c(int16_t *v1, const int32_t *v2,
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
while (order--) {
|
do {
|
||||||
res += *v1 * *v2++;
|
res += *v1 * *v2++;
|
||||||
*v1++ += mul * *v3++;
|
*v1++ += mul * *v3++;
|
||||||
}
|
res += *v1 * *v2++;
|
||||||
|
*v1++ += mul * *v3++;
|
||||||
|
} while (order-=2);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user