ГОСТ Р 53556.12-2014
define SHIFTJNTTNS 2
1
INTbl mslnvQuantCoefFixedPoint(coef_res, coej)
(
INTbl intTnsCoef_resW}
= {-2065292. -1816187, -1348023, -717268.
0.909920. 1639620. 2044572/;
INTbl intTnsCoef_res4{
16/ = {-2088206. -2017095,-1877294,-1673563, -1412842, -1104008.
-757579, -385351,0,436022,852989, 1232675. 1558488, 1816187,
1994510, 2085664/;
if(coefjres
==
b) {
re!urn intTnsCoef_resb
/4+
coef]
;
I
if(coef_res
==
4)
/
return intTnsCoef_res4l8+cocfJ:
I
/
/*
Decoder transmitted coefficients for one TNSfilter */
int_tns_decode_coef( order, coefjres
,
*coef INTbl *a )
{
INTbl tmpfTNSjVIAX_ORDER
+1/.
b[TNS_MAX_ORDER
+1/;
/*
Inverse quantization */
for
f/’=0;
i<order; i++) f
tmpfi+\l
=
tnslnvQuantCoefFixedPoinЦcoef_res. coeffi]);
I
/*
Conversion to LPC coefficients */
/* worst casefor order
==12
and all coefficients
== 1;
6th coefficient raised by \2!/(6!*6!)
= 924
->
10 bits headroom required ■>SHIFTJNTTNS
= =21 */
afOJ
= 1
«SHIFTJNTTNS:
for (m=l: m<=order: m+ +) f
blQJ
=
а\Щ:
for fi—
1;
i<m; i++) {
bfii
=
a fl + ((«((INT64)tmplm])*alm-ij)»(SHIFTJNTTNS-1))+\)»\ );
!
b[mj
=
tmp[m):
for
0=0:
i<-m: i++) {
Ф
7 =
blij:
32