diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-02-12 17:51:48 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-02-12 17:51:48 +0100 |
commit | 6eb9a403558d4dfde1de36e5c6744b58dc26ea79 (patch) | |
tree | 60f35619167d007ab7ef3a3af3573d3a9c8e8501 /src/PuncturingEncoder.h | |
parent | e659399f872832552a5fdae02e70f4579f0e266e (diff) | |
download | dabmod-6eb9a403558d4dfde1de36e5c6744b58dc26ea79.tar.gz dabmod-6eb9a403558d4dfde1de36e5c6744b58dc26ea79.tar.bz2 dabmod-6eb9a403558d4dfde1de36e5c6744b58dc26ea79.zip |
Fix incorrect frame size bug due to missing puncturing padding
Diffstat (limited to 'src/PuncturingEncoder.h')
-rw-r--r-- | src/PuncturingEncoder.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/PuncturingEncoder.h b/src/PuncturingEncoder.h index 19be53e..b6f9f0e 100644 --- a/src/PuncturingEncoder.h +++ b/src/PuncturingEncoder.h @@ -35,13 +35,26 @@ #include "ModPlugin.h" #include <vector> +#include <string> #include <sys/types.h> #include <boost/optional.hpp> class PuncturingEncoder : public ModCodec { public: - PuncturingEncoder(); + /* Initialise a puncturer that does not check if the + * outgoing data requires padding. To be used for the + * FIC. The size of the output buffer is derived from + * the puncturing rules only + */ + PuncturingEncoder(void); + + /* Initialise a puncturer that checks if there is up to + * one byte padding needed in the output buffer. See + * EN 300 401 Table 31 in 11.3.1 UEP coding. Up to one + * byte of padding is added + */ + PuncturingEncoder(size_t num_cu); void append_rule(const PuncturingRule& rule); void append_tail_rule(const PuncturingRule& rule); @@ -51,12 +64,12 @@ public: size_t getOutputSize() { return d_out_block_size; } private: + size_t d_num_cu; size_t d_in_block_size; size_t d_out_block_size; std::vector<PuncturingRule> d_rules; boost::optional<PuncturingRule> d_tail_rule; void adjust_item_size(); - }; |