Enable actual LLR, now with proper scaling.

work
pabr 2019-02-18 19:07:07 +01:00
rodzic 66df2dc8fd
commit 3b22079ba1
1 zmienionych plików z 3 dodań i 7 usunięć

Wyświetl plik

@ -359,14 +359,10 @@ namespace leansdr {
};
void to_softsymb(const full_ss *fss, llr_ss *ss) {
for ( int b=0; b<8; ++b ) {
#if 1 // TBD Linear works better ?
int r = 127 - 254*fss->p[b];
#else
float v = (1.0f-fss->p[b])/(fss->p[b]+1e-6);
int r = logf(v) * 32;
#endif
float v = (1.0f-fss->p[b]) / (fss->p[b]+1e-6);
int r = logf(v) * 5; // TBD Optimal scaling vs saturation ?
if ( r < -127 ) r = -127;
if ( r > 127 ) r = 127;
if ( r > 127 ) r = 127;
ss->bits[b] = r;
}
}