From 347fb063820653f170ef1a78f08ae106b41504d7 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 28 Oct 2020 09:28:50 -0400 Subject: [PATCH] Separate calls to q65_intrinsics_ff() and q65_dec(). --- lib/qra/q65/q65_loops.f90 | 3 ++- lib/qra/q65/q65_subs.c | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/lib/qra/q65/q65_loops.f90 b/lib/qra/q65/q65_loops.f90 index b2498e982..15e640ffd 100644 --- a/lib/qra/q65/q65_loops.f90 +++ b/lib/qra/q65/q65_loops.f90 @@ -68,9 +68,10 @@ subroutine q65_loops(c00,npts2,nsps,mode,mode64,nsubmode,nFadingModel, & ! if(b90.lt.0.15*width) exit ncall=ncall+1 call timer('qra64_de',0) + call q65_intrinsics_ff(s3,nsubmode,b90,nFadingModel,s3prob) APmask=0 APsymbols=0 - call q65_dec(s3,APmask,APsymbols,nsubmode,b90,nFadingModel,s3prob,snr2,dat4,irc) + call q65_dec(s3,s3prob,APmask,APsymbols,snr2,dat4,irc) ! irc > 0 ==> number of iterations required to decode ! -1 = invalid params ! -2 = decode failed diff --git a/lib/qra/q65/q65_subs.c b/lib/qra/q65/q65_subs.c index f589f7faa..ffd4c0385 100644 --- a/lib/qra/q65/q65_subs.c +++ b/lib/qra/q65/q65_subs.c @@ -46,26 +46,18 @@ void q65_enc_(int x[], int y[]) q65_encode(&codec,y,x); } -void q65_dec_(float s3[], int APmask[], int APsymbols[], int* submode, - float* B90, int* fadingModel, float s3prob[], - float* snr2500, int xdec[], int* rc0) +void q65_intrinsics_ff_(float s3[], int* submode, float* B90, + int* fadingModel, float s3prob[]) { /* Input: s3[LL,NN] Received energies - * APmask[13] AP information to be used in decoding - * APsymbols[13] Available AP informtion * submode 0=A, 4=E * B90 Spread bandwidth, 90% fractional energy * fadingModel 0=Gaussian, 1=Lorentzian * Output: s3prob[LL,NN] Symbol-value intrinsic probabilities - * snr2500 SNR_2500 of decoded signal, or lower limit - * xdec[13] Decoded 78-bit message as 13 six-bit integers - * rc0 Return code from q65_decode() */ int rc; - int ydec[63]; - float esnodb; static int first=1; if (first) { @@ -82,6 +74,24 @@ void q65_dec_(float s3[], int APmask[], int APsymbols[], int* submode, printf("error in q65_intrinsics()\n"); exit(0); } +} + +void q65_dec_(float s3[], float s3prob[], int APmask[], int APsymbols[], + float* snr2500, int xdec[], int* rc0) +{ + +/* Input: s3prob[LL,NN] Symbol-value intrinsic probabilities + * APmask[13] AP information to be used in decoding + * APsymbols[13] Available AP informtion + * Output: + * snr2500 SNR_2500 of decoded signal, or lower limit + * xdec[13] Decoded 78-bit message as 13 six-bit integers + * rc0 Return code from q65_decode() + */ + + int rc; + int ydec[63]; + float esnodb; rc = q65_decode(&codec,ydec,xdec,s3prob,APmask,APsymbols); *rc0=rc;