- reference source code for EVS codec

This commit is contained in:
2018-11-30 13:09:22 +02:00
parent 8c16c048dc
commit 94465da48e
422 changed files with 288315 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
/*====================================================================================
EVS Codec 3GPP TS26.442 Apr 03, 2018. Version 12.11.0 / 13.6.0 / 14.2.0
====================================================================================*/
#include "options.h" /* Compilation switches */
#include "stl.h"
#include "prot_fx.h" /* Function prototypes */
/*--------------------------------------------------------------------------*
* reordvct()
*
* Rearrange a vector in decreasing order
*--------------------------------------------------------------------------*/
void reordvct_fx(
Word16 *y, /* i/o: vector to rearrange */
const Word16 N, /* i : dimensions */
Word16 *idx /* o : reordered vector index */
)
{
Word16 i, j, k, n, im, temp;
n = sub(N, 1);
move16();
FOR (i=0; i<n; i++)
{
im = i;
move16();
k = add(i, 1);
move16();
FOR (j=k; j<N; j++)
{
if ( sub(y[im], y[j]) < 0 )
{
im = j;
move16();
}
}
temp = y[i];
move16();
y[i] = y[im];
move16();
y[im] = temp;
move16();
j = idx[i];
move16();
idx[i] = idx[im];
move16();
idx[im] = j;
move16();
}
return;
}