[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8072 - gnuradio/branches/developers/trondeau/ofdm/gnu
From: |
trondeau |
Subject: |
[Commit-gnuradio] r8072 - gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general |
Date: |
Sat, 22 Mar 2008 14:26:16 -0600 (MDT) |
Author: trondeau
Date: 2008-03-22 14:26:15 -0600 (Sat, 22 Mar 2008)
New Revision: 8072
Modified:
gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc
Log:
added comments
Modified:
gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc
2008-03-22 20:25:26 UTC (rev 8071)
+++
gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc
2008-03-22 20:26:15 UTC (rev 8072)
@@ -161,6 +161,7 @@
}
if(d_nresid > 0) {
+ // take the residual bits, fill out nbits with info from the new byte,
and put them in the symbol
d_resid |= (((1 << d_nresid)-1) & d_msgbytes) << (d_nbits - d_nresid);
bits = d_resid;
@@ -174,14 +175,16 @@
// bits, d_resid, d_nresid, d_bit_offset);
}
else {
- if((8 - d_bit_offset) >= d_nbits) {
+ if((8 - d_bit_offset) >= d_nbits) { // test to make sure we can fit
nbits
+ // take the nbits number of bits at a time from the byte to add to the
symbol
bits = ((1 << d_nbits)-1) & (d_msgbytes >> d_bit_offset);
d_bit_offset += d_nbits;
out[d_subcarrier_map[i]] = d_constellation[bits];
i++;
}
- else {
+ else { // if we can't fit nbits, store them for the next
+ // saves d_nresid bits of this message where d_nresid < d_nbits
unsigned int extra = 8-d_bit_offset;
d_resid = ((1 << extra)-1) & (d_msgbytes >> d_bit_offset);
d_bit_offset += extra;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8072 - gnuradio/branches/developers/trondeau/ofdm/gnuradio-core/src/lib/general,
trondeau <=