mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 08:28:36 -05:00
SDRdaemonFEC plugin: first working FEC version with cm256cc library
This commit is contained in:
parent
c96c52eb5e
commit
fac8465575
@ -265,22 +265,23 @@ void SDRdaemonFECBuffer::writeData(char *array, uint32_t length)
|
||||
{
|
||||
int recoveryIndex = m_nbOriginalBlocks - m_decoderSlots[decoderIndex].m_recoveryCount + ir;
|
||||
int blockIndex = m_decoderSlots[decoderIndex].m_cm256DescriptorBlocks[recoveryIndex].Index;
|
||||
ProtectedBlock *recoveredBlock = (ProtectedBlock *) m_decoderSlots[decoderIndex].m_cm256DescriptorBlocks[recoveryIndex].Block;
|
||||
|
||||
if (blockIndex == 0) // first block with meta
|
||||
{
|
||||
printMeta("SDRdaemonFECBuffer::writeData: recovered meta", (MetaDataFEC *) recoveredBlock);
|
||||
m_decoderSlots[decoderIndex].m_metaRetrieved = true;
|
||||
}
|
||||
|
||||
qDebug() << "SDRdaemonFECBuffer::writeData: recovered block #" << blockIndex
|
||||
<< " i[0]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[0].i
|
||||
<< " q[0]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[0].q
|
||||
<< " i[1]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[1].i
|
||||
<< " q[1]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[1].q
|
||||
<< " i[2]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[2].i
|
||||
<< " q[2]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[2].q;
|
||||
|
||||
|
||||
m_decoderSlots[decoderIndex].m_originalBlocks[blockIndex] = *recoveredBlock;
|
||||
|
||||
qDebug() << "SDRdaemonFECBuffer::writeData: recovered block #" << blockIndex;
|
||||
// << " i[0]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[0].i
|
||||
// << " q[0]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[0].q
|
||||
// << " i[1]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[1].i
|
||||
// << " q[1]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[1].q
|
||||
// << " i[2]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[2].i
|
||||
// << " q[2]: " << m_decoderSlots[decoderIndex].m_recoveryBlocks[ir].samples[2].q;
|
||||
} // restore missing blocks
|
||||
} // CM256 decode
|
||||
} // revovery
|
||||
|
Loading…
Reference in New Issue
Block a user