... | ... | @@ -25,7 +25,7 @@ make -j4 |
|
|
sudo make install
|
|
|
```
|
|
|
|
|
|
The header files and the library itseld should be found installed in `/usr/local/include/` and `/usr/local/lib/` respectively.
|
|
|
The header files and the library itself should be found installed in `/usr/local/include/` and `/usr/local/lib/` respectively.
|
|
|
|
|
|
To develop with the library, include the following header :
|
|
|
|
... | ... | @@ -36,29 +36,29 @@ To develop with the library, include the following header : |
|
|
First declare and initialize a decoder :
|
|
|
|
|
|
```c
|
|
|
REDS_DVB_DECODER_Decoder_t *decoder;
|
|
|
REDS_DVB_DECODER_Scheduler_t *scheduler = REDS_DVB_DECODER_SCHEDULER_FLOODED;
|
|
|
REDS_DVB_DECODER_Code_t *code = REDS_DVB_DECODER_CODE_DVB_S2_64800_32400;
|
|
|
REDS_DVB_DECODER_Error_t error;
|
|
|
LDPC_DVBS2_DECODER_Decoder_t *decoder;
|
|
|
LDPC_DVBS2_DECODER_Scheduler_t *scheduler = LDPC_DVBS2_DECODER_SCHEDULER_FLOODED;
|
|
|
LDPC_DVBS2_DECODER_Code_t *code = LDPC_DVBS2_DECODER_CODE_DVB_S2_64800_32400;
|
|
|
LDPC_DVBS2_DECODER_Error_t error;
|
|
|
|
|
|
error = REDS_DVB_DECODER_Init(decoder, scheduler, code);
|
|
|
error = LDPC_DVBS2_DECODER_Init(decoder, scheduler, code);
|
|
|
```
|
|
|
|
|
|
There are multiple available schedulers and code you can specify to the decoder initializer. The available schedulers are :
|
|
|
- REDS_DVB_DECODER_SCHEDULER_FLOODED
|
|
|
- REDS_DVB_DECODER_SCHEDULER_LAYERED
|
|
|
- LDPC_DVBS2_DECODER_SCHEDULER_FLOODED
|
|
|
- LDPC_DVBS2_DECODER_SCHEDULER_LAYERED
|
|
|
|
|
|
The available codes are :
|
|
|
- REDS_DVB_DECODER_CODE_DVB_S2_64800_32400
|
|
|
- REDS_DVB_DECODER_CODE_DVB_S2_64800_7200
|
|
|
- REDS_DVB_DECODER_CODE_DVB_S2_64800_6480
|
|
|
- LDPC_DVBS2_DECODER_CODE_DVB_S2_64800_32400
|
|
|
- LDPC_DVBS2_DECODER_CODE_DVB_S2_64800_7200
|
|
|
- LDPC_DVBS2_DECODER_CODE_DVB_S2_64800_6480
|
|
|
|
|
|
Once the decoder is initialized you can pass it to the decode function like this :
|
|
|
|
|
|
```c
|
|
|
#define CODEWORD_LEN 64800
|
|
|
|
|
|
REDS_DVB_DECODER_Decoder *decoder;
|
|
|
LDPC_DVBS2_DECODER_Decoder *decoder;
|
|
|
char soft_bits[CODEWORD_LEN];
|
|
|
char hard_bits[CODEWORD_LEN];
|
|
|
int nb_iter = 10;
|
... | ... | @@ -67,7 +67,7 @@ int nb_iter = 10; |
|
|
* Fetch a codeword of soft bits encoded in signed 8 bit values
|
|
|
*/
|
|
|
|
|
|
REDS_DVB_DECODER_Decode(decoder, soft_bits, hard_bits, nb_iter);
|
|
|
LDPC_DVBS2_DECODER_Decode(decoder, soft_bits, hard_bits, nb_iter);
|
|
|
|
|
|
/*
|
|
|
* Hard bits encoded either to 0 or 1 are returned in each byte of hard_bits
|
... | ... | @@ -79,7 +79,7 @@ Note that the size of the **soft_bits and hard_bits arrays must have the correct |
|
|
Once you are done with the decoder, free it with :
|
|
|
|
|
|
```c
|
|
|
REDS_DVB_DECODER_Terminate(decoder);
|
|
|
LDPC_DVBS2_DECODER_Terminate(decoder);
|
|
|
```
|
|
|
|
|
|
## Testing environment
|
... | ... | |