Skip to content

Commit 4a53af2

Browse files
committed
restored unnecessary shift of functions
1 parent e8a8b3c commit 4a53af2

File tree

1 file changed

+10
-10
lines changed
  • libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/Effects/eel2

1 file changed

+10
-10
lines changed

libjamesdsp/subtree/Main/libjamesdsp/jni/jamesdsp/jdsp/Effects/eel2/nseel-compiler.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,16 @@ static float NSEEL_CGEN_CALL arburgPredictBackward(float *blocks, float *start)
13661366
double output = predictArburg(backwardState, predictionCoefficients, *flag);
13671367
return (float)output;
13681368
}
1369+
static float NSEEL_CGEN_CALL arburgPredictForward(float *blocks, float *start)
1370+
{
1371+
int32_t offs = (int32_t)(*start + NSEEL_CLOSEFACTOR);
1372+
char *burg = (char*)__NSEEL_RAMAlloc(blocks, (uint64_t)offs);
1373+
unsigned int *flag = (unsigned int*)(burg + 1);
1374+
double *predictionCoefficients = (double*)(flag + 1);
1375+
double *forwardState = ((double*)(flag + 1)) + (*flag + 1) * 5 + (*flag + 2) * 2;
1376+
double output = predictArburg(forwardState, predictionCoefficients, *flag);
1377+
return (float)output;
1378+
}
13691379
void reverse(float *arr, int32_t start, int32_t end)
13701380
{
13711381
while (start < end)
@@ -1384,16 +1394,6 @@ void shift(float *arr, int32_t k, int32_t n)
13841394
reverse(arr, 0, n - k - 1);
13851395
reverse(arr, n - k, n - 1);
13861396
}
1387-
static float NSEEL_CGEN_CALL arburgPredictForward(float *blocks, float *start)
1388-
{
1389-
int32_t offs = (int32_t)(*start + NSEEL_CLOSEFACTOR);
1390-
char *burg = (char*)__NSEEL_RAMAlloc(blocks, (uint64_t)offs);
1391-
unsigned int *flag = (unsigned int*)(burg + 1);
1392-
double *predictionCoefficients = (double*)(flag + 1);
1393-
double *forwardState = ((double*)(flag + 1)) + (*flag + 1) * 5 + (*flag + 2) * 2;
1394-
double output = predictArburg(forwardState, predictionCoefficients, *flag);
1395-
return (float)output;
1396-
}
13971397
float * NSEEL_CGEN_CALL __NSEEL_circshift(float *blocks, float *offptr, float *shiftptr, float *lenptr)
13981398
{
13991399
uint32_t offs = (uint32_t)(*offptr + NSEEL_CLOSEFACTOR);

0 commit comments

Comments
 (0)