diff --git a/build_linux.py b/build_linux.py index 840949a0..65a2a11c 100755 --- a/build_linux.py +++ b/build_linux.py @@ -19,7 +19,7 @@ def make_build() -> Path: os.mkdir(DIR_BUILD) os.chdir(DIR_BUILD) - cmd = f'cmake ../src' + cmd = f'cmake ../src -G Ninja' retcode = os.system(cmd) if retcode != 0: raise RuntimeError('Problem when configuring the project') @@ -34,4 +34,4 @@ def make_build() -> Path: if __name__ == '__main__': p = make_build() - print (f'Built: {p}') \ No newline at end of file + print (f'Built: {p}') diff --git a/src/libs/libg729/acelp_ca.c b/src/libs/libg729/acelp_ca.c deleted file mode 100644 index e340ca32..00000000 --- a/src/libs/libg729/acelp_ca.c +++ /dev/null @@ -1,991 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*---------------------------------------------------------------------------* - * Function ACELP_Code_A() * - * ~~~~~~~~~~~~~~~~~~~~~~~~ * - * Find Algebraic codebook for G.729A * - *--------------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" - -/* Constants defined in ld8a.h */ -/* L_SUBFR -> Lenght of subframe. */ -/* NB_POS -> Number of positions for each pulse. */ -/* STEP -> Step betweem position of the same pulse. */ -/* MSIZE -> Size of vectors for cross-correlation between two pulses. */ - - -/* local routines definition */ - -void Cor_h (Word16 * H, /* (i) Q12 :Impulse response of filters */ - Word16 * rr /* (o) :Correlations of H[] */ -); -Word16 D4i40_17_fast ( /*(o) : Index of pulses positions. */ - Word16 dn[], /* (i) : Correlations between h[] and Xn[]. */ - Word16 * rr, /* (i) : Correlations of impulse response h[]. */ - Word16 h[], /* (i) Q12: Impulse response of filters. */ - Word16 cod[], /* (o) Q13: Selected algebraic codeword. */ - Word16 y[], /* (o) Q12: Filtered algebraic codeword. */ - Word16 * sign /* (o) : Signs of 4 pulses. */ - ); - - /*-----------------------------------------------------------------* - * Main ACELP function. * - *-----------------------------------------------------------------*/ - -Word16 -ACELP_Code_A ( /* (o) :index of pulses positions */ - Word16 x[], /* (i) :Target vector */ - Word16 h[], /* (i) Q12 :Inpulse response of filters */ - Word16 T0, /* (i) :Pitch lag */ - Word16 pitch_sharp, /* (i) Q14 :Last quantized pitch gain */ - Word16 code[], /* (o) Q13 :Innovative codebook */ - Word16 y[], /* (o) Q12 :Filtered innovative codebook */ - Word16 * sign /* (o) :Signs of 4 pulses */ - ) -{ - Word16 i, index, sharp; - Word16 Dn[L_SUBFR]; - Word16 rr[DIM_RR]; - - /*-----------------------------------------------------------------* - * Include fixed-gain pitch contribution into impulse resp. h[] * - * Find correlations of h[] needed for the codebook search. * - *-----------------------------------------------------------------*/ - - sharp = shl (pitch_sharp, 1); /* From Q14 to Q15 */ - if (T0 < L_SUBFR) - for (i = T0; i < L_SUBFR; i++) /* h[i] += pitch_sharp*h[i-T0] */ - h[i] = add (h[i], mult (h[i - T0], sharp)); - - Cor_h (h, rr); - - /*-----------------------------------------------------------------* - * Compute correlation of target vector with impulse response. * - *-----------------------------------------------------------------*/ - - Cor_h_X (h, x, Dn); - - /*-----------------------------------------------------------------* - * Find innovative codebook. * - *-----------------------------------------------------------------*/ - - index = D4i40_17_fast (Dn, rr, h, code, y, sign); - - /*-----------------------------------------------------------------* - * Compute innovation vector gain. * - * Include fixed-gain pitch contribution into code[]. * - *-----------------------------------------------------------------*/ - - if (T0 < L_SUBFR) - for (i = T0; i < L_SUBFR; i++) /* code[i] += pitch_sharp*code[i-T0] */ - code[i] = add (code[i], mult (code[i - T0], sharp)); - - return index; -} - - - -/*--------------------------------------------------------------------------* - * Function Cor_h() * - * ~~~~~~~~~~~~~~~~~ * - * Compute correlations of h[] needed for the codebook search. * - *--------------------------------------------------------------------------*/ - -void -Cor_h (Word16 * H, /* (i) Q12 :Impulse response of filters */ - Word16 * rr /* (o) :Correlations of H[] */ - ) -{ - Word16 *rri0i0, *rri1i1, *rri2i2, *rri3i3, *rri4i4; - Word16 *rri0i1, *rri0i2, *rri0i3, *rri0i4; - Word16 *rri1i2, *rri1i3, *rri1i4; - Word16 *rri2i3, *rri2i4; - - Word16 *p0, *p1, *p2, *p3, *p4; - - Word16 *ptr_hd, *ptr_hf, *ptr_h1, *ptr_h2; - Word32 cor; - Word16 i, k, ldec, l_fin_sup, l_fin_inf; - Word16 h[L_SUBFR]; - - /* Scaling h[] for maximum precision */ - - cor = 0; - for (i = 0; i < L_SUBFR; i++) - cor = L_mac (cor, H[i], H[i]); - - if (sub (extract_h (cor), 32000) > 0) { - for (i = 0; i < L_SUBFR; i++) { - h[i] = shr (H[i], 1); - } - } - else { - k = norm_l (cor); - k = shr (k, 1); - - for (i = 0; i < L_SUBFR; i++) { - h[i] = shl (H[i], k); - } - } - - - - /*------------------------------------------------------------* - * Compute rri0i0[], rri1i1[], rri2i2[], rri3i3 and rri4i4[] * - *------------------------------------------------------------*/ - /* Init pointers */ - rri0i0 = rr; - rri1i1 = rri0i0 + NB_POS; - rri2i2 = rri1i1 + NB_POS; - rri3i3 = rri2i2 + NB_POS; - rri4i4 = rri3i3 + NB_POS; - rri0i1 = rri4i4 + NB_POS; - rri0i2 = rri0i1 + MSIZE; - rri0i3 = rri0i2 + MSIZE; - rri0i4 = rri0i3 + MSIZE; - rri1i2 = rri0i4 + MSIZE; - rri1i3 = rri1i2 + MSIZE; - rri1i4 = rri1i3 + MSIZE; - rri2i3 = rri1i4 + MSIZE; - rri2i4 = rri2i3 + MSIZE; - - p0 = rri0i0 + NB_POS - 1; /* Init pointers to last position of rrixix[] */ - p1 = rri1i1 + NB_POS - 1; - p2 = rri2i2 + NB_POS - 1; - p3 = rri3i3 + NB_POS - 1; - p4 = rri4i4 + NB_POS - 1; - - ptr_h1 = h; - cor = 0; - for (i = 0; i < NB_POS; i++) { - cor = L_mac (cor, *ptr_h1, *ptr_h1); - ptr_h1++; - *p4-- = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h1); - ptr_h1++; - *p3-- = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h1); - ptr_h1++; - *p2-- = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h1); - ptr_h1++; - *p1-- = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h1); - ptr_h1++; - *p0-- = extract_h (cor); - } - - /*-----------------------------------------------------------------* - * Compute elements of: rri2i3[], rri1i2[], rri0i1[] and rri0i4[] * - *-----------------------------------------------------------------*/ - - l_fin_sup = MSIZE - 1; - l_fin_inf = l_fin_sup - (Word16) 1; - ldec = NB_POS + 1; - - ptr_hd = h; - ptr_hf = ptr_hd + 1; - - for (k = 0; k < NB_POS; k++) { - - p3 = rri2i3 + l_fin_sup; - p2 = rri1i2 + l_fin_sup; - p1 = rri0i1 + l_fin_sup; - p0 = rri0i4 + l_fin_inf; - - cor = 0; - ptr_h1 = ptr_hd; - ptr_h2 = ptr_hf; - - for (i = k + (Word16) 1; i < NB_POS; i++) { - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p1 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p0 = extract_h (cor); - - p3 -= ldec; - p2 -= ldec; - p1 -= ldec; - p0 -= ldec; - } - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p1 = extract_h (cor); - - l_fin_sup -= NB_POS; - l_fin_inf--; - ptr_hf += STEP; - } - - /*---------------------------------------------------------------------* - * Compute elements of: rri2i4[], rri1i3[], rri0i2[], rri1i4[], rri0i3 * - *---------------------------------------------------------------------*/ - - ptr_hd = h; - ptr_hf = ptr_hd + 2; - l_fin_sup = MSIZE - 1; - l_fin_inf = l_fin_sup - (Word16) 1; - for (k = 0; k < NB_POS; k++) { - - p4 = rri2i4 + l_fin_sup; - p3 = rri1i3 + l_fin_sup; - p2 = rri0i2 + l_fin_sup; - p1 = rri1i4 + l_fin_inf; - p0 = rri0i3 + l_fin_inf; - - cor = 0; - ptr_h1 = ptr_hd; - ptr_h2 = ptr_hf; - for (i = k + (Word16) 1; i < NB_POS; i++) { - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p4 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p1 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p0 = extract_h (cor); - - p4 -= ldec; - p3 -= ldec; - p2 -= ldec; - p1 -= ldec; - p0 -= ldec; - } - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p4 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - - l_fin_sup -= NB_POS; - l_fin_inf--; - ptr_hf += STEP; - } - - /*----------------------------------------------------------------------* - * Compute elements of: rri1i4[], rri0i3[], rri2i4[], rri1i3[], rri0i2 * - *----------------------------------------------------------------------*/ - - ptr_hd = h; - ptr_hf = ptr_hd + 3; - l_fin_sup = MSIZE - 1; - l_fin_inf = l_fin_sup - (Word16) 1; - for (k = 0; k < NB_POS; k++) { - - p4 = rri1i4 + l_fin_sup; - p3 = rri0i3 + l_fin_sup; - p2 = rri2i4 + l_fin_inf; - p1 = rri1i3 + l_fin_inf; - p0 = rri0i2 + l_fin_inf; - - ptr_h1 = ptr_hd; - ptr_h2 = ptr_hf; - cor = 0; - for (i = k + (Word16) 1; i < NB_POS; i++) { - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p4 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p1 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p0 = extract_h (cor); - - p4 -= ldec; - p3 -= ldec; - p2 -= ldec; - p1 -= ldec; - p0 -= ldec; - } - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p4 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - l_fin_sup -= NB_POS; - l_fin_inf--; - ptr_hf += STEP; - } - - /*----------------------------------------------------------------------* - * Compute elements of: rri0i4[], rri2i3[], rri1i2[], rri0i1[] * - *----------------------------------------------------------------------*/ - - ptr_hd = h; - ptr_hf = ptr_hd + 4; - l_fin_sup = MSIZE - 1; - l_fin_inf = l_fin_sup - (Word16) 1; - for (k = 0; k < NB_POS; k++) { - - p3 = rri0i4 + l_fin_sup; - p2 = rri2i3 + l_fin_inf; - p1 = rri1i2 + l_fin_inf; - p0 = rri0i1 + l_fin_inf; - - ptr_h1 = ptr_hd; - ptr_h2 = ptr_hf; - cor = 0; - for (i = k + (Word16) 1; i < NB_POS; i++) { - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p2 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p1 = extract_h (cor); - - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p0 = extract_h (cor); - - p3 -= ldec; - p2 -= ldec; - p1 -= ldec; - p0 -= ldec; - } - cor = L_mac (cor, *ptr_h1, *ptr_h2); - ptr_h1++; - ptr_h2++; - *p3 = extract_h (cor); - - l_fin_sup -= NB_POS; - l_fin_inf--; - ptr_hf += STEP; - } - return; -} - - - -/*------------------------------------------------------------------------* - * Function D4i40_17_fast() * - * ~~~~~~~~~ * - * Algebraic codebook for ITU 8kb/s. * - * -> 17 bits; 4 pulses in a frame of 40 samples * - * * - *------------------------------------------------------------------------* - * The code length is 40, containing 4 nonzero pulses i0, i1, i2, i3. * - * Each pulses can have 8 possible positions (positive or negative) * - * except i3 that have 16 possible positions. * - * * - * i0 (+-1) : 0, 5, 10, 15, 20, 25, 30, 35 * - * i1 (+-1) : 1, 6, 11, 16, 21, 26, 31, 36 * - * i2 (+-1) : 2, 7, 12, 17, 22, 27, 32, 37 * - * i3 (+-1) : 3, 8, 13, 18, 23, 28, 33, 38 * - * 4, 9, 14, 19, 24, 29, 34, 39 * - *------------------------------------------------------------------------*/ - -Word16 -D4i40_17_fast ( /*(o) : Index of pulses positions. */ - Word16 dn[], /* (i) : Correlations between h[] and Xn[]. */ - Word16 rr[], /* (i) : Correlations of impulse response h[]. */ - Word16 h[], /* (i) Q12: Impulse response of filters. */ - Word16 cod[], /* (o) Q13: Selected algebraic codeword. */ - Word16 y[], /* (o) Q12: Filtered algebraic codeword. */ - Word16 * sign /* (o) : Signs of 4 pulses. */ - ) -{ - Word16 i0, i1, i2, i3, ip0, ip1, ip2, ip3; - Word16 i, j, ix, iy, track, trk, max; - Word16 prev_i0, i1_offset; - Word16 psk, ps, ps0, ps1, ps2, sq, sq2; - Word16 alpk, alp, alp_16; - Word32 s, alp0, alp1, alp2; - Word16 *p0, *p1, *p2, *p3, *p4; - Word16 sign_dn[L_SUBFR], sign_dn_inv[L_SUBFR], *psign; - Word16 tmp_vect[NB_POS]; - Word16 *rri0i0, *rri1i1, *rri2i2, *rri3i3, *rri4i4; - Word16 *rri0i1, *rri0i2, *rri0i3, *rri0i4; - Word16 *rri1i2, *rri1i3, *rri1i4; - Word16 *rri2i3, *rri2i4; - - Word16 *ptr_rri0i3_i4; - Word16 *ptr_rri1i3_i4; - Word16 *ptr_rri2i3_i4; - Word16 *ptr_rri3i3_i4; - - /* Init pointers */ - rri0i0 = rr; - rri1i1 = rri0i0 + NB_POS; - rri2i2 = rri1i1 + NB_POS; - rri3i3 = rri2i2 + NB_POS; - rri4i4 = rri3i3 + NB_POS; - rri0i1 = rri4i4 + NB_POS; - rri0i2 = rri0i1 + MSIZE; - rri0i3 = rri0i2 + MSIZE; - rri0i4 = rri0i3 + MSIZE; - rri1i2 = rri0i4 + MSIZE; - rri1i3 = rri1i2 + MSIZE; - rri1i4 = rri1i3 + MSIZE; - rri2i3 = rri1i4 + MSIZE; - rri2i4 = rri2i3 + MSIZE; - - /*-----------------------------------------------------------------------* - * Chose the sign of the impulse. * - *-----------------------------------------------------------------------*/ - - for (i = 0; i < L_SUBFR; i++) { - if (dn[i] >= 0) { - sign_dn[i] = MAX_16; - sign_dn_inv[i] = MIN_16; - } - else { - sign_dn[i] = MIN_16; - sign_dn_inv[i] = MAX_16; - dn[i] = negate (dn[i]); - } - } - - /*-------------------------------------------------------------------* - * Modification of rrixiy[] to take signs into account. * - *-------------------------------------------------------------------*/ - - p0 = rri0i1; - p1 = rri0i2; - p2 = rri0i3; - p3 = rri0i4; - - for (i0 = 0; i0 < L_SUBFR; i0 += STEP) { - psign = sign_dn; - if (psign[i0] < 0) - psign = sign_dn_inv; - - for (i1 = 1; i1 < L_SUBFR; i1 += STEP) { - *p0 = mult (*p0, psign[i1]); p0++; - *p1 = mult (*p1, psign[i1 + 1]); p1++; - *p2 = mult (*p2, psign[i1 + 2]); p2++; - *p3 = mult (*p3, psign[i1 + 3]); p3++; - } - } - - p0 = rri1i2; - p1 = rri1i3; - p2 = rri1i4; - - for (i1 = 1; i1 < L_SUBFR; i1 += STEP) { - psign = sign_dn; - if (psign[i1] < 0) - psign = sign_dn_inv; - - for (i2 = 2; i2 < L_SUBFR; i2 += STEP) { - *p0 = mult (*p0, psign[i2]); p0++; - *p1 = mult (*p1, psign[i2 + 1]); p1++; - *p2 = mult (*p2, psign[i2 + 2]); p2++; - } - } - - p0 = rri2i3; - p1 = rri2i4; - - for (i2 = 2; i2 < L_SUBFR; i2 += STEP) { - psign = sign_dn; - if (psign[i2] < 0) - psign = sign_dn_inv; - - for (i3 = 3; i3 < L_SUBFR; i3 += STEP) { - *p0 = mult (*p0, psign[i3]); p0++; - *p1 = mult (*p1, psign[i3 + 1]); p1++; - } - } - - - /*-------------------------------------------------------------------* - * Search the optimum positions of the four pulses which maximize * - * square(correlation) / energy * - *-------------------------------------------------------------------*/ - - psk = -1; - alpk = 1; - - ptr_rri0i3_i4 = rri0i3; - ptr_rri1i3_i4 = rri1i3; - ptr_rri2i3_i4 = rri2i3; - ptr_rri3i3_i4 = rri3i3; - - /* Initializations only to remove warning from some compilers */ - - ip0 = 0; - ip1 = 1; - ip2 = 2; - ip3 = 3; - ix = 0; - iy = 0; - ps = 0; - - /* search 2 times: track 3 and 4 */ - for (track = 3, trk = 0; track < 5; track++, trk++) { - /*------------------------------------------------------------------* - * depth first search 3, phase A: track 2 and 3/4. * - *------------------------------------------------------------------*/ - - sq = -1; - alp = 1; - - /* i0 loop: 2 positions in track 2 */ - - prev_i0 = -1; - - for (i = 0; i < 2; i++) { - max = -1; - /* search "dn[]" maximum position in track 2 */ - for (j = 2; j < L_SUBFR; j += STEP) { - if ((sub (dn[j], max) > 0) && (sub (prev_i0, j) != 0)) { - max = dn[j]; - i0 = j; - } - } - prev_i0 = i0; - - j = mult (i0, 6554); /* j = i0/5 */ - p0 = rri2i2 + j; - - ps1 = dn[i0]; - alp1 = L_mult (*p0, _1_4); - - /* i1 loop: 8 positions in track 2 */ - - p0 = ptr_rri2i3_i4 + shl (j, 3); - p1 = ptr_rri3i3_i4; - - for (i1 = track; i1 < L_SUBFR; i1 += STEP) { - ps2 = add (ps1, dn[i1]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i1] + 1/2*rr[i1][i1]; */ - alp2 = L_mac (alp1, *p0++, _1_2); - alp2 = L_mac (alp2, *p1++, _1_4); - - sq2 = mult (ps2, ps2); - alp_16 = wround (alp2); - - s = L_msu (L_mult (alp, sq2), sq, alp_16); - if (s > 0) { - sq = sq2; - ps = ps2; - alp = alp_16; - ix = i0; - iy = i1; - } - } - } - - i0 = ix; - i1 = iy; - i1_offset = shl (mult (i1, 6554), 3); /* j = 8*(i1/5) */ - - /*------------------------------------------------------------------* - * depth first search 3, phase B: track 0 and 1. * - *------------------------------------------------------------------*/ - - ps0 = ps; - alp0 = L_mult (alp, _1_4); - - sq = -1; - alp = 1; - - /* build vector for next loop to decrease complexity */ - - p0 = rri1i2 + mult (i0, 6554); - p1 = ptr_rri1i3_i4 + mult (i1, 6554); - p2 = rri1i1; - p3 = tmp_vect; - - for (i3 = 1; i3 < L_SUBFR; i3 += STEP) { - /* rrv[i3] = rr[i3][i3] + rr[i0][i3] + rr[i1][i3]; */ - s = L_mult (*p0, _1_4); - p0 += NB_POS; - s = L_mac (s, *p1, _1_4); - p1 += NB_POS; - s = L_mac (s, *p2++, _1_8); - *p3++ = wround (s); - } - - /* i2 loop: 8 positions in track 0 */ - - p0 = rri0i2 + mult (i0, 6554); - p1 = ptr_rri0i3_i4 + mult (i1, 6554); - p2 = rri0i0; - p3 = rri0i1; - - for (i2 = 0; i2 < L_SUBFR; i2 += STEP) { - ps1 = add (ps0, dn[i2]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i2] + rr[i1][i2] + 1/2*rr[i2][i2]; */ - alp1 = L_mac (alp0, *p0, _1_8); - p0 += NB_POS; - alp1 = L_mac (alp1, *p1, _1_8); - p1 += NB_POS; - alp1 = L_mac (alp1, *p2++, _1_16); - - /* i3 loop: 8 positions in track 1 */ - - p4 = tmp_vect; - - for (i3 = 1; i3 < L_SUBFR; i3 += STEP) { - ps2 = add (ps1, dn[i3]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i3] + rr[i1][i3] + rr[i2][i3] + 1/2*rr[i3][i3]; */ - alp2 = L_mac (alp1, *p3++, _1_8); - alp2 = L_mac (alp2, *p4++, _1_2); - - sq2 = mult (ps2, ps2); - alp_16 = wround (alp2); - - s = L_msu (L_mult (alp, sq2), sq, alp_16); - if (s > 0) { - sq = sq2; - alp = alp_16; - ix = i2; - iy = i3; - } - } - } - - /*----------------------------------------------------------------* - * depth first search 3: compare codevector with the best case. * - *----------------------------------------------------------------*/ - - s = L_msu (L_mult (alpk, sq), psk, alp); - if (s > 0) { - psk = sq; - alpk = alp; - ip2 = i0; - ip3 = i1; - ip0 = ix; - ip1 = iy; - } - - /*------------------------------------------------------------------* - * depth first search 4, phase A: track 3 and 0. * - *------------------------------------------------------------------*/ - - sq = -1; - alp = 1; - - /* i0 loop: 2 positions in track 3/4 */ - - prev_i0 = -1; - - for (i = 0; i < 2; i++) { - max = -1; - /* search "dn[]" maximum position in track 3/4 */ - for (j = track; j < L_SUBFR; j += STEP) { - if ((sub (dn[j], max) > 0) && (sub (prev_i0, j) != 0)) { - max = dn[j]; - i0 = j; - } - } - prev_i0 = i0; - - j = mult (i0, 6554); /* j = i0/5 */ - p0 = ptr_rri3i3_i4 + j; - - ps1 = dn[i0]; - alp1 = L_mult (*p0, _1_4); - - /* i1 loop: 8 positions in track 0 */ - - p0 = ptr_rri0i3_i4 + j; - p1 = rri0i0; - - for (i1 = 0; i1 < L_SUBFR; i1 += STEP) { - ps2 = add (ps1, dn[i1]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i1] + 1/2*rr[i1][i1]; */ - alp2 = L_mac (alp1, *p0, _1_2); - p0 += NB_POS; - alp2 = L_mac (alp2, *p1++, _1_4); - - sq2 = mult (ps2, ps2); - alp_16 = wround (alp2); - - s = L_msu (L_mult (alp, sq2), sq, alp_16); - if (s > 0) { - sq = sq2; - ps = ps2; - alp = alp_16; - ix = i0; - iy = i1; - } - } - } - - i0 = ix; - i1 = iy; - i1_offset = shl (mult (i1, 6554), 3); /* j = 8*(i1/5) */ - - /*------------------------------------------------------------------* - * depth first search 4, phase B: track 1 and 2. * - *------------------------------------------------------------------*/ - - ps0 = ps; - alp0 = L_mult (alp, _1_4); - - sq = -1; - alp = 1; - - /* build vector for next loop to decrease complexity */ - - p0 = ptr_rri2i3_i4 + mult (i0, 6554); - p1 = rri0i2 + i1_offset; - p2 = rri2i2; - p3 = tmp_vect; - - for (i3 = 2; i3 < L_SUBFR; i3 += STEP) { - /* rrv[i3] = rr[i3][i3] + rr[i0][i3] + rr[i1][i3]; */ - s = L_mult (*p0, _1_4); - p0 += NB_POS; - s = L_mac (s, *p1++, _1_4); - s = L_mac (s, *p2++, _1_8); - *p3++ = wround (s); - } - - /* i2 loop: 8 positions in track 1 */ - - p0 = ptr_rri1i3_i4 + mult (i0, 6554); - p1 = rri0i1 + i1_offset; - p2 = rri1i1; - p3 = rri1i2; - - for (i2 = 1; i2 < L_SUBFR; i2 += STEP) { - ps1 = add (ps0, dn[i2]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i2] + rr[i1][i2] + 1/2*rr[i2][i2]; */ - alp1 = L_mac (alp0, *p0, _1_8); - p0 += NB_POS; - alp1 = L_mac (alp1, *p1++, _1_8); - alp1 = L_mac (alp1, *p2++, _1_16); - - /* i3 loop: 8 positions in track 2 */ - - p4 = tmp_vect; - - for (i3 = 2; i3 < L_SUBFR; i3 += STEP) { - ps2 = add (ps1, dn[i3]); /* index increment = STEP */ - - /* alp1 = alp0 + rr[i0][i3] + rr[i1][i3] + rr[i2][i3] + 1/2*rr[i3][i3]; */ - alp2 = L_mac (alp1, *p3++, _1_8); - alp2 = L_mac (alp2, *p4++, _1_2); - - sq2 = mult (ps2, ps2); - alp_16 = wround (alp2); - - s = L_msu (L_mult (alp, sq2), sq, alp_16); - if (s > 0) { - sq = sq2; - alp = alp_16; - ix = i2; - iy = i3; - } - } - } - - /*----------------------------------------------------------------* - * depth first search 1: compare codevector with the best case. * - *----------------------------------------------------------------*/ - - s = L_msu (L_mult (alpk, sq), psk, alp); - if (s > 0) { - psk = sq; - alpk = alp; - ip3 = i0; - ip0 = i1; - ip1 = ix; - ip2 = iy; - } - - ptr_rri0i3_i4 = rri0i4; - ptr_rri1i3_i4 = rri1i4; - ptr_rri2i3_i4 = rri2i4; - ptr_rri3i3_i4 = rri4i4; - - } - - - /* Set the sign of impulses */ - - i0 = sign_dn[ip0]; - i1 = sign_dn[ip1]; - i2 = sign_dn[ip2]; - i3 = sign_dn[ip3]; - - /* Find the codeword corresponding to the selected positions */ - - - for (i = 0; i < L_SUBFR; i++) { - cod[i] = 0; - } - - cod[ip0] = shr (i0, 2); /* From Q15 to Q13 */ - cod[ip1] = shr (i1, 2); - cod[ip2] = shr (i2, 2); - cod[ip3] = shr (i3, 2); - - /* find the filtered codeword */ - - for (i = 0; i < ip0; i++) - y[i] = 0; - - if (i0 > 0) - for (i = ip0, j = 0; i < L_SUBFR; i++, j++) - y[i] = h[j]; - else - for (i = ip0, j = 0; i < L_SUBFR; i++, j++) - y[i] = negate (h[j]); - - if (i1 > 0) - for (i = ip1, j = 0; i < L_SUBFR; i++, j++) - y[i] = add (y[i], h[j]); - else - for (i = ip1, j = 0; i < L_SUBFR; i++, j++) - y[i] = sub (y[i], h[j]); - - if (i2 > 0) - for (i = ip2, j = 0; i < L_SUBFR; i++, j++) - y[i] = add (y[i], h[j]); - else - for (i = ip2, j = 0; i < L_SUBFR; i++, j++) - y[i] = sub (y[i], h[j]); - - if (i3 > 0) - for (i = ip3, j = 0; i < L_SUBFR; i++, j++) - y[i] = add (y[i], h[j]); - else - for (i = ip3, j = 0; i < L_SUBFR; i++, j++) - y[i] = sub (y[i], h[j]); - - /* find codebook index; 17-bit address */ - - i = 0; - if (i0 > 0) - i = add (i, 1); - if (i1 > 0) - i = add (i, 2); - if (i2 > 0) - i = add (i, 4); - if (i3 > 0) - i = add (i, 8); - *sign = i; - - ip0 = mult (ip0, 6554); /* ip0/5 */ - ip1 = mult (ip1, 6554); /* ip1/5 */ - ip2 = mult (ip2, 6554); /* ip2/5 */ - i = mult (ip3, 6554); /* ip3/5 */ - j = add (i, shl (i, 2)); /* j = i*5 */ - j = sub (ip3, add (j, 3)); /* j= ip3%5 -3 */ - ip3 = add (shl (i, 1), j); - - i = add (ip0, shl (ip1, 3)); - i = add (i, shl (ip2, 6)); - i = add (i, shl (ip3, 9)); - - return i; -} diff --git a/src/libs/libg729/basic_op.c b/src/libs/libg729/basic_op.c deleted file mode 100644 index 54c128ab..00000000 --- a/src/libs/libg729/basic_op.c +++ /dev/null @@ -1,2013 +0,0 @@ - -/* - * - * Basics operators. - * -*/ - -/* - * - * Include-Files - * -*/ - -#include -#include -#include "typedef.h" -#include "basic_op.h" - - -/* - * - * Function Name : sature - * - * Purpose : - * - * Limit the 32 bit input to the range of a 16 bit word. - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -sature (Word32 L_var1) -{ - Word16 var_out; - - if (L_var1 > 0X00007fffL) { - var_out = MAX_16; - } - else if (L_var1 < (Word32) 0xffff8000L) { - var_out = MIN_16; - } - else { - var_out = extract_l (L_var1); - } - - return (var_out); -} - - -/* - * - * Function Name : sature - * - * Purpose : - * - * Limit the 32 bit input to the range of a 16 bit word. - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -sature_o (Word32 L_var1, Flag *Overflow) -{ - Word16 var_out; - - if (L_var1 > 0X00007fffL) { - *Overflow = 1; - var_out = MAX_16; - } - else if (L_var1 < (Word32) 0xffff8000L) { - *Overflow = 1; - var_out = MIN_16; - } - else { - *Overflow = 0; - var_out = extract_l (L_var1); - } - - return (var_out); -} - -/* - * - * Function Name : add - * - * Purpose : - * - * Performs the addition (var1+var2) with overflow control and saturation; - * the 16 bit result is set at +32767 when overflow occurs or at -32768 - * when underflow occurs. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -add (Word16 var1, Word16 var2) -{ - Word16 var_out; - Word32 L_somme; - - L_somme = (Word32) var1 + var2; - var_out = sature (L_somme); - return (var_out); -} - -/* - * - * Function Name : sub - * - * Purpose : - * - * Performs the subtraction (var1+var2) with overflow control and satu- - * ration; the 16 bit result is set at +32767 when overflow occurs or at - * -32768 when underflow occurs. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -sub (Word16 var1, Word16 var2) -{ - Word16 var_out; - Word32 L_diff; - - L_diff = (Word32) var1 - var2; - var_out = sature (L_diff); - return (var_out); -} - -/* - * - * Function Name : add_o - * - * Purpose : - * - * Performs the addition (var1+var2) with overflow control and saturation; - * the 16 bit result is set at +32767 when overflow occurs or at -32768 - * when underflow occurs. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -add_o (Word16 var1, Word16 var2, Flag *Overflow) -{ - Word16 var_out; - Word32 L_somme; - - L_somme = (Word32) var1 + var2; - var_out = sature_o (L_somme, Overflow); - return (var_out); -} - -/* - * - * Function Name : sub_o - * - * Purpose : - * - * Performs the subtraction (var1+var2) with overflow control and satu- - * ration; the 16 bit result is set at +32767 when overflow occurs or at - * -32768 when underflow occurs. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -sub_o (Word16 var1, Word16 var2, Flag *Overflow) -{ - Word16 var_out; - Word32 L_diff; - - L_diff = (Word32) var1 - var2; - var_out = sature_o (L_diff, Overflow); - return (var_out); -} - -/* - * - * Function Name : abs_s - * - * Purpose : - * - * Absolute value of var1; abs_s(-32768) = 32767. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 0000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -abs_s (Word16 var1) -{ - Word16 var_out; - - if (var1 == (Word16) 0X8000) { - var_out = MAX_16; - } - else { - if (var1 < 0) { - var_out = -var1; - } - else { - var_out = var1; - } - } - return (var_out); -} - -/* - * - * Function Name : shl - * - * Purpose : - * - * Arithmetically shift the 16 bit input var1 left var2 positions.Zero fill - * the var2 LSB of the result. If var2 is negative, arithmetically shift - * var1 right by -var2 with sign extension. Saturate the result in case of - * underflows or overflows. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -shl (Word16 var1, Word16 var2) -{ - Word16 var_out; - Word32 resultat; - - if (var2 < 0) { - var_out = shr (var1, -var2); - } - else { - resultat = (Word32) var1 *((Word32) 1 << var2); - if ((var2 > 15 && var1 != 0) - || (resultat != (Word32) ((Word16) resultat))) { - var_out = (var1 > 0) ? MAX_16 : MIN_16; - } - else { - var_out = extract_l (resultat); - } - } - return (var_out); -} - -/* - * - * Function Name : shr - * - * Purpose : - * - * Arithmetically shift the 16 bit input var1 right var2 positions with - * sign extension. If var2 is negative, arithmetically shift var1 left by - * -var2 with sign extension. Saturate the result in case of underflows or - * overflows. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -shr (Word16 var1, Word16 var2) -{ - Word16 var_out; - - if (var2 < 0) { - var_out = shl (var1, -var2); - } - else { - if (var2 >= 15) { - var_out = (var1 < 0) ? (Word16) (-1) : (Word16) 0; - } - else { - if (var1 < 0) { - var_out = ~((~var1) >> var2); - } - else { - var_out = var1 >> var2; - } - } - } - - return (var_out); -} - -/* - * - * Function Name : mult - * - * Purpose : - * - * Performs the multiplication of var1 by var2 and gives a 16 bit result - * which is scaled i.e.: - * mult(var1,var2) = shr((var1 times var2),15) and - * mult(-32768,-32768) = 32767. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -mult (Word16 var1, Word16 var2) -{ - Word16 var_out; - Word32 L_produit; - - L_produit = (Word32) var1 *(Word32) var2; - - L_produit = (L_produit & (Word32) 0xffff8000L) >> 15; - - if (L_produit & (Word32) 0x00010000L) - L_produit = L_produit | (Word32) 0xffff0000L; - - var_out = sature (L_produit); - return (var_out); -} - - -/* - * - * Function Name : L_mult - * - * Purpose : - * - * L_mult is the 32 bit result of the multiplication of var1 times var2 - * with one shift left i.e.: - * L_mult(var1,var2) = shl((var1 times var2),1) and - * L_mult(-32768,-32768) = 2147483647. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_mult (Word16 var1, Word16 var2) -{ - Word32 L_var_out; - - L_var_out = (Word32) var1 *(Word32) var2; - if (L_var_out != (Word32) 0x40000000L) { - L_var_out *= 2; - } - else { - L_var_out = MAX_32; - } - - return (L_var_out); -} - -/* - * - * Function Name : L_mult_o - * - * Purpose : - * - * L_mult is the 32 bit result of the multiplication of var1 times var2 - * with one shift left i.e.: - * L_mult(var1,var2) = shl((var1 times var2),1) and - * L_mult(-32768,-32768) = 2147483647. - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_mult_o (Word16 var1, Word16 var2, Flag *Overflow) -{ - Word32 L_var_out; - - L_var_out = (Word32) var1 *(Word32) var2; - if (L_var_out != (Word32) 0x40000000L) { - L_var_out *= 2; - } - else { - *Overflow = 1; - L_var_out = MAX_32; - } - - return (L_var_out); -} - -/* - * - * Function Name : negate - * - * Purpose : - * - * Negate var1 with saturation, saturate in the case where input is -32768: - * negate(var1) = sub(0,var1). - * - * Complexity weight : 1 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -negate (Word16 var1) -{ - Word16 var_out; - - var_out = (var1 == MIN_16) ? MAX_16 : -var1; - return (var_out); -} - - -/* - * - * Function Name : extract_h - * - * Purpose : - * - * Return the 16 MSB of L_var1. - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32 ) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -extract_h (Word32 L_var1) -{ - Word16 var_out; - - var_out = (Word16) (L_var1 >> 16); - return (var_out); -} - -/* - * - * Function Name : extract_l - * - * Purpose : - * - * Return the 16 LSB of L_var1. - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32 ) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -extract_l (Word32 L_var1) -{ - Word16 var_out; - - var_out = (Word16) L_var1; - return (var_out); -} - - -/* - * - * Function Name : wround - * - * Purpose : - * - * Round the lower 16 bits of the 32 bit input number into its MS 16 bits - * with saturation. Shift the resulting bits right by 16 and return the 16 - * bit number: - * wround(L_var1) = extract_h(L_add(L_var1,32768)) - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32 ) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -wround (Word32 L_var1) -{ - Word16 var_out; - Word32 L_arrondi; - - L_arrondi = L_add (L_var1, (Word32) 0x00008000); - var_out = extract_h (L_arrondi); - return (var_out); -} - -/* - * - * Function Name : wround_o - * - * Purpose : - * - * Round the lower 16 bits of the 32 bit input number into its MS 16 bits - * with saturation. Shift the resulting bits right by 16 and return the 16 - * bit number: - * wround(L_var1) = extract_h(L_add(L_var1,32768)) - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32 ) whose value falls in the - * range : 0x8000 0000 <= L_var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -wround_o (Word32 L_var1, Flag *Overflow) -{ - Word16 var_out; - Word32 L_arrondi; - - L_arrondi = L_add_o (L_var1, (Word32) 0x00008000, Overflow); - var_out = extract_h (L_arrondi); - return (var_out); -} - - -/* - * - * Function Name : L_mac - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Add the 32 bit - * result to L_var3 with saturation, return a 32 bit result: - * L_mac(L_var3,var1,var2) = L_add(L_var3,(L_mult(var1,var2)). - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_mac (Word32 L_var3, Word16 var1, Word16 var2) -{ - Word32 L_var_out; - Word32 L_produit; - - L_produit = L_mult (var1, var2); - L_var_out = L_add (L_var3, L_produit); - return (L_var_out); -} - - -/* - * - * Function Name : L_mac_o - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Add the 32 bit - * result to L_var3 with saturation, return a 32 bit result: - * L_mac(L_var3,var1,var2) = L_add(L_var3,(L_mult(var1,var2)). - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_mac_o (Word32 L_var3, Word16 var1, Word16 var2, Flag* Overflow) -{ - Word32 L_var_out; - Word32 L_produit; - - L_produit = L_mult_o (var1, var2, Overflow); - L_var_out = L_add_o (L_var3, L_produit, Overflow); - return (L_var_out); -} - -/* - * - * Function Name : L_msu - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Subtract the 32 - * bit result to L_var3 with saturation, return a 32 bit result: - * L_msu(L_var3,var1,var2) = L_sub(L_var3,(L_mult(var1,var2)). - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_msu (Word32 L_var3, Word16 var1, Word16 var2) -{ - Word32 L_var_out; - Word32 L_produit; - - L_produit = L_mult (var1, var2); - L_var_out = L_sub (L_var3, L_produit); - return (L_var_out); -} - -/* - * - * Function Name : L_msu_o - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Subtract the 32 - * bit result to L_var3 with saturation, return a 32 bit result: - * L_msu(L_var3,var1,var2) = L_sub(L_var3,(L_mult(var1,var2)). - * - * Complexity weight : 1 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_msu_o (Word32 L_var3, Word16 var1, Word16 var2, Flag *Overflow) -{ - Word32 L_var_out; - Word32 L_produit; - - L_produit = L_mult_o (var1, var2, Overflow); - L_var_out = L_sub_o (L_var3, L_produit, Overflow); - return (L_var_out); -} - -/* - * - * Function Name : L_add - * - * Purpose : - * - * 32 bits addition of the two 32 bits variables (L_var1+L_var2) with - * overflow control and saturation; the result is set at +214783647 when - * overflow occurs or at -214783648 when underflow occurs. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * L_var2 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_add (Word32 L_var1, Word32 L_var2) -{ - Word32 L_var_out; - - L_var_out = L_var1 + L_var2; - - if (((L_var1 ^ L_var2) & MIN_32) == 0) { - if ((L_var_out ^ L_var1) & MIN_32) { - L_var_out = (L_var1 < 0) ? MIN_32 : MAX_32; - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_sub - * - * Purpose : - * - * 32 bits subtraction of the two 32 bits variables (L_var1-L_var2) with - * overflow control and saturation; the result is set at +214783647 when - * overflow occurs or at -214783648 when underflow occurs. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * L_var2 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_sub (Word32 L_var1, Word32 L_var2) -{ - Word32 L_var_out; - - L_var_out = L_var1 - L_var2; - - if (((L_var1 ^ L_var2) & MIN_32) != 0) { - if ((L_var_out ^ L_var1) & MIN_32) { - L_var_out = (L_var1 < 0L) ? MIN_32 : MAX_32; - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_add_o - * - * Purpose : - * - * 32 bits addition of the two 32 bits variables (L_var1+L_var2) with - * overflow control and saturation; the result is set at +214783647 when - * overflow occurs or at -214783648 when underflow occurs. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * L_var2 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_add_o (Word32 L_var1, Word32 L_var2, Flag *Overflow) -{ - Word32 L_var_out; - - L_var_out = L_var1 + L_var2; - - if (((L_var1 ^ L_var2) & MIN_32) == 0) { - if ((L_var_out ^ L_var1) & MIN_32) { - L_var_out = (L_var1 < 0) ? MIN_32 : MAX_32; - *Overflow = 1; - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_sub_o - * - * Purpose : - * - * 32 bits subtraction of the two 32 bits variables (L_var1-L_var2) with - * overflow control and saturation; the result is set at +214783647 when - * overflow occurs or at -214783648 when underflow occurs. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * L_var2 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_sub_o (Word32 L_var1, Word32 L_var2, Flag *Overflow) -{ - Word32 L_var_out; - - L_var_out = L_var1 - L_var2; - - if (((L_var1 ^ L_var2) & MIN_32) != 0) { - if ((L_var_out ^ L_var1) & MIN_32) { - L_var_out = (L_var1 < 0L) ? MIN_32 : MAX_32; - *Overflow = 1; - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_negate - * - * Purpose : - * - * Negate the 32 bit variable L_var1 with saturation; saturate in the case - * where input is -2147483648 (0x8000 0000). - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_negate (Word32 L_var1) -{ - Word32 L_var_out; - - L_var_out = (L_var1 == MIN_32) ? MAX_32 : -L_var1; - return (L_var_out); -} - -/* - * - * Function Name : mult_r - * - * Purpose : - * - * Same as mult with rounding, i.e.: - * mult_r(var1,var2) = shr(((var1*var2) + 16384),15) and - * mult_r(-32768,-32768) = 32767. - * - * Complexity weight : 2 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -mult_r (Word16 var1, Word16 var2) -{ - Word16 var_out; - Word32 L_produit_arr; - - L_produit_arr = (Word32) var1 *(Word32) var2; /* product */ - L_produit_arr += (Word32) 0x00004000; /* round */ - L_produit_arr &= (Word32) 0xffff8000L; - L_produit_arr >>= 15; /* shift */ - - if (L_produit_arr & (Word32) 0x00010000L) { /* sign extend when necessary */ - L_produit_arr |= (Word32) 0xffff0000L; - } - - var_out = sature (L_produit_arr); - return (var_out); -} - -/* - * - * Function Name : L_shl - * - * Purpose : - * - * Arithmetically shift the 32 bit input L_var1 left var2 positions. Zero - * fill the var2 LSB of the result. If var2 is negative, L_var1 right by - * -var2 arithmetically shift with sign extension. Saturate the result in - * case of underflows or overflows. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_shl (Word32 L_var1, Word16 var2) -{ - Word32 L_var_out; - - /* initialization used only to suppress Microsoft Visual C++ warnings */ - L_var_out = 0L; - - if (var2 <= 0) { - L_var_out = L_shr (L_var1, -var2); - } - else { - for (; var2 > 0; var2--) { - if (L_var1 > (Word32) 0X3fffffffL) { - L_var_out = MAX_32; - break; - } - else { - if (L_var1 < (Word32) 0xc0000000L) { - L_var_out = MIN_32; - break; - } - } - L_var1 *= 2; - L_var_out = L_var1; - } - } - return (L_var_out); -} - - -/* - * - * Function Name : L_shl_o - * - * Purpose : - * - * Arithmetically shift the 32 bit input L_var1 left var2 positions. Zero - * fill the var2 LSB of the result. If var2 is negative, L_var1 right by - * -var2 arithmetically shift with sign extension. Saturate the result in - * case of underflows or overflows. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_shl_o (Word32 L_var1, Word16 var2, Flag *Overflow) -{ - Word32 L_var_out; - - /* initialization used only to suppress Microsoft Visual C++ warnings */ - L_var_out = 0L; - - if (var2 <= 0) { - L_var_out = L_shr (L_var1, -var2); - } - else { - for (; var2 > 0; var2--) { - if (L_var1 > (Word32) 0X3fffffffL) { - *Overflow = 1; - L_var_out = MAX_32; - break; - } - else { - if (L_var1 < (Word32) 0xc0000000L) { - *Overflow = 1; - L_var_out = MIN_32; - break; - } - } - L_var1 *= 2; - L_var_out = L_var1; - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_shr - * - * Purpose : - * - * Arithmetically shift the 32 bit input L_var1 right var2 positions with - * sign extension. If var2 is negative, arithmetically shift L_var1 left - * by -var2 and zero fill the var2 LSB of the result. Saturate the result - * in case of underflows or overflows. - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var1 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_shr (Word32 L_var1, Word16 var2) -{ - Word32 L_var_out; - - if (var2 < 0) { - L_var_out = L_shl (L_var1, -var2); - } - else { - if (var2 >= 31) { - L_var_out = (L_var1 < 0L) ? -1 : 0; - } - else { - if (L_var1 < 0) { - L_var_out = ~((~L_var1) >> var2); - } - else { - L_var_out = L_var1 >> var2; - } - } - } - return (L_var_out); -} - -/* - * - * Function Name : shr_r - * - * Purpose : - * - * Same as shr(var1,var2) but with rounding. Saturate the result in case of - * underflows or overflows : - * If var2 is greater than zero : - * shr_r(var1,var2) = shr(add(var1,2**(var2-1)),var2) - * If var2 is less than zero : - * shr_r(var1,var2) = shr(var1,var2). - * - * Complexity weight : 2 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word16 -shr_r (Word16 var1, Word16 var2) -{ - Word16 var_out; - - if (var2 > 15) { - var_out = 0; - } - else { - var_out = shr (var1, var2); - - if (var2 > 0) { - if ((var1 & ((Word16) 1 << (var2 - 1))) != 0) { - var_out++; - } - } - } - return (var_out); -} - -/* - * - * Function Name : mac_r - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Add the 32 bit - * result to L_var3 with saturation. Round the LS 16 bits of the result - * into the MS 16 bits with saturation and shift the result right by 16. - * Return a 16 bit result. - * mac_r(L_var3,var1,var2) = wround(L_mac(Lvar3,var1,var2)) - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 8000 <= L_var_out <= 0x0000 7fff. - * -*/ - -Word16 -mac_r (Word32 L_var3, Word16 var1, Word16 var2) -{ - Word16 var_out; - - L_var3 = L_mac (L_var3, var1, var2); - L_var3 = L_add (L_var3, (Word32) 0x00008000); - var_out = extract_h (L_var3); - return (var_out); -} - - -/* - * - * Function Name : msu_r - * - * Purpose : - * - * Multiply var1 by var2 and shift the result left by 1. Subtract the 32 - * bit result to L_var3 with saturation. Round the LS 16 bits of the res- - * ult into the MS 16 bits with saturation and shift the result right by - * 16. Return a 16 bit result. - * msu_r(L_var3,var1,var2) = wround(L_msu(Lvar3,var1,var2)) - * - * Complexity weight : 2 - * - * Inputs : - * - * L_var3 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= L_var3 <= 0x7fff ffff. - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 8000 <= L_var_out <= 0x0000 7fff. - * -*/ - -Word16 -msu_r (Word32 L_var3, Word16 var1, Word16 var2) -{ - Word16 var_out; - - L_var3 = L_msu (L_var3, var1, var2); - L_var3 = L_add (L_var3, (Word32) 0x00008000); - var_out = extract_h (L_var3); - return (var_out); -} - - - -/* - * - * Function Name : L_deposit_h - * - * Purpose : - * - * Deposit the 16 bit var1 into the 16 MS bits of the 32 bit output. The - * 16 LS bits of the output are zeroed. - * - * Complexity weight : 2 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= var_out <= 0x7fff 0000. - * -*/ - -Word32 -L_deposit_h (Word16 var1) -{ - Word32 L_var_out; - - L_var_out = (Word32) var1 << 16; - return (L_var_out); -} - -/* - * - * Function Name : L_deposit_l - * - * Purpose : - * - * Deposit the 16 bit var1 into the 16 LS bits of the 32 bit output. The - * 16 MS bits of the output are sign extended. - * - * Complexity weight : 2 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0xFFFF 8000 <= var_out <= 0x0000 7fff. - * -*/ - -Word32 -L_deposit_l (Word16 var1) -{ - Word32 L_var_out; - - L_var_out = (Word32) var1; - return (L_var_out); -} - -/* - * - * Function Name : L_shr_r - * - * Purpose : - * - * Same as L_shr(L_var1,var2)but with rounding. Saturate the result in case - * of underflows or overflows : - * If var2 is greater than zero : - * L_shr_r(var1,var2) = L_shr(L_add(L_var1,2**(var2-1)),var2) - * If var2 is less than zero : - * L_shr_r(var1,var2) = L_shr(L_var1,var2). - * - * Complexity weight : 3 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= var1 <= 0x7fff ffff. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_shr_r (Word32 L_var1, Word16 var2) -{ - Word32 L_var_out; - - if (var2 > 31) { - L_var_out = 0; - } - else { - L_var_out = L_shr (L_var1, var2); - if (var2 > 0) { - if ((L_var1 & ((Word32) 1 << (var2 - 1))) != 0) { - L_var_out++; - } - } - } - return (L_var_out); -} - -/* - * - * Function Name : L_abs - * - * Purpose : - * - * Absolute value of L_var1; Saturate in case where the input is - * -214783648 - * - * Complexity weight : 3 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * L_var_out - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x0000 0000 <= var_out <= 0x7fff ffff. - * -*/ - -Word32 -L_abs (Word32 L_var1) -{ - Word32 L_var_out; - - if (L_var1 == MIN_32) { - L_var_out = MAX_32; - } - else { - if (L_var1 < 0) { - L_var_out = -L_var1; - } - else { - L_var_out = L_var1; - } - } - - return (L_var_out); -} - -/* - * - * Function Name : norm_s - * - * Purpose : - * - * Produces the number of left shift needed to normalize the 16 bit varia- - * ble var1 for positive values on the interval with minimum of 16384 and - * maximum of 32767, and for negative values on the interval with minimum - * of -32768 and maximum of -16384; in order to normalize the result, the - * following operation must be done : - * norm_var1 = shl(var1,norm_s(var1)). - * - * Complexity weight : 15 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0xffff 8000 <= var1 <= 0x0000 7fff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 0000 <= var_out <= 0x0000 000f. - * -*/ - -Word16 -norm_s (Word16 var1) -{ - Word16 var_out; - - if (var1 == 0) { - var_out = 0; - } - else { - if (var1 == (Word16) 0xffff) { - var_out = 15; - } - else { - if (var1 < 0) { - var1 = ~var1; - } - - for (var_out = 0; var1 < 0x4000; var_out++) { - var1 <<= 1; - } - } - } - - return (var_out); -} - - -/* - * - * Function Name : div_s - * - * Purpose : - * - * Produces a result which is the fractional integer division of var1 by - * var2; var1 and var2 must be positive and var2 must be greater or equal - * to var1; the result is positive (leading bit equal to 0) and truncated - * to 16 bits. - * If var1 = var2 then div(var1,var2) = 32767. - * - * Complexity weight : 18 - * - * Inputs : - * - * var1 - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 0000 <= var1 <= var2 and var2 != 0. - * - * var2 - * 16 bit short signed integer (Word16) whose value falls in the - * range : var1 <= var2 <= 0x0000 7fff and var2 != 0. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 0000 <= var_out <= 0x0000 7fff. - * It's a Q15 value (point between b15 and b14). - * -*/ - -Word16 -div_s (Word16 var1, Word16 var2) -{ - Word16 var_out = 0; - Word16 iteration; - Word32 L_num; - Word32 L_denom; - - if ((var1 > var2) || (var1 < 0) || (var2 < 0)) { - printf ("Division Error var1=%d var2=%d\n", var1, var2); - exit (0); - } - - if (var2 == 0) { - printf ("Division by 0, Fatal error \n"); - exit (0); - } - - if (var1 == 0) { - var_out = 0; - } - else { - if (var1 == var2) { - var_out = MAX_16; - } - else { - L_num = L_deposit_l (var1); - L_denom = L_deposit_l (var2); - - for (iteration = 0; iteration < 15; iteration++) { - var_out <<= 1; - L_num <<= 1; - - if (L_num >= L_denom) { - L_num = L_sub (L_num, L_denom); - var_out = add (var_out, 1); - } - } - } - } - - return (var_out); -} - - -/* - * - * Function Name : norm_l - * - * Purpose : - * - * Produces the number of left shift needed to normalize the 32 bit varia- - * ble l_var1 for positive values on the interval with minimum of - * 1073741824 and maximum of 2147483647, and for negative values on the in- - * terval with minimum of -2147483648 and maximum of -1073741824; in order - * to normalize the result, the following operation must be done : - * norm_L_var1 = L_shl(L_var1,norm_l(L_var1)). - * - * Complexity weight : 30 - * - * Inputs : - * - * L_var1 - * 32 bit long signed integer (Word32) whose value falls in the - * range : 0x8000 0000 <= var1 <= 0x7fff ffff. - * - * Outputs : - * - * none - * - * Return Value : - * - * var_out - * 16 bit short signed integer (Word16) whose value falls in the - * range : 0x0000 0000 <= var_out <= 0x0000 001f. - * -*/ - -Word16 -norm_l (Word32 L_var1) -{ - Word16 var_out; - - if (L_var1 == 0) { - var_out = 0; - } - else { - if (L_var1 == (Word32) 0xffffffffL) { - var_out = 31; - } - else { - if (L_var1 < 0) { - L_var1 = ~L_var1; - } - - for (var_out = 0; L_var1 < (Word32) 0x40000000L; var_out++) { - L_var1 <<= 1; - } - } - } - - return (var_out); -} diff --git a/src/libs/libg729/cor_func.c b/src/libs/libg729/cor_func.c deleted file mode 100644 index 1346493a..00000000 --- a/src/libs/libg729/cor_func.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/* Functions Corr_xy2() and Cor_h_x() */ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" - -/*---------------------------------------------------------------------------* - * Function corr_xy2() * - * ~~~~~~~~~~~~~~~~~~~ * - * Find the correlations between the target xn[], the filtered adaptive * - * codebook excitation y1[], and the filtered 1st codebook innovation y2[]. * - * g_coeff[2]:exp_g_coeff[2] = * - * g_coeff[3]:exp_g_coeff[3] = -2 * - * g_coeff[4]:exp_g_coeff[4] = 2 * - *---------------------------------------------------------------------------*/ - -void -Corr_xy2 (Word16 xn[], /* (i) Q0 :Target vector. */ - Word16 y1[], /* (i) Q0 :Adaptive codebook. */ - Word16 y2[], /* (i) Q12 :Filtered innovative vector. */ - Word16 g_coeff[], /* (o) Q[exp]:Correlations between xn,y1,y2 */ - Word16 exp_g_coeff[] /* (o) :Q-format of g_coeff[] */ - ) -{ - Word16 i, exp; - Word16 exp_y2y2, exp_xny2, exp_y1y2; - Word16 y2y2, xny2, y1y2; - Word32 L_acc; - Word16 scaled_y2[L_SUBFR]; /* Q9 */ - - /*------------------------------------------------------------------* - * Scale down y2[] from Q12 to Q9 to avoid overflow * - *------------------------------------------------------------------*/ - for (i = 0; i < L_SUBFR; i++) { - scaled_y2[i] = shr (y2[i], 3); - } - - /* Compute scalar product */ - L_acc = 1; /* Avoid case of all zeros */ - for (i = 0; i < L_SUBFR; i++) - L_acc = L_mac (L_acc, scaled_y2[i], scaled_y2[i]); /* L_acc:Q19 */ - - exp = norm_l (L_acc); - y2y2 = wround (L_shl (L_acc, exp)); - exp_y2y2 = add (exp, 19 - 16); /* Q[19+exp-16] */ - - g_coeff[2] = y2y2; - exp_g_coeff[2] = exp_y2y2; - - /* Compute scalar product */ - L_acc = 1; /* Avoid case of all zeros */ - for (i = 0; i < L_SUBFR; i++) - L_acc = L_mac (L_acc, xn[i], scaled_y2[i]); /* L_acc:Q10 */ - - exp = norm_l (L_acc); - xny2 = wround (L_shl (L_acc, exp)); - exp_xny2 = add (exp, 10 - 16); /* Q[10+exp-16] */ - - g_coeff[3] = negate (xny2); - exp_g_coeff[3] = sub (exp_xny2, 1); /* -2 */ - - /* Compute scalar product */ - L_acc = 1; /* Avoid case of all zeros */ - for (i = 0; i < L_SUBFR; i++) - L_acc = L_mac (L_acc, y1[i], scaled_y2[i]); /* L_acc:Q10 */ - - exp = norm_l (L_acc); - y1y2 = wround (L_shl (L_acc, exp)); - exp_y1y2 = add (exp, 10 - 16); /* Q[10+exp-16] */ - - g_coeff[4] = y1y2; - exp_g_coeff[4] = sub (exp_y1y2, 1);; /* 2 */ - - return; -} - - -/*--------------------------------------------------------------------------* - * Function Cor_h_X() * - * ~~~~~~~~~~~~~~~~~~~ * - * Compute correlations of input response h[] with the target vector X[]. * - *--------------------------------------------------------------------------*/ - -void -Cor_h_X (Word16 h[], /* (i) Q12 :Impulse response of filters */ - Word16 X[], /* (i) :Target vector */ - Word16 D[] - /* (o) :Correlations between h[] and D[] */ - /* Normalized to 13 bits */ - ) -{ - Word16 i, j; - Word32 s, max, L_temp; - Word32 y32[L_SUBFR]; - - /* first keep the result on 32 bits and find absolute maximum */ - - max = 0; - - for (i = 0; i < L_SUBFR; i++) { - s = 0; - for (j = i; j < L_SUBFR; j++) - s = L_mac (s, X[j], h[j - i]); - - y32[i] = s; - - s = L_abs (s); - L_temp = L_sub (s, max); - if (L_temp > 0L) { - max = s; - } - } - - /* Find the number of right shifts to do on y32[] */ - /* so that maximum is on 13 bits */ - - j = norm_l (max); - if (sub (j, 16) > 0) { - j = 16; - } - - j = sub (18, j); - - for (i = 0; i < L_SUBFR; i++) { - D[i] = extract_l (L_shr (y32[i], j)); - } - - return; - -} diff --git a/src/libs/libg729/de_acelp.c b/src/libs/libg729/de_acelp.c deleted file mode 100644 index 3fa230cd..00000000 --- a/src/libs/libg729/de_acelp.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*-----------------------------------------------------------* - * Function Decod_ACELP() * - * ~~~~~~~~~~~~~~~~~~~~~~~ * - * Algebraic codebook decoder. * - *----------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" - -void -Decod_ACELP (Word16 sign, /* (i) : signs of 4 pulses. */ - Word16 index, /* (i) : Positions of the 4 pulses. */ - Word16 cod[] /* (o) Q13 : algebraic (fixed) codebook excitation */ - ) -{ - Word16 i, j; - Word16 pos[4]; - - - /* Decode the positions */ - - i = index & (Word16) 7; - pos[0] = add (i, shl (i, 2)); /* pos0 =i*5 */ - - index = shr (index, 3); - i = index & (Word16) 7; - i = add (i, shl (i, 2)); /* pos1 =i*5+1 */ - pos[1] = add (i, 1); - - index = shr (index, 3); - i = index & (Word16) 7; - i = add (i, shl (i, 2)); /* pos2 =i*5+1 */ - pos[2] = add (i, 2); - - index = shr (index, 3); - j = index & (Word16) 1; - index = shr (index, 1); - i = index & (Word16) 7; - i = add (i, shl (i, 2)); /* pos3 =i*5+3+j */ - i = add (i, 3); - pos[3] = add (i, j); - - /* decode the signs and build the codeword */ - - for (i = 0; i < L_SUBFR; i++) { - cod[i] = 0; - } - - for (j = 0; j < 4; j++) { - - i = sign & (Word16) 1; - sign = shr (sign, 1); - - if (i != 0) { - cod[pos[j]] = 8191; /* Q13 +1.0 */ - } - else { - cod[pos[j]] = -8192; /* Q13 -1.0 */ - } - } - - return; -} diff --git a/src/libs/libg729/dec_gain.c b/src/libs/libg729/dec_gain.c deleted file mode 100644 index 1a9dec81..00000000 --- a/src/libs/libg729/dec_gain.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" -#include "tab_ld8a.h" - -/*---------------------------------------------------------------------------* - * Function Dec_gain * - * ~~~~~~~~~~~~~~~~~~ * - * Decode the pitch and codebook gains * - * * - *---------------------------------------------------------------------------* - * input arguments: * - * * - * index :Quantization index * - * code[] :Innovative code vector * - * L_subfr :Subframe size * - * bfi :Bad frame indicator * - * * - * output arguments: * - * * - * gain_pit :Quantized pitch gain * - * gain_cod :Quantized codebook gain * - * * - *---------------------------------------------------------------------------*/ -void -Dec_gain (DecState *decoder, - Word16 index, /* (i) :Index of quantization. */ - Word16 code[], /* (i) Q13 :Innovative vector. */ - Word16 L_subfr, /* (i) :Subframe length. */ - Word16 bfi, /* (i) :Bad frame indicator */ - Word16 * gain_pit, /* (o) Q14 :Pitch gain. */ - Word16 * gain_cod /* (o) Q1 :Code gain. */ - ) -{ - Word16 index1, index2, tmp; - Word16 gcode0, exp_gcode0; - Word32 L_gbk12, L_acc, L_accb; - void Gain_predict (Word16 past_qua_en[], Word16 code[], Word16 L_subfr, - Word16 * gcode0, Word16 * exp_gcode0); - void Gain_update (Word16 past_qua_en[], Word32 L_gbk12); - void Gain_update_erasure (Word16 past_qua_en[]); - - /* Gain predictor, Past quantized energies = -14.0 in Q10 */ - - - - /*-------------- Case of erasure. ---------------*/ - - if (bfi != 0) { - *gain_pit = mult (*gain_pit, 29491); /* *0.9 in Q15 */ - if (sub (*gain_pit, 29491) > 0) - *gain_pit = 29491; - *gain_cod = mult (*gain_cod, 32111); /* *0.98 in Q15 */ - - /*----------------------------------------------* - * update table of past quantized energies * - * (frame erasure) * - *----------------------------------------------*/ - Gain_update_erasure (decoder->past_qua_en); - - return; - } - - /*-------------- Decode pitch gain ---------------*/ - - index1 = imap1[shr (index, NCODE2_B)]; - index2 = imap2[index & (NCODE2 - 1)]; - *gain_pit = add (gbk1[index1][0], gbk2[index2][0]); - - /*-------------- Decode codebook gain ---------------*/ - - /*---------------------------------------------------* - *- energy due to innovation -* - *- predicted energy -* - *- predicted codebook gain => gcode0[exp_gcode0] -* - *---------------------------------------------------*/ - - Gain_predict (decoder->past_qua_en, code, L_subfr, &gcode0, &exp_gcode0); - - /*-----------------------------------------------------------------* - * *gain_code = (gbk1[indice1][1]+gbk2[indice2][1]) * gcode0; * - *-----------------------------------------------------------------*/ - - L_acc = L_deposit_l (gbk1[index1][1]); - L_accb = L_deposit_l (gbk2[index2][1]); - L_gbk12 = L_add (L_acc, L_accb); /* Q13 */ - tmp = extract_l (L_shr (L_gbk12, 1)); /* Q12 */ - L_acc = L_mult (tmp, gcode0); /* Q[exp_gcode0+12+1] */ - - L_acc = L_shl (L_acc, add (negate (exp_gcode0), (-12 - 1 + 1 + 16))); - *gain_cod = extract_h (L_acc); /* Q1 */ - - /*----------------------------------------------* - * update table of past quantized energies * - *----------------------------------------------*/ - Gain_update (decoder->past_qua_en, L_gbk12); - - return; - -} diff --git a/src/libs/libg729/dec_lag3.c b/src/libs/libg729/dec_lag3.c deleted file mode 100644 index 196dd5f0..00000000 --- a/src/libs/libg729/dec_lag3.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*------------------------------------------------------------------------* - * Function Dec_lag3 * - * ~~~~~~~~ * - * Decoding of fractional pitch lag with 1/3 resolution. * - * See "Enc_lag3.c" for more details about the encoding procedure. * - *------------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" - -void -Dec_lag3 (Word16 index, /* input : received pitch index */ - Word16 pit_min, /* input : minimum pitch lag */ - Word16 pit_max, /* input : maximum pitch lag */ - Word16 i_subfr, /* input : subframe flag */ - Word16 * T0, /* output: integer part of pitch lag */ - Word16 * T0_frac /* output: fractional part of pitch lag */ - ) -{ - Word16 i; - Word16 T0_min, T0_max; - - if (i_subfr == 0) { /* if 1st subframe */ - if (sub (index, 197) < 0) { - /* *T0 = (index+2)/3 + 19 */ - - *T0 = add (mult (add (index, 2), 10923), 19); - - /* *T0_frac = index - *T0*3 + 58 */ - - i = add (add (*T0, *T0), *T0); - *T0_frac = add (sub (index, i), 58); - } - else { - *T0 = sub (index, 112); - *T0_frac = 0; - } - - } - - else { /* second subframe */ - - /* find T0_min and T0_max for 2nd subframe */ - - T0_min = sub (*T0, 5); - if (sub (T0_min, pit_min) < 0) { - T0_min = pit_min; - } - - T0_max = add (T0_min, 9); - if (sub (T0_max, pit_max) > 0) { - T0_max = pit_max; - T0_min = sub (T0_max, 9); - } - - /* i = (index+2)/3 - 1 */ - /* *T0 = i + t0_min; */ - - i = sub (mult (add (index, 2), 10923), 1); - *T0 = add (i, T0_min); - - /* t0_frac = index - 2 - i*3; */ - - i = add (add (i, i), i); - *T0_frac = sub (sub (index, 2), i); - } - - return; -} diff --git a/src/libs/libg729/dspfunc.c b/src/libs/libg729/dspfunc.c deleted file mode 100644 index f84f1b13..00000000 --- a/src/libs/libg729/dspfunc.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -#include "typedef.h" -#include "basic_op.h" - -#include "ld8a.h" -#include "tab_ld8a.h" - -/*___________________________________________________________________________ - | | - | Function Name : Pow2() | - | | - | L_x = pow(2.0, exponent.fraction) | - |---------------------------------------------------------------------------| - | Algorithm: | - | | - | The function Pow2(L_x) is approximated by a table and linear | - | interpolation. | - | | - | 1- i = bit10-b15 of fraction, 0 <= i <= 31 | - | 2- a = bit0-b9 of fraction | - | 3- L_x = tabpow[i]<<16 - (tabpow[i] - tabpow[i+1]) * a * 2 | - | 4- L_x = L_x >> (30-exponent) (with rounding) | - |___________________________________________________________________________| -*/ - - -Word32 -Pow2 ( /* (o) Q0 : result (range: 0<=val<=0x7fffffff) */ - Word16 exponent, /* (i) Q0 : Integer part. (range: 0<=val<=30) */ - Word16 fraction /* (i) Q15 : Fractional part. (range: 0.0<=val<1.0) */ - ) -{ - Word16 exp, i, a, tmp; - Word32 L_x; - - L_x = L_mult (fraction, 32); /* L_x = fraction<<6 */ - i = extract_h (L_x); /* Extract b10-b15 of fraction */ - L_x = L_shr (L_x, 1); - a = extract_l (L_x); /* Extract b0-b9 of fraction */ - a = a & (Word16) 0x7fff; - - L_x = L_deposit_h (tabpow[i]); /* tabpow[i] << 16 */ - tmp = sub (tabpow[i], tabpow[i + 1]); /* tabpow[i] - tabpow[i+1] */ - L_x = L_msu (L_x, tmp, a); /* L_x -= tmp*a*2 */ - - exp = sub (30, exponent); - L_x = L_shr_r (L_x, exp); - - return (L_x); -} - -/*___________________________________________________________________________ - | | - | Function Name : Log2() | - | | - | Compute log2(L_x). | - | L_x is positive. | - | | - | if L_x is negative or zero, result is 0. | - |---------------------------------------------------------------------------| - | Algorithm: | - | | - | The function Log2(L_x) is approximated by a table and linear | - | interpolation. | - | | - | 1- Normalization of L_x. | - | 2- exponent = 30-exponent | - | 3- i = bit25-b31 of L_x, 32 <= i <= 63 ->because of normalization. | - | 4- a = bit10-b24 | - | 5- i -=32 | - | 6- fraction = tablog[i]<<16 - (tablog[i] - tablog[i+1]) * a * 2 | - |___________________________________________________________________________| -*/ - -void -Log2 (Word32 L_x, /* (i) Q0 : input value */ - Word16 * exponent, /* (o) Q0 : Integer part of Log2. (range: 0<=val<=30) */ - Word16 * fraction /* (o) Q15: Fractional part of Log2. (range: 0<=val<1) */ - ) -{ - Word16 exp, i, a, tmp; - Word32 L_y; - - if (L_x <= (Word32) 0) { - *exponent = 0; - *fraction = 0; - return; - } - - exp = norm_l (L_x); - L_x = L_shl (L_x, exp); /* L_x is normalized */ - - *exponent = sub (30, exp); - - L_x = L_shr (L_x, 9); - i = extract_h (L_x); /* Extract b25-b31 */ - L_x = L_shr (L_x, 1); - a = extract_l (L_x); /* Extract b10-b24 of fraction */ - a = a & (Word16) 0x7fff; - - i = sub (i, 32); - - L_y = L_deposit_h (tablog[i]); /* tablog[i] << 16 */ - tmp = sub (tablog[i], tablog[i + 1]); /* tablog[i] - tablog[i+1] */ - L_y = L_msu (L_y, tmp, a); /* L_y -= tmp*a*2 */ - - *fraction = extract_h (L_y); - - return; -} - -/*___________________________________________________________________________ - | | - | Function Name : Inv_sqrt | - | | - | Compute 1/sqrt(L_x). | - | L_x is positive. | - | | - | if L_x is negative or zero, result is 1 (3fff ffff). | - |---------------------------------------------------------------------------| - | Algorithm: | - | | - | The function 1/sqrt(L_x) is approximated by a table and linear | - | interpolation. | - | | - | 1- Normalization of L_x. | - | 2- If (30-exponent) is even then shift right once. | - | 3- exponent = (30-exponent)/2 +1 | - | 4- i = bit25-b31 of L_x, 16 <= i <= 63 ->because of normalization. | - | 5- a = bit10-b24 | - | 6- i -=16 | - | 7- L_y = tabsqr[i]<<16 - (tabsqr[i] - tabsqr[i+1]) * a * 2 | - | 8- L_y >>= exponent | - |___________________________________________________________________________| -*/ - - -Word32 -Inv_sqrt ( /* (o) Q30 : output value (range: 0<=val<1) */ - Word32 L_x /* (i) Q0 : input value (range: 0<=val<=7fffffff) */ - ) -{ - Word16 exp, i, a, tmp; - Word32 L_y; - - if (L_x <= (Word32) 0) - return ((Word32) 0x3fffffffL); - - exp = norm_l (L_x); - L_x = L_shl (L_x, exp); /* L_x is normalize */ - - exp = sub (30, exp); - if ((exp & 1) == 0) /* If exponent even -> shift right */ - L_x = L_shr (L_x, 1); - - exp = shr (exp, 1); - exp = add (exp, 1); - - L_x = L_shr (L_x, 9); - i = extract_h (L_x); /* Extract b25-b31 */ - L_x = L_shr (L_x, 1); - a = extract_l (L_x); /* Extract b10-b24 */ - a = a & (Word16) 0x7fff; - - i = sub (i, 16); - - L_y = L_deposit_h (tabsqr[i]); /* tabsqr[i] << 16 */ - tmp = sub (tabsqr[i], tabsqr[i + 1]); /* tabsqr[i] - tabsqr[i+1]) */ - L_y = L_msu (L_y, tmp, a); /* L_y -= tmp*a*2 */ - - L_y = L_shr (L_y, exp); /* denormalization */ - - return (L_y); -} diff --git a/src/libs/libg729/gainpred.c b/src/libs/libg729/gainpred.c deleted file mode 100644 index 8d8943a4..00000000 --- a/src/libs/libg729/gainpred.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*---------------------------------------------------------------------------* - * Gain_predict() : make gcode0(exp_gcode0) * - * Gain_update() : update table of past quantized energies. * - * Gain_update_erasure() : update table of past quantized energies. * - * (frame erasure) * - * This function is used both Coder and Decoder. * - *---------------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" -#include "tab_ld8a.h" -#include "oper_32b.h" - -/*---------------------------------------------------------------------------* - * Function Gain_predict * - * ~~~~~~~~~~~~~~~~~~~~~~ * - * MA prediction is performed on the innovation energy (in dB with mean * - * removed). * - *---------------------------------------------------------------------------*/ -void -Gain_predict (Word16 past_qua_en[], /* (i) Q10 :Past quantized energies */ - Word16 code[], /* (i) Q13 :Innovative vector. */ - Word16 L_subfr, /* (i) :Subframe length. */ - Word16 * gcode0, /* (o) Qxx :Predicted codebook gain */ - Word16 * exp_gcode0 /* (o) :Q-Format(gcode0) */ - ) -{ - Word16 i, exp, frac; - Word32 L_tmp; - - /*-------------------------------* - * Energy coming from code * - *-------------------------------*/ - - L_tmp = 0; - for (i = 0; i < L_subfr; i++) - L_tmp = L_mac (L_tmp, code[i], code[i]); - - /*-----------------------------------------------------------------* - * Compute: means_ener - 10log10(ener_code/ L_sufr) * - * Note: mean_ener change from 36 dB to 30 dB because input/2 * - * * - * = 30.0 - 10 log10( ener_code / lcode) + 10log10(2^27) * - * !!ener_code in Q27!! * - * = 30.0 - 3.0103 * log2(ener_code) + 10log10(40) + 10log10(2^27) * - * = 30.0 - 3.0103 * log2(ener_code) + 16.02 + 81.278 * - * = 127.298 - 3.0103 * log2(ener_code) * - *-----------------------------------------------------------------*/ - - Log2 (L_tmp, &exp, &frac); /* Q27->Q0 ^Q0 ^Q15 */ - L_tmp = Mpy_32_16 (exp, frac, -24660); /* Q0 Q15 Q13 -> ^Q14 */ - /* hi:Q0+Q13+1 */ - /* lo:Q15+Q13-15+1 */ - /* -24660[Q13]=-3.0103 */ - L_tmp = L_mac (L_tmp, 32588, 32); /* 32588*32[Q14]=127.298 */ - - /*-----------------------------------------------------------------* - * Compute gcode0. * - * = Sum(i=0,3) pred[i]*past_qua_en[i] - ener_code + mean_ener * - *-----------------------------------------------------------------*/ - - L_tmp = L_shl (L_tmp, 10); /* From Q14 to Q24 */ - for (i = 0; i < 4; i++) - L_tmp = L_mac (L_tmp, pred[i], past_qua_en[i]); /* Q13*Q10 ->Q24 */ - - *gcode0 = extract_h (L_tmp); /* From Q24 to Q8 */ - - /*-----------------------------------------------------------------* - * gcode0 = pow(10.0, gcode0/20) * - * = pow(2, 3.3219*gcode0/20) * - * = pow(2, 0.166*gcode0) * - *-----------------------------------------------------------------*/ - - L_tmp = L_mult (*gcode0, 5439); /* *0.166 in Q15, result in Q24 */ - L_tmp = L_shr (L_tmp, 8); /* From Q24 to Q16 */ - L_Extract (L_tmp, &exp, &frac); /* Extract exponent of gcode0 */ - - *gcode0 = extract_l (Pow2 (14, frac)); /* Put 14 as exponent so that */ - /* output of Pow2() will be: */ - /* 16768 < Pow2() <= 32767 */ - *exp_gcode0 = sub (14, exp); -} - - -/*---------------------------------------------------------------------------* - * Function Gain_update * - * ~~~~~~~~~~~~~~~~~~~~~~ * - * update table of past quantized energies * - *---------------------------------------------------------------------------*/ -void -Gain_update (Word16 past_qua_en[], /* (io) Q10 :Past quantized energies */ - Word32 L_gbk12 /* (i) Q13 : gbk1[indice1][1]+gbk2[indice2][1] */ - ) -{ - Word16 i, tmp; - Word16 exp, frac; - Word32 L_acc; - - for (i = 3; i > 0; i--) { - past_qua_en[i] = past_qua_en[i - 1]; /* Q10 */ - } - /*----------------------------------------------------------------------* - * -- past_qua_en[0] = 20*log10(gbk1[index1][1]+gbk2[index2][1]); -- * - * 2 * 10 log10( gbk1[index1][1]+gbk2[index2][1] ) * - * = 2 * 3.0103 log2( gbk1[index1][1]+gbk2[index2][1] ) * - * = 2 * 3.0103 log2( gbk1[index1][1]+gbk2[index2][1] ) * - * 24660:Q12(6.0205) * - *----------------------------------------------------------------------*/ - - Log2 (L_gbk12, &exp, &frac); /* L_gbk12:Q13 */ - L_acc = L_Comp (sub (exp, 13), frac); /* L_acc:Q16 */ - tmp = extract_h (L_shl (L_acc, 13)); /* tmp:Q13 */ - past_qua_en[0] = mult (tmp, 24660); /* past_qua_en[]:Q10 */ -} - - -/*---------------------------------------------------------------------------* - * Function Gain_update_erasure * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * - * update table of past quantized energies (frame erasure) * - *---------------------------------------------------------------------------* - * av_pred_en = 0.0; * - * for (i = 0; i < 4; i++) * - * av_pred_en += past_qua_en[i]; * - * av_pred_en = av_pred_en*0.25 - 4.0; * - * if (av_pred_en < -14.0) av_pred_en = -14.0; * - *---------------------------------------------------------------------------*/ -void -Gain_update_erasure (Word16 past_qua_en[] /* (i) Q10 :Past quantized energies */ - ) -{ - Word16 i, av_pred_en; - Word32 L_tmp; - - L_tmp = 0; /* Q10 */ - for (i = 0; i < 4; i++) - L_tmp = L_add (L_tmp, L_deposit_l (past_qua_en[i])); - av_pred_en = extract_l (L_shr (L_tmp, 2)); - av_pred_en = sub (av_pred_en, 4096); /* Q10 */ - - if (sub (av_pred_en, -14336) < 0) { - av_pred_en = -14336; /* 14336:14[Q10] */ - } - - for (i = 3; i > 0; i--) { - past_qua_en[i] = past_qua_en[i - 1]; - } - past_qua_en[0] = av_pred_en; -} diff --git a/src/libs/libg729/oper_32b.c b/src/libs/libg729/oper_32b.c deleted file mode 100644 index 48e29ef1..00000000 --- a/src/libs/libg729/oper_32b.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" - -/*___________________________________________________________________________ - | | - | This file contains operations in double precision. | - | These operations are not standard double precision operations. | - | They are used where single precision is not enough but the full 32 bits | - | precision is not necessary. For example, the function Div_32() has a | - | 24 bits precision which is enough for our purposes. | - | | - | The double precision numbers use a special representation: | - | | - | L_32 = hi<<16 + lo<<1 | - | | - | L_32 is a 32 bit integer. | - | hi and lo are 16 bit signed integers. | - | As the low part also contains the sign, this allows fast multiplication. | - | | - | 0x8000 0000 <= L_32 <= 0x7fff fffe. | - | | - | We will use DPF (Double Precision Format )in this file to specify | - | this special format. | - |___________________________________________________________________________| -*/ - -/*___________________________________________________________________________ - | | - | Function L_Extract() | - | | - | Extract from a 32 bit integer two 16 bit DPF. | - | | - | Arguments: | - | | - | L_32 : 32 bit integer. | - | 0x8000 0000 <= L_32 <= 0x7fff ffff. | - | hi : b16 to b31 of L_32 | - | lo : (L_32 - hi<<16)>>1 | - |___________________________________________________________________________| -*/ - -void -L_Extract (Word32 L_32, Word16 * hi, Word16 * lo) -{ - *hi = extract_h (L_32); - *lo = extract_l (L_msu (L_shr (L_32, 1), *hi, 16384)); /* lo = L_32>>1 */ - return; -} - -/*___________________________________________________________________________ - | | - | Function L_Comp() | - | | - | Compose from two 16 bit DPF a 32 bit integer. | - | | - | L_32 = hi<<16 + lo<<1 | - | | - | Arguments: | - | | - | hi msb | - | lo lsf (with sign) | - | | - | Return Value : | - | | - | 32 bit long signed integer (Word32) whose value falls in the | - | range : 0x8000 0000 <= L_32 <= 0x7fff fff0. | - | | - |___________________________________________________________________________| -*/ - -Word32 -L_Comp (Word16 hi, Word16 lo) -{ - Word32 L_32; - - L_32 = L_deposit_h (hi); - return (L_mac (L_32, lo, 1)); /* = hi<<16 + lo<<1 */ -} - -/*___________________________________________________________________________ - | Function Mpy_32() | - | | - | Multiply two 32 bit integers (DPF). The result is divided by 2**31 | - | | - | L_32 = (hi1*hi2)<<1 + ( (hi1*lo2)>>15 + (lo1*hi2)>>15 )<<1 | - | | - | This operation can also be viewed as the multiplication of two Q31 | - | number and the result is also in Q31. | - | | - | Arguments: | - | | - | hi1 hi part of first number | - | lo1 lo part of first number | - | hi2 hi part of second number | - | lo2 lo part of second number | - | | - |___________________________________________________________________________| -*/ - -Word32 -Mpy_32 (Word16 hi1, Word16 lo1, Word16 hi2, Word16 lo2) -{ - Word32 L_32; - - L_32 = L_mult (hi1, hi2); - L_32 = L_mac (L_32, mult (hi1, lo2), 1); - L_32 = L_mac (L_32, mult (lo1, hi2), 1); - - return (L_32); -} - -/*___________________________________________________________________________ - | Function Mpy_32_16() | - | | - | Multiply a 16 bit integer by a 32 bit (DPF). The result is divided | - | by 2**15 | - | | - | This operation can also be viewed as the multiplication of a Q31 | - | number by a Q15 number, the result is in Q31. | - | | - | L_32 = (hi1*lo2)<<1 + ((lo1*lo2)>>15)<<1 | - | | - | Arguments: | - | | - | hi hi part of 32 bit number. | - | lo lo part of 32 bit number. | - | n 16 bit number. | - | | - |___________________________________________________________________________| -*/ - -Word32 -Mpy_32_16 (Word16 hi, Word16 lo, Word16 n) -{ - Word32 L_32; - - L_32 = L_mult (hi, n); - L_32 = L_mac (L_32, mult (lo, n), 1); - - return (L_32); -} - -/*___________________________________________________________________________ - | | - | Function Name : Div_32 | - | | - | Purpose : | - | Fractional integer division of two 32 bit numbers. | - | L_num / L_denom. | - | L_num and L_denom must be positive and L_num < L_denom. | - | L_denom = denom_hi<<16 + denom_lo<<1 | - | denom_hi is a normalize number. | - | The result is in Q30. | - | | - | Inputs : | - | | - | L_num | - | 32 bit long signed integer (Word32) whose value falls in the | - | range : 0x0000 0000 < L_num < L_denom | - | | - | L_denom = denom_hi<<16 + denom_lo<<1 (DPF) | - | | - | denom_hi | - | 16 bit positive normalized integer whose value falls in the | - | range : 0x4000 < hi < 0x7fff | - | denom_lo | - | 16 bit positive integer whose value falls in the | - | range : 0 < lo < 0x7fff | - | | - | Return Value : | - | | - | L_div | - | 32 bit long signed integer (Word32) whose value falls in the | - | range : 0x0000 0000 <= L_div <= 0x7fff ffff. | - | It's a Q31 value | - | | - | Algorithm: | - | | - | - find = 1/L_denom. | - | First approximation: approx = 1 / denom_hi | - | 1/L_denom = approx * (2.0 - L_denom * approx ) | - | | - | - result = L_num * (1/L_denom) | - |___________________________________________________________________________| -*/ - -Word32 -Div_32 (Word32 L_num, Word16 denom_hi, Word16 denom_lo) -{ - Word16 approx, hi, lo, n_hi, n_lo; - Word32 L_32; - - - /* First approximation: 1 / L_denom = 1/denom_hi */ - - approx = div_s ((Word16) 0x3fff, denom_hi); /* result in Q14 */ - /* Note: 3fff = 0.5 in Q15 */ - - /* 1/L_denom = approx * (2.0 - L_denom * approx) */ - - L_32 = Mpy_32_16 (denom_hi, denom_lo, approx); /* result in Q30 */ - - - L_32 = L_sub ((Word32) 0x7fffffffL, L_32); /* result in Q30 */ - - L_Extract (L_32, &hi, &lo); - - L_32 = Mpy_32_16 (hi, lo, approx); /* = 1/L_denom in Q29 */ - - /* L_num * (1/L_denom) */ - - L_Extract (L_32, &hi, &lo); - L_Extract (L_num, &n_hi, &n_lo); - L_32 = Mpy_32 (n_hi, n_lo, hi, lo); /* result in Q29 */ - L_32 = L_shl (L_32, 2); /* From Q29 to Q31 */ - - return (L_32); -} diff --git a/src/libs/libg729/p_parity.c b/src/libs/libg729/p_parity.c deleted file mode 100644 index 34a963af..00000000 --- a/src/libs/libg729/p_parity.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*------------------------------------------------------* - * Parity_pitch - compute parity bit for first 6 MSBs * - *------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" - -Word16 -Parity_Pitch ( /* output: parity bit (XOR of 6 MSB bits) */ - Word16 pitch_index /* input : index for which parity to compute */ - ) -{ - Word16 temp, sum, i, bit; - - temp = shr (pitch_index, 1); - - sum = 1; - for (i = 0; i <= 5; i++) { - temp = shr (temp, 1); - bit = temp & (Word16) 1; - sum = add (sum, bit); - } - sum = sum & (Word16) 1; - - - return sum; -} - -/*--------------------------------------------------------------------* - * check_parity_pitch - check parity of index with transmitted parity * - *--------------------------------------------------------------------*/ - -Word16 -Check_Parity_Pitch ( /* output: 0 = no error, 1= error */ - Word16 pitch_index, /* input : index of parameter */ - Word16 parity /* input : parity bit */ - ) -{ - Word16 temp, sum, i, bit; - - temp = shr (pitch_index, 1); - - sum = 1; - for (i = 0; i <= 5; i++) { - temp = shr (temp, 1); - bit = temp & (Word16) 1; - sum = add (sum, bit); - } - sum = add (sum, parity); - sum = sum & (Word16) 1; - - return sum; -} diff --git a/src/libs/libg729/pitch_a.c b/src/libs/libg729/pitch_a.c deleted file mode 100644 index fc59209c..00000000 --- a/src/libs/libg729/pitch_a.c +++ /dev/null @@ -1,570 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*---------------------------------------------------------------------------* - * Pitch related functions * - * ~~~~~~~~~~~~~~~~~~~~~~~ * - *---------------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" -#include "ld8a.h" -#include "tab_ld8a.h" -#include "util.h" - -/*---------------------------------------------------------------------------* - * Function Pitch_ol_fast * - * ~~~~~~~~~~~~~~~~~~~~~~~ * - * Compute the open loop pitch lag. (fast version) * - * * - *---------------------------------------------------------------------------*/ - - -Word16 -Pitch_ol_fast ( /* output: open loop pitch lag */ - Word16 signal[], /* input : signal used to compute the open loop pitch */ - /* signal[-pit_max] to signal[-1] should be known */ - Word16 pit_max, /* input : maximum pitch lag */ - Word16 L_frame /* input : length of frame to compute pitch */ - ) -{ - Flag Overflow; - Word16 i, j; - Word16 max1, max2, max3; - Word16 max_h, max_l, ener_h, ener_l; - Word16 T1, T2, T3; - Word16 *p, *p1; - Word32 max, sum, L_temp; - - /* Scaled signal */ - - Word16 scaled_signal[L_FRAME + PIT_MAX]; - Word16 *scal_sig; - - scal_sig = &scaled_signal[pit_max]; - - /*--------------------------------------------------------* - * Verification for risk of overflow. * - *--------------------------------------------------------*/ - - Overflow = 0; - sum = 0; - - for (i = -pit_max; i < L_frame; i += 2) - sum = L_mac_o (sum, signal[i], signal[i], &Overflow); - - /*--------------------------------------------------------* - * Scaling of input signal. * - * * - * if Overflow -> scal_sig[i] = signal[i]>>3 * - * else if sum < 1^20 -> scal_sig[i] = signal[i]<<3 * - * else -> scal_sig[i] = signal[i] * - *--------------------------------------------------------*/ - - if (Overflow == 1) { - for (i = -pit_max; i < L_frame; i++) { - scal_sig[i] = shr (signal[i], 3); - } - } - else { - L_temp = L_sub (sum, (Word32) 1048576L); - if (L_temp < (Word32) 0) { /* if (sum < 2^20) */ - for (i = -pit_max; i < L_frame; i++) { - scal_sig[i] = shl (signal[i], 3); - } - } - else { - for (i = -pit_max; i < L_frame; i++) { - scal_sig[i] = signal[i]; - } - } - } - - /*--------------------------------------------------------------------* - * The pitch lag search is divided in three sections. * - * Each section cannot have a pitch multiple. * - * We find a maximum for each section. * - * We compare the maxima of each section by favoring small lag. * - * * - * First section: lag delay = 20 to 39 * - * Second section: lag delay = 40 to 79 * - * Third section: lag delay = 80 to 143 * - *--------------------------------------------------------------------*/ - - /* First section */ - - max = MIN_32; - T1 = 20; /* Only to remove warning from some compilers */ - for (i = 20; i < 40; i++) { - p = scal_sig; - p1 = &scal_sig[-i]; - sum = 0; - for (j = 0; j < L_frame; j += 2, p += 2, p1 += 2) - sum = L_mac (sum, *p, *p1); - L_temp = L_sub (sum, max); - if (L_temp > 0) { - max = sum; - T1 = i; - } - } - - /* compute energy of maximum */ - - sum = 1; /* to avoid division by zero */ - p = &scal_sig[-T1]; - for (i = 0; i < L_frame; i += 2, p += 2) - sum = L_mac (sum, *p, *p); - - /* max1 = max/sqrt(energy) */ - /* This result will always be on 16 bits !! */ - - sum = Inv_sqrt (sum); /* 1/sqrt(energy), result in Q30 */ - L_Extract (max, &max_h, &max_l); - L_Extract (sum, &ener_h, &ener_l); - sum = Mpy_32 (max_h, max_l, ener_h, ener_l); - max1 = extract_l (sum); - - /* Second section */ - - max = MIN_32; - T2 = 40; /* Only to remove warning from some compilers */ - for (i = 40; i < 80; i++) { - p = scal_sig; - p1 = &scal_sig[-i]; - sum = 0; - for (j = 0; j < L_frame; j += 2, p += 2, p1 += 2) - sum = L_mac (sum, *p, *p1); - L_temp = L_sub (sum, max); - if (L_temp > 0) { - max = sum; - T2 = i; - } - } - - /* compute energy of maximum */ - - sum = 1; /* to avoid division by zero */ - p = &scal_sig[-T2]; - for (i = 0; i < L_frame; i += 2, p += 2) - sum = L_mac (sum, *p, *p); - - /* max2 = max/sqrt(energy) */ - /* This result will always be on 16 bits !! */ - - sum = Inv_sqrt (sum); /* 1/sqrt(energy), result in Q30 */ - L_Extract (max, &max_h, &max_l); - L_Extract (sum, &ener_h, &ener_l); - sum = Mpy_32 (max_h, max_l, ener_h, ener_l); - max2 = extract_l (sum); - - /* Third section */ - - max = MIN_32; - T3 = 80; /* Only to remove warning from some compilers */ - for (i = 80; i < 143; i += 2) { - p = scal_sig; - p1 = &scal_sig[-i]; - sum = 0; - for (j = 0; j < L_frame; j += 2, p += 2, p1 += 2) - sum = L_mac (sum, *p, *p1); - L_temp = L_sub (sum, max); - if (L_temp > 0) { - max = sum; - T3 = i; - } - } - - /* Test around max3 */ - - i = T3; - p = scal_sig; - p1 = &scal_sig[-(i + 1)]; - sum = 0; - for (j = 0; j < L_frame; j += 2, p += 2, p1 += 2) - sum = L_mac (sum, *p, *p1); - L_temp = L_sub (sum, max); - if (L_temp > 0) { - max = sum; - T3 = i + (Word16) 1; - } - - p = scal_sig; - p1 = &scal_sig[-(i - 1)]; - sum = 0; - for (j = 0; j < L_frame; j += 2, p += 2, p1 += 2) - sum = L_mac (sum, *p, *p1); - L_temp = L_sub (sum, max); - if (L_temp > 0) { - max = sum; - T3 = i - (Word16) 1; - } - - /* compute energy of maximum */ - - sum = 1; /* to avoid division by zero */ - p = &scal_sig[-T3]; - for (i = 0; i < L_frame; i += 2, p += 2) - sum = L_mac (sum, *p, *p); - - /* max1 = max/sqrt(energy) */ - /* This result will always be on 16 bits !! */ - - sum = Inv_sqrt (sum); /* 1/sqrt(energy), result in Q30 */ - L_Extract (max, &max_h, &max_l); - L_Extract (sum, &ener_h, &ener_l); - sum = Mpy_32 (max_h, max_l, ener_h, ener_l); - max3 = extract_l (sum); - - /*-----------------------* - * Test for multiple. * - *-----------------------*/ - - /* if( abs(T2*2 - T3) < 5) */ - /* max2 += max3 * 0.25; */ - - i = sub (shl (T2, 1), T3); - j = sub (abs_s (i), 5); - if (j < 0) - max2 = add (max2, shr (max3, 2)); - - /* if( abs(T2*3 - T3) < 7) */ - /* max2 += max3 * 0.25; */ - - i = add (i, T2); - j = sub (abs_s (i), 7); - if (j < 0) - max2 = add (max2, shr (max3, 2)); - - /* if( abs(T1*2 - T2) < 5) */ - /* max1 += max2 * 0.20; */ - - i = sub (shl (T1, 1), T2); - j = sub (abs_s (i), 5); - if (j < 0) - max1 = add (max1, mult (max2, 6554)); - - /* if( abs(T1*3 - T2) < 7) */ - /* max1 += max2 * 0.20; */ - - i = add (i, T1); - j = sub (abs_s (i), 7); - if (j < 0) - max1 = add (max1, mult (max2, 6554)); - - /*--------------------------------------------------------------------* - * Compare the 3 sections maxima. * - *--------------------------------------------------------------------*/ - - if (sub (max1, max2) < 0) { - max1 = max2; - T1 = T2; - } - if (sub (max1, max3) < 0) { - T1 = T3; - } - - return T1; -} - - - - -/*--------------------------------------------------------------------------* - * Function Dot_Product() * - * ~~~~~~~~~~~~~~~~~~~~~~ * - *--------------------------------------------------------------------------*/ - -Word32 -Dot_Product ( /* (o) :Result of scalar product. */ - Word16 x[], /* (i) :First vector. */ - Word16 y[], /* (i) :Second vector. */ - Word16 lg /* (i) :Number of point. */ - ) -{ - Word16 i; - Word32 sum; - - sum = 0; - for (i = 0; i < lg; i++) - sum = L_mac (sum, x[i], y[i]); - - return sum; -} - -/*--------------------------------------------------------------------------* - * Function Pitch_fr3_fast() * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~ * - * Fast version of the pitch close loop. * - *--------------------------------------------------------------------------*/ - -Word16 -Pitch_fr3_fast ( /* (o) : pitch period. */ - Word16 exc[], /* (i) : excitation buffer */ - Word16 xn[], /* (i) : target vector */ - Word16 h[], /* (i) Q12 : impulse response of filters. */ - Word16 L_subfr, /* (i) : Length of subframe */ - Word16 t0_min, /* (i) : minimum value in the searched range. */ - Word16 t0_max, /* (i) : maximum value in the searched range. */ - Word16 i_subfr, /* (i) : indicator for first subframe. */ - Word16 * pit_frac /* (o) : chosen fraction. */ - ) -{ - Word16 t, t0; - Word16 Dn[L_SUBFR]; - Word16 exc_tmp[L_SUBFR]; - Word32 max, corr, L_temp; - - /*-----------------------------------------------------------------* - * Compute correlation of target vector with impulse response. * - *-----------------------------------------------------------------*/ - - Cor_h_X (h, xn, Dn); - - /*-----------------------------------------------------------------* - * Find maximum integer delay. * - *-----------------------------------------------------------------*/ - - max = MIN_32; - t0 = t0_min; /* Only to remove warning from some compilers */ - - for (t = t0_min; t <= t0_max; t++) { - corr = Dot_Product (Dn, &exc[-t], L_subfr); - L_temp = L_sub (corr, max); - if (L_temp > 0) { - max = corr; - t0 = t; - } - } - - /*-----------------------------------------------------------------* - * Test fractions. * - *-----------------------------------------------------------------*/ - - /* Fraction 0 */ - - Pred_lt_3 (exc, t0, 0, L_subfr); - max = Dot_Product (Dn, exc, L_subfr); - *pit_frac = 0; - - /* If first subframe and lag > 84 do not search fractional pitch */ - - if ((i_subfr == 0) && (sub (t0, 84) > 0)) - return t0; - - Copy (exc, exc_tmp, L_subfr); - - /* Fraction -1/3 */ - - Pred_lt_3 (exc, t0, -1, L_subfr); - corr = Dot_Product (Dn, exc, L_subfr); - L_temp = L_sub (corr, max); - if (L_temp > 0) { - max = corr; - *pit_frac = -1; - Copy (exc, exc_tmp, L_subfr); - } - - /* Fraction +1/3 */ - - Pred_lt_3 (exc, t0, 1, L_subfr); - corr = Dot_Product (Dn, exc, L_subfr); - L_temp = L_sub (corr, max); - if (L_temp > 0) { - max = corr; - *pit_frac = 1; - } - else - Copy (exc_tmp, exc, L_subfr); - - return t0; -} - - -/*---------------------------------------------------------------------* - * Function G_pitch: * - * ~~~~~~~~ * - *---------------------------------------------------------------------* - * Compute correlations and to use in gains quantizer. * - * Also compute the gain of pitch. Result in Q14 * - * if (gain < 0) gain =0 * - * if (gain >1.2) gain =1.2 * - *---------------------------------------------------------------------*/ - - -Word16 -G_pitch ( /* (o) Q14 : Gain of pitch lag saturated to 1.2 */ - Word16 xn[], /* (i) : Pitch target. */ - Word16 y1[], /* (i) : Filtered adaptive codebook. */ - Word16 g_coeff[], /* (i) : Correlations need for gain quantization. */ - Word16 L_subfr /* (i) : Length of subframe. */ - ) -{ - Flag Overflow; - Word16 i; - Word16 xy, yy, exp_xy, exp_yy, gain; - Word32 s; - - Word16 scaled_y1[L_SUBFR]; - - /* divide "y1[]" by 4 to avoid overflow */ - - for (i = 0; i < L_subfr; i++) - scaled_y1[i] = shr (y1[i], 2); - - /* Compute scalar product */ - - Overflow = 0; - s = 1; /* Avoid case of all zeros */ - for (i = 0; i < L_subfr; i++) - s = L_mac_o (s, y1[i], y1[i], &Overflow); - - if (Overflow == 0) { - exp_yy = norm_l (s); - yy = wround (L_shl (s, exp_yy)); - } - else { - s = 1; /* Avoid case of all zeros */ - for (i = 0; i < L_subfr; i++) - s = L_mac (s, scaled_y1[i], scaled_y1[i]); - exp_yy = norm_l (s); - yy = wround (L_shl (s, exp_yy)); - exp_yy = sub (exp_yy, 4); - } - - /* Compute scalar product */ - - Overflow = 0; - s = 0; - for (i = 0; i < L_subfr; i++) - s = L_mac_o (s, xn[i], y1[i], &Overflow); - - if (Overflow == 0) { - exp_xy = norm_l (s); - xy = wround (L_shl (s, exp_xy)); - } - else { - s = 0; - for (i = 0; i < L_subfr; i++) - s = L_mac (s, xn[i], scaled_y1[i]); - exp_xy = norm_l (s); - xy = wround (L_shl (s, exp_xy)); - exp_xy = sub (exp_xy, 2); - } - - g_coeff[0] = yy; - g_coeff[1] = sub (15, exp_yy); - g_coeff[2] = xy; - g_coeff[3] = sub (15, exp_xy); - - /* If (xy <= 0) gain = 0 */ - - - if (xy <= 0) { - g_coeff[3] = -15; /* Force exp_xy to -15 = (15-30) */ - return ((Word16) 0); - } - - /* compute gain = xy/yy */ - - xy = shr (xy, 1); /* Be sure xy < yy */ - gain = div_s (xy, yy); - - i = sub (exp_xy, exp_yy); - gain = shr (gain, i); /* saturation if > 1.99 in Q14 */ - - /* if(gain >1.2) gain = 1.2 in Q14 */ - - if (sub (gain, 19661) > 0) { - gain = 19661; - } - - - return (gain); -} - - - -/*----------------------------------------------------------------------* - * Function Enc_lag3 * - * ~~~~~~~~ * - * Encoding of fractional pitch lag with 1/3 resolution. * - *----------------------------------------------------------------------* - * The pitch range for the first subframe is divided as follows: * - * 19 1/3 to 84 2/3 resolution 1/3 * - * 85 to 143 resolution 1 * - * * - * The period in the first subframe is encoded with 8 bits. * - * For the range with fractions: * - * index = (T-19)*3 + frac - 1; where T=[19..85] and frac=[-1,0,1] * - * and for the integer only range * - * index = (T - 85) + 197; where T=[86..143] * - *----------------------------------------------------------------------* - * For the second subframe a resolution of 1/3 is always used, and the * - * search range is relative to the lag in the first subframe. * - * If t0 is the lag in the first subframe then * - * t_min=t0-5 and t_max=t0+4 and the range is given by * - * t_min - 2/3 to t_max + 2/3 * - * * - * The period in the 2nd subframe is encoded with 5 bits: * - * index = (T-(t_min-1))*3 + frac - 1; where T[t_min-1 .. t_max+1] * - *----------------------------------------------------------------------*/ - - -Word16 -Enc_lag3 ( /* output: Return index of encoding */ - Word16 T0, /* input : Pitch delay */ - Word16 T0_frac, /* input : Fractional pitch delay */ - Word16 * T0_min, /* in/out: Minimum search delay */ - Word16 * T0_max, /* in/out: Maximum search delay */ - Word16 pit_min, /* input : Minimum pitch delay */ - Word16 pit_max, /* input : Maximum pitch delay */ - Word16 pit_flag /* input : Flag for 1st subframe */ - ) -{ - Word16 index, i; - - if (pit_flag == 0) { /* if 1st subframe */ - /* encode pitch delay (with fraction) */ - - if (sub (T0, 85) <= 0) { - /* index = t0*3 - 58 + t0_frac */ - i = add (add (T0, T0), T0); - index = add (sub (i, 58), T0_frac); - } - else { - index = add (T0, 112); - } - - /* find T0_min and T0_max for second subframe */ - - *T0_min = sub (T0, 5); - if (sub (*T0_min, pit_min) < 0) { - *T0_min = pit_min; - } - - *T0_max = add (*T0_min, 9); - if (sub (*T0_max, pit_max) > 0) { - *T0_max = pit_max; - *T0_min = sub (*T0_max, 9); - } - } - else { /* if second subframe */ - - - /* i = t0 - t0_min; */ - /* index = i*3 + 2 + t0_frac; */ - i = sub (T0, *T0_min); - i = add (add (i, i), i); - index = add (add (i, 2), T0_frac); - } - - - return index; -} diff --git a/src/libs/libg729/post_pro.c b/src/libs/libg729/post_pro.c deleted file mode 100644 index 40b53efd..00000000 --- a/src/libs/libg729/post_pro.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*------------------------------------------------------------------------* - * Function Post_Process() * - * * - * Post-processing of output speech. * - * - 2nd order high pass filter with cut off frequency at 100 Hz. * - * - Multiplication by two of output speech with saturation. * - *-----------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" - -#include "ld8a.h" -#include "tab_ld8a.h" - -/*------------------------------------------------------------------------* - * 2nd order high pass filter with cut off frequency at 100 Hz. * - * Designed with SPPACK efi command -40 dB att, 0.25 ri. * - * * - * Algorithm: * - * * - * y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2] * - * + a[1]*y[i-1] + a[2]*y[i-2]; * - * * - * b[3] = {0.93980581E+00, -0.18795834E+01, 0.93980581E+00}; * - * a[3] = {0.10000000E+01, 0.19330735E+01, -0.93589199E+00}; * - *-----------------------------------------------------------------------*/ - - -/* Initialization of values */ - -void -Init_Post_Process (DecState *decoder) -{ - decoder->y2_hi = 0; - decoder->y2_lo = 0; - decoder->y1_hi = 0; - decoder->y1_lo = 0; - decoder->x0 = 0; - decoder->x1 = 0; -} - - -void -Post_Process (DecState *decoder, - Word16 signal[], /* input/output signal */ - Word16 lg) -{ /* length of signal */ - Word16 i, x2; - Word32 L_tmp; - - for (i = 0; i < lg; i++) { - x2 = decoder->x1; - decoder->x1 = decoder->x0; - decoder->x0 = signal[i]; - - /* y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2] */ - /* + a[1]*y[i-1] + a[2] * y[i-2]; */ - - L_tmp = Mpy_32_16 (decoder->y1_hi, decoder->y1_lo, a100[1]); - L_tmp = L_add (L_tmp, Mpy_32_16 (decoder->y2_hi, decoder->y2_lo, a100[2])); - L_tmp = L_mac (L_tmp, decoder->x0, b100[0]); - L_tmp = L_mac (L_tmp, decoder->x1, b100[1]); - L_tmp = L_mac (L_tmp, x2, b100[2]); - L_tmp = L_shl (L_tmp, 2); /* Q29 --> Q31 (Q13 --> Q15) */ - - /* Multiplication by two of output speech with saturation. */ - signal[i] = wround (L_shl (L_tmp, 1)); - - decoder->y2_hi = decoder->y1_hi; - decoder->y2_lo = decoder->y1_lo; - L_Extract (L_tmp, &decoder->y1_hi, &decoder->y1_lo); - } - return; -} diff --git a/src/libs/libg729/pre_proc.c b/src/libs/libg729/pre_proc.c deleted file mode 100644 index 001a9b01..00000000 --- a/src/libs/libg729/pre_proc.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*------------------------------------------------------------------------* - * Function Pre_Process() * - * * - * Preprocessing of input speech. * - * - 2nd order high pass filter with cut off frequency at 140 Hz. * - * - Divide input by two. * - *-----------------------------------------------------------------------*/ - - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" - -#include "ld8a.h" -#include "tab_ld8a.h" - - -/*------------------------------------------------------------------------* - * 2nd order high pass filter with cut off frequency at 140 Hz. * - * Designed with SPPACK efi command -40 dB att, 0.25 ri. * - * * - * Algorithm: * - * * - * y[i] = b[0]*x[i]/2 + b[1]*x[i-1]/2 + b[2]*x[i-2]/2 * - * + a[1]*y[i-1] + a[2]*y[i-2]; * - * * - * b[3] = {0.92727435E+00, -0.18544941E+01, 0.92727435E+00}; * - * a[3] = {0.10000000E+01, 0.19059465E+01, -0.91140240E+00}; * - * * - * Input are divided by two in the filtering process. * - *-----------------------------------------------------------------------*/ - - -/* Initialization of values */ - -void Init_Pre_Process (CodState *coder) -{ - coder->y2_hi = 0; - coder->y2_lo = 0; - coder->y1_hi = 0; - coder->y1_lo = 0; - coder->x0 = 0; - coder->x1 = 0; -} - - -void -Pre_Process (CodState *coder, - Word16 signal[], /* input/output signal */ - Word16 lg) -{ /* length of signal */ - Word16 i, x2; - Word32 L_tmp; - - for (i = 0; i < lg; i++) { - x2 = coder->x1; - coder->x1 = coder->x0; - coder->x0 = signal[i]; - - /* y[i] = b[0]*x[i]/2 + b[1]*x[i-1]/2 + b140[2]*x[i-2]/2 */ - /* + a[1]*y[i-1] + a[2] * y[i-2]; */ - - L_tmp = Mpy_32_16 (coder->y1_hi, coder->y1_lo, a140[1]); - L_tmp = L_add (L_tmp, Mpy_32_16 (coder->y2_hi, coder->y2_lo, a140[2])); - L_tmp = L_mac (L_tmp, coder->x0, b140[0]); - L_tmp = L_mac (L_tmp, coder->x1, b140[1]); - L_tmp = L_mac (L_tmp, x2, b140[2]); - L_tmp = L_shl (L_tmp, 3); /* Q28 --> Q31 (Q12 --> Q15) */ - signal[i] = wround (L_tmp); - - coder->y2_hi = coder->y1_hi; - coder->y2_lo = coder->y1_lo; - L_Extract (L_tmp, &coder->y1_hi, &coder->y1_lo); - } - return; -} diff --git a/src/libs/libg729/pred_lt3.c b/src/libs/libg729/pred_lt3.c deleted file mode 100644 index 2a0706fe..00000000 --- a/src/libs/libg729/pred_lt3.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*-------------------------------------------------------------------* - * Function Pred_lt_3() * - * ~~~~~~~~~~~ * - *-------------------------------------------------------------------* - * Compute the result of long term prediction with fractional * - * interpolation of resolution 1/3. * - * * - * On return exc[0..L_subfr-1] contains the interpolated signal * - * (adaptive codebook excitation) * - *-------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" -#include "tab_ld8a.h" - -void -Pred_lt_3 (Word16 exc[], /* in/out: excitation buffer */ - Word16 T0, /* input : integer pitch lag */ - Word16 frac, /* input : fraction of lag */ - Word16 L_subfr /* input : subframe size */ - ) -{ - Word16 i, j, k; - Word16 *x0, *x1, *x2, *c1, *c2; - Word32 s; - - x0 = &exc[-T0]; - - frac = negate (frac); - if (frac < 0) { - frac = add (frac, UP_SAMP); - x0--; - } - - for (j = 0; j < L_subfr; j++) { - x1 = x0++; - x2 = x0; - c1 = &inter_3l[frac]; - c2 = &inter_3l[sub (UP_SAMP, frac)]; - - s = 0; - for (i = 0, k = 0; i < L_INTER10; i++, k += UP_SAMP) { - s = L_mac (s, x1[-i], c1[k]); - s = L_mac (s, x2[i], c2[k]); - } - - exc[j] = wround (s); - } - - return; -} diff --git a/src/libs/libg729/qua_gain.c b/src/libs/libg729/qua_gain.c deleted file mode 100644 index 0488aacd..00000000 --- a/src/libs/libg729/qua_gain.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" - -#include "ld8a.h" -#include "tab_ld8a.h" -#include "taming.h" - -void Gbk_presel (Word16 best_gain[], /* (i) [0] Q9 : unquantized pitch gain */ - /* (i) [1] Q2 : unquantized code gain */ - Word16 * cand1, /* (o) : index of best 1st stage vector */ - Word16 * cand2, /* (o) : index of best 2nd stage vector */ - Word16 gcode0 /* (i) Q4 : presearch for gain codebook */ - ); - - -/*---------------------------------------------------------------------------* - * Function Qua_gain * - * ~~~~~~~~~~~~~~~~~~ * - * Inputs: * - * code[] :Innovative codebook. * - * g_coeff[] :Correlations compute for pitch. * - * L_subfr :Subframe length. * - * * - * Outputs: * - * gain_pit :Quantized pitch gain. * - * gain_cod :Quantized code gain. * - * * - * Return: * - * Index of quantization. * - * * - *--------------------------------------------------------------------------*/ -Word16 -Qua_gain (CodState *coder, - Word16 code[], /* (i) Q13 :Innovative vector. */ - Word16 g_coeff[], /* (i) :Correlations -2 */ - /* , -2, 2 */ - Word16 exp_coeff[], /* (i) :Q-Format g_coeff[] */ - Word16 L_subfr, /* (i) :Subframe length. */ - Word16 * gain_pit, /* (o) Q14 :Pitch gain. */ - Word16 * gain_cod, /* (o) Q1 :Code gain. */ - Word16 tameflag /* (i) : set to 1 if taming is needed */ - ) -{ - Word16 i, j, index1, index2; - Word16 cand1, cand2; - Word16 exp, gcode0, exp_gcode0, gcode0_org, e_min; - Word16 nume, denom, inv_denom; - Word16 exp1, exp2, exp_nume, exp_denom, exp_inv_denom, sft, tmp; - Word16 g_pitch, g2_pitch, g_code, g2_code, g_pit_cod; - Word16 coeff[5], coeff_lsf[5]; - Word16 exp_min[5]; - Word32 L_gbk12; - Word32 L_tmp, L_dist_min, L_temp, L_tmp1, L_tmp2, L_acc, L_accb; - Word16 best_gain[2]; - - /* Gain predictor, Past quantized energies = -14.0 in Q10 */ - - - /*---------------------------------------------------* - *- energy due to innovation -* - *- predicted energy -* - *- predicted codebook gain => gcode0[exp_gcode0] -* - *---------------------------------------------------*/ - - Gain_predict (coder->past_qua_en, code, L_subfr, &gcode0, &exp_gcode0); - - /*-----------------------------------------------------------------* - * pre-selection * - *-----------------------------------------------------------------*/ - /*-----------------------------------------------------------------* - * calculate best gain * - * * - * tmp = -1./(4.*coeff[0]*coeff[2]-coeff[4]*coeff[4]) ; * - * best_gain[0] = (2.*coeff[2]*coeff[1]-coeff[3]*coeff[4])*tmp ; * - * best_gain[1] = (2.*coeff[0]*coeff[3]-coeff[1]*coeff[4])*tmp ; * - * gbk_presel(best_gain,&cand1,&cand2,gcode0) ; * - * * - *-----------------------------------------------------------------*/ - - /*-----------------------------------------------------------------* - * tmp = -1./(4.*coeff[0]*coeff[2]-coeff[4]*coeff[4]) ; * - *-----------------------------------------------------------------*/ - L_tmp1 = L_mult (g_coeff[0], g_coeff[2]); - exp1 = add (add (exp_coeff[0], exp_coeff[2]), 1 - 2); - L_tmp2 = L_mult (g_coeff[4], g_coeff[4]); - exp2 = add (add (exp_coeff[4], exp_coeff[4]), 1); - - if (sub (exp1, exp2) > 0) { - L_tmp = L_sub (L_shr (L_tmp1, sub (exp1, exp2)), L_tmp2); - exp = exp2; - } - else { - L_tmp = L_sub (L_tmp1, L_shr (L_tmp2, sub (exp2, exp1))); - exp = exp1; - } - sft = norm_l (L_tmp); - denom = extract_h (L_shl (L_tmp, sft)); - exp_denom = sub (add (exp, sft), 16); - - inv_denom = div_s (16384, denom); - inv_denom = negate (inv_denom); - exp_inv_denom = sub (14 + 15, exp_denom); - - /*-----------------------------------------------------------------* - * best_gain[0] = (2.*coeff[2]*coeff[1]-coeff[3]*coeff[4])*tmp ; * - *-----------------------------------------------------------------*/ - L_tmp1 = L_mult (g_coeff[2], g_coeff[1]); - exp1 = add (exp_coeff[2], exp_coeff[1]); - L_tmp2 = L_mult (g_coeff[3], g_coeff[4]); - exp2 = add (add (exp_coeff[3], exp_coeff[4]), 1); - - if (sub (exp1, exp2) > 0) { - L_tmp = - L_sub (L_shr (L_tmp1, add (sub (exp1, exp2), 1)), L_shr (L_tmp2, 1)); - exp = sub (exp2, 1); - } - else { - L_tmp = - L_sub (L_shr (L_tmp1, 1), L_shr (L_tmp2, add (sub (exp2, exp1), 1))); - exp = sub (exp1, 1); - } - sft = norm_l (L_tmp); - nume = extract_h (L_shl (L_tmp, sft)); - exp_nume = sub (add (exp, sft), 16); - - sft = sub (add (exp_nume, exp_inv_denom), (9 + 16 - 1)); - L_acc = L_shr (L_mult (nume, inv_denom), sft); - best_gain[0] = extract_h (L_acc); /*-- best_gain[0]:Q9 --*/ - - if (tameflag == 1) { - if (sub (best_gain[0], GPCLIP2) > 0) - best_gain[0] = GPCLIP2; - } - - /*-----------------------------------------------------------------* - * best_gain[1] = (2.*coeff[0]*coeff[3]-coeff[1]*coeff[4])*tmp ; * - *-----------------------------------------------------------------*/ - L_tmp1 = L_mult (g_coeff[0], g_coeff[3]); - exp1 = add (exp_coeff[0], exp_coeff[3]); - L_tmp2 = L_mult (g_coeff[1], g_coeff[4]); - exp2 = add (add (exp_coeff[1], exp_coeff[4]), 1); - - if (sub (exp1, exp2) > 0) { - L_tmp = - L_sub (L_shr (L_tmp1, add (sub (exp1, exp2), 1)), L_shr (L_tmp2, 1)); - exp = sub (exp2, 1); - } - else { - L_tmp = - L_sub (L_shr (L_tmp1, 1), L_shr (L_tmp2, add (sub (exp2, exp1), 1))); - exp = sub (exp1, 1); - } - sft = norm_l (L_tmp); - nume = extract_h (L_shl (L_tmp, sft)); - exp_nume = sub (add (exp, sft), 16); - - sft = sub (add (exp_nume, exp_inv_denom), (2 + 16 - 1)); - L_acc = L_shr (L_mult (nume, inv_denom), sft); - best_gain[1] = extract_h (L_acc); /*-- best_gain[1]:Q2 --*/ - - /*--- Change Q-format of gcode0 ( Q[exp_gcode0] -> Q4 ) ---*/ - if (sub (exp_gcode0, 4) >= 0) { - gcode0_org = shr (gcode0, sub (exp_gcode0, 4)); - } - else { - L_acc = L_deposit_l (gcode0); - L_acc = L_shl (L_acc, sub ((4 + 16), exp_gcode0)); - gcode0_org = extract_h (L_acc); /*-- gcode0_org:Q4 --*/ - } - - /*----------------------------------------------* - * - presearch for gain codebook - * - *----------------------------------------------*/ - - Gbk_presel (best_gain, &cand1, &cand2, gcode0_org); - -/*---------------------------------------------------------------------------* - * * - * Find the best quantizer. * - * * - * dist_min = MAX_32; * - * for ( i=0 ; ipast_qua_en, L_gbk12); - - return (add (map1[index1] * (Word16) NCODE2, map2[index2])); - -} - -/*---------------------------------------------------------------------------* - * Function Gbk_presel * - * ~~~~~~~~~~~~~~~~~~~ * - * - presearch for gain codebook - * - *---------------------------------------------------------------------------*/ -void -Gbk_presel (Word16 best_gain[], /* (i) [0] Q9 : unquantized pitch gain */ - /* (i) [1] Q2 : unquantized code gain */ - Word16 * cand1, /* (o) : index of best 1st stage vector */ - Word16 * cand2, /* (o) : index of best 2nd stage vector */ - Word16 gcode0 /* (i) Q4 : presearch for gain codebook */ - ) -{ - Word16 acc_h; - Word16 sft_x, sft_y; - Word32 L_acc, L_preg, L_cfbg, L_tmp, L_tmp_x, L_tmp_y; - Word32 L_temp; - - /*--------------------------------------------------------------------------* - x = (best_gain[1]-(coef[0][0]*best_gain[0]+coef[1][1])*gcode0) * inv_coef; - *--------------------------------------------------------------------------*/ - L_cfbg = L_mult (coef[0][0], best_gain[0]); /* L_cfbg:Q20 -> !!y */ - L_acc = L_shr (L_coef[1][1], 15); /* L_acc:Q20 */ - L_acc = L_add (L_cfbg, L_acc); - acc_h = extract_h (L_acc); /* acc_h:Q4 */ - L_preg = L_mult (acc_h, gcode0); /* L_preg:Q9 */ - L_acc = L_shl (L_deposit_l (best_gain[1]), 7); /* L_acc:Q9 */ - L_acc = L_sub (L_acc, L_preg); - acc_h = extract_h (L_shl (L_acc, 2)); /* L_acc_h:Q[-5] */ - L_tmp_x = L_mult (acc_h, INV_COEF); /* L_tmp_x:Q15 */ - - /*--------------------------------------------------------------------------* - y = (coef[1][0]*(-coef[0][1]+best_gain[0]*coef[0][0])*gcode0 - -coef[0][0]*best_gain[1]) * inv_coef; - *--------------------------------------------------------------------------*/ - L_acc = L_shr (L_coef[0][1], 10); /* L_acc:Q20 */ - L_acc = L_sub (L_cfbg, L_acc); /* !!x -> L_cfbg:Q20 */ - acc_h = extract_h (L_acc); /* acc_h:Q4 */ - acc_h = mult (acc_h, gcode0); /* acc_h:Q[-7] */ - L_tmp = L_mult (acc_h, coef[1][0]); /* L_tmp:Q10 */ - - L_preg = L_mult (coef[0][0], best_gain[1]); /* L_preg:Q13 */ - L_acc = L_sub (L_tmp, L_shr (L_preg, 3)); /* L_acc:Q10 */ - - acc_h = extract_h (L_shl (L_acc, 2)); /* acc_h:Q[-4] */ - L_tmp_y = L_mult (acc_h, INV_COEF); /* L_tmp_y:Q16 */ - - sft_y = (14 + 4 + 1) - 16; /* (Q[thr1]+Q[gcode0]+1)-Q[L_tmp_y] */ - sft_x = (15 + 4 + 1) - 15; /* (Q[thr2]+Q[gcode0]+1)-Q[L_tmp_x] */ - - if (gcode0 > 0) { - /*-- pre select codebook #1 --*/ - *cand1 = 0; - do { - L_temp = L_sub (L_tmp_y, L_shr (L_mult (thr1[*cand1], gcode0), sft_y)); - if (L_temp > 0L) { - (*cand1) = add (*cand1, 1); - } - else - break; - } while (sub ((*cand1), (NCODE1 - NCAN1)) < 0); - /*-- pre select codebook #2 --*/ - *cand2 = 0; - do { - L_temp = L_sub (L_tmp_x, L_shr (L_mult (thr2[*cand2], gcode0), sft_x)); - if (L_temp > 0L) { - (*cand2) = add (*cand2, 1); - } - else - break; - } while (sub ((*cand2), (NCODE2 - NCAN2)) < 0); - } - else { - /*-- pre select codebook #1 --*/ - *cand1 = 0; - do { - L_temp = L_sub (L_tmp_y, L_shr (L_mult (thr1[*cand1], gcode0), sft_y)); - if (L_temp < 0L) { - (*cand1) = add (*cand1, 1); - } - else - break; - } while (sub ((*cand1), (NCODE1 - NCAN1))); - /*-- pre select codebook #2 --*/ - *cand2 = 0; - do { - L_temp = L_sub (L_tmp_x, L_shr (L_mult (thr2[*cand2], gcode0), sft_x)); - if (L_temp < 0L) { - (*cand2) = add (*cand2, 1); - } - else - break; - } while (sub ((*cand2), (NCODE2 - NCAN2))); - } - - return; -} diff --git a/src/libs/libg729/taming.c b/src/libs/libg729/taming.c deleted file mode 100644 index 5853b944..00000000 --- a/src/libs/libg729/taming.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/************************************************************************** - * Taming functions. * - **************************************************************************/ - -#include "typedef.h" -#include "basic_op.h" -#include "oper_32b.h" -#include "ld8a.h" -#include "tab_ld8a.h" -#include "taming.h" - -void -Init_exc_err (CodState *coder) -{ - Word16 i; - for (i = 0; i < 4; i++) - coder->L_exc_err[i] = 0x00004000L; /* Q14 */ -} - -/************************************************************************** - * routine test_err - computes the accumulated potential error in the * - * adaptive codebook contribution * - **************************************************************************/ - -Word16 -test_err (/* (o) flag set to 1 if taming is necessary */ - CodState *coder, - Word16 T0, /* (i) integer part of pitch delay */ - Word16 T0_frac /* (i) fractional part of pitch delay */ - ) -{ - Word16 i, t1, zone1, zone2, flag; - Word32 L_maxloc, L_acc; - - if (T0_frac > 0) { - t1 = add (T0, 1); - } - else { - t1 = T0; - } - - i = sub (t1, (L_SUBFR + L_INTER10)); - if (i < 0) { - i = 0; - } - zone1 = tab_zone[i]; - - i = add (t1, (L_INTER10 - 2)); - zone2 = tab_zone[i]; - - L_maxloc = -1L; - flag = 0; - for (i = zone2; i >= zone1; i--) { - L_acc = L_sub (coder->L_exc_err[i], L_maxloc); - if (L_acc > 0L) { - L_maxloc = coder->L_exc_err[i]; - } - } - L_acc = L_sub (L_maxloc, L_THRESH_ERR); - if (L_acc > 0L) { - flag = 1; - } - - return (flag); -} - -/************************************************************************** - *routine update_exc_err - maintains the memory used to compute the error * - * function due to an adaptive codebook mismatch between encoder and * - * decoder * - **************************************************************************/ - -void -update_exc_err (CodState *coder, - Word16 gain_pit, /* (i) pitch gain */ - Word16 T0 /* (i) integer part of pitch delay */ - ) -{ - - Word16 i, zone1, zone2, n; - Word32 L_worst, L_temp, L_acc; - Word16 hi, lo; - - L_worst = -1L; - n = sub (T0, L_SUBFR); - - if (n < 0) { - L_Extract (coder->L_exc_err[0], &hi, &lo); - L_temp = Mpy_32_16 (hi, lo, gain_pit); - L_temp = L_shl (L_temp, 1); - L_temp = L_add (0x00004000L, L_temp); - L_acc = L_sub (L_temp, L_worst); - if (L_acc > 0L) { - L_worst = L_temp; - } - L_Extract (L_temp, &hi, &lo); - L_temp = Mpy_32_16 (hi, lo, gain_pit); - L_temp = L_shl (L_temp, 1); - L_temp = L_add (0x00004000L, L_temp); - L_acc = L_sub (L_temp, L_worst); - if (L_acc > 0L) { - L_worst = L_temp; - } - } - - else { - - zone1 = tab_zone[n]; - - i = sub (T0, 1); - zone2 = tab_zone[i]; - - for (i = zone1; i <= zone2; i++) { - L_Extract (coder->L_exc_err[i], &hi, &lo); - L_temp = Mpy_32_16 (hi, lo, gain_pit); - L_temp = L_shl (L_temp, 1); - L_temp = L_add (0x00004000L, L_temp); - L_acc = L_sub (L_temp, L_worst); - if (L_acc > 0L) - L_worst = L_temp; - } - } - - for (i = 3; i >= 1; i--) { - coder->L_exc_err[i] = coder->L_exc_err[i - 1]; - } - coder->L_exc_err[0] = L_worst; - - return; -} diff --git a/src/libs/libg729/util.c b/src/libs/libg729/util.c deleted file mode 100644 index 14a5ee03..00000000 --- a/src/libs/libg729/util.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - ITU-T G.729A Speech Coder ANSI-C Source Code - Version 1.1 Last modified: September 1996 - - Copyright (c) 1996, - AT&T, France Telecom, NTT, Universite de Sherbrooke - All rights reserved. -*/ - -/*-------------------------------------------------------------------* - * Function Set zero() * - * ~~~~~~~~~~ * - * Set vector x[] to zero * - *-------------------------------------------------------------------*/ - -#include "typedef.h" -#include "basic_op.h" -#include "ld8a.h" -#include "tab_ld8a.h" - -void -Set_zero (Word16 x[], Word16 L) -{ - Word16 i; - - for (i = 0; i < L; i++) - x[i] = 0; - - return; -} - -/*-------------------------------------------------------------------* - * Function Copy: * - * ~~~~~ * - * Copy vector x[] to y[] * - *-------------------------------------------------------------------*/ - -void -Copy (Word16 x[], Word16 y[], Word16 L) -{ - Word16 i; - - for (i = 0; i < L; i++) - y[i] = x[i]; - - return; -} - -/* Random generator */ - -Word16 -Random_16 (Word16* seed) -{ - /* seed = seed*31821 + 13849; */ - *seed = extract_l (L_add (L_shr (L_mult (*seed, 31821), 1), 13849L)); - - return (*seed); -} - - -/*---------------------------------------------------------------------------- - * Store_Param - converts encoder parameter vector into frame - * Restore_Params - converts serial received frame to encoder parameter vector - * - * The transmitted parameters are: - * - * LPC: 1st codebook 7+1 bit - * 2nd codebook 5+5 bit - * - * 1st subframe: - * pitch period 8 bit - * parity check on 1st period 1 bit - * codebook index1 (positions) 13 bit - * codebook index2 (signs) 4 bit - * pitch and codebook gains 4+3 bit - * - * 2nd subframe: - * pitch period (relative) 5 bit - * codebook index1 (positions) 13 bit - * codebook index2 (signs) 4 bit - * pitch and codebook gains 4+3 bit - *---------------------------------------------------------------------------- - */ - - -void -Store_Params(Word16 * parm, void *to) -{ - int i, j; - unsigned char mask, *to_b; - Word16 value, val_mask; - - to_b = (unsigned char *)to; - mask = 0x80; - for (i = 0; i < PRM_SIZE; i++) { - value = parm[i]; - val_mask = 1 << (bitsno[i] - 1); - for (j = 0; j < bitsno[i]; j++) { - - if (value & val_mask) - *to_b |= mask; - else - *to_b &= ~mask; - - value = value << 1; - mask = mask >> 1; - - if (mask == 0) { - mask = 0x80; - to_b++; - } - } - } - return; -} - -void Restore_Params(const void *from, Word16 * parm) -{ - int i, j; - unsigned char mask, *from_b; - Word16 value; - - mask = 0x80; - from_b = (unsigned char *)from; - - for (i = 0; i < PRM_SIZE; i++) { - value = 0; - for (j = 0; j < bitsno[i]; j++) { - - value = value << 1; - - if (mask & (*from_b)) - value += 1; - - mask = mask >> 1; - if (mask == 0) { - mask = 0x80; - from_b++; - } - } - parm[i] = value; - } - return; -} - diff --git a/src/libs/opus/CMakeLists.txt b/src/libs/opus/CMakeLists.txt index eeea6fab..06e9b675 100644 --- a/src/libs/opus/CMakeLists.txt +++ b/src/libs/opus/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.1) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(OpusPackageVersion) @@ -97,12 +97,6 @@ if(APPLE) add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR}) endif() -if(MSVC) - set(OPUS_STATIC_RUNTIME_HELP_STR "build with static runtime library.") - option(OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR} OFF) - add_feature_info(OPUS_STATIC_RUNTIME OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR}) -endif() - set(OPUS_FIXED_POINT_DEBUG_HELP_STR "debug fixed-point implementation.") cmake_dependent_option(OPUS_FIXED_POINT_DEBUG ${OPUS_FIXED_POINT_DEBUG_HELP_STR} @@ -271,14 +265,6 @@ if(OPUS_CUSTOM_MODES) list(APPEND Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_custom.h) endif() -if(MSVC) - if(OPUS_STATIC_RUNTIME) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") - else() - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") - endif() -endif() - add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER}) add_library(Opus::opus ALIAS opus) @@ -422,7 +408,8 @@ if(NOT OPUS_DISABLE_INTRINSICS) if(((OPUS_X86_MAY_HAVE_SSE AND NOT OPUS_X86_PRESUME_SSE) OR (OPUS_X86_MAY_HAVE_SSE2 AND NOT OPUS_X86_PRESUME_SSE2) OR (OPUS_X86_MAY_HAVE_SSE4_1 AND NOT OPUS_X86_PRESUME_SSE4_1) OR - (OPUS_X86_MAY_HAVE_AVX2 AND NOT OPUS_X86_PRESUME_AVX2))) + (OPUS_X86_MAY_HAVE_AVX2 AND NOT OPUS_X86_PRESUME_AVX2)) AND + RUNTIME_CPU_CAPABILITY_DETECTION) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) if(NOT MSVC) if(CPU_INFO_BY_ASM_SUPPORTED) @@ -545,7 +532,7 @@ if(NOT OPUS_DISABLE_INTRINSICS) if(COMPILER_SUPPORT_NEON) if(OPUS_MAY_HAVE_NEON) - if(TRUE) + if(RUNTIME_CPU_CAPABILITY_DETECTION) message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection") target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) add_sources_group(opus celt ${celt_sources_arm_rtcd}) diff --git a/src/libs/opus/Makefile.am b/src/libs/opus/Makefile.am index bb357bba..a3155585 100644 --- a/src/libs/opus/Makefile.am +++ b/src/libs/opus/Makefile.am @@ -294,9 +294,9 @@ endif if EXTRA_PROGRAMS if ENABLE_DEEP_PLC -noinst_PROGRAMS += fargan_demo dump_data dump_weights_blob -fargan_demo_SOURCES = dnn/fargan_demo.c -fargan_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) +noinst_PROGRAMS += lpcnet_demo dump_data dump_weights_blob +lpcnet_demo_SOURCES = dnn/lpcnet_demo.c +lpcnet_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) dump_data_SOURCES = dnn/dump_data.c dump_data_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) @@ -331,7 +331,6 @@ EXTRA_DIST = opus.pc.in \ cmake/OpusFunctions.cmake \ cmake/OpusPackageVersion.cmake \ cmake/OpusSources.cmake \ - cmake/README.md \ cmake/RunTest.cmake \ cmake/config.h.cmake.in \ cmake/vla.c \ @@ -339,14 +338,12 @@ EXTRA_DIST = opus.pc.in \ cmake/cpu_info_by_c.c \ meson/get-version.py \ meson/read-sources-list.py \ - meson/README.md \ meson.build \ meson_options.txt \ include/meson.build \ celt/meson.build \ celt/tests/meson.build \ dnn/meson.build \ - dnn/README.md \ silk/meson.build \ silk/tests/meson.build \ src/meson.build \ diff --git a/src/libs/opus/Makefile.in b/src/libs/opus/Makefile.in index 7bca4a63..ee24f70e 100644 --- a/src/libs/opus/Makefile.in +++ b/src/libs/opus/Makefile.in @@ -172,7 +172,7 @@ host_triplet = @host@ @EXTRA_PROGRAMS_TRUE@@OPUS_ARM_EXTERNAL_ASM_TRUE@am__append_42 = libarmasm.la @CUSTOM_MODES_TRUE@am__append_43 = include/opus_custom.h @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_44 = opus_custom_demo -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_45 = fargan_demo dump_data dump_weights_blob +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_45 = lpcnet_demo dump_data dump_weights_blob @ENABLE_DRED_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_46 = tests/test_opus_dred @ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__append_47 = lossgen_demo subdir = . @@ -196,7 +196,7 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = opus.pc opus-uninstalled.pc celt/arm/armopts.s CONFIG_CLEAN_VPATH_FILES = @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_1 = opus_custom_demo$(EXEEXT) -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_2 = fargan_demo$(EXEEXT) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_2 = lpcnet_demo$(EXEEXT) \ @ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ dump_data$(EXEEXT) \ @ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ dump_weights_blob$(EXEEXT) @ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@am__EXEEXT_3 = lossgen_demo$(EXEEXT) @@ -688,12 +688,6 @@ dump_weights_blob_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(dump_weights_blob_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ -am__fargan_demo_SOURCES_DIST = dnn/fargan_demo.c -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am_fargan_demo_OBJECTS = dnn/fargan_demo.$(OBJEXT) -fargan_demo_OBJECTS = $(am_fargan_demo_OBJECTS) -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_DEPENDENCIES = $(am__DEPENDENCIES_41) \ -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__lossgen_demo_SOURCES_DIST = dnn/lossgen_demo.c dnn/lossgen.c \ dnn/lossgen_data.c am__objects_64 = dnn/lossgen.$(OBJEXT) dnn/lossgen_data.$(OBJEXT) @@ -701,6 +695,12 @@ am__objects_64 = dnn/lossgen.$(OBJEXT) dnn/lossgen_data.$(OBJEXT) @ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__objects_64) lossgen_demo_OBJECTS = $(am_lossgen_demo_OBJECTS) @ENABLE_LOSSGEN_TRUE@@EXTRA_PROGRAMS_TRUE@lossgen_demo_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__lpcnet_demo_SOURCES_DIST = dnn/lpcnet_demo.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@am_lpcnet_demo_OBJECTS = dnn/lpcnet_demo.$(OBJEXT) +lpcnet_demo_OBJECTS = $(am_lpcnet_demo_OBJECTS) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@lpcnet_demo_DEPENDENCIES = $(am__DEPENDENCIES_41) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_19) \ +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@ $(am__DEPENDENCIES_1) am__opus_compare_SOURCES_DIST = src/opus_compare.c @EXTRA_PROGRAMS_TRUE@am_opus_compare_OBJECTS = \ @EXTRA_PROGRAMS_TRUE@ src/opus_compare.$(OBJEXT) @@ -992,9 +992,9 @@ am__depfiles_remade = celt/$(DEPDIR)/bands.Plo celt/$(DEPDIR)/celt.Plo \ dnn/$(DEPDIR)/dump_data.Po \ dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po \ dnn/$(DEPDIR)/fargan.Plo dnn/$(DEPDIR)/fargan_data.Plo \ - dnn/$(DEPDIR)/fargan_demo.Po dnn/$(DEPDIR)/freq.Plo \ - dnn/$(DEPDIR)/lace_data.Plo dnn/$(DEPDIR)/lossgen.Po \ - dnn/$(DEPDIR)/lossgen_data.Po dnn/$(DEPDIR)/lossgen_demo.Po \ + dnn/$(DEPDIR)/freq.Plo dnn/$(DEPDIR)/lace_data.Plo \ + dnn/$(DEPDIR)/lossgen.Po dnn/$(DEPDIR)/lossgen_data.Po \ + dnn/$(DEPDIR)/lossgen_demo.Po dnn/$(DEPDIR)/lpcnet_demo.Po \ dnn/$(DEPDIR)/lpcnet_enc.Plo dnn/$(DEPDIR)/lpcnet_plc.Plo \ dnn/$(DEPDIR)/lpcnet_tables.Plo dnn/$(DEPDIR)/nndsp.Plo \ dnn/$(DEPDIR)/nnet.Plo dnn/$(DEPDIR)/nnet_default.Plo \ @@ -1194,8 +1194,8 @@ SOURCES = $(libarmasm_la_SOURCES) $(libopus_la_SOURCES) \ $(celt_tests_test_unit_mdct_SOURCES) \ $(celt_tests_test_unit_rotation_SOURCES) \ $(celt_tests_test_unit_types_SOURCES) $(dump_data_SOURCES) \ - $(dump_weights_blob_SOURCES) $(fargan_demo_SOURCES) \ - $(lossgen_demo_SOURCES) $(opus_compare_SOURCES) \ + $(dump_weights_blob_SOURCES) $(lossgen_demo_SOURCES) \ + $(lpcnet_demo_SOURCES) $(opus_compare_SOURCES) \ $(opus_custom_demo_SOURCES) $(opus_demo_SOURCES) \ $(repacketizer_demo_SOURCES) \ $(silk_tests_test_unit_LPC_inv_pred_gain_SOURCES) \ @@ -1219,8 +1219,8 @@ DIST_SOURCES = $(am__libarmasm_la_SOURCES_DIST) \ $(am__celt_tests_test_unit_types_SOURCES_DIST) \ $(am__dump_data_SOURCES_DIST) \ $(am__dump_weights_blob_SOURCES_DIST) \ - $(am__fargan_demo_SOURCES_DIST) \ $(am__lossgen_demo_SOURCES_DIST) \ + $(am__lpcnet_demo_SOURCES_DIST) \ $(am__opus_compare_SOURCES_DIST) \ $(am__opus_custom_demo_SOURCES_DIST) \ $(am__opus_demo_SOURCES_DIST) \ @@ -2182,8 +2182,8 @@ noinst_HEADERS = $(OPUS_HEAD) $(SILK_HEAD) $(CELT_HEAD) $(LPCNET_HEAD) @EXTRA_PROGRAMS_TRUE@celt_tests_test_unit_types_LDADD = $(LIBM) @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_SOURCES = celt/opus_custom_demo.c @CUSTOM_MODES_TRUE@@EXTRA_PROGRAMS_TRUE@opus_custom_demo_LDADD = libopus.la $(LIBM) -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_SOURCES = dnn/fargan_demo.c -@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@fargan_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@lpcnet_demo_SOURCES = dnn/lpcnet_demo.c +@ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@lpcnet_demo_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) @ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_data_SOURCES = dnn/dump_data.c @ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_data_LDADD = $(LPCNET_OBJ) $(CELT_OBJ) $(LIBM) @ENABLE_DEEP_PLC_TRUE@@EXTRA_PROGRAMS_TRUE@dump_weights_blob_SOURCES = dnn/write_lpcnet_weights.c @@ -2204,7 +2204,6 @@ EXTRA_DIST = opus.pc.in \ cmake/OpusFunctions.cmake \ cmake/OpusPackageVersion.cmake \ cmake/OpusSources.cmake \ - cmake/README.md \ cmake/RunTest.cmake \ cmake/config.h.cmake.in \ cmake/vla.c \ @@ -2212,14 +2211,12 @@ EXTRA_DIST = opus.pc.in \ cmake/cpu_info_by_c.c \ meson/get-version.py \ meson/read-sources-list.py \ - meson/README.md \ meson.build \ meson_options.txt \ include/meson.build \ celt/meson.build \ celt/tests/meson.build \ dnn/meson.build \ - dnn/README.md \ silk/meson.build \ silk/tests/meson.build \ src/meson.build \ @@ -2930,12 +2927,6 @@ dnn/dump_weights_blob-write_lpcnet_weights.$(OBJEXT): \ dump_weights_blob$(EXEEXT): $(dump_weights_blob_OBJECTS) $(dump_weights_blob_DEPENDENCIES) $(EXTRA_dump_weights_blob_DEPENDENCIES) @rm -f dump_weights_blob$(EXEEXT) $(AM_V_CCLD)$(dump_weights_blob_LINK) $(dump_weights_blob_OBJECTS) $(dump_weights_blob_LDADD) $(LIBS) -dnn/fargan_demo.$(OBJEXT): dnn/$(am__dirstamp) \ - dnn/$(DEPDIR)/$(am__dirstamp) - -fargan_demo$(EXEEXT): $(fargan_demo_OBJECTS) $(fargan_demo_DEPENDENCIES) $(EXTRA_fargan_demo_DEPENDENCIES) - @rm -f fargan_demo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fargan_demo_OBJECTS) $(fargan_demo_LDADD) $(LIBS) dnn/lossgen_demo.$(OBJEXT): dnn/$(am__dirstamp) \ dnn/$(DEPDIR)/$(am__dirstamp) dnn/lossgen.$(OBJEXT): dnn/$(am__dirstamp) \ @@ -2946,6 +2937,12 @@ dnn/lossgen_data.$(OBJEXT): dnn/$(am__dirstamp) \ lossgen_demo$(EXEEXT): $(lossgen_demo_OBJECTS) $(lossgen_demo_DEPENDENCIES) $(EXTRA_lossgen_demo_DEPENDENCIES) @rm -f lossgen_demo$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lossgen_demo_OBJECTS) $(lossgen_demo_LDADD) $(LIBS) +dnn/lpcnet_demo.$(OBJEXT): dnn/$(am__dirstamp) \ + dnn/$(DEPDIR)/$(am__dirstamp) + +lpcnet_demo$(EXEEXT): $(lpcnet_demo_OBJECTS) $(lpcnet_demo_DEPENDENCIES) $(EXTRA_lpcnet_demo_DEPENDENCIES) + @rm -f lpcnet_demo$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(lpcnet_demo_OBJECTS) $(lpcnet_demo_LDADD) $(LIBS) src/opus_compare.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) @@ -3141,12 +3138,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan_data.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/fargan_demo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/freq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lace_data.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen_data.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lossgen_demo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_demo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_enc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_plc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@dnn/$(DEPDIR)/lpcnet_tables.Plo@am__quote@ # am--include-marker @@ -4217,12 +4214,12 @@ distclean: distclean-recursive -rm -f dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po -rm -f dnn/$(DEPDIR)/fargan.Plo -rm -f dnn/$(DEPDIR)/fargan_data.Plo - -rm -f dnn/$(DEPDIR)/fargan_demo.Po -rm -f dnn/$(DEPDIR)/freq.Plo -rm -f dnn/$(DEPDIR)/lace_data.Plo -rm -f dnn/$(DEPDIR)/lossgen.Po -rm -f dnn/$(DEPDIR)/lossgen_data.Po -rm -f dnn/$(DEPDIR)/lossgen_demo.Po + -rm -f dnn/$(DEPDIR)/lpcnet_demo.Po -rm -f dnn/$(DEPDIR)/lpcnet_enc.Plo -rm -f dnn/$(DEPDIR)/lpcnet_plc.Plo -rm -f dnn/$(DEPDIR)/lpcnet_tables.Plo @@ -4516,12 +4513,12 @@ maintainer-clean: maintainer-clean-recursive -rm -f dnn/$(DEPDIR)/dump_weights_blob-write_lpcnet_weights.Po -rm -f dnn/$(DEPDIR)/fargan.Plo -rm -f dnn/$(DEPDIR)/fargan_data.Plo - -rm -f dnn/$(DEPDIR)/fargan_demo.Po -rm -f dnn/$(DEPDIR)/freq.Plo -rm -f dnn/$(DEPDIR)/lace_data.Plo -rm -f dnn/$(DEPDIR)/lossgen.Po -rm -f dnn/$(DEPDIR)/lossgen_data.Po -rm -f dnn/$(DEPDIR)/lossgen_demo.Po + -rm -f dnn/$(DEPDIR)/lpcnet_demo.Po -rm -f dnn/$(DEPDIR)/lpcnet_enc.Plo -rm -f dnn/$(DEPDIR)/lpcnet_plc.Plo -rm -f dnn/$(DEPDIR)/lpcnet_tables.Plo diff --git a/src/libs/opus/celt/arm/armcpu.c b/src/libs/opus/celt/arm/armcpu.c index 6785121a..06a53435 100644 --- a/src/libs/opus/celt/arm/armcpu.c +++ b/src/libs/opus/celt/arm/armcpu.c @@ -96,7 +96,7 @@ static OPUS_INLINE opus_uint32 opus_cpu_capabilities(void){ /* Linux based */ #include -static opus_uint32 opus_cpu_capabilities(void) +opus_uint32 opus_cpu_capabilities(void) { opus_uint32 flags = 0; FILE *cpuinfo; @@ -169,7 +169,7 @@ static opus_uint32 opus_cpu_capabilities(void) #include #include -static opus_uint32 opus_cpu_capabilities(void) +opus_uint32 opus_cpu_capabilities(void) { opus_uint32 flags = 0; @@ -191,54 +191,6 @@ static opus_uint32 opus_cpu_capabilities(void) return flags; } -#elif defined(__FreeBSD__) -#include - -static opus_uint32 opus_cpu_capabilities(void) -{ - long hwcap = 0; - opus_uint32 flags = 0; - -# if defined(OPUS_ARM_MAY_HAVE_MEDIA) \ - || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) - /* FreeBSD requires armv6+, which always supports media instructions */ - flags |= OPUS_CPU_ARM_MEDIA_FLAG; -# endif - - elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); - -# if defined(OPUS_ARM_MAY_HAVE_EDSP) || defined(OPUS_ARM_MAY_HAVE_MEDIA) \ - || defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) -# ifdef HWCAP_EDSP - if (hwcap & HWCAP_EDSP) - flags |= OPUS_CPU_ARM_EDSP_FLAG; -# endif - -# if defined(OPUS_ARM_MAY_HAVE_NEON) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) -# ifdef HWCAP_NEON - if (hwcap & HWCAP_NEON) - flags |= OPUS_CPU_ARM_NEON_FLAG; -# elif defined(HWCAP_ASIMD) - if (hwcap & HWCAP_ASIMD) - flags |= OPUS_CPU_ARM_NEON_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_EDSP_FLAG; -# endif -# endif -# if defined(OPUS_ARM_MAY_HAVE_DOTPROD) && defined(HWCAP_ASIMDDP) - if (hwcap & HWCAP_ASIMDDP) - flags |= OPUS_CPU_ARM_DOTPROD_FLAG; -# endif -# endif - -#if defined(OPUS_ARM_PRESUME_AARCH64_NEON_INTR) - flags |= OPUS_CPU_ARM_EDSP_FLAG | OPUS_CPU_ARM_MEDIA_FLAG | OPUS_CPU_ARM_NEON_FLAG; -# if defined(OPUS_ARM_PRESUME_DOTPROD) - flags |= OPUS_CPU_ARM_DOTPROD_FLAG; -# endif -#endif - - return (flags); -} - #else /* The feature registers which can tell us what the processor supports are * accessible in priveleged modes only, so we can't have a general user-space diff --git a/src/libs/opus/celt/meson.build b/src/libs/opus/celt/meson.build index 46601ca1..7852fc15 100644 --- a/src/libs/opus/celt/meson.build +++ b/src/libs/opus/celt/meson.build @@ -43,7 +43,14 @@ if host_cpu_family in ['arm', 'aarch64'] and have_arm_intrinsics_or_asm celt_sources += sources['CELT_SOURCES_ARM_NE10'] endif if opus_arm_external_asm - subdir('arm') + arm2gnu = [find_program('arm/arm2gnu.pl')] + arm2gnu_args + celt_sources_arm_asm = configure_file(input: 'arm/celt_pitch_xcorr_arm.s', + output: '@BASENAME@-gnu.S', + command: arm2gnu + ['@INPUT@'], + capture: true) + celt_arm_armopts_s = configure_file(input: 'arm/armopts.s.in', + output: 'arm/armopts.s', + configuration: opus_conf) celt_static_libs += static_library('celt-armasm', celt_arm_armopts_s, celt_sources_arm_asm, install: false) diff --git a/src/libs/opus/celt/x86/x86cpu.h b/src/libs/opus/celt/x86/x86cpu.h index 1e5b6a4c..8ae9be8d 100644 --- a/src/libs/opus/celt/x86/x86cpu.h +++ b/src/libs/opus/celt/x86/x86cpu.h @@ -68,22 +68,8 @@ int opus_select_arch(void); Use this to work around those restrictions (which should hopefully all get optimized to a single MOVD instruction). GCC implemented _mm_loadu_si32() since GCC 11; HOWEVER, there is a bug! - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754 - LLVM implemented _mm_loadu_si32() since Clang 8.0, however the - __clang_major__ version number macro is unreliable, as vendors - (specifically, Apple) will use different numbering schemes than upstream. - Clang's advice is "use feature detection", but they do not provide feature - detection support for specific SIMD functions. - We follow the approach from the SIMDe project and instead detect unrelated - features that should be available in the version we want (see - ).*/ -# if defined(__clang__) -# if __has_warning("-Wextra-semi-stmt") || \ - __has_builtin(__builtin_rotateleft32) -# define OPUS_CLANG_8 (1) -# endif -# endif -# if !defined(_MSC_VER) && !OPUS_GNUC_PREREQ(11,3) && !defined(OPUS_CLANG_8) + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99754 */ +# if !defined(_MSC_VER) && !OPUS_GNUC_PREREQ(11,3) && !(defined(__clang__) && (__clang_major__ >= 8)) # include # include diff --git a/src/libs/opus/configure b/src/libs/opus/configure index 4ca76b50..f499e1e0 100755 --- a/src/libs/opus/configure +++ b/src/libs/opus/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for opus 1.5.2. +# Generated by GNU Autoconf 2.71 for opus 1.5.1. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='opus' PACKAGE_TARNAME='opus' -PACKAGE_VERSION='1.5.2' -PACKAGE_STRING='opus 1.5.2' +PACKAGE_VERSION='1.5.1' +PACKAGE_STRING='opus 1.5.1' PACKAGE_BUGREPORT='opus@xiph.org' PACKAGE_URL='' @@ -1466,7 +1466,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures opus 1.5.2 to adapt to many kinds of systems. +\`configure' configures opus 1.5.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1537,7 +1537,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of opus 1.5.2:";; + short | recursive ) echo "Configuration of opus 1.5.1:";; esac cat <<\_ACEOF @@ -1708,7 +1708,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -opus configure 1.5.2 +opus configure 1.5.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1964,7 +1964,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by opus $as_me 1.5.2, which was +It was created by opus $as_me 1.5.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2767,7 +2767,7 @@ AM_BACKSLASH='\' # For libtool. OPUS_LT_CURRENT=10 -OPUS_LT_REVISION=1 +OPUS_LT_REVISION=0 OPUS_LT_AGE=10 @@ -3247,7 +3247,7 @@ fi # Define the identity of the package. PACKAGE='opus' - VERSION='1.5.2' + VERSION='1.5.1' # Some tools Automake needs. @@ -14950,7 +14950,7 @@ main (void) mtest = _mm256_fmadd_ps(mtest, mtest, mtest); mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest)); mtest2 = - _mm256_cvtepi16_epi32(_mm_loadu_si128(utest)); + _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u *)utest)); return _mm256_extract_epi16(_mm256_xor_si256( _mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0); @@ -14992,7 +14992,7 @@ main (void) mtest = _mm256_fmadd_ps(mtest, mtest, mtest); mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest)); mtest2 = - _mm256_cvtepi16_epi32(_mm_loadu_si128(utest)); + _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u *)utest)); return _mm256_extract_epi16(_mm256_xor_si256( _mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0); @@ -16490,7 +16490,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by opus $as_me 1.5.2, which was +This file was extended by opus $as_me 1.5.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16558,7 +16558,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -opus config.status 1.5.2 +opus config.status 1.5.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/src/libs/opus/configure.ac b/src/libs/opus/configure.ac index 78defd6f..e4785a47 100644 --- a/src/libs/opus/configure.ac +++ b/src/libs/opus/configure.ac @@ -23,7 +23,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # For libtool. dnl Please update these for releases. OPUS_LT_CURRENT=10 -OPUS_LT_REVISION=1 +OPUS_LT_REVISION=0 OPUS_LT_AGE=10 AC_SUBST(OPUS_LT_CURRENT) @@ -699,7 +699,7 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[ mtest = _mm256_fmadd_ps(mtest, mtest, mtest); mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest)); mtest2 = - _mm256_cvtepi16_epi32(_mm_loadu_si128(utest)); + _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u *)utest)); return _mm256_extract_epi16(_mm256_xor_si256( _mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0); ]] diff --git a/src/libs/opus/dnn/dred_rdovae_dec_data.c b/src/libs/opus/dnn/dred_rdovae_dec_data.c index bc58e1fd..bd10feac 100644 --- a/src/libs/opus/dnn/dred_rdovae_dec_data.c +++ b/src/libs/opus/dnn/dred_rdovae_dec_data.c @@ -86297,361 +86297,361 @@ static const float dec_conv5_bias[32] = { #ifndef USE_WEIGHTS_FILE const WeightArray rdovaedec_arrays[] = { #ifdef WEIGHTS_dec_dense1_weights_float_DEFINED -{"dec_dense1_weights_float",WEIGHTS_dec_dense1_weights_float_TYPE,sizeof(dec_dense1_weights_float),dec_dense1_weights_float}, +{"dec_dense1_weights_float", WEIGHTS_dec_dense1_weights_float_TYPE,sizeof(dec_dense1_weights_float),dec_dense1_weights_float}, #endif #ifdef WEIGHTS_dec_dense1_bias_DEFINED -{"dec_dense1_bias",WEIGHTS_dec_dense1_bias_TYPE,sizeof(dec_dense1_bias),dec_dense1_bias}, +{"dec_dense1_bias", WEIGHTS_dec_dense1_bias_TYPE,sizeof(dec_dense1_bias),dec_dense1_bias}, #endif #ifdef WEIGHTS_dec_glu1_weights_int8_DEFINED -{"dec_glu1_weights_int8",WEIGHTS_dec_glu1_weights_int8_TYPE,sizeof(dec_glu1_weights_int8),dec_glu1_weights_int8}, +{"dec_glu1_weights_int8", WEIGHTS_dec_glu1_weights_int8_TYPE,sizeof(dec_glu1_weights_int8),dec_glu1_weights_int8}, #endif #ifdef WEIGHTS_dec_glu1_weights_float_DEFINED -{"dec_glu1_weights_float",WEIGHTS_dec_glu1_weights_float_TYPE,sizeof(dec_glu1_weights_float),dec_glu1_weights_float}, +{"dec_glu1_weights_float", WEIGHTS_dec_glu1_weights_float_TYPE,sizeof(dec_glu1_weights_float),dec_glu1_weights_float}, #endif #ifdef WEIGHTS_dec_glu1_subias_DEFINED -{"dec_glu1_subias",WEIGHTS_dec_glu1_subias_TYPE,sizeof(dec_glu1_subias),dec_glu1_subias}, +{"dec_glu1_subias", WEIGHTS_dec_glu1_subias_TYPE,sizeof(dec_glu1_subias),dec_glu1_subias}, #endif #ifdef WEIGHTS_dec_glu1_scale_DEFINED -{"dec_glu1_scale",WEIGHTS_dec_glu1_scale_TYPE,sizeof(dec_glu1_scale),dec_glu1_scale}, +{"dec_glu1_scale", WEIGHTS_dec_glu1_scale_TYPE,sizeof(dec_glu1_scale),dec_glu1_scale}, #endif #ifdef WEIGHTS_dec_glu1_bias_DEFINED -{"dec_glu1_bias",WEIGHTS_dec_glu1_bias_TYPE,sizeof(dec_glu1_bias),dec_glu1_bias}, +{"dec_glu1_bias", WEIGHTS_dec_glu1_bias_TYPE,sizeof(dec_glu1_bias),dec_glu1_bias}, #endif #ifdef WEIGHTS_dec_glu2_weights_int8_DEFINED -{"dec_glu2_weights_int8",WEIGHTS_dec_glu2_weights_int8_TYPE,sizeof(dec_glu2_weights_int8),dec_glu2_weights_int8}, +{"dec_glu2_weights_int8", WEIGHTS_dec_glu2_weights_int8_TYPE,sizeof(dec_glu2_weights_int8),dec_glu2_weights_int8}, #endif #ifdef WEIGHTS_dec_glu2_weights_float_DEFINED -{"dec_glu2_weights_float",WEIGHTS_dec_glu2_weights_float_TYPE,sizeof(dec_glu2_weights_float),dec_glu2_weights_float}, +{"dec_glu2_weights_float", WEIGHTS_dec_glu2_weights_float_TYPE,sizeof(dec_glu2_weights_float),dec_glu2_weights_float}, #endif #ifdef WEIGHTS_dec_glu2_subias_DEFINED -{"dec_glu2_subias",WEIGHTS_dec_glu2_subias_TYPE,sizeof(dec_glu2_subias),dec_glu2_subias}, +{"dec_glu2_subias", WEIGHTS_dec_glu2_subias_TYPE,sizeof(dec_glu2_subias),dec_glu2_subias}, #endif #ifdef WEIGHTS_dec_glu2_scale_DEFINED -{"dec_glu2_scale",WEIGHTS_dec_glu2_scale_TYPE,sizeof(dec_glu2_scale),dec_glu2_scale}, +{"dec_glu2_scale", WEIGHTS_dec_glu2_scale_TYPE,sizeof(dec_glu2_scale),dec_glu2_scale}, #endif #ifdef WEIGHTS_dec_glu2_bias_DEFINED -{"dec_glu2_bias",WEIGHTS_dec_glu2_bias_TYPE,sizeof(dec_glu2_bias),dec_glu2_bias}, +{"dec_glu2_bias", WEIGHTS_dec_glu2_bias_TYPE,sizeof(dec_glu2_bias),dec_glu2_bias}, #endif #ifdef WEIGHTS_dec_glu3_weights_int8_DEFINED -{"dec_glu3_weights_int8",WEIGHTS_dec_glu3_weights_int8_TYPE,sizeof(dec_glu3_weights_int8),dec_glu3_weights_int8}, +{"dec_glu3_weights_int8", WEIGHTS_dec_glu3_weights_int8_TYPE,sizeof(dec_glu3_weights_int8),dec_glu3_weights_int8}, #endif #ifdef WEIGHTS_dec_glu3_weights_float_DEFINED -{"dec_glu3_weights_float",WEIGHTS_dec_glu3_weights_float_TYPE,sizeof(dec_glu3_weights_float),dec_glu3_weights_float}, +{"dec_glu3_weights_float", WEIGHTS_dec_glu3_weights_float_TYPE,sizeof(dec_glu3_weights_float),dec_glu3_weights_float}, #endif #ifdef WEIGHTS_dec_glu3_subias_DEFINED -{"dec_glu3_subias",WEIGHTS_dec_glu3_subias_TYPE,sizeof(dec_glu3_subias),dec_glu3_subias}, +{"dec_glu3_subias", WEIGHTS_dec_glu3_subias_TYPE,sizeof(dec_glu3_subias),dec_glu3_subias}, #endif #ifdef WEIGHTS_dec_glu3_scale_DEFINED -{"dec_glu3_scale",WEIGHTS_dec_glu3_scale_TYPE,sizeof(dec_glu3_scale),dec_glu3_scale}, +{"dec_glu3_scale", WEIGHTS_dec_glu3_scale_TYPE,sizeof(dec_glu3_scale),dec_glu3_scale}, #endif #ifdef WEIGHTS_dec_glu3_bias_DEFINED -{"dec_glu3_bias",WEIGHTS_dec_glu3_bias_TYPE,sizeof(dec_glu3_bias),dec_glu3_bias}, +{"dec_glu3_bias", WEIGHTS_dec_glu3_bias_TYPE,sizeof(dec_glu3_bias),dec_glu3_bias}, #endif #ifdef WEIGHTS_dec_glu4_weights_int8_DEFINED -{"dec_glu4_weights_int8",WEIGHTS_dec_glu4_weights_int8_TYPE,sizeof(dec_glu4_weights_int8),dec_glu4_weights_int8}, +{"dec_glu4_weights_int8", WEIGHTS_dec_glu4_weights_int8_TYPE,sizeof(dec_glu4_weights_int8),dec_glu4_weights_int8}, #endif #ifdef WEIGHTS_dec_glu4_weights_float_DEFINED -{"dec_glu4_weights_float",WEIGHTS_dec_glu4_weights_float_TYPE,sizeof(dec_glu4_weights_float),dec_glu4_weights_float}, +{"dec_glu4_weights_float", WEIGHTS_dec_glu4_weights_float_TYPE,sizeof(dec_glu4_weights_float),dec_glu4_weights_float}, #endif #ifdef WEIGHTS_dec_glu4_subias_DEFINED -{"dec_glu4_subias",WEIGHTS_dec_glu4_subias_TYPE,sizeof(dec_glu4_subias),dec_glu4_subias}, +{"dec_glu4_subias", WEIGHTS_dec_glu4_subias_TYPE,sizeof(dec_glu4_subias),dec_glu4_subias}, #endif #ifdef WEIGHTS_dec_glu4_scale_DEFINED -{"dec_glu4_scale",WEIGHTS_dec_glu4_scale_TYPE,sizeof(dec_glu4_scale),dec_glu4_scale}, +{"dec_glu4_scale", WEIGHTS_dec_glu4_scale_TYPE,sizeof(dec_glu4_scale),dec_glu4_scale}, #endif #ifdef WEIGHTS_dec_glu4_bias_DEFINED -{"dec_glu4_bias",WEIGHTS_dec_glu4_bias_TYPE,sizeof(dec_glu4_bias),dec_glu4_bias}, +{"dec_glu4_bias", WEIGHTS_dec_glu4_bias_TYPE,sizeof(dec_glu4_bias),dec_glu4_bias}, #endif #ifdef WEIGHTS_dec_glu5_weights_int8_DEFINED -{"dec_glu5_weights_int8",WEIGHTS_dec_glu5_weights_int8_TYPE,sizeof(dec_glu5_weights_int8),dec_glu5_weights_int8}, +{"dec_glu5_weights_int8", WEIGHTS_dec_glu5_weights_int8_TYPE,sizeof(dec_glu5_weights_int8),dec_glu5_weights_int8}, #endif #ifdef WEIGHTS_dec_glu5_weights_float_DEFINED -{"dec_glu5_weights_float",WEIGHTS_dec_glu5_weights_float_TYPE,sizeof(dec_glu5_weights_float),dec_glu5_weights_float}, +{"dec_glu5_weights_float", WEIGHTS_dec_glu5_weights_float_TYPE,sizeof(dec_glu5_weights_float),dec_glu5_weights_float}, #endif #ifdef WEIGHTS_dec_glu5_subias_DEFINED -{"dec_glu5_subias",WEIGHTS_dec_glu5_subias_TYPE,sizeof(dec_glu5_subias),dec_glu5_subias}, +{"dec_glu5_subias", WEIGHTS_dec_glu5_subias_TYPE,sizeof(dec_glu5_subias),dec_glu5_subias}, #endif #ifdef WEIGHTS_dec_glu5_scale_DEFINED -{"dec_glu5_scale",WEIGHTS_dec_glu5_scale_TYPE,sizeof(dec_glu5_scale),dec_glu5_scale}, +{"dec_glu5_scale", WEIGHTS_dec_glu5_scale_TYPE,sizeof(dec_glu5_scale),dec_glu5_scale}, #endif #ifdef WEIGHTS_dec_glu5_bias_DEFINED -{"dec_glu5_bias",WEIGHTS_dec_glu5_bias_TYPE,sizeof(dec_glu5_bias),dec_glu5_bias}, +{"dec_glu5_bias", WEIGHTS_dec_glu5_bias_TYPE,sizeof(dec_glu5_bias),dec_glu5_bias}, #endif #ifdef WEIGHTS_dec_output_weights_int8_DEFINED -{"dec_output_weights_int8",WEIGHTS_dec_output_weights_int8_TYPE,sizeof(dec_output_weights_int8),dec_output_weights_int8}, +{"dec_output_weights_int8", WEIGHTS_dec_output_weights_int8_TYPE,sizeof(dec_output_weights_int8),dec_output_weights_int8}, #endif #ifdef WEIGHTS_dec_output_weights_float_DEFINED -{"dec_output_weights_float",WEIGHTS_dec_output_weights_float_TYPE,sizeof(dec_output_weights_float),dec_output_weights_float}, +{"dec_output_weights_float", WEIGHTS_dec_output_weights_float_TYPE,sizeof(dec_output_weights_float),dec_output_weights_float}, #endif #ifdef WEIGHTS_dec_output_subias_DEFINED -{"dec_output_subias",WEIGHTS_dec_output_subias_TYPE,sizeof(dec_output_subias),dec_output_subias}, +{"dec_output_subias", WEIGHTS_dec_output_subias_TYPE,sizeof(dec_output_subias),dec_output_subias}, #endif #ifdef WEIGHTS_dec_output_scale_DEFINED -{"dec_output_scale",WEIGHTS_dec_output_scale_TYPE,sizeof(dec_output_scale),dec_output_scale}, +{"dec_output_scale", WEIGHTS_dec_output_scale_TYPE,sizeof(dec_output_scale),dec_output_scale}, #endif #ifdef WEIGHTS_dec_output_bias_DEFINED -{"dec_output_bias",WEIGHTS_dec_output_bias_TYPE,sizeof(dec_output_bias),dec_output_bias}, +{"dec_output_bias", WEIGHTS_dec_output_bias_TYPE,sizeof(dec_output_bias),dec_output_bias}, #endif #ifdef WEIGHTS_dec_hidden_init_weights_float_DEFINED -{"dec_hidden_init_weights_float",WEIGHTS_dec_hidden_init_weights_float_TYPE,sizeof(dec_hidden_init_weights_float),dec_hidden_init_weights_float}, +{"dec_hidden_init_weights_float", WEIGHTS_dec_hidden_init_weights_float_TYPE,sizeof(dec_hidden_init_weights_float),dec_hidden_init_weights_float}, #endif #ifdef WEIGHTS_dec_hidden_init_bias_DEFINED -{"dec_hidden_init_bias",WEIGHTS_dec_hidden_init_bias_TYPE,sizeof(dec_hidden_init_bias),dec_hidden_init_bias}, +{"dec_hidden_init_bias", WEIGHTS_dec_hidden_init_bias_TYPE,sizeof(dec_hidden_init_bias),dec_hidden_init_bias}, #endif #ifdef WEIGHTS_dec_gru_init_weights_int8_DEFINED -{"dec_gru_init_weights_int8",WEIGHTS_dec_gru_init_weights_int8_TYPE,sizeof(dec_gru_init_weights_int8),dec_gru_init_weights_int8}, +{"dec_gru_init_weights_int8", WEIGHTS_dec_gru_init_weights_int8_TYPE,sizeof(dec_gru_init_weights_int8),dec_gru_init_weights_int8}, #endif #ifdef WEIGHTS_dec_gru_init_weights_float_DEFINED -{"dec_gru_init_weights_float",WEIGHTS_dec_gru_init_weights_float_TYPE,sizeof(dec_gru_init_weights_float),dec_gru_init_weights_float}, +{"dec_gru_init_weights_float", WEIGHTS_dec_gru_init_weights_float_TYPE,sizeof(dec_gru_init_weights_float),dec_gru_init_weights_float}, #endif #ifdef WEIGHTS_dec_gru_init_subias_DEFINED -{"dec_gru_init_subias",WEIGHTS_dec_gru_init_subias_TYPE,sizeof(dec_gru_init_subias),dec_gru_init_subias}, +{"dec_gru_init_subias", WEIGHTS_dec_gru_init_subias_TYPE,sizeof(dec_gru_init_subias),dec_gru_init_subias}, #endif #ifdef WEIGHTS_dec_gru_init_scale_DEFINED -{"dec_gru_init_scale",WEIGHTS_dec_gru_init_scale_TYPE,sizeof(dec_gru_init_scale),dec_gru_init_scale}, +{"dec_gru_init_scale", WEIGHTS_dec_gru_init_scale_TYPE,sizeof(dec_gru_init_scale),dec_gru_init_scale}, #endif #ifdef WEIGHTS_dec_gru_init_bias_DEFINED -{"dec_gru_init_bias",WEIGHTS_dec_gru_init_bias_TYPE,sizeof(dec_gru_init_bias),dec_gru_init_bias}, +{"dec_gru_init_bias", WEIGHTS_dec_gru_init_bias_TYPE,sizeof(dec_gru_init_bias),dec_gru_init_bias}, #endif #ifdef WEIGHTS_dec_gru1_input_weights_int8_DEFINED -{"dec_gru1_input_weights_int8",WEIGHTS_dec_gru1_input_weights_int8_TYPE,sizeof(dec_gru1_input_weights_int8),dec_gru1_input_weights_int8}, +{"dec_gru1_input_weights_int8", WEIGHTS_dec_gru1_input_weights_int8_TYPE,sizeof(dec_gru1_input_weights_int8),dec_gru1_input_weights_int8}, #endif #ifdef WEIGHTS_dec_gru1_input_weights_float_DEFINED -{"dec_gru1_input_weights_float",WEIGHTS_dec_gru1_input_weights_float_TYPE,sizeof(dec_gru1_input_weights_float),dec_gru1_input_weights_float}, +{"dec_gru1_input_weights_float", WEIGHTS_dec_gru1_input_weights_float_TYPE,sizeof(dec_gru1_input_weights_float),dec_gru1_input_weights_float}, #endif #ifdef WEIGHTS_dec_gru1_input_weights_idx_DEFINED -{"dec_gru1_input_weights_idx",WEIGHTS_dec_gru1_input_weights_idx_TYPE,sizeof(dec_gru1_input_weights_idx),dec_gru1_input_weights_idx}, +{"dec_gru1_input_weights_idx", WEIGHTS_dec_gru1_input_weights_idx_TYPE,sizeof(dec_gru1_input_weights_idx),dec_gru1_input_weights_idx}, #endif #ifdef WEIGHTS_dec_gru1_input_subias_DEFINED -{"dec_gru1_input_subias",WEIGHTS_dec_gru1_input_subias_TYPE,sizeof(dec_gru1_input_subias),dec_gru1_input_subias}, +{"dec_gru1_input_subias", WEIGHTS_dec_gru1_input_subias_TYPE,sizeof(dec_gru1_input_subias),dec_gru1_input_subias}, #endif #ifdef WEIGHTS_dec_gru1_input_scale_DEFINED -{"dec_gru1_input_scale",WEIGHTS_dec_gru1_input_scale_TYPE,sizeof(dec_gru1_input_scale),dec_gru1_input_scale}, +{"dec_gru1_input_scale", WEIGHTS_dec_gru1_input_scale_TYPE,sizeof(dec_gru1_input_scale),dec_gru1_input_scale}, #endif #ifdef WEIGHTS_dec_gru1_input_bias_DEFINED -{"dec_gru1_input_bias",WEIGHTS_dec_gru1_input_bias_TYPE,sizeof(dec_gru1_input_bias),dec_gru1_input_bias}, +{"dec_gru1_input_bias", WEIGHTS_dec_gru1_input_bias_TYPE,sizeof(dec_gru1_input_bias),dec_gru1_input_bias}, #endif #ifdef WEIGHTS_dec_gru1_recurrent_weights_int8_DEFINED -{"dec_gru1_recurrent_weights_int8",WEIGHTS_dec_gru1_recurrent_weights_int8_TYPE,sizeof(dec_gru1_recurrent_weights_int8),dec_gru1_recurrent_weights_int8}, +{"dec_gru1_recurrent_weights_int8", WEIGHTS_dec_gru1_recurrent_weights_int8_TYPE,sizeof(dec_gru1_recurrent_weights_int8),dec_gru1_recurrent_weights_int8}, #endif #ifdef WEIGHTS_dec_gru1_recurrent_weights_float_DEFINED -{"dec_gru1_recurrent_weights_float",WEIGHTS_dec_gru1_recurrent_weights_float_TYPE,sizeof(dec_gru1_recurrent_weights_float),dec_gru1_recurrent_weights_float}, +{"dec_gru1_recurrent_weights_float", WEIGHTS_dec_gru1_recurrent_weights_float_TYPE,sizeof(dec_gru1_recurrent_weights_float),dec_gru1_recurrent_weights_float}, #endif #ifdef WEIGHTS_dec_gru1_recurrent_subias_DEFINED -{"dec_gru1_recurrent_subias",WEIGHTS_dec_gru1_recurrent_subias_TYPE,sizeof(dec_gru1_recurrent_subias),dec_gru1_recurrent_subias}, +{"dec_gru1_recurrent_subias", WEIGHTS_dec_gru1_recurrent_subias_TYPE,sizeof(dec_gru1_recurrent_subias),dec_gru1_recurrent_subias}, #endif #ifdef WEIGHTS_dec_gru1_recurrent_scale_DEFINED -{"dec_gru1_recurrent_scale",WEIGHTS_dec_gru1_recurrent_scale_TYPE,sizeof(dec_gru1_recurrent_scale),dec_gru1_recurrent_scale}, +{"dec_gru1_recurrent_scale", WEIGHTS_dec_gru1_recurrent_scale_TYPE,sizeof(dec_gru1_recurrent_scale),dec_gru1_recurrent_scale}, #endif #ifdef WEIGHTS_dec_gru1_recurrent_bias_DEFINED -{"dec_gru1_recurrent_bias",WEIGHTS_dec_gru1_recurrent_bias_TYPE,sizeof(dec_gru1_recurrent_bias),dec_gru1_recurrent_bias}, +{"dec_gru1_recurrent_bias", WEIGHTS_dec_gru1_recurrent_bias_TYPE,sizeof(dec_gru1_recurrent_bias),dec_gru1_recurrent_bias}, #endif #ifdef WEIGHTS_dec_gru2_input_weights_int8_DEFINED -{"dec_gru2_input_weights_int8",WEIGHTS_dec_gru2_input_weights_int8_TYPE,sizeof(dec_gru2_input_weights_int8),dec_gru2_input_weights_int8}, +{"dec_gru2_input_weights_int8", WEIGHTS_dec_gru2_input_weights_int8_TYPE,sizeof(dec_gru2_input_weights_int8),dec_gru2_input_weights_int8}, #endif #ifdef WEIGHTS_dec_gru2_input_weights_float_DEFINED -{"dec_gru2_input_weights_float",WEIGHTS_dec_gru2_input_weights_float_TYPE,sizeof(dec_gru2_input_weights_float),dec_gru2_input_weights_float}, +{"dec_gru2_input_weights_float", WEIGHTS_dec_gru2_input_weights_float_TYPE,sizeof(dec_gru2_input_weights_float),dec_gru2_input_weights_float}, #endif #ifdef WEIGHTS_dec_gru2_input_weights_idx_DEFINED -{"dec_gru2_input_weights_idx",WEIGHTS_dec_gru2_input_weights_idx_TYPE,sizeof(dec_gru2_input_weights_idx),dec_gru2_input_weights_idx}, +{"dec_gru2_input_weights_idx", WEIGHTS_dec_gru2_input_weights_idx_TYPE,sizeof(dec_gru2_input_weights_idx),dec_gru2_input_weights_idx}, #endif #ifdef WEIGHTS_dec_gru2_input_subias_DEFINED -{"dec_gru2_input_subias",WEIGHTS_dec_gru2_input_subias_TYPE,sizeof(dec_gru2_input_subias),dec_gru2_input_subias}, +{"dec_gru2_input_subias", WEIGHTS_dec_gru2_input_subias_TYPE,sizeof(dec_gru2_input_subias),dec_gru2_input_subias}, #endif #ifdef WEIGHTS_dec_gru2_input_scale_DEFINED -{"dec_gru2_input_scale",WEIGHTS_dec_gru2_input_scale_TYPE,sizeof(dec_gru2_input_scale),dec_gru2_input_scale}, +{"dec_gru2_input_scale", WEIGHTS_dec_gru2_input_scale_TYPE,sizeof(dec_gru2_input_scale),dec_gru2_input_scale}, #endif #ifdef WEIGHTS_dec_gru2_input_bias_DEFINED -{"dec_gru2_input_bias",WEIGHTS_dec_gru2_input_bias_TYPE,sizeof(dec_gru2_input_bias),dec_gru2_input_bias}, +{"dec_gru2_input_bias", WEIGHTS_dec_gru2_input_bias_TYPE,sizeof(dec_gru2_input_bias),dec_gru2_input_bias}, #endif #ifdef WEIGHTS_dec_gru2_recurrent_weights_int8_DEFINED -{"dec_gru2_recurrent_weights_int8",WEIGHTS_dec_gru2_recurrent_weights_int8_TYPE,sizeof(dec_gru2_recurrent_weights_int8),dec_gru2_recurrent_weights_int8}, +{"dec_gru2_recurrent_weights_int8", WEIGHTS_dec_gru2_recurrent_weights_int8_TYPE,sizeof(dec_gru2_recurrent_weights_int8),dec_gru2_recurrent_weights_int8}, #endif #ifdef WEIGHTS_dec_gru2_recurrent_weights_float_DEFINED -{"dec_gru2_recurrent_weights_float",WEIGHTS_dec_gru2_recurrent_weights_float_TYPE,sizeof(dec_gru2_recurrent_weights_float),dec_gru2_recurrent_weights_float}, +{"dec_gru2_recurrent_weights_float", WEIGHTS_dec_gru2_recurrent_weights_float_TYPE,sizeof(dec_gru2_recurrent_weights_float),dec_gru2_recurrent_weights_float}, #endif #ifdef WEIGHTS_dec_gru2_recurrent_subias_DEFINED -{"dec_gru2_recurrent_subias",WEIGHTS_dec_gru2_recurrent_subias_TYPE,sizeof(dec_gru2_recurrent_subias),dec_gru2_recurrent_subias}, +{"dec_gru2_recurrent_subias", WEIGHTS_dec_gru2_recurrent_subias_TYPE,sizeof(dec_gru2_recurrent_subias),dec_gru2_recurrent_subias}, #endif #ifdef WEIGHTS_dec_gru2_recurrent_scale_DEFINED -{"dec_gru2_recurrent_scale",WEIGHTS_dec_gru2_recurrent_scale_TYPE,sizeof(dec_gru2_recurrent_scale),dec_gru2_recurrent_scale}, +{"dec_gru2_recurrent_scale", WEIGHTS_dec_gru2_recurrent_scale_TYPE,sizeof(dec_gru2_recurrent_scale),dec_gru2_recurrent_scale}, #endif #ifdef WEIGHTS_dec_gru2_recurrent_bias_DEFINED -{"dec_gru2_recurrent_bias",WEIGHTS_dec_gru2_recurrent_bias_TYPE,sizeof(dec_gru2_recurrent_bias),dec_gru2_recurrent_bias}, +{"dec_gru2_recurrent_bias", WEIGHTS_dec_gru2_recurrent_bias_TYPE,sizeof(dec_gru2_recurrent_bias),dec_gru2_recurrent_bias}, #endif #ifdef WEIGHTS_dec_gru3_input_weights_int8_DEFINED -{"dec_gru3_input_weights_int8",WEIGHTS_dec_gru3_input_weights_int8_TYPE,sizeof(dec_gru3_input_weights_int8),dec_gru3_input_weights_int8}, +{"dec_gru3_input_weights_int8", WEIGHTS_dec_gru3_input_weights_int8_TYPE,sizeof(dec_gru3_input_weights_int8),dec_gru3_input_weights_int8}, #endif #ifdef WEIGHTS_dec_gru3_input_weights_float_DEFINED -{"dec_gru3_input_weights_float",WEIGHTS_dec_gru3_input_weights_float_TYPE,sizeof(dec_gru3_input_weights_float),dec_gru3_input_weights_float}, +{"dec_gru3_input_weights_float", WEIGHTS_dec_gru3_input_weights_float_TYPE,sizeof(dec_gru3_input_weights_float),dec_gru3_input_weights_float}, #endif #ifdef WEIGHTS_dec_gru3_input_weights_idx_DEFINED -{"dec_gru3_input_weights_idx",WEIGHTS_dec_gru3_input_weights_idx_TYPE,sizeof(dec_gru3_input_weights_idx),dec_gru3_input_weights_idx}, +{"dec_gru3_input_weights_idx", WEIGHTS_dec_gru3_input_weights_idx_TYPE,sizeof(dec_gru3_input_weights_idx),dec_gru3_input_weights_idx}, #endif #ifdef WEIGHTS_dec_gru3_input_subias_DEFINED -{"dec_gru3_input_subias",WEIGHTS_dec_gru3_input_subias_TYPE,sizeof(dec_gru3_input_subias),dec_gru3_input_subias}, +{"dec_gru3_input_subias", WEIGHTS_dec_gru3_input_subias_TYPE,sizeof(dec_gru3_input_subias),dec_gru3_input_subias}, #endif #ifdef WEIGHTS_dec_gru3_input_scale_DEFINED -{"dec_gru3_input_scale",WEIGHTS_dec_gru3_input_scale_TYPE,sizeof(dec_gru3_input_scale),dec_gru3_input_scale}, +{"dec_gru3_input_scale", WEIGHTS_dec_gru3_input_scale_TYPE,sizeof(dec_gru3_input_scale),dec_gru3_input_scale}, #endif #ifdef WEIGHTS_dec_gru3_input_bias_DEFINED -{"dec_gru3_input_bias",WEIGHTS_dec_gru3_input_bias_TYPE,sizeof(dec_gru3_input_bias),dec_gru3_input_bias}, +{"dec_gru3_input_bias", WEIGHTS_dec_gru3_input_bias_TYPE,sizeof(dec_gru3_input_bias),dec_gru3_input_bias}, #endif #ifdef WEIGHTS_dec_gru3_recurrent_weights_int8_DEFINED -{"dec_gru3_recurrent_weights_int8",WEIGHTS_dec_gru3_recurrent_weights_int8_TYPE,sizeof(dec_gru3_recurrent_weights_int8),dec_gru3_recurrent_weights_int8}, +{"dec_gru3_recurrent_weights_int8", WEIGHTS_dec_gru3_recurrent_weights_int8_TYPE,sizeof(dec_gru3_recurrent_weights_int8),dec_gru3_recurrent_weights_int8}, #endif #ifdef WEIGHTS_dec_gru3_recurrent_weights_float_DEFINED -{"dec_gru3_recurrent_weights_float",WEIGHTS_dec_gru3_recurrent_weights_float_TYPE,sizeof(dec_gru3_recurrent_weights_float),dec_gru3_recurrent_weights_float}, +{"dec_gru3_recurrent_weights_float", WEIGHTS_dec_gru3_recurrent_weights_float_TYPE,sizeof(dec_gru3_recurrent_weights_float),dec_gru3_recurrent_weights_float}, #endif #ifdef WEIGHTS_dec_gru3_recurrent_subias_DEFINED -{"dec_gru3_recurrent_subias",WEIGHTS_dec_gru3_recurrent_subias_TYPE,sizeof(dec_gru3_recurrent_subias),dec_gru3_recurrent_subias}, +{"dec_gru3_recurrent_subias", WEIGHTS_dec_gru3_recurrent_subias_TYPE,sizeof(dec_gru3_recurrent_subias),dec_gru3_recurrent_subias}, #endif #ifdef WEIGHTS_dec_gru3_recurrent_scale_DEFINED -{"dec_gru3_recurrent_scale",WEIGHTS_dec_gru3_recurrent_scale_TYPE,sizeof(dec_gru3_recurrent_scale),dec_gru3_recurrent_scale}, +{"dec_gru3_recurrent_scale", WEIGHTS_dec_gru3_recurrent_scale_TYPE,sizeof(dec_gru3_recurrent_scale),dec_gru3_recurrent_scale}, #endif #ifdef WEIGHTS_dec_gru3_recurrent_bias_DEFINED -{"dec_gru3_recurrent_bias",WEIGHTS_dec_gru3_recurrent_bias_TYPE,sizeof(dec_gru3_recurrent_bias),dec_gru3_recurrent_bias}, +{"dec_gru3_recurrent_bias", WEIGHTS_dec_gru3_recurrent_bias_TYPE,sizeof(dec_gru3_recurrent_bias),dec_gru3_recurrent_bias}, #endif #ifdef WEIGHTS_dec_gru4_input_weights_int8_DEFINED -{"dec_gru4_input_weights_int8",WEIGHTS_dec_gru4_input_weights_int8_TYPE,sizeof(dec_gru4_input_weights_int8),dec_gru4_input_weights_int8}, +{"dec_gru4_input_weights_int8", WEIGHTS_dec_gru4_input_weights_int8_TYPE,sizeof(dec_gru4_input_weights_int8),dec_gru4_input_weights_int8}, #endif #ifdef WEIGHTS_dec_gru4_input_weights_float_DEFINED -{"dec_gru4_input_weights_float",WEIGHTS_dec_gru4_input_weights_float_TYPE,sizeof(dec_gru4_input_weights_float),dec_gru4_input_weights_float}, +{"dec_gru4_input_weights_float", WEIGHTS_dec_gru4_input_weights_float_TYPE,sizeof(dec_gru4_input_weights_float),dec_gru4_input_weights_float}, #endif #ifdef WEIGHTS_dec_gru4_input_weights_idx_DEFINED -{"dec_gru4_input_weights_idx",WEIGHTS_dec_gru4_input_weights_idx_TYPE,sizeof(dec_gru4_input_weights_idx),dec_gru4_input_weights_idx}, +{"dec_gru4_input_weights_idx", WEIGHTS_dec_gru4_input_weights_idx_TYPE,sizeof(dec_gru4_input_weights_idx),dec_gru4_input_weights_idx}, #endif #ifdef WEIGHTS_dec_gru4_input_subias_DEFINED -{"dec_gru4_input_subias",WEIGHTS_dec_gru4_input_subias_TYPE,sizeof(dec_gru4_input_subias),dec_gru4_input_subias}, +{"dec_gru4_input_subias", WEIGHTS_dec_gru4_input_subias_TYPE,sizeof(dec_gru4_input_subias),dec_gru4_input_subias}, #endif #ifdef WEIGHTS_dec_gru4_input_scale_DEFINED -{"dec_gru4_input_scale",WEIGHTS_dec_gru4_input_scale_TYPE,sizeof(dec_gru4_input_scale),dec_gru4_input_scale}, +{"dec_gru4_input_scale", WEIGHTS_dec_gru4_input_scale_TYPE,sizeof(dec_gru4_input_scale),dec_gru4_input_scale}, #endif #ifdef WEIGHTS_dec_gru4_input_bias_DEFINED -{"dec_gru4_input_bias",WEIGHTS_dec_gru4_input_bias_TYPE,sizeof(dec_gru4_input_bias),dec_gru4_input_bias}, +{"dec_gru4_input_bias", WEIGHTS_dec_gru4_input_bias_TYPE,sizeof(dec_gru4_input_bias),dec_gru4_input_bias}, #endif #ifdef WEIGHTS_dec_gru4_recurrent_weights_int8_DEFINED -{"dec_gru4_recurrent_weights_int8",WEIGHTS_dec_gru4_recurrent_weights_int8_TYPE,sizeof(dec_gru4_recurrent_weights_int8),dec_gru4_recurrent_weights_int8}, +{"dec_gru4_recurrent_weights_int8", WEIGHTS_dec_gru4_recurrent_weights_int8_TYPE,sizeof(dec_gru4_recurrent_weights_int8),dec_gru4_recurrent_weights_int8}, #endif #ifdef WEIGHTS_dec_gru4_recurrent_weights_float_DEFINED -{"dec_gru4_recurrent_weights_float",WEIGHTS_dec_gru4_recurrent_weights_float_TYPE,sizeof(dec_gru4_recurrent_weights_float),dec_gru4_recurrent_weights_float}, +{"dec_gru4_recurrent_weights_float", WEIGHTS_dec_gru4_recurrent_weights_float_TYPE,sizeof(dec_gru4_recurrent_weights_float),dec_gru4_recurrent_weights_float}, #endif #ifdef WEIGHTS_dec_gru4_recurrent_subias_DEFINED -{"dec_gru4_recurrent_subias",WEIGHTS_dec_gru4_recurrent_subias_TYPE,sizeof(dec_gru4_recurrent_subias),dec_gru4_recurrent_subias}, +{"dec_gru4_recurrent_subias", WEIGHTS_dec_gru4_recurrent_subias_TYPE,sizeof(dec_gru4_recurrent_subias),dec_gru4_recurrent_subias}, #endif #ifdef WEIGHTS_dec_gru4_recurrent_scale_DEFINED -{"dec_gru4_recurrent_scale",WEIGHTS_dec_gru4_recurrent_scale_TYPE,sizeof(dec_gru4_recurrent_scale),dec_gru4_recurrent_scale}, +{"dec_gru4_recurrent_scale", WEIGHTS_dec_gru4_recurrent_scale_TYPE,sizeof(dec_gru4_recurrent_scale),dec_gru4_recurrent_scale}, #endif #ifdef WEIGHTS_dec_gru4_recurrent_bias_DEFINED -{"dec_gru4_recurrent_bias",WEIGHTS_dec_gru4_recurrent_bias_TYPE,sizeof(dec_gru4_recurrent_bias),dec_gru4_recurrent_bias}, +{"dec_gru4_recurrent_bias", WEIGHTS_dec_gru4_recurrent_bias_TYPE,sizeof(dec_gru4_recurrent_bias),dec_gru4_recurrent_bias}, #endif #ifdef WEIGHTS_dec_gru5_input_weights_int8_DEFINED -{"dec_gru5_input_weights_int8",WEIGHTS_dec_gru5_input_weights_int8_TYPE,sizeof(dec_gru5_input_weights_int8),dec_gru5_input_weights_int8}, +{"dec_gru5_input_weights_int8", WEIGHTS_dec_gru5_input_weights_int8_TYPE,sizeof(dec_gru5_input_weights_int8),dec_gru5_input_weights_int8}, #endif #ifdef WEIGHTS_dec_gru5_input_weights_float_DEFINED -{"dec_gru5_input_weights_float",WEIGHTS_dec_gru5_input_weights_float_TYPE,sizeof(dec_gru5_input_weights_float),dec_gru5_input_weights_float}, +{"dec_gru5_input_weights_float", WEIGHTS_dec_gru5_input_weights_float_TYPE,sizeof(dec_gru5_input_weights_float),dec_gru5_input_weights_float}, #endif #ifdef WEIGHTS_dec_gru5_input_weights_idx_DEFINED -{"dec_gru5_input_weights_idx",WEIGHTS_dec_gru5_input_weights_idx_TYPE,sizeof(dec_gru5_input_weights_idx),dec_gru5_input_weights_idx}, +{"dec_gru5_input_weights_idx", WEIGHTS_dec_gru5_input_weights_idx_TYPE,sizeof(dec_gru5_input_weights_idx),dec_gru5_input_weights_idx}, #endif #ifdef WEIGHTS_dec_gru5_input_subias_DEFINED -{"dec_gru5_input_subias",WEIGHTS_dec_gru5_input_subias_TYPE,sizeof(dec_gru5_input_subias),dec_gru5_input_subias}, +{"dec_gru5_input_subias", WEIGHTS_dec_gru5_input_subias_TYPE,sizeof(dec_gru5_input_subias),dec_gru5_input_subias}, #endif #ifdef WEIGHTS_dec_gru5_input_scale_DEFINED -{"dec_gru5_input_scale",WEIGHTS_dec_gru5_input_scale_TYPE,sizeof(dec_gru5_input_scale),dec_gru5_input_scale}, +{"dec_gru5_input_scale", WEIGHTS_dec_gru5_input_scale_TYPE,sizeof(dec_gru5_input_scale),dec_gru5_input_scale}, #endif #ifdef WEIGHTS_dec_gru5_input_bias_DEFINED -{"dec_gru5_input_bias",WEIGHTS_dec_gru5_input_bias_TYPE,sizeof(dec_gru5_input_bias),dec_gru5_input_bias}, +{"dec_gru5_input_bias", WEIGHTS_dec_gru5_input_bias_TYPE,sizeof(dec_gru5_input_bias),dec_gru5_input_bias}, #endif #ifdef WEIGHTS_dec_gru5_recurrent_weights_int8_DEFINED -{"dec_gru5_recurrent_weights_int8",WEIGHTS_dec_gru5_recurrent_weights_int8_TYPE,sizeof(dec_gru5_recurrent_weights_int8),dec_gru5_recurrent_weights_int8}, +{"dec_gru5_recurrent_weights_int8", WEIGHTS_dec_gru5_recurrent_weights_int8_TYPE,sizeof(dec_gru5_recurrent_weights_int8),dec_gru5_recurrent_weights_int8}, #endif #ifdef WEIGHTS_dec_gru5_recurrent_weights_float_DEFINED -{"dec_gru5_recurrent_weights_float",WEIGHTS_dec_gru5_recurrent_weights_float_TYPE,sizeof(dec_gru5_recurrent_weights_float),dec_gru5_recurrent_weights_float}, +{"dec_gru5_recurrent_weights_float", WEIGHTS_dec_gru5_recurrent_weights_float_TYPE,sizeof(dec_gru5_recurrent_weights_float),dec_gru5_recurrent_weights_float}, #endif #ifdef WEIGHTS_dec_gru5_recurrent_subias_DEFINED -{"dec_gru5_recurrent_subias",WEIGHTS_dec_gru5_recurrent_subias_TYPE,sizeof(dec_gru5_recurrent_subias),dec_gru5_recurrent_subias}, +{"dec_gru5_recurrent_subias", WEIGHTS_dec_gru5_recurrent_subias_TYPE,sizeof(dec_gru5_recurrent_subias),dec_gru5_recurrent_subias}, #endif #ifdef WEIGHTS_dec_gru5_recurrent_scale_DEFINED -{"dec_gru5_recurrent_scale",WEIGHTS_dec_gru5_recurrent_scale_TYPE,sizeof(dec_gru5_recurrent_scale),dec_gru5_recurrent_scale}, +{"dec_gru5_recurrent_scale", WEIGHTS_dec_gru5_recurrent_scale_TYPE,sizeof(dec_gru5_recurrent_scale),dec_gru5_recurrent_scale}, #endif #ifdef WEIGHTS_dec_gru5_recurrent_bias_DEFINED -{"dec_gru5_recurrent_bias",WEIGHTS_dec_gru5_recurrent_bias_TYPE,sizeof(dec_gru5_recurrent_bias),dec_gru5_recurrent_bias}, +{"dec_gru5_recurrent_bias", WEIGHTS_dec_gru5_recurrent_bias_TYPE,sizeof(dec_gru5_recurrent_bias),dec_gru5_recurrent_bias}, #endif #ifdef WEIGHTS_dec_conv1_weights_int8_DEFINED -{"dec_conv1_weights_int8",WEIGHTS_dec_conv1_weights_int8_TYPE,sizeof(dec_conv1_weights_int8),dec_conv1_weights_int8}, +{"dec_conv1_weights_int8", WEIGHTS_dec_conv1_weights_int8_TYPE,sizeof(dec_conv1_weights_int8),dec_conv1_weights_int8}, #endif #ifdef WEIGHTS_dec_conv1_weights_float_DEFINED -{"dec_conv1_weights_float",WEIGHTS_dec_conv1_weights_float_TYPE,sizeof(dec_conv1_weights_float),dec_conv1_weights_float}, +{"dec_conv1_weights_float", WEIGHTS_dec_conv1_weights_float_TYPE,sizeof(dec_conv1_weights_float),dec_conv1_weights_float}, #endif #ifdef WEIGHTS_dec_conv1_subias_DEFINED -{"dec_conv1_subias",WEIGHTS_dec_conv1_subias_TYPE,sizeof(dec_conv1_subias),dec_conv1_subias}, +{"dec_conv1_subias", WEIGHTS_dec_conv1_subias_TYPE,sizeof(dec_conv1_subias),dec_conv1_subias}, #endif #ifdef WEIGHTS_dec_conv1_scale_DEFINED -{"dec_conv1_scale",WEIGHTS_dec_conv1_scale_TYPE,sizeof(dec_conv1_scale),dec_conv1_scale}, +{"dec_conv1_scale", WEIGHTS_dec_conv1_scale_TYPE,sizeof(dec_conv1_scale),dec_conv1_scale}, #endif #ifdef WEIGHTS_dec_conv1_bias_DEFINED -{"dec_conv1_bias",WEIGHTS_dec_conv1_bias_TYPE,sizeof(dec_conv1_bias),dec_conv1_bias}, +{"dec_conv1_bias", WEIGHTS_dec_conv1_bias_TYPE,sizeof(dec_conv1_bias),dec_conv1_bias}, #endif #ifdef WEIGHTS_dec_conv2_weights_int8_DEFINED -{"dec_conv2_weights_int8",WEIGHTS_dec_conv2_weights_int8_TYPE,sizeof(dec_conv2_weights_int8),dec_conv2_weights_int8}, +{"dec_conv2_weights_int8", WEIGHTS_dec_conv2_weights_int8_TYPE,sizeof(dec_conv2_weights_int8),dec_conv2_weights_int8}, #endif #ifdef WEIGHTS_dec_conv2_weights_float_DEFINED -{"dec_conv2_weights_float",WEIGHTS_dec_conv2_weights_float_TYPE,sizeof(dec_conv2_weights_float),dec_conv2_weights_float}, +{"dec_conv2_weights_float", WEIGHTS_dec_conv2_weights_float_TYPE,sizeof(dec_conv2_weights_float),dec_conv2_weights_float}, #endif #ifdef WEIGHTS_dec_conv2_subias_DEFINED -{"dec_conv2_subias",WEIGHTS_dec_conv2_subias_TYPE,sizeof(dec_conv2_subias),dec_conv2_subias}, +{"dec_conv2_subias", WEIGHTS_dec_conv2_subias_TYPE,sizeof(dec_conv2_subias),dec_conv2_subias}, #endif #ifdef WEIGHTS_dec_conv2_scale_DEFINED -{"dec_conv2_scale",WEIGHTS_dec_conv2_scale_TYPE,sizeof(dec_conv2_scale),dec_conv2_scale}, +{"dec_conv2_scale", WEIGHTS_dec_conv2_scale_TYPE,sizeof(dec_conv2_scale),dec_conv2_scale}, #endif #ifdef WEIGHTS_dec_conv2_bias_DEFINED -{"dec_conv2_bias",WEIGHTS_dec_conv2_bias_TYPE,sizeof(dec_conv2_bias),dec_conv2_bias}, +{"dec_conv2_bias", WEIGHTS_dec_conv2_bias_TYPE,sizeof(dec_conv2_bias),dec_conv2_bias}, #endif #ifdef WEIGHTS_dec_conv3_weights_int8_DEFINED -{"dec_conv3_weights_int8",WEIGHTS_dec_conv3_weights_int8_TYPE,sizeof(dec_conv3_weights_int8),dec_conv3_weights_int8}, +{"dec_conv3_weights_int8", WEIGHTS_dec_conv3_weights_int8_TYPE,sizeof(dec_conv3_weights_int8),dec_conv3_weights_int8}, #endif #ifdef WEIGHTS_dec_conv3_weights_float_DEFINED -{"dec_conv3_weights_float",WEIGHTS_dec_conv3_weights_float_TYPE,sizeof(dec_conv3_weights_float),dec_conv3_weights_float}, +{"dec_conv3_weights_float", WEIGHTS_dec_conv3_weights_float_TYPE,sizeof(dec_conv3_weights_float),dec_conv3_weights_float}, #endif #ifdef WEIGHTS_dec_conv3_subias_DEFINED -{"dec_conv3_subias",WEIGHTS_dec_conv3_subias_TYPE,sizeof(dec_conv3_subias),dec_conv3_subias}, +{"dec_conv3_subias", WEIGHTS_dec_conv3_subias_TYPE,sizeof(dec_conv3_subias),dec_conv3_subias}, #endif #ifdef WEIGHTS_dec_conv3_scale_DEFINED -{"dec_conv3_scale",WEIGHTS_dec_conv3_scale_TYPE,sizeof(dec_conv3_scale),dec_conv3_scale}, +{"dec_conv3_scale", WEIGHTS_dec_conv3_scale_TYPE,sizeof(dec_conv3_scale),dec_conv3_scale}, #endif #ifdef WEIGHTS_dec_conv3_bias_DEFINED -{"dec_conv3_bias",WEIGHTS_dec_conv3_bias_TYPE,sizeof(dec_conv3_bias),dec_conv3_bias}, +{"dec_conv3_bias", WEIGHTS_dec_conv3_bias_TYPE,sizeof(dec_conv3_bias),dec_conv3_bias}, #endif #ifdef WEIGHTS_dec_conv4_weights_int8_DEFINED -{"dec_conv4_weights_int8",WEIGHTS_dec_conv4_weights_int8_TYPE,sizeof(dec_conv4_weights_int8),dec_conv4_weights_int8}, +{"dec_conv4_weights_int8", WEIGHTS_dec_conv4_weights_int8_TYPE,sizeof(dec_conv4_weights_int8),dec_conv4_weights_int8}, #endif #ifdef WEIGHTS_dec_conv4_weights_float_DEFINED -{"dec_conv4_weights_float",WEIGHTS_dec_conv4_weights_float_TYPE,sizeof(dec_conv4_weights_float),dec_conv4_weights_float}, +{"dec_conv4_weights_float", WEIGHTS_dec_conv4_weights_float_TYPE,sizeof(dec_conv4_weights_float),dec_conv4_weights_float}, #endif #ifdef WEIGHTS_dec_conv4_subias_DEFINED -{"dec_conv4_subias",WEIGHTS_dec_conv4_subias_TYPE,sizeof(dec_conv4_subias),dec_conv4_subias}, +{"dec_conv4_subias", WEIGHTS_dec_conv4_subias_TYPE,sizeof(dec_conv4_subias),dec_conv4_subias}, #endif #ifdef WEIGHTS_dec_conv4_scale_DEFINED -{"dec_conv4_scale",WEIGHTS_dec_conv4_scale_TYPE,sizeof(dec_conv4_scale),dec_conv4_scale}, +{"dec_conv4_scale", WEIGHTS_dec_conv4_scale_TYPE,sizeof(dec_conv4_scale),dec_conv4_scale}, #endif #ifdef WEIGHTS_dec_conv4_bias_DEFINED -{"dec_conv4_bias",WEIGHTS_dec_conv4_bias_TYPE,sizeof(dec_conv4_bias),dec_conv4_bias}, +{"dec_conv4_bias", WEIGHTS_dec_conv4_bias_TYPE,sizeof(dec_conv4_bias),dec_conv4_bias}, #endif #ifdef WEIGHTS_dec_conv5_weights_int8_DEFINED -{"dec_conv5_weights_int8",WEIGHTS_dec_conv5_weights_int8_TYPE,sizeof(dec_conv5_weights_int8),dec_conv5_weights_int8}, +{"dec_conv5_weights_int8", WEIGHTS_dec_conv5_weights_int8_TYPE,sizeof(dec_conv5_weights_int8),dec_conv5_weights_int8}, #endif #ifdef WEIGHTS_dec_conv5_weights_float_DEFINED -{"dec_conv5_weights_float",WEIGHTS_dec_conv5_weights_float_TYPE,sizeof(dec_conv5_weights_float),dec_conv5_weights_float}, +{"dec_conv5_weights_float", WEIGHTS_dec_conv5_weights_float_TYPE,sizeof(dec_conv5_weights_float),dec_conv5_weights_float}, #endif #ifdef WEIGHTS_dec_conv5_subias_DEFINED -{"dec_conv5_subias",WEIGHTS_dec_conv5_subias_TYPE,sizeof(dec_conv5_subias),dec_conv5_subias}, +{"dec_conv5_subias", WEIGHTS_dec_conv5_subias_TYPE,sizeof(dec_conv5_subias),dec_conv5_subias}, #endif #ifdef WEIGHTS_dec_conv5_scale_DEFINED -{"dec_conv5_scale",WEIGHTS_dec_conv5_scale_TYPE,sizeof(dec_conv5_scale),dec_conv5_scale}, +{"dec_conv5_scale", WEIGHTS_dec_conv5_scale_TYPE,sizeof(dec_conv5_scale),dec_conv5_scale}, #endif #ifdef WEIGHTS_dec_conv5_bias_DEFINED -{"dec_conv5_bias",WEIGHTS_dec_conv5_bias_TYPE,sizeof(dec_conv5_bias),dec_conv5_bias}, +{"dec_conv5_bias", WEIGHTS_dec_conv5_bias_TYPE,sizeof(dec_conv5_bias),dec_conv5_bias}, #endif {NULL,0,0,NULL} }; diff --git a/src/libs/opus/dnn/dred_rdovae_enc_data.c b/src/libs/opus/dnn/dred_rdovae_enc_data.c index 0b96b950..a344c336 100644 --- a/src/libs/opus/dnn/dred_rdovae_enc_data.c +++ b/src/libs/opus/dnn/dred_rdovae_enc_data.c @@ -127942,295 +127942,295 @@ static const float enc_conv5_bias[96] = { #ifndef USE_WEIGHTS_FILE const WeightArray rdovaeenc_arrays[] = { #ifdef WEIGHTS_enc_dense1_weights_float_DEFINED -{"enc_dense1_weights_float",WEIGHTS_enc_dense1_weights_float_TYPE,sizeof(enc_dense1_weights_float),enc_dense1_weights_float}, +{"enc_dense1_weights_float", WEIGHTS_enc_dense1_weights_float_TYPE,sizeof(enc_dense1_weights_float),enc_dense1_weights_float}, #endif #ifdef WEIGHTS_enc_dense1_bias_DEFINED -{"enc_dense1_bias",WEIGHTS_enc_dense1_bias_TYPE,sizeof(enc_dense1_bias),enc_dense1_bias}, +{"enc_dense1_bias", WEIGHTS_enc_dense1_bias_TYPE,sizeof(enc_dense1_bias),enc_dense1_bias}, #endif #ifdef WEIGHTS_enc_zdense_weights_int8_DEFINED -{"enc_zdense_weights_int8",WEIGHTS_enc_zdense_weights_int8_TYPE,sizeof(enc_zdense_weights_int8),enc_zdense_weights_int8}, +{"enc_zdense_weights_int8", WEIGHTS_enc_zdense_weights_int8_TYPE,sizeof(enc_zdense_weights_int8),enc_zdense_weights_int8}, #endif #ifdef WEIGHTS_enc_zdense_weights_float_DEFINED -{"enc_zdense_weights_float",WEIGHTS_enc_zdense_weights_float_TYPE,sizeof(enc_zdense_weights_float),enc_zdense_weights_float}, +{"enc_zdense_weights_float", WEIGHTS_enc_zdense_weights_float_TYPE,sizeof(enc_zdense_weights_float),enc_zdense_weights_float}, #endif #ifdef WEIGHTS_enc_zdense_subias_DEFINED -{"enc_zdense_subias",WEIGHTS_enc_zdense_subias_TYPE,sizeof(enc_zdense_subias),enc_zdense_subias}, +{"enc_zdense_subias", WEIGHTS_enc_zdense_subias_TYPE,sizeof(enc_zdense_subias),enc_zdense_subias}, #endif #ifdef WEIGHTS_enc_zdense_scale_DEFINED -{"enc_zdense_scale",WEIGHTS_enc_zdense_scale_TYPE,sizeof(enc_zdense_scale),enc_zdense_scale}, +{"enc_zdense_scale", WEIGHTS_enc_zdense_scale_TYPE,sizeof(enc_zdense_scale),enc_zdense_scale}, #endif #ifdef WEIGHTS_enc_zdense_bias_DEFINED -{"enc_zdense_bias",WEIGHTS_enc_zdense_bias_TYPE,sizeof(enc_zdense_bias),enc_zdense_bias}, +{"enc_zdense_bias", WEIGHTS_enc_zdense_bias_TYPE,sizeof(enc_zdense_bias),enc_zdense_bias}, #endif #ifdef WEIGHTS_gdense1_weights_int8_DEFINED -{"gdense1_weights_int8",WEIGHTS_gdense1_weights_int8_TYPE,sizeof(gdense1_weights_int8),gdense1_weights_int8}, +{"gdense1_weights_int8", WEIGHTS_gdense1_weights_int8_TYPE,sizeof(gdense1_weights_int8),gdense1_weights_int8}, #endif #ifdef WEIGHTS_gdense1_weights_float_DEFINED -{"gdense1_weights_float",WEIGHTS_gdense1_weights_float_TYPE,sizeof(gdense1_weights_float),gdense1_weights_float}, +{"gdense1_weights_float", WEIGHTS_gdense1_weights_float_TYPE,sizeof(gdense1_weights_float),gdense1_weights_float}, #endif #ifdef WEIGHTS_gdense1_subias_DEFINED -{"gdense1_subias",WEIGHTS_gdense1_subias_TYPE,sizeof(gdense1_subias),gdense1_subias}, +{"gdense1_subias", WEIGHTS_gdense1_subias_TYPE,sizeof(gdense1_subias),gdense1_subias}, #endif #ifdef WEIGHTS_gdense1_scale_DEFINED -{"gdense1_scale",WEIGHTS_gdense1_scale_TYPE,sizeof(gdense1_scale),gdense1_scale}, +{"gdense1_scale", WEIGHTS_gdense1_scale_TYPE,sizeof(gdense1_scale),gdense1_scale}, #endif #ifdef WEIGHTS_gdense1_bias_DEFINED -{"gdense1_bias",WEIGHTS_gdense1_bias_TYPE,sizeof(gdense1_bias),gdense1_bias}, +{"gdense1_bias", WEIGHTS_gdense1_bias_TYPE,sizeof(gdense1_bias),gdense1_bias}, #endif #ifdef WEIGHTS_gdense2_weights_int8_DEFINED -{"gdense2_weights_int8",WEIGHTS_gdense2_weights_int8_TYPE,sizeof(gdense2_weights_int8),gdense2_weights_int8}, +{"gdense2_weights_int8", WEIGHTS_gdense2_weights_int8_TYPE,sizeof(gdense2_weights_int8),gdense2_weights_int8}, #endif #ifdef WEIGHTS_gdense2_weights_float_DEFINED -{"gdense2_weights_float",WEIGHTS_gdense2_weights_float_TYPE,sizeof(gdense2_weights_float),gdense2_weights_float}, +{"gdense2_weights_float", WEIGHTS_gdense2_weights_float_TYPE,sizeof(gdense2_weights_float),gdense2_weights_float}, #endif #ifdef WEIGHTS_gdense2_subias_DEFINED -{"gdense2_subias",WEIGHTS_gdense2_subias_TYPE,sizeof(gdense2_subias),gdense2_subias}, +{"gdense2_subias", WEIGHTS_gdense2_subias_TYPE,sizeof(gdense2_subias),gdense2_subias}, #endif #ifdef WEIGHTS_gdense2_scale_DEFINED -{"gdense2_scale",WEIGHTS_gdense2_scale_TYPE,sizeof(gdense2_scale),gdense2_scale}, +{"gdense2_scale", WEIGHTS_gdense2_scale_TYPE,sizeof(gdense2_scale),gdense2_scale}, #endif #ifdef WEIGHTS_gdense2_bias_DEFINED -{"gdense2_bias",WEIGHTS_gdense2_bias_TYPE,sizeof(gdense2_bias),gdense2_bias}, +{"gdense2_bias", WEIGHTS_gdense2_bias_TYPE,sizeof(gdense2_bias),gdense2_bias}, #endif #ifdef WEIGHTS_enc_gru1_input_weights_int8_DEFINED -{"enc_gru1_input_weights_int8",WEIGHTS_enc_gru1_input_weights_int8_TYPE,sizeof(enc_gru1_input_weights_int8),enc_gru1_input_weights_int8}, +{"enc_gru1_input_weights_int8", WEIGHTS_enc_gru1_input_weights_int8_TYPE,sizeof(enc_gru1_input_weights_int8),enc_gru1_input_weights_int8}, #endif #ifdef WEIGHTS_enc_gru1_input_weights_float_DEFINED -{"enc_gru1_input_weights_float",WEIGHTS_enc_gru1_input_weights_float_TYPE,sizeof(enc_gru1_input_weights_float),enc_gru1_input_weights_float}, +{"enc_gru1_input_weights_float", WEIGHTS_enc_gru1_input_weights_float_TYPE,sizeof(enc_gru1_input_weights_float),enc_gru1_input_weights_float}, #endif #ifdef WEIGHTS_enc_gru1_input_weights_idx_DEFINED -{"enc_gru1_input_weights_idx",WEIGHTS_enc_gru1_input_weights_idx_TYPE,sizeof(enc_gru1_input_weights_idx),enc_gru1_input_weights_idx}, +{"enc_gru1_input_weights_idx", WEIGHTS_enc_gru1_input_weights_idx_TYPE,sizeof(enc_gru1_input_weights_idx),enc_gru1_input_weights_idx}, #endif #ifdef WEIGHTS_enc_gru1_input_subias_DEFINED -{"enc_gru1_input_subias",WEIGHTS_enc_gru1_input_subias_TYPE,sizeof(enc_gru1_input_subias),enc_gru1_input_subias}, +{"enc_gru1_input_subias", WEIGHTS_enc_gru1_input_subias_TYPE,sizeof(enc_gru1_input_subias),enc_gru1_input_subias}, #endif #ifdef WEIGHTS_enc_gru1_input_scale_DEFINED -{"enc_gru1_input_scale",WEIGHTS_enc_gru1_input_scale_TYPE,sizeof(enc_gru1_input_scale),enc_gru1_input_scale}, +{"enc_gru1_input_scale", WEIGHTS_enc_gru1_input_scale_TYPE,sizeof(enc_gru1_input_scale),enc_gru1_input_scale}, #endif #ifdef WEIGHTS_enc_gru1_input_bias_DEFINED -{"enc_gru1_input_bias",WEIGHTS_enc_gru1_input_bias_TYPE,sizeof(enc_gru1_input_bias),enc_gru1_input_bias}, +{"enc_gru1_input_bias", WEIGHTS_enc_gru1_input_bias_TYPE,sizeof(enc_gru1_input_bias),enc_gru1_input_bias}, #endif #ifdef WEIGHTS_enc_gru1_recurrent_weights_int8_DEFINED -{"enc_gru1_recurrent_weights_int8",WEIGHTS_enc_gru1_recurrent_weights_int8_TYPE,sizeof(enc_gru1_recurrent_weights_int8),enc_gru1_recurrent_weights_int8}, +{"enc_gru1_recurrent_weights_int8", WEIGHTS_enc_gru1_recurrent_weights_int8_TYPE,sizeof(enc_gru1_recurrent_weights_int8),enc_gru1_recurrent_weights_int8}, #endif #ifdef WEIGHTS_enc_gru1_recurrent_weights_float_DEFINED -{"enc_gru1_recurrent_weights_float",WEIGHTS_enc_gru1_recurrent_weights_float_TYPE,sizeof(enc_gru1_recurrent_weights_float),enc_gru1_recurrent_weights_float}, +{"enc_gru1_recurrent_weights_float", WEIGHTS_enc_gru1_recurrent_weights_float_TYPE,sizeof(enc_gru1_recurrent_weights_float),enc_gru1_recurrent_weights_float}, #endif #ifdef WEIGHTS_enc_gru1_recurrent_subias_DEFINED -{"enc_gru1_recurrent_subias",WEIGHTS_enc_gru1_recurrent_subias_TYPE,sizeof(enc_gru1_recurrent_subias),enc_gru1_recurrent_subias}, +{"enc_gru1_recurrent_subias", WEIGHTS_enc_gru1_recurrent_subias_TYPE,sizeof(enc_gru1_recurrent_subias),enc_gru1_recurrent_subias}, #endif #ifdef WEIGHTS_enc_gru1_recurrent_scale_DEFINED -{"enc_gru1_recurrent_scale",WEIGHTS_enc_gru1_recurrent_scale_TYPE,sizeof(enc_gru1_recurrent_scale),enc_gru1_recurrent_scale}, +{"enc_gru1_recurrent_scale", WEIGHTS_enc_gru1_recurrent_scale_TYPE,sizeof(enc_gru1_recurrent_scale),enc_gru1_recurrent_scale}, #endif #ifdef WEIGHTS_enc_gru1_recurrent_bias_DEFINED -{"enc_gru1_recurrent_bias",WEIGHTS_enc_gru1_recurrent_bias_TYPE,sizeof(enc_gru1_recurrent_bias),enc_gru1_recurrent_bias}, +{"enc_gru1_recurrent_bias", WEIGHTS_enc_gru1_recurrent_bias_TYPE,sizeof(enc_gru1_recurrent_bias),enc_gru1_recurrent_bias}, #endif #ifdef WEIGHTS_enc_gru2_input_weights_int8_DEFINED -{"enc_gru2_input_weights_int8",WEIGHTS_enc_gru2_input_weights_int8_TYPE,sizeof(enc_gru2_input_weights_int8),enc_gru2_input_weights_int8}, +{"enc_gru2_input_weights_int8", WEIGHTS_enc_gru2_input_weights_int8_TYPE,sizeof(enc_gru2_input_weights_int8),enc_gru2_input_weights_int8}, #endif #ifdef WEIGHTS_enc_gru2_input_weights_float_DEFINED -{"enc_gru2_input_weights_float",WEIGHTS_enc_gru2_input_weights_float_TYPE,sizeof(enc_gru2_input_weights_float),enc_gru2_input_weights_float}, +{"enc_gru2_input_weights_float", WEIGHTS_enc_gru2_input_weights_float_TYPE,sizeof(enc_gru2_input_weights_float),enc_gru2_input_weights_float}, #endif #ifdef WEIGHTS_enc_gru2_input_weights_idx_DEFINED -{"enc_gru2_input_weights_idx",WEIGHTS_enc_gru2_input_weights_idx_TYPE,sizeof(enc_gru2_input_weights_idx),enc_gru2_input_weights_idx}, +{"enc_gru2_input_weights_idx", WEIGHTS_enc_gru2_input_weights_idx_TYPE,sizeof(enc_gru2_input_weights_idx),enc_gru2_input_weights_idx}, #endif #ifdef WEIGHTS_enc_gru2_input_subias_DEFINED -{"enc_gru2_input_subias",WEIGHTS_enc_gru2_input_subias_TYPE,sizeof(enc_gru2_input_subias),enc_gru2_input_subias}, +{"enc_gru2_input_subias", WEIGHTS_enc_gru2_input_subias_TYPE,sizeof(enc_gru2_input_subias),enc_gru2_input_subias}, #endif #ifdef WEIGHTS_enc_gru2_input_scale_DEFINED -{"enc_gru2_input_scale",WEIGHTS_enc_gru2_input_scale_TYPE,sizeof(enc_gru2_input_scale),enc_gru2_input_scale}, +{"enc_gru2_input_scale", WEIGHTS_enc_gru2_input_scale_TYPE,sizeof(enc_gru2_input_scale),enc_gru2_input_scale}, #endif #ifdef WEIGHTS_enc_gru2_input_bias_DEFINED -{"enc_gru2_input_bias",WEIGHTS_enc_gru2_input_bias_TYPE,sizeof(enc_gru2_input_bias),enc_gru2_input_bias}, +{"enc_gru2_input_bias", WEIGHTS_enc_gru2_input_bias_TYPE,sizeof(enc_gru2_input_bias),enc_gru2_input_bias}, #endif #ifdef WEIGHTS_enc_gru2_recurrent_weights_int8_DEFINED -{"enc_gru2_recurrent_weights_int8",WEIGHTS_enc_gru2_recurrent_weights_int8_TYPE,sizeof(enc_gru2_recurrent_weights_int8),enc_gru2_recurrent_weights_int8}, +{"enc_gru2_recurrent_weights_int8", WEIGHTS_enc_gru2_recurrent_weights_int8_TYPE,sizeof(enc_gru2_recurrent_weights_int8),enc_gru2_recurrent_weights_int8}, #endif #ifdef WEIGHTS_enc_gru2_recurrent_weights_float_DEFINED -{"enc_gru2_recurrent_weights_float",WEIGHTS_enc_gru2_recurrent_weights_float_TYPE,sizeof(enc_gru2_recurrent_weights_float),enc_gru2_recurrent_weights_float}, +{"enc_gru2_recurrent_weights_float", WEIGHTS_enc_gru2_recurrent_weights_float_TYPE,sizeof(enc_gru2_recurrent_weights_float),enc_gru2_recurrent_weights_float}, #endif #ifdef WEIGHTS_enc_gru2_recurrent_subias_DEFINED -{"enc_gru2_recurrent_subias",WEIGHTS_enc_gru2_recurrent_subias_TYPE,sizeof(enc_gru2_recurrent_subias),enc_gru2_recurrent_subias}, +{"enc_gru2_recurrent_subias", WEIGHTS_enc_gru2_recurrent_subias_TYPE,sizeof(enc_gru2_recurrent_subias),enc_gru2_recurrent_subias}, #endif #ifdef WEIGHTS_enc_gru2_recurrent_scale_DEFINED -{"enc_gru2_recurrent_scale",WEIGHTS_enc_gru2_recurrent_scale_TYPE,sizeof(enc_gru2_recurrent_scale),enc_gru2_recurrent_scale}, +{"enc_gru2_recurrent_scale", WEIGHTS_enc_gru2_recurrent_scale_TYPE,sizeof(enc_gru2_recurrent_scale),enc_gru2_recurrent_scale}, #endif #ifdef WEIGHTS_enc_gru2_recurrent_bias_DEFINED -{"enc_gru2_recurrent_bias",WEIGHTS_enc_gru2_recurrent_bias_TYPE,sizeof(enc_gru2_recurrent_bias),enc_gru2_recurrent_bias}, +{"enc_gru2_recurrent_bias", WEIGHTS_enc_gru2_recurrent_bias_TYPE,sizeof(enc_gru2_recurrent_bias),enc_gru2_recurrent_bias}, #endif #ifdef WEIGHTS_enc_gru3_input_weights_int8_DEFINED -{"enc_gru3_input_weights_int8",WEIGHTS_enc_gru3_input_weights_int8_TYPE,sizeof(enc_gru3_input_weights_int8),enc_gru3_input_weights_int8}, +{"enc_gru3_input_weights_int8", WEIGHTS_enc_gru3_input_weights_int8_TYPE,sizeof(enc_gru3_input_weights_int8),enc_gru3_input_weights_int8}, #endif #ifdef WEIGHTS_enc_gru3_input_weights_float_DEFINED -{"enc_gru3_input_weights_float",WEIGHTS_enc_gru3_input_weights_float_TYPE,sizeof(enc_gru3_input_weights_float),enc_gru3_input_weights_float}, +{"enc_gru3_input_weights_float", WEIGHTS_enc_gru3_input_weights_float_TYPE,sizeof(enc_gru3_input_weights_float),enc_gru3_input_weights_float}, #endif #ifdef WEIGHTS_enc_gru3_input_weights_idx_DEFINED -{"enc_gru3_input_weights_idx",WEIGHTS_enc_gru3_input_weights_idx_TYPE,sizeof(enc_gru3_input_weights_idx),enc_gru3_input_weights_idx}, +{"enc_gru3_input_weights_idx", WEIGHTS_enc_gru3_input_weights_idx_TYPE,sizeof(enc_gru3_input_weights_idx),enc_gru3_input_weights_idx}, #endif #ifdef WEIGHTS_enc_gru3_input_subias_DEFINED -{"enc_gru3_input_subias",WEIGHTS_enc_gru3_input_subias_TYPE,sizeof(enc_gru3_input_subias),enc_gru3_input_subias}, +{"enc_gru3_input_subias", WEIGHTS_enc_gru3_input_subias_TYPE,sizeof(enc_gru3_input_subias),enc_gru3_input_subias}, #endif #ifdef WEIGHTS_enc_gru3_input_scale_DEFINED -{"enc_gru3_input_scale",WEIGHTS_enc_gru3_input_scale_TYPE,sizeof(enc_gru3_input_scale),enc_gru3_input_scale}, +{"enc_gru3_input_scale", WEIGHTS_enc_gru3_input_scale_TYPE,sizeof(enc_gru3_input_scale),enc_gru3_input_scale}, #endif #ifdef WEIGHTS_enc_gru3_input_bias_DEFINED -{"enc_gru3_input_bias",WEIGHTS_enc_gru3_input_bias_TYPE,sizeof(enc_gru3_input_bias),enc_gru3_input_bias}, +{"enc_gru3_input_bias", WEIGHTS_enc_gru3_input_bias_TYPE,sizeof(enc_gru3_input_bias),enc_gru3_input_bias}, #endif #ifdef WEIGHTS_enc_gru3_recurrent_weights_int8_DEFINED -{"enc_gru3_recurrent_weights_int8",WEIGHTS_enc_gru3_recurrent_weights_int8_TYPE,sizeof(enc_gru3_recurrent_weights_int8),enc_gru3_recurrent_weights_int8}, +{"enc_gru3_recurrent_weights_int8", WEIGHTS_enc_gru3_recurrent_weights_int8_TYPE,sizeof(enc_gru3_recurrent_weights_int8),enc_gru3_recurrent_weights_int8}, #endif #ifdef WEIGHTS_enc_gru3_recurrent_weights_float_DEFINED -{"enc_gru3_recurrent_weights_float",WEIGHTS_enc_gru3_recurrent_weights_float_TYPE,sizeof(enc_gru3_recurrent_weights_float),enc_gru3_recurrent_weights_float}, +{"enc_gru3_recurrent_weights_float", WEIGHTS_enc_gru3_recurrent_weights_float_TYPE,sizeof(enc_gru3_recurrent_weights_float),enc_gru3_recurrent_weights_float}, #endif #ifdef WEIGHTS_enc_gru3_recurrent_subias_DEFINED -{"enc_gru3_recurrent_subias",WEIGHTS_enc_gru3_recurrent_subias_TYPE,sizeof(enc_gru3_recurrent_subias),enc_gru3_recurrent_subias}, +{"enc_gru3_recurrent_subias", WEIGHTS_enc_gru3_recurrent_subias_TYPE,sizeof(enc_gru3_recurrent_subias),enc_gru3_recurrent_subias}, #endif #ifdef WEIGHTS_enc_gru3_recurrent_scale_DEFINED -{"enc_gru3_recurrent_scale",WEIGHTS_enc_gru3_recurrent_scale_TYPE,sizeof(enc_gru3_recurrent_scale),enc_gru3_recurrent_scale}, +{"enc_gru3_recurrent_scale", WEIGHTS_enc_gru3_recurrent_scale_TYPE,sizeof(enc_gru3_recurrent_scale),enc_gru3_recurrent_scale}, #endif #ifdef WEIGHTS_enc_gru3_recurrent_bias_DEFINED -{"enc_gru3_recurrent_bias",WEIGHTS_enc_gru3_recurrent_bias_TYPE,sizeof(enc_gru3_recurrent_bias),enc_gru3_recurrent_bias}, +{"enc_gru3_recurrent_bias", WEIGHTS_enc_gru3_recurrent_bias_TYPE,sizeof(enc_gru3_recurrent_bias),enc_gru3_recurrent_bias}, #endif #ifdef WEIGHTS_enc_gru4_input_weights_int8_DEFINED -{"enc_gru4_input_weights_int8",WEIGHTS_enc_gru4_input_weights_int8_TYPE,sizeof(enc_gru4_input_weights_int8),enc_gru4_input_weights_int8}, +{"enc_gru4_input_weights_int8", WEIGHTS_enc_gru4_input_weights_int8_TYPE,sizeof(enc_gru4_input_weights_int8),enc_gru4_input_weights_int8}, #endif #ifdef WEIGHTS_enc_gru4_input_weights_float_DEFINED -{"enc_gru4_input_weights_float",WEIGHTS_enc_gru4_input_weights_float_TYPE,sizeof(enc_gru4_input_weights_float),enc_gru4_input_weights_float}, +{"enc_gru4_input_weights_float", WEIGHTS_enc_gru4_input_weights_float_TYPE,sizeof(enc_gru4_input_weights_float),enc_gru4_input_weights_float}, #endif #ifdef WEIGHTS_enc_gru4_input_weights_idx_DEFINED -{"enc_gru4_input_weights_idx",WEIGHTS_enc_gru4_input_weights_idx_TYPE,sizeof(enc_gru4_input_weights_idx),enc_gru4_input_weights_idx}, +{"enc_gru4_input_weights_idx", WEIGHTS_enc_gru4_input_weights_idx_TYPE,sizeof(enc_gru4_input_weights_idx),enc_gru4_input_weights_idx}, #endif #ifdef WEIGHTS_enc_gru4_input_subias_DEFINED -{"enc_gru4_input_subias",WEIGHTS_enc_gru4_input_subias_TYPE,sizeof(enc_gru4_input_subias),enc_gru4_input_subias}, +{"enc_gru4_input_subias", WEIGHTS_enc_gru4_input_subias_TYPE,sizeof(enc_gru4_input_subias),enc_gru4_input_subias}, #endif #ifdef WEIGHTS_enc_gru4_input_scale_DEFINED -{"enc_gru4_input_scale",WEIGHTS_enc_gru4_input_scale_TYPE,sizeof(enc_gru4_input_scale),enc_gru4_input_scale}, +{"enc_gru4_input_scale", WEIGHTS_enc_gru4_input_scale_TYPE,sizeof(enc_gru4_input_scale),enc_gru4_input_scale}, #endif #ifdef WEIGHTS_enc_gru4_input_bias_DEFINED -{"enc_gru4_input_bias",WEIGHTS_enc_gru4_input_bias_TYPE,sizeof(enc_gru4_input_bias),enc_gru4_input_bias}, +{"enc_gru4_input_bias", WEIGHTS_enc_gru4_input_bias_TYPE,sizeof(enc_gru4_input_bias),enc_gru4_input_bias}, #endif #ifdef WEIGHTS_enc_gru4_recurrent_weights_int8_DEFINED -{"enc_gru4_recurrent_weights_int8",WEIGHTS_enc_gru4_recurrent_weights_int8_TYPE,sizeof(enc_gru4_recurrent_weights_int8),enc_gru4_recurrent_weights_int8}, +{"enc_gru4_recurrent_weights_int8", WEIGHTS_enc_gru4_recurrent_weights_int8_TYPE,sizeof(enc_gru4_recurrent_weights_int8),enc_gru4_recurrent_weights_int8}, #endif #ifdef WEIGHTS_enc_gru4_recurrent_weights_float_DEFINED -{"enc_gru4_recurrent_weights_float",WEIGHTS_enc_gru4_recurrent_weights_float_TYPE,sizeof(enc_gru4_recurrent_weights_float),enc_gru4_recurrent_weights_float}, +{"enc_gru4_recurrent_weights_float", WEIGHTS_enc_gru4_recurrent_weights_float_TYPE,sizeof(enc_gru4_recurrent_weights_float),enc_gru4_recurrent_weights_float}, #endif #ifdef WEIGHTS_enc_gru4_recurrent_subias_DEFINED -{"enc_gru4_recurrent_subias",WEIGHTS_enc_gru4_recurrent_subias_TYPE,sizeof(enc_gru4_recurrent_subias),enc_gru4_recurrent_subias}, +{"enc_gru4_recurrent_subias", WEIGHTS_enc_gru4_recurrent_subias_TYPE,sizeof(enc_gru4_recurrent_subias),enc_gru4_recurrent_subias}, #endif #ifdef WEIGHTS_enc_gru4_recurrent_scale_DEFINED -{"enc_gru4_recurrent_scale",WEIGHTS_enc_gru4_recurrent_scale_TYPE,sizeof(enc_gru4_recurrent_scale),enc_gru4_recurrent_scale}, +{"enc_gru4_recurrent_scale", WEIGHTS_enc_gru4_recurrent_scale_TYPE,sizeof(enc_gru4_recurrent_scale),enc_gru4_recurrent_scale}, #endif #ifdef WEIGHTS_enc_gru4_recurrent_bias_DEFINED -{"enc_gru4_recurrent_bias",WEIGHTS_enc_gru4_recurrent_bias_TYPE,sizeof(enc_gru4_recurrent_bias),enc_gru4_recurrent_bias}, +{"enc_gru4_recurrent_bias", WEIGHTS_enc_gru4_recurrent_bias_TYPE,sizeof(enc_gru4_recurrent_bias),enc_gru4_recurrent_bias}, #endif #ifdef WEIGHTS_enc_gru5_input_weights_int8_DEFINED -{"enc_gru5_input_weights_int8",WEIGHTS_enc_gru5_input_weights_int8_TYPE,sizeof(enc_gru5_input_weights_int8),enc_gru5_input_weights_int8}, +{"enc_gru5_input_weights_int8", WEIGHTS_enc_gru5_input_weights_int8_TYPE,sizeof(enc_gru5_input_weights_int8),enc_gru5_input_weights_int8}, #endif #ifdef WEIGHTS_enc_gru5_input_weights_float_DEFINED -{"enc_gru5_input_weights_float",WEIGHTS_enc_gru5_input_weights_float_TYPE,sizeof(enc_gru5_input_weights_float),enc_gru5_input_weights_float}, +{"enc_gru5_input_weights_float", WEIGHTS_enc_gru5_input_weights_float_TYPE,sizeof(enc_gru5_input_weights_float),enc_gru5_input_weights_float}, #endif #ifdef WEIGHTS_enc_gru5_input_weights_idx_DEFINED -{"enc_gru5_input_weights_idx",WEIGHTS_enc_gru5_input_weights_idx_TYPE,sizeof(enc_gru5_input_weights_idx),enc_gru5_input_weights_idx}, +{"enc_gru5_input_weights_idx", WEIGHTS_enc_gru5_input_weights_idx_TYPE,sizeof(enc_gru5_input_weights_idx),enc_gru5_input_weights_idx}, #endif #ifdef WEIGHTS_enc_gru5_input_subias_DEFINED -{"enc_gru5_input_subias",WEIGHTS_enc_gru5_input_subias_TYPE,sizeof(enc_gru5_input_subias),enc_gru5_input_subias}, +{"enc_gru5_input_subias", WEIGHTS_enc_gru5_input_subias_TYPE,sizeof(enc_gru5_input_subias),enc_gru5_input_subias}, #endif #ifdef WEIGHTS_enc_gru5_input_scale_DEFINED -{"enc_gru5_input_scale",WEIGHTS_enc_gru5_input_scale_TYPE,sizeof(enc_gru5_input_scale),enc_gru5_input_scale}, +{"enc_gru5_input_scale", WEIGHTS_enc_gru5_input_scale_TYPE,sizeof(enc_gru5_input_scale),enc_gru5_input_scale}, #endif #ifdef WEIGHTS_enc_gru5_input_bias_DEFINED -{"enc_gru5_input_bias",WEIGHTS_enc_gru5_input_bias_TYPE,sizeof(enc_gru5_input_bias),enc_gru5_input_bias}, +{"enc_gru5_input_bias", WEIGHTS_enc_gru5_input_bias_TYPE,sizeof(enc_gru5_input_bias),enc_gru5_input_bias}, #endif #ifdef WEIGHTS_enc_gru5_recurrent_weights_int8_DEFINED -{"enc_gru5_recurrent_weights_int8",WEIGHTS_enc_gru5_recurrent_weights_int8_TYPE,sizeof(enc_gru5_recurrent_weights_int8),enc_gru5_recurrent_weights_int8}, +{"enc_gru5_recurrent_weights_int8", WEIGHTS_enc_gru5_recurrent_weights_int8_TYPE,sizeof(enc_gru5_recurrent_weights_int8),enc_gru5_recurrent_weights_int8}, #endif #ifdef WEIGHTS_enc_gru5_recurrent_weights_float_DEFINED -{"enc_gru5_recurrent_weights_float",WEIGHTS_enc_gru5_recurrent_weights_float_TYPE,sizeof(enc_gru5_recurrent_weights_float),enc_gru5_recurrent_weights_float}, +{"enc_gru5_recurrent_weights_float", WEIGHTS_enc_gru5_recurrent_weights_float_TYPE,sizeof(enc_gru5_recurrent_weights_float),enc_gru5_recurrent_weights_float}, #endif #ifdef WEIGHTS_enc_gru5_recurrent_subias_DEFINED -{"enc_gru5_recurrent_subias",WEIGHTS_enc_gru5_recurrent_subias_TYPE,sizeof(enc_gru5_recurrent_subias),enc_gru5_recurrent_subias}, +{"enc_gru5_recurrent_subias", WEIGHTS_enc_gru5_recurrent_subias_TYPE,sizeof(enc_gru5_recurrent_subias),enc_gru5_recurrent_subias}, #endif #ifdef WEIGHTS_enc_gru5_recurrent_scale_DEFINED -{"enc_gru5_recurrent_scale",WEIGHTS_enc_gru5_recurrent_scale_TYPE,sizeof(enc_gru5_recurrent_scale),enc_gru5_recurrent_scale}, +{"enc_gru5_recurrent_scale", WEIGHTS_enc_gru5_recurrent_scale_TYPE,sizeof(enc_gru5_recurrent_scale),enc_gru5_recurrent_scale}, #endif #ifdef WEIGHTS_enc_gru5_recurrent_bias_DEFINED -{"enc_gru5_recurrent_bias",WEIGHTS_enc_gru5_recurrent_bias_TYPE,sizeof(enc_gru5_recurrent_bias),enc_gru5_recurrent_bias}, +{"enc_gru5_recurrent_bias", WEIGHTS_enc_gru5_recurrent_bias_TYPE,sizeof(enc_gru5_recurrent_bias),enc_gru5_recurrent_bias}, #endif #ifdef WEIGHTS_enc_conv1_weights_int8_DEFINED -{"enc_conv1_weights_int8",WEIGHTS_enc_conv1_weights_int8_TYPE,sizeof(enc_conv1_weights_int8),enc_conv1_weights_int8}, +{"enc_conv1_weights_int8", WEIGHTS_enc_conv1_weights_int8_TYPE,sizeof(enc_conv1_weights_int8),enc_conv1_weights_int8}, #endif #ifdef WEIGHTS_enc_conv1_weights_float_DEFINED -{"enc_conv1_weights_float",WEIGHTS_enc_conv1_weights_float_TYPE,sizeof(enc_conv1_weights_float),enc_conv1_weights_float}, +{"enc_conv1_weights_float", WEIGHTS_enc_conv1_weights_float_TYPE,sizeof(enc_conv1_weights_float),enc_conv1_weights_float}, #endif #ifdef WEIGHTS_enc_conv1_subias_DEFINED -{"enc_conv1_subias",WEIGHTS_enc_conv1_subias_TYPE,sizeof(enc_conv1_subias),enc_conv1_subias}, +{"enc_conv1_subias", WEIGHTS_enc_conv1_subias_TYPE,sizeof(enc_conv1_subias),enc_conv1_subias}, #endif #ifdef WEIGHTS_enc_conv1_scale_DEFINED -{"enc_conv1_scale",WEIGHTS_enc_conv1_scale_TYPE,sizeof(enc_conv1_scale),enc_conv1_scale}, +{"enc_conv1_scale", WEIGHTS_enc_conv1_scale_TYPE,sizeof(enc_conv1_scale),enc_conv1_scale}, #endif #ifdef WEIGHTS_enc_conv1_bias_DEFINED -{"enc_conv1_bias",WEIGHTS_enc_conv1_bias_TYPE,sizeof(enc_conv1_bias),enc_conv1_bias}, +{"enc_conv1_bias", WEIGHTS_enc_conv1_bias_TYPE,sizeof(enc_conv1_bias),enc_conv1_bias}, #endif #ifdef WEIGHTS_enc_conv2_weights_int8_DEFINED -{"enc_conv2_weights_int8",WEIGHTS_enc_conv2_weights_int8_TYPE,sizeof(enc_conv2_weights_int8),enc_conv2_weights_int8}, +{"enc_conv2_weights_int8", WEIGHTS_enc_conv2_weights_int8_TYPE,sizeof(enc_conv2_weights_int8),enc_conv2_weights_int8}, #endif #ifdef WEIGHTS_enc_conv2_weights_float_DEFINED -{"enc_conv2_weights_float",WEIGHTS_enc_conv2_weights_float_TYPE,sizeof(enc_conv2_weights_float),enc_conv2_weights_float}, +{"enc_conv2_weights_float", WEIGHTS_enc_conv2_weights_float_TYPE,sizeof(enc_conv2_weights_float),enc_conv2_weights_float}, #endif #ifdef WEIGHTS_enc_conv2_subias_DEFINED -{"enc_conv2_subias",WEIGHTS_enc_conv2_subias_TYPE,sizeof(enc_conv2_subias),enc_conv2_subias}, +{"enc_conv2_subias", WEIGHTS_enc_conv2_subias_TYPE,sizeof(enc_conv2_subias),enc_conv2_subias}, #endif #ifdef WEIGHTS_enc_conv2_scale_DEFINED -{"enc_conv2_scale",WEIGHTS_enc_conv2_scale_TYPE,sizeof(enc_conv2_scale),enc_conv2_scale}, +{"enc_conv2_scale", WEIGHTS_enc_conv2_scale_TYPE,sizeof(enc_conv2_scale),enc_conv2_scale}, #endif #ifdef WEIGHTS_enc_conv2_bias_DEFINED -{"enc_conv2_bias",WEIGHTS_enc_conv2_bias_TYPE,sizeof(enc_conv2_bias),enc_conv2_bias}, +{"enc_conv2_bias", WEIGHTS_enc_conv2_bias_TYPE,sizeof(enc_conv2_bias),enc_conv2_bias}, #endif #ifdef WEIGHTS_enc_conv3_weights_int8_DEFINED -{"enc_conv3_weights_int8",WEIGHTS_enc_conv3_weights_int8_TYPE,sizeof(enc_conv3_weights_int8),enc_conv3_weights_int8}, +{"enc_conv3_weights_int8", WEIGHTS_enc_conv3_weights_int8_TYPE,sizeof(enc_conv3_weights_int8),enc_conv3_weights_int8}, #endif #ifdef WEIGHTS_enc_conv3_weights_float_DEFINED -{"enc_conv3_weights_float",WEIGHTS_enc_conv3_weights_float_TYPE,sizeof(enc_conv3_weights_float),enc_conv3_weights_float}, +{"enc_conv3_weights_float", WEIGHTS_enc_conv3_weights_float_TYPE,sizeof(enc_conv3_weights_float),enc_conv3_weights_float}, #endif #ifdef WEIGHTS_enc_conv3_subias_DEFINED -{"enc_conv3_subias",WEIGHTS_enc_conv3_subias_TYPE,sizeof(enc_conv3_subias),enc_conv3_subias}, +{"enc_conv3_subias", WEIGHTS_enc_conv3_subias_TYPE,sizeof(enc_conv3_subias),enc_conv3_subias}, #endif #ifdef WEIGHTS_enc_conv3_scale_DEFINED -{"enc_conv3_scale",WEIGHTS_enc_conv3_scale_TYPE,sizeof(enc_conv3_scale),enc_conv3_scale}, +{"enc_conv3_scale", WEIGHTS_enc_conv3_scale_TYPE,sizeof(enc_conv3_scale),enc_conv3_scale}, #endif #ifdef WEIGHTS_enc_conv3_bias_DEFINED -{"enc_conv3_bias",WEIGHTS_enc_conv3_bias_TYPE,sizeof(enc_conv3_bias),enc_conv3_bias}, +{"enc_conv3_bias", WEIGHTS_enc_conv3_bias_TYPE,sizeof(enc_conv3_bias),enc_conv3_bias}, #endif #ifdef WEIGHTS_enc_conv4_weights_int8_DEFINED -{"enc_conv4_weights_int8",WEIGHTS_enc_conv4_weights_int8_TYPE,sizeof(enc_conv4_weights_int8),enc_conv4_weights_int8}, +{"enc_conv4_weights_int8", WEIGHTS_enc_conv4_weights_int8_TYPE,sizeof(enc_conv4_weights_int8),enc_conv4_weights_int8}, #endif #ifdef WEIGHTS_enc_conv4_weights_float_DEFINED -{"enc_conv4_weights_float",WEIGHTS_enc_conv4_weights_float_TYPE,sizeof(enc_conv4_weights_float),enc_conv4_weights_float}, +{"enc_conv4_weights_float", WEIGHTS_enc_conv4_weights_float_TYPE,sizeof(enc_conv4_weights_float),enc_conv4_weights_float}, #endif #ifdef WEIGHTS_enc_conv4_subias_DEFINED -{"enc_conv4_subias",WEIGHTS_enc_conv4_subias_TYPE,sizeof(enc_conv4_subias),enc_conv4_subias}, +{"enc_conv4_subias", WEIGHTS_enc_conv4_subias_TYPE,sizeof(enc_conv4_subias),enc_conv4_subias}, #endif #ifdef WEIGHTS_enc_conv4_scale_DEFINED -{"enc_conv4_scale",WEIGHTS_enc_conv4_scale_TYPE,sizeof(enc_conv4_scale),enc_conv4_scale}, +{"enc_conv4_scale", WEIGHTS_enc_conv4_scale_TYPE,sizeof(enc_conv4_scale),enc_conv4_scale}, #endif #ifdef WEIGHTS_enc_conv4_bias_DEFINED -{"enc_conv4_bias",WEIGHTS_enc_conv4_bias_TYPE,sizeof(enc_conv4_bias),enc_conv4_bias}, +{"enc_conv4_bias", WEIGHTS_enc_conv4_bias_TYPE,sizeof(enc_conv4_bias),enc_conv4_bias}, #endif #ifdef WEIGHTS_enc_conv5_weights_int8_DEFINED -{"enc_conv5_weights_int8",WEIGHTS_enc_conv5_weights_int8_TYPE,sizeof(enc_conv5_weights_int8),enc_conv5_weights_int8}, +{"enc_conv5_weights_int8", WEIGHTS_enc_conv5_weights_int8_TYPE,sizeof(enc_conv5_weights_int8),enc_conv5_weights_int8}, #endif #ifdef WEIGHTS_enc_conv5_weights_float_DEFINED -{"enc_conv5_weights_float",WEIGHTS_enc_conv5_weights_float_TYPE,sizeof(enc_conv5_weights_float),enc_conv5_weights_float}, +{"enc_conv5_weights_float", WEIGHTS_enc_conv5_weights_float_TYPE,sizeof(enc_conv5_weights_float),enc_conv5_weights_float}, #endif #ifdef WEIGHTS_enc_conv5_subias_DEFINED -{"enc_conv5_subias",WEIGHTS_enc_conv5_subias_TYPE,sizeof(enc_conv5_subias),enc_conv5_subias}, +{"enc_conv5_subias", WEIGHTS_enc_conv5_subias_TYPE,sizeof(enc_conv5_subias),enc_conv5_subias}, #endif #ifdef WEIGHTS_enc_conv5_scale_DEFINED -{"enc_conv5_scale",WEIGHTS_enc_conv5_scale_TYPE,sizeof(enc_conv5_scale),enc_conv5_scale}, +{"enc_conv5_scale", WEIGHTS_enc_conv5_scale_TYPE,sizeof(enc_conv5_scale),enc_conv5_scale}, #endif #ifdef WEIGHTS_enc_conv5_bias_DEFINED -{"enc_conv5_bias",WEIGHTS_enc_conv5_bias_TYPE,sizeof(enc_conv5_bias),enc_conv5_bias}, +{"enc_conv5_bias", WEIGHTS_enc_conv5_bias_TYPE,sizeof(enc_conv5_bias),enc_conv5_bias}, #endif {NULL,0,0,NULL} }; diff --git a/src/libs/opus/dnn/dump_data.c b/src/libs/opus/dnn/dump_data.c index 65b9639b..e4c78c7e 100644 --- a/src/libs/opus/dnn/dump_data.c +++ b/src/libs/opus/dnn/dump_data.c @@ -68,6 +68,13 @@ static void rand_resp(float *a, float *b) { b[1] = .75*uni_rand(); } +void compute_noise(int *noise, float noise_std) { + int i; + for (i=0;ifeatures[NB_BANDS+2+j]*st->sig_mem[j]; + e = lin2ulaw(pcm[i] - p); + /* Signal in. */ + data[2*i] = float2short(st->sig_mem[0]); + /* Signal out. */ + data[2*i+1] = pcm[i]; + /* Simulate error on excitation. */ + e += noise[i]; + e = IMIN(255, IMAX(0, e)); + + OPUS_MOVE(&st->sig_mem[1], &st->sig_mem[0], LPC_ORDER-1); + st->sig_mem[0] = p + ulaw2lin(e); + } + fwrite(data, 4*FRAME_SIZE, 1, file); +} + int main(int argc, char **argv) { int i; char *argv0; @@ -92,11 +123,13 @@ int main(int argc, char **argv) { FILE *ffeat; FILE *fpcm=NULL; opus_int16 pcm[FRAME_SIZE]={0}; + int noisebuf[FRAME_SIZE]={0}; opus_int16 tmp[FRAME_SIZE] = {0}; float speech_gain=1; float old_speech_gain = 1; int one_pass_completed = 0; LPCNetEncState *st; + float noise_std=0; int training = -1; int burg = 0; int pitch = 0; @@ -169,12 +202,16 @@ int main(int argc, char **argv) { for (i=0;i=10000000 && one_pass_completed) break; if (training && ++gain_change_count > 2821) { + float tmp1, tmp2; speech_gain = pow(10., (-30+(rand()%40))/20.); if (rand()&1) speech_gain = -speech_gain; if (rand()%20==0) speech_gain *= .01; if (!pitch && rand()%100==0) speech_gain = 0; gain_change_count = 0; rand_resp(a_sig, b_sig); + tmp1 = rand()/(float)RAND_MAX; + tmp2 = rand()/(float)RAND_MAX; + noise_std = ABS16(-1.5*log(1e-4+tmp1)-.5*log(1e-4+tmp2)); if (fnoise != NULL) { long pos; /* Randomize the fraction because rand() only gives us 31 bits. */ @@ -207,10 +244,15 @@ int main(int argc, char **argv) { fwrite(ceps, sizeof(float), 2*NB_BANDS, ffeat); } preemphasis(x, &mem_preemph, x, PREEMPHASIS, FRAME_SIZE); + for (i=0;ifeatures, sizeof(float), NB_TOTAL_FEATURES, ffeat); } /*if(pitch) fwrite(pcm, FRAME_SIZE, 2, stdout);*/ - if (fpcm) fwrite(pcm, FRAME_SIZE, 2, fpcm); + if (fpcm) write_audio(st, pcm, noisebuf, fpcm); /*if (fpcm) fwrite(pcm, sizeof(opus_int16), FRAME_SIZE, fpcm);*/ for (i=0;i #include "os_support.h" -#if defined(__arm__) && !defined(__aarch64__) && (__ARM_ARCH < 8 || !defined(__clang__)) +#if defined(__arm__) && !defined(__aarch64__) /* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */ static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) { return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8); diff --git a/src/libs/opus/meson.build b/src/libs/opus/meson.build index d040ddfd..56232609 100644 --- a/src/libs/opus/meson.build +++ b/src/libs/opus/meson.build @@ -146,6 +146,9 @@ opts = [ [ 'fixed-point-debug', 'FIXED_DEBUG' ], [ 'custom-modes', 'CUSTOM_MODES' ], [ 'float-approx', 'FLOAT_APPROX' ], + [ 'enable-deep-plc', 'ENABLE_DEEP_PLC' ], + [ 'enable-dred', 'ENABLE_DRED' ], + [ 'enable-osce', 'ENABLE_OSCE' ], [ 'assertions', 'ENABLE_ASSERTIONS' ], [ 'hardening', 'ENABLE_HARDENING' ], [ 'fuzzing', 'FUZZING' ], @@ -161,21 +164,6 @@ foreach opt : opts set_variable('opt_' + opt[0].underscorify(), opt_foo) endforeach -feat = [ - [ 'deep-plc', 'ENABLE_DEEP_PLC' ], - [ 'dred', 'ENABLE_DRED' ], - [ 'osce', 'ENABLE_OSCE' ], -] - -foreach opt : feat - # we assume these are all boolean options - opt_foo = get_option(opt[0]) - if opt_foo.enabled() - opus_conf.set(opt[1], 1) - endif - set_variable('opt_' + opt[0].underscorify(), opt_foo) -endforeach - opt_asm = get_option('asm') opt_rtcd = get_option('rtcd') opt_intrinsics = get_option('intrinsics') @@ -187,7 +175,7 @@ if disable_float_api opus_conf.set('DISABLE_FLOAT_API', 1) endif -if not get_option('dnn-debug-float').enabled() +if not get_option('enable-dnn-debug-float') opus_conf.set('DISABLE_DEBUG_FLOAT', 1) endif @@ -239,7 +227,7 @@ if not opt_asm.disabled() #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif - int main(int argc, char ** argv) { __asm__ (""::); }''', + __asm__ (""::)''', name : 'compiler supports gcc-style inline assembly') opus_conf.set('OPUS_ARM_INLINE_ASM', 1) @@ -264,13 +252,6 @@ if not opt_asm.disabled() opus_conf.set('OPUS_ARM_INLINE_NEON', 1) inline_optimization += ['NEON'] endif - - # AS_ASM_ARM_DOTPROD - if cc.compiles(asm_tmpl.format('udot v0.4s,v1.16b,v2.16b'), - name : 'assembler supports DOTPROD instructions on ARM') - opus_conf.set('OPUS_ARM_INLINE_DOTPROD', 1) - inline_optimization += ['DOTPROD'] - endif endif # We need Perl to translate RVCT-syntax asm to gas syntax @@ -292,24 +273,21 @@ if not opt_asm.disabled() opus_arm_may_have_neon = opus_conf.has('OPUS_ARM_INLINE_NEON') opus_arm_presume_neon = opus_arm_may_have_neon and opus_can_presume_simd - opus_arm_may_have_dotprod = opus_conf.has('OPUS_ARM_INLINE_DOTPROD') - opus_arm_presume_dotprod = opus_arm_may_have_dotprod and opus_can_presume_simd - if not opt_rtcd.disabled() if not opus_arm_may_have_edsp message('Trying to force-enable armv5e EDSP instructions...') # AS_ASM_ARM_EDSP_FORCE - opus_arm_may_have_edsp = cc.compiles(asm_tmpl.format('.arch armv5te;.object_arch armv4t;qadd r3,r3,r3'), + opus_arm_may_have_edsp = cc.compiles(asm_tmpl.format('.arch armv5te\n.object_arch armv4t\nqadd r3,r3,r3'), name : 'Assembler supports EDSP instructions on ARM (forced)') endif if not opus_arm_may_have_media message('Trying to force-enable ARMv6 media instructions...') - opus_arm_may_have_media = cc.compiles(asm_tmpl.format('.arch armv6;.object_arch armv4t;shadd8 r3,r3,r3'), + opus_arm_may_have_media = cc.compiles(asm_tmpl.format('.arch armv6\n.object_arch armv4t\nshadd8 r3,r3,r3'), name : 'Assembler supports ARMv6 media instructions on ARM (forced)') endif if not opus_arm_may_have_neon message('Trying to force-enable NEON instructions...') - opus_arm_may_have_neon = cc.compiles(asm_tmpl.format('.arch armv7-a;.fpu neon;.object_arch armv4t;vorr d0,d0,d0'), + opus_arm_may_have_neon = cc.compiles(asm_tmpl.format('.arch armv7-a\n.fpu neon\n.object_arch armv4t\nvorr d0,d0,d0'), name : 'Assembler supports NEON instructions on ARM (forced)') endif endif @@ -502,10 +480,10 @@ if not opt_intrinsics.disabled() elif host_cpu_family in ['x86', 'x86_64'] # XXX: allow external override/specification of the flags x86_intrinsics = [ - [ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'], [] ], - [ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'], [] ], - [ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'], [] ], - [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'], ['/arch:AVX2'] ], + [ 'SSE', 'xmmintrin.h', '__m128', '_mm_setzero_ps()', ['-msse'] ], + [ 'SSE2', 'emmintrin.h', '__m128i', '_mm_setzero_si128()', ['-msse2'] ], + [ 'SSE4.1', 'smmintrin.h', '__m128i', '_mm_setzero_si128(); mtest = _mm_cmpeq_epi64(mtest, mtest)', ['-msse4.1'] ], + [ 'AVX2', 'immintrin.h', '__m256i', '_mm256_abs_epi32(_mm256_setzero_si256())', ['-mavx', '-mfma', '-mavx2'] ], ] foreach intrin : x86_intrinsics @@ -516,11 +494,9 @@ if not opt_intrinsics.disabled() return *((unsigned char *) &mtest) != 0; }'''.format(intrin[1],intrin[2],intrin[3]) intrin_name = intrin[0] - intrin_args = cc.get_argument_syntax() == 'msvc' ? intrin[5] : intrin[4] - if cc.get_argument_syntax() == 'msvc' and intrin_args.length() == 0 and cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name)) - may_have_intrin = true - presume_intrin = opus_can_presume_simd - elif cc.get_argument_syntax() != 'msvc' and cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name)) + # Intrinsics arguments are not available with MSVC-like compilers + intrin_args = cc.get_argument_syntax() == 'msvc' ? [] : intrin[4] + if cc.links(intrin_check, name : 'compiler supports @0@ intrinsics'.format(intrin_name)) may_have_intrin = true presume_intrin = opus_can_presume_simd elif intrin_args.length() > 0 @@ -674,11 +650,29 @@ if not opt_tests.disabled() subdir('tests') endif -pkg = import('pkgconfig') -pkg.generate(opus_lib, - description: 'Opus IETF audio codec (floating-point build)', - subdirs: 'opus', -) +# pkg-config files (not using pkg module so we can use the existing .pc.in file) +pkgconf = configuration_data() + +pkgconf.set('prefix', join_paths(get_option('prefix'))) +pkgconf.set('exec_prefix', '${prefix}') +pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) +pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) +pkgconf.set('VERSION', opus_version) +pkgconf.set('PC_BUILD', pc_build) +pkgconf.set('LIBM', libm.found() ? '-lm' : '') + +pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir')) + +configure_file(input : 'opus.pc.in', + output : 'opus.pc', + configuration : pkgconf, + install_dir : pkg_install_dir) + +# The uninstalled one has hardcoded libtool + static lib stuff, skip it for now +#configure_file(input : 'opus-uninstalled.pc.in', +# output : 'opus-uninstalled.pc', +# configuration : pkgconf, +# install : false) doxygen = find_program('doxygen', required: get_option('docs')) if doxygen.found() diff --git a/src/libs/opus/meson_options.txt b/src/libs/opus/meson_options.txt index a2981d0b..46099276 100644 --- a/src/libs/opus/meson_options.txt +++ b/src/libs/opus/meson_options.txt @@ -7,10 +7,10 @@ option('rtcd', type : 'feature', value : 'auto', description : 'Run-time CPU cap option('asm', type : 'feature', value : 'auto', description : 'Assembly optimizations for ARM (fixed-point)') option('intrinsics', type : 'feature', value : 'auto', description : 'Intrinsics optimizations for ARM NEON or x86') -option('deep-plc', type : 'feature', value : 'disabled', description : 'Enable Deep Packet Loss Concealment (PLC)') -option('dred', type : 'feature', value : 'disabled', description : 'Enable Deep Redundancy (DRED)') -option('osce', type : 'feature', value : 'disabled', description : 'Enable Opus Speech Coding Enhancement (OSCE)') -option('dnn-debug-float', type : 'feature', value : 'disabled', description : 'Compute DNN using float weights') +option('enable-deep-plc', type : 'boolean', value : false, description : 'Enable Deep Packet Loss Concealment (PLC)') +option('enable-dred', type : 'boolean', value : false, description : 'Enable Deep Redundancy (DRED)') +option('enable-osce', type : 'boolean', value : false, description : 'Enable Opus Speech Coding Enhancement (OSCE)') +option('enable-dnn-debug-float', type : 'boolean', value : false, description : 'Compute DNN using float weights') option('custom-modes', type : 'boolean', value : false, description : 'Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames') option('extra-programs', type : 'feature', value : 'auto', description : 'Extra programs (demo and tests)') diff --git a/src/libs/opus/package_version b/src/libs/opus/package_version index 8463c415..e99765e8 100644 --- a/src/libs/opus/package_version +++ b/src/libs/opus/package_version @@ -1 +1 @@ -PACKAGE_VERSION="1.5.2" +PACKAGE_VERSION="1.5.1" diff --git a/src/libs/opus/silk/meson.build b/src/libs/opus/silk/meson.build index 35d95578..80a59b05 100644 --- a/src/libs/opus/silk/meson.build +++ b/src/libs/opus/silk/meson.build @@ -44,7 +44,9 @@ foreach intr_name : ['sse4_1', 'avx2', 'neon_intr'] endif intr_sources = get_variable('silk_sources_' + intr_name) - if not opt_fixed_point + if opt_fixed_point + intr_sources += get_variable('silk_sources_fixed_' + intr_name) + else intr_sources += get_variable('silk_sources_float_' + intr_name) endif diff --git a/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c b/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c index 21f00c2d..43485871 100644 --- a/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c +++ b/src/libs/opus/silk/x86/NSQ_del_dec_avx2.c @@ -73,6 +73,7 @@ static OPUS_INLINE int verify_assumptions(const silk_encoder_state *psEncC) /* Intrinsics not defined on MSVC */ #ifdef _MSC_VER #include +#define __m128i_u __m128i static inline int __builtin_sadd_overflow(opus_int32 a, opus_int32 b, opus_int32* res) { *res = a+b; @@ -958,7 +959,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2( { __m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i])); x = _mm256_slli_epi64(_mm256_mul_epi32(x, _mm256_set1_epi32(inv_gain_Q26)), 16); - _mm_storeu_si128((__m128i*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x)); + _mm_storeu_si128((__m128i_u*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x)); } /* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */ @@ -984,8 +985,8 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2( /* Scale long-term shaping state */ for (i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i+=4) { - opus_int32 *p = &NSQ->sLTP_shp_Q14[i]; - _mm_storeu_si128((__m128i*)p, silk_mm_smulww_epi32(_mm_loadu_si128((__m128i*)p), gain_adj_Q16)); + __m128i_u* p = (__m128i_u*)&NSQ->sLTP_shp_Q14[i]; + *p = silk_mm_smulww_epi32(*p, gain_adj_Q16); } /* Scale long-term prediction state */ @@ -1040,13 +1041,13 @@ static OPUS_INLINE void silk_LPC_analysis_filter_avx2( /* Allowing wrap around so that two wraps can cancel each other. The rare cases where the result wraps around can only be triggered by invalid streams*/ - __m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-8])); - __m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)& B[0])); + __m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-8])); + __m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)& B[0])); __m256i sum = _mm256_mullo_epi32(in_v, silk_mm256_reverse_epi32(B_v)); if (order > 10) { - in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-16])); - B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&B [8])); + in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-16])); + B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&B [8])); B_v = silk_mm256_reverse_epi32(B_v); } else diff --git a/src/libs/opus/src/opus_private.h b/src/libs/opus/src/opus_private.h index 279f5f95..364c21ce 100644 --- a/src/libs/opus/src/opus_private.h +++ b/src/libs/opus/src/opus_private.h @@ -214,7 +214,7 @@ int opus_multistream_decode_native( opus_int32 opus_packet_extensions_parse(const unsigned char *data, opus_int32 len, opus_extension_data *extensions, opus_int32 *nb_extensions); -opus_int32 opus_packet_extensions_generate(unsigned char *data, opus_int32 len, const opus_extension_data *extensions, opus_int32 nb_extensions, int pad); +opus_int32 opus_packet_extensions_generate(unsigned char *data, opus_int32 len, const opus_extension_data *extensions, int nb_extensions, int pad); opus_int32 opus_packet_extensions_count(const unsigned char *data, opus_int32 len); diff --git a/src/libs/opus/src/repacketizer.c b/src/libs/opus/src/repacketizer.c index 79798b02..6a7a8b3d 100644 --- a/src/libs/opus/src/repacketizer.c +++ b/src/libs/opus/src/repacketizer.c @@ -155,8 +155,7 @@ opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int /* incorporate any extensions from the repacketizer padding */ for (i=begin;ipaddings[i], rp->padding_len[i], &all_extensions[ext_count], &frame_ext_count); diff --git a/src/libs/opus/src/tansig_table.h b/src/libs/opus/src/tansig_table.h deleted file mode 100644 index c76f844a..00000000 --- a/src/libs/opus/src/tansig_table.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is auto-generated by gen_tables */ - -static const float tansig_table[201] = { -0.000000f, 0.039979f, 0.079830f, 0.119427f, 0.158649f, -0.197375f, 0.235496f, 0.272905f, 0.309507f, 0.345214f, -0.379949f, 0.413644f, 0.446244f, 0.477700f, 0.507977f, -0.537050f, 0.564900f, 0.591519f, 0.616909f, 0.641077f, -0.664037f, 0.685809f, 0.706419f, 0.725897f, 0.744277f, -0.761594f, 0.777888f, 0.793199f, 0.807569f, 0.821040f, -0.833655f, 0.845456f, 0.856485f, 0.866784f, 0.876393f, -0.885352f, 0.893698f, 0.901468f, 0.908698f, 0.915420f, -0.921669f, 0.927473f, 0.932862f, 0.937863f, 0.942503f, -0.946806f, 0.950795f, 0.954492f, 0.957917f, 0.961090f, -0.964028f, 0.966747f, 0.969265f, 0.971594f, 0.973749f, -0.975743f, 0.977587f, 0.979293f, 0.980869f, 0.982327f, -0.983675f, 0.984921f, 0.986072f, 0.987136f, 0.988119f, -0.989027f, 0.989867f, 0.990642f, 0.991359f, 0.992020f, -0.992631f, 0.993196f, 0.993718f, 0.994199f, 0.994644f, -0.995055f, 0.995434f, 0.995784f, 0.996108f, 0.996407f, -0.996682f, 0.996937f, 0.997172f, 0.997389f, 0.997590f, -0.997775f, 0.997946f, 0.998104f, 0.998249f, 0.998384f, -0.998508f, 0.998623f, 0.998728f, 0.998826f, 0.998916f, -0.999000f, 0.999076f, 0.999147f, 0.999213f, 0.999273f, -0.999329f, 0.999381f, 0.999428f, 0.999472f, 0.999513f, -0.999550f, 0.999585f, 0.999617f, 0.999646f, 0.999673f, -0.999699f, 0.999722f, 0.999743f, 0.999763f, 0.999781f, -0.999798f, 0.999813f, 0.999828f, 0.999841f, 0.999853f, -0.999865f, 0.999875f, 0.999885f, 0.999893f, 0.999902f, -0.999909f, 0.999916f, 0.999923f, 0.999929f, 0.999934f, -0.999939f, 0.999944f, 0.999948f, 0.999952f, 0.999956f, -0.999959f, 0.999962f, 0.999965f, 0.999968f, 0.999970f, -0.999973f, 0.999975f, 0.999977f, 0.999978f, 0.999980f, -0.999982f, 0.999983f, 0.999984f, 0.999986f, 0.999987f, -0.999988f, 0.999989f, 0.999990f, 0.999990f, 0.999991f, -0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999994f, -0.999994f, 0.999995f, 0.999995f, 0.999996f, 0.999996f, -0.999996f, 0.999997f, 0.999997f, 0.999997f, 0.999997f, -0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, -0.999998f, 0.999998f, 0.999999f, 0.999999f, 0.999999f, -0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, -0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, -1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, -1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, -1.000000f, -}; diff --git a/src/libs/opus/tests/meson.build b/src/libs/opus/tests/meson.build index 1a4040b5..1c1ddf07 100644 --- a/src/libs/opus/tests/meson.build +++ b/src/libs/opus/tests/meson.build @@ -8,10 +8,6 @@ opus_tests = [ ['test_opus_projection'], ] -if opt_dred.enabled() - opus_tests += [['test_opus_dred', [], 60 * 20]] -endif - foreach t : opus_tests test_name = t.get(0) extra_srcs = t.get(1, []) diff --git a/src/libs/opus/win32/VS2015/common.props b/src/libs/opus/win32/VS2015/common.props deleted file mode 100644 index d83b7c2d..00000000 --- a/src/libs/opus/win32/VS2015/common.props +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - $(Platform)\$(Configuration)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - Unicode - - - true - true - false - - - false - false - true - - - - Level3 - false - false - ..\..;..\..\include;..\..\silk;..\..\celt;..\..\win32;%(AdditionalIncludeDirectories) - HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - false - - - Console - - - true - Console - - - - - Guard - ProgramDatabase - NoExtensions - false - true - false - Disabled - false - false - Disabled - MultiThreadedDebug - MultiThreadedDebugDLL - true - false - - - true - - - - - false - None - true - true - false - Speed - Fast - Precise - true - true - true - MaxSpeed - MultiThreaded - MultiThreadedDLL - 16Bytes - - - false - - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/opus.sln b/src/libs/opus/win32/VS2015/opus.sln deleted file mode 100644 index abd7a4dd..00000000 --- a/src/libs/opus/win32/VS2015/opus.sln +++ /dev/null @@ -1,168 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus", "opus.vcxproj", "{219EC965-228A-1824-174D-96449D05F88A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus_demo", "opus_demo.vcxproj", "{016C739D-6389-43BF-8D88-24B2BF6F620F}" - ProjectSection(ProjectDependencies) = postProject - {219EC965-228A-1824-174D-96449D05F88A} = {219EC965-228A-1824-174D-96449D05F88A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_opus_api", "test_opus_api.vcxproj", "{1D257A17-D254-42E5-82D6-1C87A6EC775A}" - ProjectSection(ProjectDependencies) = postProject - {219EC965-228A-1824-174D-96449D05F88A} = {219EC965-228A-1824-174D-96449D05F88A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_opus_decode", "test_opus_decode.vcxproj", "{8578322A-1883-486B-B6FA-E0094B65C9F2}" - ProjectSection(ProjectDependencies) = postProject - {219EC965-228A-1824-174D-96449D05F88A} = {219EC965-228A-1824-174D-96449D05F88A} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_opus_encode", "test_opus_encode.vcxproj", "{84DAA768-1A38-4312-BB61-4C78BB59E5B8}" - ProjectSection(ProjectDependencies) = postProject - {219EC965-228A-1824-174D-96449D05F88A} = {219EC965-228A-1824-174D-96449D05F88A} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - DebugDLL_fixed|Win32 = DebugDLL_fixed|Win32 - DebugDLL_fixed|x64 = DebugDLL_fixed|x64 - DebugDLL|Win32 = DebugDLL|Win32 - DebugDLL|x64 = DebugDLL|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseDLL_fixed|Win32 = ReleaseDLL_fixed|Win32 - ReleaseDLL_fixed|x64 = ReleaseDLL_fixed|x64 - ReleaseDLL|Win32 = ReleaseDLL|Win32 - ReleaseDLL|x64 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {219EC965-228A-1824-174D-96449D05F88A}.Debug|Win32.ActiveCfg = Debug|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.Debug|Win32.Build.0 = Debug|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.Debug|x64.ActiveCfg = Debug|x64 - {219EC965-228A-1824-174D-96449D05F88A}.Debug|x64.Build.0 = Debug|x64 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL_fixed|Win32.ActiveCfg = DebugDLL_fixed|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL_fixed|Win32.Build.0 = DebugDLL_fixed|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL_fixed|x64.ActiveCfg = DebugDLL_fixed|x64 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL_fixed|x64.Build.0 = DebugDLL_fixed|x64 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {219EC965-228A-1824-174D-96449D05F88A}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {219EC965-228A-1824-174D-96449D05F88A}.Release|Win32.ActiveCfg = Release|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.Release|Win32.Build.0 = Release|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.Release|x64.ActiveCfg = Release|x64 - {219EC965-228A-1824-174D-96449D05F88A}.Release|x64.Build.0 = Release|x64 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL_fixed|Win32.ActiveCfg = ReleaseDLL_fixed|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL_fixed|Win32.Build.0 = ReleaseDLL_fixed|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL_fixed|x64.ActiveCfg = ReleaseDLL_fixed|x64 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL_fixed|x64.Build.0 = ReleaseDLL_fixed|x64 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {219EC965-228A-1824-174D-96449D05F88A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Debug|Win32.ActiveCfg = Debug|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Debug|Win32.Build.0 = Debug|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Debug|x64.ActiveCfg = Debug|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Debug|x64.Build.0 = Debug|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL_fixed|Win32.ActiveCfg = DebugDLL_fixed|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL_fixed|Win32.Build.0 = DebugDLL_fixed|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL_fixed|x64.ActiveCfg = DebugDLL_fixed|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL_fixed|x64.Build.0 = DebugDLL_fixed|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Release|Win32.ActiveCfg = Release|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Release|Win32.Build.0 = Release|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Release|x64.ActiveCfg = Release|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.Release|x64.Build.0 = Release|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL_fixed|Win32.ActiveCfg = ReleaseDLL_fixed|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL_fixed|Win32.Build.0 = ReleaseDLL_fixed|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL_fixed|x64.ActiveCfg = ReleaseDLL_fixed|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL_fixed|x64.Build.0 = ReleaseDLL_fixed|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {016C739D-6389-43BF-8D88-24B2BF6F620F}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Debug|Win32.ActiveCfg = Debug|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Debug|Win32.Build.0 = Debug|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Debug|x64.ActiveCfg = Debug|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Debug|x64.Build.0 = Debug|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL_fixed|Win32.ActiveCfg = DebugDLL_fixed|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL_fixed|Win32.Build.0 = DebugDLL_fixed|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL_fixed|x64.ActiveCfg = DebugDLL_fixed|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL_fixed|x64.Build.0 = DebugDLL_fixed|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Release|Win32.ActiveCfg = Release|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Release|Win32.Build.0 = Release|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Release|x64.ActiveCfg = Release|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.Release|x64.Build.0 = Release|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL_fixed|Win32.ActiveCfg = ReleaseDLL_fixed|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL_fixed|Win32.Build.0 = ReleaseDLL_fixed|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL_fixed|x64.ActiveCfg = ReleaseDLL_fixed|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL_fixed|x64.Build.0 = ReleaseDLL_fixed|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {1D257A17-D254-42E5-82D6-1C87A6EC775A}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Debug|Win32.ActiveCfg = Debug|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Debug|Win32.Build.0 = Debug|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Debug|x64.ActiveCfg = Debug|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Debug|x64.Build.0 = Debug|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL_fixed|Win32.ActiveCfg = DebugDLL_fixed|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL_fixed|Win32.Build.0 = DebugDLL_fixed|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL_fixed|x64.ActiveCfg = DebugDLL_fixed|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL_fixed|x64.Build.0 = DebugDLL_fixed|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Release|Win32.ActiveCfg = Release|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Release|Win32.Build.0 = Release|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Release|x64.ActiveCfg = Release|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.Release|x64.Build.0 = Release|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL_fixed|Win32.ActiveCfg = ReleaseDLL_fixed|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL_fixed|Win32.Build.0 = ReleaseDLL_fixed|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL_fixed|x64.ActiveCfg = ReleaseDLL_fixed|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL_fixed|x64.Build.0 = ReleaseDLL_fixed|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {8578322A-1883-486B-B6FA-E0094B65C9F2}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Debug|Win32.ActiveCfg = Debug|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Debug|Win32.Build.0 = Debug|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Debug|x64.ActiveCfg = Debug|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Debug|x64.Build.0 = Debug|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL_fixed|Win32.ActiveCfg = DebugDLL_fixed|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL_fixed|Win32.Build.0 = DebugDLL_fixed|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL_fixed|x64.ActiveCfg = DebugDLL_fixed|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL_fixed|x64.Build.0 = DebugDLL_fixed|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL|Win32.ActiveCfg = DebugDLL|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL|Win32.Build.0 = DebugDLL|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL|x64.ActiveCfg = DebugDLL|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.DebugDLL|x64.Build.0 = DebugDLL|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Release|Win32.ActiveCfg = Release|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Release|Win32.Build.0 = Release|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Release|x64.ActiveCfg = Release|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.Release|x64.Build.0 = Release|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL_fixed|Win32.ActiveCfg = ReleaseDLL_fixed|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL_fixed|Win32.Build.0 = ReleaseDLL_fixed|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL_fixed|x64.ActiveCfg = ReleaseDLL_fixed|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL_fixed|x64.Build.0 = ReleaseDLL_fixed|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {84DAA768-1A38-4312-BB61-4C78BB59E5B8}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/libs/opus/win32/VS2015/opus.vcxproj b/src/libs/opus/win32/VS2015/opus.vcxproj deleted file mode 100644 index e7a17da5..00000000 --- a/src/libs/opus/win32/VS2015/opus.vcxproj +++ /dev/null @@ -1,399 +0,0 @@ - - - - - DebugDLL_fixed - Win32 - - - DebugDLL_fixed - x64 - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL_fixed - Win32 - - - ReleaseDLL_fixed - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - Win32Proj - opus - {219EC965-228A-1824-174D-96449D05F88A} - - - - StaticLibrary - v140 - - - DynamicLibrary - v140 - - - DynamicLibrary - v140 - - - StaticLibrary - v140 - - - DynamicLibrary - v140 - - - DynamicLibrary - v140 - - - StaticLibrary - v140 - - - DynamicLibrary - v140 - - - DynamicLibrary - v140 - - - StaticLibrary - v140 - - - DynamicLibrary - v140 - - - DynamicLibrary - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\silk\fixed;..\..\silk\float;%(AdditionalIncludeDirectories) - DLL_EXPORT;%(PreprocessorDefinitions) - FIXED_POINT;%(PreprocessorDefinitions) - /arch:IA32 %(AdditionalOptions) - - - /ignore:4221 %(AdditionalOptions) - - - "$(ProjectDir)..\..\win32\genversion.bat" "$(ProjectDir)..\..\win32\version.h" PACKAGE_VERSION - Generating version.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4244;%(DisableSpecificWarnings) - - - - - - - - - - - - - - - false - - - false - - - true - - - - - - - true - - - true - - - false - - - - - - - - diff --git a/src/libs/opus/win32/VS2015/opus.vcxproj.filters b/src/libs/opus/win32/VS2015/opus.vcxproj.filters deleted file mode 100644 index d59c7563..00000000 --- a/src/libs/opus/win32/VS2015/opus.vcxproj.filters +++ /dev/null @@ -1,585 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/src/libs/opus/win32/VS2015/opus_demo.vcxproj b/src/libs/opus/win32/VS2015/opus_demo.vcxproj deleted file mode 100644 index 9860bf93..00000000 --- a/src/libs/opus/win32/VS2015/opus_demo.vcxproj +++ /dev/null @@ -1,171 +0,0 @@ - - - - - DebugDLL_fixed - Win32 - - - DebugDLL_fixed - x64 - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL_fixed - Win32 - - - ReleaseDLL_fixed - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - - {219ec965-228a-1824-174d-96449d05f88a} - - - - - - - {016C739D-6389-43BF-8D88-24B2BF6F620F} - Win32Proj - opus_demo - - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/opus_demo.vcxproj.filters b/src/libs/opus/win32/VS2015/opus_demo.vcxproj.filters deleted file mode 100644 index dbcc8ae9..00000000 --- a/src/libs/opus/win32/VS2015/opus_demo.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_api.vcxproj b/src/libs/opus/win32/VS2015/test_opus_api.vcxproj deleted file mode 100644 index c6abf88e..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_api.vcxproj +++ /dev/null @@ -1,171 +0,0 @@ - - - - - DebugDLL_fixed - Win32 - - - DebugDLL_fixed - x64 - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL_fixed - Win32 - - - ReleaseDLL_fixed - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - {219ec965-228a-1824-174d-96449d05f88a} - - - - {1D257A17-D254-42E5-82D6-1C87A6EC775A} - Win32Proj - test_opus_api - - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_api.vcxproj.filters b/src/libs/opus/win32/VS2015/test_opus_api.vcxproj.filters deleted file mode 100644 index 070c8ab0..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_api.vcxproj.filters +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj b/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj deleted file mode 100644 index 9db09b8d..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj +++ /dev/null @@ -1,171 +0,0 @@ - - - - - DebugDLL_fixed - Win32 - - - DebugDLL_fixed - x64 - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL_fixed - Win32 - - - ReleaseDLL_fixed - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - {219ec965-228a-1824-174d-96449d05f88a} - - - - {8578322A-1883-486B-B6FA-E0094B65C9F2} - Win32Proj - test_opus_api - - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj.filters b/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj.filters deleted file mode 100644 index 588637e8..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_decode.vcxproj.filters +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {4a0dd677-931f-4728-afe5-b761149fc7eb} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj b/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj deleted file mode 100644 index b10eaf21..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj +++ /dev/null @@ -1,172 +0,0 @@ - - - - - DebugDLL_fixed - Win32 - - - DebugDLL_fixed - x64 - - - DebugDLL - Win32 - - - DebugDLL - x64 - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL_fixed - Win32 - - - ReleaseDLL_fixed - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - {219ec965-228a-1824-174d-96449d05f88a} - - - - {84DAA768-1A38-4312-BB61-4C78BB59E5B8} - Win32Proj - test_opus_api - - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - Application - v140 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj.filters b/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj.filters deleted file mode 100644 index f0477638..00000000 --- a/src/libs/opus/win32/VS2015/test_opus_encode.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {546c8d9a-103e-4f78-972b-b44e8d3c8aba} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/libs/opus/win32/config.h b/src/libs/opus/win32/config.h deleted file mode 100644 index 3e54bcbb..00000000 --- a/src/libs/opus/win32/config.h +++ /dev/null @@ -1,64 +0,0 @@ -/*********************************************************************** -Copyright (c) 2011, Skype Limited. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -- Neither the name of Internet Society, IETF or IETF Trust, nor the -names of specific contributors, may be used to endorse or promote -products derived from this software without specific prior written -permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -***********************************************************************/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define USE_ALLOCA 1 - -/* Comment out the next line for floating-point code */ -/*#define FIXED_POINT 1 */ - -#define OPUS_BUILD 1 - -#if defined(_M_IX86) || defined(_M_X64) -/* Can always compile SSE intrinsics (no special compiler flags necessary) */ -#define OPUS_X86_MAY_HAVE_SSE -#define OPUS_X86_MAY_HAVE_SSE2 -#define OPUS_X86_MAY_HAVE_SSE4_1 - -/* Presume SSE functions, if compiled to use SSE/SSE2/AVX (note that AMD64 implies SSE2, and AVX - implies SSE4.1) */ -#if defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1)) || defined(__AVX__) -#define OPUS_X86_PRESUME_SSE 1 -#endif -#if defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__AVX__) -#define OPUS_X86_PRESUME_SSE2 1 -#endif -#if defined(__AVX__) -#define OPUS_X86_PRESUME_SSE4_1 1 -#endif - -#if !defined(OPUS_X86_PRESUME_SSE4_1) || !defined(OPUS_X86_PRESUME_SSE2) || !defined(OPUS_X86_PRESUME_SSE) -#define OPUS_HAVE_RTCD 1 -#endif - -#endif - -#include "version.h" - -#endif /* CONFIG_H */ diff --git a/src/libs/opus/win32/genversion.bat b/src/libs/opus/win32/genversion.bat deleted file mode 100644 index aea55739..00000000 --- a/src/libs/opus/win32/genversion.bat +++ /dev/null @@ -1,37 +0,0 @@ -@echo off - -setlocal enableextensions enabledelayedexpansion - -for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v - -if not "%version%"=="" set version=!version:~1! && goto :gotversion - -if exist "%~dp0..\package_version" goto :getversion - -echo Git cannot be found, nor can package_version. Generating unknown version. - -set version=unknown - -goto :gotversion - -:getversion - -for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v -set version=!version:"=! - -:gotversion - -set version=!version: =! -set version_out=#define %~2 "%version%" - -echo %version_out%> "%~1_temp" - -echo n | comp "%~1_temp" "%~1" > NUL 2> NUL - -if not errorlevel 1 goto exit - -copy /y "%~1_temp" "%~1" - -:exit - -del "%~1_temp"