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_decoder_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gr-fec/lib/cc_decoder_impl.h') diff --git a/gr-fec/lib/cc_decoder_impl.h b/gr-fec/lib/cc_decoder_impl.h index d0b1af35a3..33ced0250c 100644 --- a/gr-fec/lib/cc_decoder_impl.h +++ b/gr-fec/lib/cc_decoder_impl.h @@ -67,6 +67,7 @@ namespace gr { unsigned int d_partial_rate; std::vector<int> d_polys; cc_mode_t d_mode; + int d_padding; struct v* d_vp; unsigned char* d_managed_in; @@ -90,7 +91,7 @@ namespace gr { cc_decoder_impl(int frame_size, int k, int rate, std::vector<int> polys, int start_state = 0, int end_state = -1, - cc_mode_t mode=CC_STREAMING); + cc_mode_t mode=CC_STREAMING, bool padded=false); ~cc_decoder_impl(); void generic_work(void *inbuffer, void *outbuffer); -- cgit v1.2.3