mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-26 18:52:27 -04:00
Correct what appears to be an error in q65_intrinsics_fastfading: max hidx=63, not 64?
This commit is contained in:
parent
53f5e26580
commit
a47f5e5103
@ -301,8 +301,7 @@ int q65_intrinsics_fastfading(q65_codec_ds *pCodec,
|
|||||||
const float *pCurSym, *pCurBin;
|
const float *pCurSym, *pCurBin;
|
||||||
float *pCurIx;
|
float *pCurIx;
|
||||||
|
|
||||||
// printf("pcodec=%08x submode=%d fadingmodel=%d B90Ts=%f\n",pcodec, submode,fadingModel, B90Ts);
|
// printf("pcodec=%08x submode=%d fadingmodel=%d B90Ts=%f\n",pCodec, submode,fadingModel, B90Ts);
|
||||||
|
|
||||||
if (pCodec==NULL)
|
if (pCodec==NULL)
|
||||||
return Q65_DECODE_INVPARAMS; // invalid pCodec pointer
|
return Q65_DECODE_INVPARAMS; // invalid pCodec pointer
|
||||||
|
|
||||||
@ -322,8 +321,8 @@ int q65_intrinsics_fastfading(q65_codec_ds *pCodec,
|
|||||||
if (hidx<0)
|
if (hidx<0)
|
||||||
hidx = 0;
|
hidx = 0;
|
||||||
else
|
else
|
||||||
if (hidx > 64)
|
if (hidx > 63) //Changed by K1JT: previously max was 64.
|
||||||
hidx=64;
|
hidx=63; //Changed by K1JT: previously max was 64.
|
||||||
|
|
||||||
// select the appropriate weighting fading coefficients array
|
// select the appropriate weighting fading coefficients array
|
||||||
if (fadingModel==0) { // gaussian fading model
|
if (fadingModel==0) { // gaussian fading model
|
||||||
@ -401,6 +400,7 @@ int q65_intrinsics_fastfading(q65_codec_ds *pCodec,
|
|||||||
// for which we compute the exact intrinsics probabilities
|
// for which we compute the exact intrinsics probabilities
|
||||||
for (k=0;k<hlen;k++) {
|
for (k=0;k<hlen;k++) {
|
||||||
fTemp = hptr[k]*EsNoMetric;
|
fTemp = hptr[k]*EsNoMetric;
|
||||||
|
// printf("%d %d %f %f %f\n",hlen,k,EsNoMetric,hptr[k],fTemp);
|
||||||
weight[k] = fTemp/(1.0f+fTemp)/fNoiseVar;
|
weight[k] = fTemp/(1.0f+fTemp)/fNoiseVar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user