From 91b5f380b6c511624064f1b64ae3ebfd710d7272 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <tom@trondeau.com> Date: Sat, 17 May 2014 19:23:44 -0400 Subject: fec: wip: adding concept of padding for CC encoder/decoder. When using terminated mode, the CC encoder adds K-1 bits to the output, which doesn't fit a full byte and will throw off the book-keeping in PDU or tagged mode. Padding to fill a byte tells both encoder and decoder to handle the extra bits. --- gr-fec/lib/cc_encoder_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-fec/lib/cc_encoder_impl.h') diff --git a/gr-fec/lib/cc_encoder_impl.h b/gr-fec/lib/cc_encoder_impl.h index 008887559b..77d5f42462 100644 --- a/gr-fec/lib/cc_encoder_impl.h +++ b/gr-fec/lib/cc_encoder_impl.h @@ -51,6 +51,7 @@ namespace gr { int d_decision_t_size; int d_start_state; cc_mode_t d_mode; + int d_padding; int d_output_size; int parity(int x); @@ -60,7 +61,7 @@ namespace gr { public: cc_encoder_impl(int frame_size, int k, int rate, std::vector<int> polys, int start_state = 0, - cc_mode_t mode=CC_STREAMING); + cc_mode_t mode=CC_STREAMING, bool padded=false); ~cc_encoder_impl(); bool set_frame_size(unsigned int frame_size); -- cgit v1.2.3