mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 22:35:44 +00:00
only need m=6 bits with 1011011
This commit is contained in:
parent
246c013896
commit
cb8dcd0ffb
2 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ class PACEncoder
|
||||||
bool b4 = (*state >> 4) & 1;
|
bool b4 = (*state >> 4) & 1;
|
||||||
bool b6 = (*state >> 6) & 1;
|
bool b6 = (*state >> 6) & 1;
|
||||||
bool output = input ^ b1 ^ b3 ^ b4 ^ b6;
|
bool output = input ^ b1 ^ b3 ^ b4 ^ b6;
|
||||||
*state = ((*state & 126) << 1) | (input ? 2 : 0) | (output ? 1 : 0);
|
*state = ((*state & 62) << 1) | (input ? 2 : 0) | (output ? 1 : 0);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ struct PACListTree<TYPE, 1>
|
||||||
bool b4 = (*state >> 4) & 1;
|
bool b4 = (*state >> 4) & 1;
|
||||||
bool b6 = (*state >> 6) & 1;
|
bool b6 = (*state >> 6) & 1;
|
||||||
bool output = input ^ b1 ^ b3 ^ b4 ^ b6;
|
bool output = input ^ b1 ^ b3 ^ b4 ^ b6;
|
||||||
*state = ((*state & 126) << 1) | (input ? 2 : 0) | (output ? 1 : 0);
|
*state = ((*state & 62) << 1) | (input ? 2 : 0) | (output ? 1 : 0);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
static MAP rate0(PATH *metric, int *state, TYPE *hard, TYPE *soft)
|
static MAP rate0(PATH *metric, int *state, TYPE *hard, TYPE *soft)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue