summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/src/bitloading.c
diff options
context:
space:
mode:
authorJalil Chemseddine2012-06-12 15:09:42 +0200
committerJalil Chemseddine2012-06-20 15:41:03 +0200
commit792b9ed42008e4d682b3efd4197eca961944fa3e (patch)
treeb994a9d949197395d58f7e050b005b6a661eb6d1 /cesar/ce/rx/bitloading/src/bitloading.c
parentfd43428ce1580b21eae6f33a70fffb73db375b5b (diff)
cesar/ce/rx add new tone mask to handle faulty carriers, closes #3095
Add a new tone mask which disable faulty carriers in CE bit-loading computation. This tone mask differs from the general tone mask in the station and is only used in bit-loading.
Diffstat (limited to 'cesar/ce/rx/bitloading/src/bitloading.c')
-rw-r--r--cesar/ce/rx/bitloading/src/bitloading.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cesar/ce/rx/bitloading/src/bitloading.c b/cesar/ce/rx/bitloading/src/bitloading.c
index 614c3e0628..948487fa6e 100644
--- a/cesar/ce/rx/bitloading/src/bitloading.c
+++ b/cesar/ce/rx/bitloading/src/bitloading.c
@@ -255,6 +255,7 @@ tonemap_t *
ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
uint iteration_max,
tonemask_info_t *tonemask,
+ tonemask_info_t *reducedtm,
ce_rx_bitloading_t *bl)
{
/* Check parameters. */
@@ -267,6 +268,7 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
/* Dynamic table size is not possible (because of compiler bug on stack).
* For the moment being we use a define (even if table is too big). */
dbg_assert (tonemask && tonemask->carrier_nb <= PHY_CARRIER_NB);
+ dbg_assert (reducedtm && reducedtm->carrier_nb <= PHY_CARRIER_NB);
ce_rx_bl_ber_impact_t opti[PHY_FEC_RATE_NB][PHY_CARRIER_NB];
u16 opti_cursor[PHY_FEC_RATE_NB];
uint cpt;
@@ -295,19 +297,19 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
{
/* Make the tone map reach the BER consign, no optimization. */
u64 ber_weighted_sum_q49 =
- ce_rx_bl_update_tone_map_under_ber_consign (ber_cur, tonemask,
+ ce_rx_bl_update_tone_map_under_ber_consign (ber_cur, reducedtm,
fec_rate, bl,
tm[fec_rate],
opti[fec_rate],
&tone_en);
/* Sort optimization table. */
- ce_rx_bl_sort_optimization (opti[fec_rate], tonemask->carrier_nb);
+ ce_rx_bl_sort_optimization (opti[fec_rate], reducedtm->carrier_nb);
/* Optimize tone map to reach BER consign. */
opti_cursor[fec_rate] =
ce_rx_bl_update_tone_map_at_ber_consign (ber_cur,
- tonemask,
+ reducedtm,
bl,
tm[fec_rate],
opti[fec_rate],
@@ -326,7 +328,7 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
/* Get new BER consign. */
ber_cur =
ce_rx_bl_ber_pt_bpt (fec_rate,
- tonemask->carrier_nb,
+ reducedtm->carrier_nb,
(tm[fec_rate]->bits_per_symbol *
CE_RX_BL_BPT_QUANT_FACTOR) / tone_en);
}