diff options
author | jcorgan | 2006-08-04 16:07:06 +0000 |
---|---|---|
committer | jcorgan | 2006-08-04 16:07:06 +0000 |
commit | c5b588b8f182374d83918d810e6c59b3bd804d7e (patch) | |
tree | b6a57dd725e90f559427778bc5ac6429b336889d /gnuradio-core/src/lib | |
parent | 79cf92c9a63c1887693cdff226aca116fc89ea95 (diff) | |
download | gnuradio-c5b588b8f182374d83918d810e6c59b3bd804d7e.tar.gz gnuradio-c5b588b8f182374d83918d810e6c59b3bd804d7e.tar.bz2 gnuradio-c5b588b8f182374d83918d810e6c59b3bd804d7e.zip |
Merge CVS changes from FIRST_MIGRATION_2006_07_26 into trunk.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3138 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t | 12 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t | 12 |
2 files changed, 16 insertions, 8 deletions
diff --git a/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t b/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t index f585c4a6a..3d66c6896 100644 --- a/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t +++ b/gnuradio-core/src/lib/general/gr_packed_to_unpacked_XX.cc.t @@ -87,12 +87,15 @@ int gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { + unsigned int index_tmp; + assert (input_items.size() == output_items.size()); int nstreams = input_items.size(); for (int m=0; m < nstreams; m++){ const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m]; @O_TYPE@ *out = (@O_TYPE@ *) output_items[m]; + index_tmp = d_index; // per stream processing @@ -102,8 +105,8 @@ int for (int i = 0; i < noutput_items; i++){ //printf("here msb %d\n",i); @O_TYPE@ x = 0; - for(unsigned int j=0; j<d_bits_per_chunk; j++, d_index++) - x = (x<<1) | get_bit_be(in, d_index); + for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++) + x = (x<<1) | get_bit_be(in, index_tmp); out[i] = x; } break; @@ -112,8 +115,8 @@ int for (int i = 0; i < noutput_items; i++){ //printf("here lsb %d\n",i); @O_TYPE@ x = 0; - for(unsigned int j=0; j<d_bits_per_chunk; j++, d_index++) - x = (x<<1) | get_bit_le(in, d_index); + for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++) + x = (x<<1) | get_bit_le(in, index_tmp); out[i] = x; } break; @@ -126,6 +129,7 @@ int assert(ninput_items[m] >= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE)); } + d_index = index_tmp; consume_each (d_index >> LOG2_L_TYPE); d_index = d_index & (BITS_PER_TYPE-1); //printf("got to end\n"); diff --git a/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t b/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t index 7d5d72e65..fcb5d0637 100644 --- a/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t +++ b/gnuradio-core/src/lib/general/gr_unpacked_to_packed_XX.cc.t @@ -78,12 +78,15 @@ int gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { + unsigned int index_tmp; + assert (input_items.size() == output_items.size()); int nstreams = input_items.size(); for (int m=0; m< nstreams; m++) { const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m]; @O_TYPE@ *out = (@O_TYPE@ *) output_items[m]; + index_tmp=d_index; // per stream processing @@ -95,8 +98,8 @@ int for(int i=0;i<noutput_items;i++) { @O_TYPE@ tmp=0; for(unsigned int j=0; j<BITS_PER_TYPE; j++) { - tmp = (tmp<<1) | get_bit_be1(in,d_index,d_bits_per_chunk); - d_index++; + tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk); + index_tmp++; } out[i] = tmp; } @@ -106,8 +109,8 @@ int for(int i=0;i<noutput_items;i++) { unsigned long tmp=0; for(unsigned int j=0; j<BITS_PER_TYPE; j++) { - tmp = (tmp>>1)| (get_bit_be1(in,d_index,d_bits_per_chunk)<<(BITS_PER_TYPE-1)); - d_index++; + tmp = (tmp>>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1)); + index_tmp++; } out[i] = tmp; } @@ -118,6 +121,7 @@ int } } + d_index = index_tmp; consume_each ((int)(d_index/d_bits_per_chunk)); d_index = d_index%d_bits_per_chunk; |