Fixing occasional MMDVMHost crash when receiving P25 RF data with high BER (RS decoder fix)
This commit is contained in:
parent
5ca81f288b
commit
738cc467ee
|
@ -241,7 +241,7 @@ bool CRS241213::decode(unsigned char* data)
|
||||||
if (q == 0) { //it is a root
|
if (q == 0) { //it is a root
|
||||||
//store root (index-form) and error location number
|
//store root (index-form) and error location number
|
||||||
root[count] = i;
|
root[count] = i;
|
||||||
locn[count] = i - 1;
|
locn[count] = i - 40;
|
||||||
//if wehave max possible roots, abort search to save time
|
//if wehave max possible roots, abort search to save time
|
||||||
count = count + 1;
|
count = count + 1;
|
||||||
|
|
||||||
|
@ -317,7 +317,8 @@ bool CRS241213::decode(unsigned char* data)
|
||||||
|
|
||||||
// apply error to data
|
// apply error to data
|
||||||
if (num1 != 0) {
|
if (num1 != 0) {
|
||||||
HB[locn[j]] = HB[locn[j]] ^ (rsGFexp[(rsGFlog[num1] + rsGFlog[num2] + 63 - rsGFlog[den]) % 63]);
|
if(locn[j] < 24)
|
||||||
|
HB[locn[j]] = HB[locn[j]] ^ (rsGFexp[(rsGFlog[num1] + rsGFlog[num2] + 63 - rsGFlog[den]) % 63]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(RS241213_H)
|
#if !defined(RS241213_H)
|
||||||
#define RS241213
|
#define RS241213_H
|
||||||
|
|
||||||
class CRS241213
|
class CRS241213
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue