mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
added self correcting update of outgoing values
This commit is contained in:
parent
974c4c582d
commit
e7dbd7400f
2 changed files with 12 additions and 0 deletions
|
|
@ -86,6 +86,10 @@ class LDPCDecoder
|
|||
for (int i = 0; i < cnt; ++i)
|
||||
out[i] = vsign(other(mags[i], mins[0], mins[1]), mine(signs, inp[i]));
|
||||
}
|
||||
static TYPE selfcorr(TYPE a, TYPE b)
|
||||
{
|
||||
return vreinterpret<TYPE>(vand(vmask(b), vorr(vceqz(a), veor(vcgtz(a), vcltz(b)))));
|
||||
}
|
||||
static TYPE rotate(TYPE a, int s)
|
||||
{
|
||||
if (s < 0)
|
||||
|
|
@ -172,6 +176,8 @@ class LDPCDecoder
|
|||
cnp(out, inp, deg);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
out[d] = vclamp(out[d], -32, 31);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
out[d] = selfcorr(bl[d], out[d]);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
*bl++ = out[d];
|
||||
for (int c = 0; c < cnt; ++c)
|
||||
|
|
|
|||
|
|
@ -88,6 +88,10 @@ class LDPCDecoder
|
|||
for (int i = 0; i < cnt; ++i)
|
||||
out[i] = vsign(other(mags[i], mins[0], mins[1]), mine(signs, inp[i]));
|
||||
}
|
||||
static TYPE selfcorr(TYPE a, TYPE b)
|
||||
{
|
||||
return vreinterpret<TYPE>(vand(vmask(b), vorr(vceqz(a), veor(vcgtz(a), vcltz(b)))));
|
||||
}
|
||||
static TYPE rotate(TYPE a, int s)
|
||||
{
|
||||
if (s < 0)
|
||||
|
|
@ -168,6 +172,8 @@ class LDPCDecoder
|
|||
cnp(out, inp, deg);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
out[d] = vclamp(out[d], -32, 31);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
out[d] = selfcorr(bl[d], out[d]);
|
||||
for (int d = 0; d < deg; ++d)
|
||||
*bl++ = out[d];
|
||||
for (int c = 0; c < cnt; ++c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue