ГОСТ Р 56047—2014
rf(Flevtest > ZeroThreshold)
ZeroThreshokJ = Flevtest;
}
for(k=ZEROTHRESHOLD-1;k>=0;k—) {
Flevref = 20.0 ’ log10{(do<jble)fftref(k]);
if(Flevref >= 10.0+ZeroThreshold) {
BwRef = к + 1;
break:
}
}
for(k=BwRef-1;k>=0;k-*) {
Flevtest = 20.0 * tog 10((double)ffttest[k]};
if(Flevtest >= 5.0+ZeroThreshold) {
BwTest = к + 1:
break;
}
}
K(BwRef > BwMAX) {
out->sumBandwidthRefb += (double)BwRef;
out->countref++:
}
if(BwTest > BwMAX) {
out->sumBandwidthTestb += (double)B.vTest;
out->counttest++;
}
if(out->countref == 0)
out->BandwidthRefb = 0:
else
out->Band\vidthRefb = out->sumBandwidlhRefb.’(double)out->countref:
if(out->counttest == 0)
out->Band\vidthTestb = 0:
else
out->Band\vidthTestb = out->sumBand4vidthTestb/(double)out->counttest:
return 0;
}
Файл: boundary.h
«define BOUNDWIN 5
«define BOUNDLIMIT 200
struct boundaryflag {
int begin:
int end:
}:
Г Function prototypes */
int boundary(signed int \ signed int *, signed int *, signed int *, int);
Г Prototypes end */
Файл: boundary.c
«include <stdlib.h>
«include <math.h>
«include <common.h>
«include <boundary.h>
int
boundary(signed int *ch1ref. signed int ’chllest. signed int *ch2ref.
signed int *ch2test. int hann)
{
66