diff options
author | Ron Economos <w6rz@comcast.net> | 2016-08-23 00:00:19 -0700 |
---|---|---|
committer | Ron Economos <w6rz@comcast.net> | 2016-08-23 00:00:19 -0700 |
commit | 2b05d00a4354a8ba61f7a2452ba7e0e259f1ae5a (patch) | |
tree | f9719ae8a4f9b50e953fa70e3d337ba0fb8b4e45 /gr-dtv | |
parent | 1866270951ba0efa556a35accbf5dfdffb19d463 (diff) |
gr-dtv: One more modulo based performance enhancement.
Diffstat (limited to 'gr-dtv')
-rw-r--r-- | gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc index 82b7c94d5f..9ebfb143ed 100644 --- a/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc +++ b/gr-dtv/lib/dvbt2/dvbt2_interleaver_bb_impl.cc @@ -249,7 +249,10 @@ namespace gr { offset = twist[col]; for (int row = 0; row < rows; row++) { tempv[offset + (rows * col)] = tempu[index++]; - offset = (offset + 1) % rows; + offset++; + if (offset == rows) { + offset = 0; + } } } index = 0; @@ -327,7 +330,10 @@ namespace gr { offset = twist[col]; for (int row = 0; row < rows; row++) { tempv[offset + (rows * col)] = tempu[index++]; - offset = (offset + 1) % rows; + offset++; + if (offset == rows) { + offset = 0; + } } } index = 0; @@ -406,7 +412,10 @@ namespace gr { offset = twist256n[col]; for (int row = 0; row < rows; row++) { tempv[offset + (rows * col)] = tempu[index++]; - offset = (offset + 1) % rows; + offset++; + if (offset == rows) { + offset = 0; + } } } index = 0; @@ -479,7 +488,10 @@ namespace gr { offset = twist256s[col]; for (int row = 0; row < rows; row++) { tempv[offset + (rows * col)] = tempu[index++]; - offset = (offset + 1) % rows; + offset++; + if (offset == rows) { + offset = 0; + } } } index = 0; |