[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/05: Fix assertions in DVBT blocks.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/05: Fix assertions in DVBT blocks. |
Date: |
Mon, 2 May 2016 04:54:38 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 2568e9d09d587ba9e210cafbdeaf3c0406a59d05
Author: Clayton Smith <address@hidden>
Date: Fri Apr 29 06:44:15 2016 -0400
Fix assertions in DVBT blocks.
---
gr-dtv/lib/dvbt/dvbt_inner_coder_impl.cc | 5 ++---
gr-dtv/lib/dvbt/dvbt_viterbi_decoder_impl.cc | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gr-dtv/lib/dvbt/dvbt_inner_coder_impl.cc
b/gr-dtv/lib/dvbt/dvbt_inner_coder_impl.cc
index 4f24f02..54d25e4 100644
--- a/gr-dtv/lib/dvbt/dvbt_inner_coder_impl.cc
+++ b/gr-dtv/lib/dvbt/dvbt_inner_coder_impl.cc
@@ -161,14 +161,13 @@ namespace gr {
// We output one byte for a symbol of m bits
// The out/in rate in bytes is: 8n/km (Bytes)
- assert(d_ninput % 1);
- assert(d_noutput % 1512);
+ assert(d_noutput % 1512 == 0);
// Set output items multiple of 4
set_output_multiple(4);
// Set relative rate out/in
- assert((d_noutput * d_k * d_m) % (d_ninput * 8 * d_n));
+ assert((d_noutput * d_k * d_m) % (d_ninput * 8 * d_n) == 0);
set_relative_rate((float)(d_ninput * 8 * d_n) / (float)d_noutput * d_k *
d_m);
// calculate in and out block sizes
diff --git a/gr-dtv/lib/dvbt/dvbt_viterbi_decoder_impl.cc
b/gr-dtv/lib/dvbt/dvbt_viterbi_decoder_impl.cc
index 3b0f9fd..8e22d8d 100644
--- a/gr-dtv/lib/dvbt/dvbt_viterbi_decoder_impl.cc
+++ b/gr-dtv/lib/dvbt/dvbt_viterbi_decoder_impl.cc
@@ -578,7 +578,7 @@ namespace gr {
*
* out/in rate is therefore km/8n in bytes
*/
- assert((d_k * d_m) % (8 * d_n));
+ assert((d_k * d_m) % (8 * d_n) == 0);
set_relative_rate((d_k * d_m) / (8 * d_n));
assert ((d_bsize * d_n) % d_m == 0);