mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
SDRdaemonFEC plugin: fixed CM256 library init and simplify code
This commit is contained in:
@@ -139,19 +139,17 @@ private:
|
||||
|
||||
struct DecoderSlot
|
||||
{
|
||||
ProtectedBlock m_blockZero;
|
||||
ProtectedBlock m_recoveryBlocks[m_nbOriginalBlocks]; // max size
|
||||
cm256_block m_cm256DescriptorBlocks[m_nbOriginalBlocks];
|
||||
int m_totalCount; //!< total number of blocks received for this frame
|
||||
int m_blockCount; //!< number of blocks usable for decode in this frame
|
||||
ProtectedBlock m_originalBlocks[m_nbOriginalBlocks]; //!< Original blocks retrieved directly or by later FEC
|
||||
ProtectedBlock m_recoveryBlocks[m_nbOriginalBlocks]; //!< Recovery blocks (FEC blocks) with max size
|
||||
cm256_block m_cm256DescriptorBlocks[m_nbOriginalBlocks]; //!< CM256 decoder descriptors (block addresses and block indexes)
|
||||
int m_blockCount; //!< number of blocks received for this frame
|
||||
int m_originalCount; //!< number of original blocks received
|
||||
int m_recoveryStartIndex; //!< block number start of recovery blocks
|
||||
int m_recoveryCount; //!< number of recovery blocks received
|
||||
bool m_decoded; //!< true if decoded
|
||||
bool m_metaRetrieved; //!< true if meta data (block zero) was retrieved
|
||||
};
|
||||
|
||||
MetaDataFEC m_currentMeta; //!< Stored current meta data
|
||||
MetaDataFEC m_currentMeta; //!< Stored current meta data
|
||||
cm256_encoder_params m_paramsCM256; //!< CM256 decoder parameters block
|
||||
DecoderSlot m_decoderSlots[nbDecoderSlots]; //!< CM256 decoding control/buffer slots
|
||||
BufferFrame m_frames[nbDecoderSlots]; //!< Samples buffer
|
||||
@@ -165,7 +163,6 @@ private:
|
||||
int m_readIndex; //!< current byte read index in frames buffer
|
||||
int m_wrDeltaEstimate; //!< Sampled estimate of write to read indexes difference
|
||||
int m_readNbBytes; //!< Nominal number of bytes per read (50ms)
|
||||
int m_blockIndex; //!< Stored block index for verification
|
||||
|
||||
uint32_t m_throttlemsNominal; //!< Initial throttle in ms
|
||||
uint8_t* m_readBuffer; //!< Read buffer to hold samples when looping back to beginning of raw buffer
|
||||
@@ -177,6 +174,7 @@ private:
|
||||
int m_nbWrites; //!< Number of buffer writes since start of auto R/W balance correction period
|
||||
int m_balCorrection; //!< R/W balance correction in number of samples
|
||||
int m_balCorrLimit; //!< Correction absolute value limit in number of samples
|
||||
bool m_cm256_OK; //!< CM256 library initialized OK
|
||||
|
||||
void initDecodeAllSlots();
|
||||
void initReadIndex();
|
||||
|
||||
Reference in New Issue
Block a user