% Inverse DFT
Cx = PQRFFT (dx. NFFT.-1);
C = Cx(1:NL);
ГОСТ P 56047— 2014
%-
---------
function Cn = PQ_NCorr (C. D. NL. M)
Cn = zeros (1.NL):
sO = C(0+1);
sj = sO;
Cn(0+1) = 1;
for (i = 1:NL-1)
sj = sj + (D(i+M-1+1)A2 - 0{М+1)Л2);
d = sO * sj;
if (d <= 0)
Cn(i+1) = 1;
else
Cn(i+1) = C(i+1) I sqrt (d);
end
end
%
------
function EHS = PQ_FindPeak (c2. N)
cprev = c2(0+1);
стах = 0;
for(n = 1:N-1)
if (c2{n+1) > cprev) % Rising from a valley
if (c2(n+1)> стах)
стах = c2(n+1);
end
end
end
EHS = стах;
function [EP, Fmem] = POadapt (Ehs, Fmem. Ver, Mod)
persistent a b Nc M1 М2 Version Model
if (-strcmp (Ver. Version) | -strcmp (Mod. Model))
Version = Ver;
Model = Mod;
if (strcmp (Model. ’FFT))
[Nc. fcj = PQCB (Version);
NF = 2046;
Nadv = NF / 2;
else
[Nc. fc] = PQF8;
Nadv = 192;
end
Version = Ver;
Model = Mod;
Fs = 48000;
Fss = Fs / Nadv;
1100 = 0.050:
tmin = 0.008;
[a b] = PQtConst (И00. tmin. fc. Fss);
[M l. М2] = PQ_M1M2 (Version. Model);
end
EP = zeros (2. Nc);
R = zeros (2. Nc):
47