summaryrefslogtreecommitdiff
path: root/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
diff options
context:
space:
mode:
authorAchilleas Anastasopoulos2011-02-20 09:22:32 -0500
committerAchilleas Anastasopoulos2011-02-20 09:22:32 -0500
commit9bc24753ce556492bb222ca4b91e15fb1fcf0f32 (patch)
treeb775f5da16262c67381b1ee9c86d32aedc43a355 /gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
parent00c5b9c5923b774b0a0a7ddd89737f4a64fd1903 (diff)
downloadgnuradio-9bc24753ce556492bb222ca4b91e15fb1fcf0f32.tar.gz
gnuradio-9bc24753ce556492bb222ca4b91e15fb1fcf0f32.tar.bz2
gnuradio-9bc24753ce556492bb222ca4b91e15fb1fcf0f32.zip
added a scaling parameter in trellis_sccc_decoder, needed
for sum-product metric calculation
Diffstat (limited to 'gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t')
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t18
1 files changed, 14 insertions, 4 deletions
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
index ce8df037a..62532bd4e 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
@@ -45,7 +45,8 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE
+ trellis_metric_type_t METRIC_TYPE,
+ float scaling
)
{
return gnuradio::get_initial_sptr (new @NAME@ (
@@ -56,7 +57,8 @@ trellis_make_@BASE_NAME@ (
repetitions,
SISO_TYPE,
D,
- TABLE,METRIC_TYPE
+ TABLE,METRIC_TYPE,
+ scaling
));
}
@@ -69,7 +71,8 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE
+ trellis_metric_type_t METRIC_TYPE,
+ float scaling
)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
@@ -82,12 +85,18 @@ trellis_make_@BASE_NAME@ (
d_SISO_TYPE (SISO_TYPE),
d_D (D),
d_TABLE (TABLE),
- d_METRIC_TYPE (METRIC_TYPE)
+ d_METRIC_TYPE (METRIC_TYPE),
+ d_scaling (scaling)
{
set_relative_rate (1.0 / ((double) d_D));
set_output_multiple (d_blocklength);
}
+void @NAME@::set_scaling(float scaling)
+{
+ d_scaling = scaling;
+}
+
void
@NAME@::forecast (int noutput_items, gr_vector_int &ninput_items_required)
@@ -127,6 +136,7 @@ int
p2min,
d_D,d_TABLE,
d_METRIC_TYPE,
+ d_scaling,
&(in[n*d_blocklength*d_D]),&(out[n*d_blocklength])
);
}