[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: fec: Fixed async_decoder. Can't use
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: fec: Fixed async_decoder. Can't use nbits_out because it's 0 at this point. |
Date: |
Fri, 25 Sep 2015 15:38:46 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch maint
in repository gnuradio.
commit 283ac81498c0ef8c1d9c7e5b7cabf35ac6eb414b
Author: Tom Rondeau <address@hidden>
Date: Fri Sep 25 10:52:44 2015 -0400
fec: Fixed async_decoder. Can't use nbits_out because it's 0 at this point.
Need to calculate based on nbits_in*rate.
---
gr-fec/lib/async_decoder_impl.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gr-fec/lib/async_decoder_impl.cc b/gr-fec/lib/async_decoder_impl.cc
index b5ae04b..955aaa5 100644
--- a/gr-fec/lib/async_decoder_impl.cc
+++ b/gr-fec/lib/async_decoder_impl.cc
@@ -114,9 +114,9 @@ namespace gr {
int diff = d_decoder->rate()*d_decoder->get_input_size() -
d_decoder->get_output_size();
size_t nbits_in = pmt::length(bits);
- size_t nbits_out = 0;
+ size_t nbits_out = 0;
size_t nblocks = 1;
- bool variable_frame_size = d_decoder->set_frame_size(nbits_out);
+ bool variable_frame_size =
d_decoder->set_frame_size(nbits_in*d_decoder->rate());
// Check here if the frame size is larger than what we've
// allocated for in the constructor.
@@ -145,7 +145,6 @@ namespace gr {
volk_32f_s32f_multiply_32f(d_tmp_f32, f32in, 48.0f, nbits_in);
}
else {
-
// grow d_tmp_f32 if needed
if(nbits_in > d_max_bits_in){
d_max_bits_in = nbits_in;
@@ -169,9 +168,10 @@ namespace gr {
d_decoder->generic_work((void*)d_tmp_u8, (void*)u8out);
}
else {
- for(size_t i=0; i<nblocks; i++){
-
d_decoder->generic_work((void*)&d_tmp_f32[i*d_decoder->get_input_size()],
(void*)&u8out[i*d_decoder->get_output_size()]);
- }
+ for(size_t i = 0; i < nblocks; i++){
+
d_decoder->generic_work((void*)&d_tmp_f32[i*d_decoder->get_input_size()],
+
(void*)&u8out[i*d_decoder->get_output_size()]);
+ }
}
meta = pmt::dict_add(meta, pmt::mp("iterations"),
pmt::mp(d_decoder->get_iterations()) );