From 6eb9a403558d4dfde1de36e5c6744b58dc26ea79 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 12 Feb 2017 17:51:48 +0100 Subject: Fix incorrect frame size bug due to missing puncturing padding --- src/PuncturingEncoder.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/PuncturingEncoder.h') 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 +#include #include #include 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 d_rules; boost::optional d_tail_rule; void adjust_item_size(); - }; -- cgit v1.2.3