ГОСТ Р 53556.12-2014
intjnsJilter_encode(length. order, direction. 1NTS2* spec, IN132 *lpc)
(
1
1
INT64 tempjiccu;
if(direction) {
/*
Startup, initial state is zero */
tempilength
-
J=spec[length- J:
for (i=length-2; i>(length
-1-
order);i—) {
tempiiJ-specliJ:
tempjiccu
= 0;
Jt++;
for(j=\;j<=k;j++){
tempjiccu
+=
((INTM)tempfi+jj) *a[j);
I
specfi]
+=
(!NTi2)( ( ( tempjaccu
»
(SHIFTJNTTNSA))
+
\) »\);
I
/* Nowfilter the rest
*/
1
for (i=length
-
-order;i>=0;i--) {
tempiiJ=spec[i);
tempjaccu
= 0;
1
for (j= ;j<-orderJ+ +) {
tempjiccu
+=
((INTM)templi+jJ) *afjj:
I
1
specfiJ
+=
<IN132)( ( ( tempjiccu >> (SHIFT_INTTNS- )) +
U >> 1
):
/
I else (
1
/*
Startup, initial state is zero V
temp10J-specl0):
for (i= :i<order:i++)
/
tempiij=spec{iJ;
tempjiccu =
0;
1
.for (j= :j<=i;j+ +) {
tempjiccu
+=
((INT(A)iempli-jJ)
*
aljJ;
/
specfiJ
+=
(IN132)( ( ( tempjiccu »(SHIFTJNTTNS-\)) + \) >> \ ):
}
/* Now filler the rest */
34