summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/src/bitloading.c
diff options
context:
space:
mode:
authorjutteau2011-01-04 09:52:04 +0100
committerjutteau2011-01-04 09:52:04 +0100
commit6ca61ab53d06c628ec845c86deb8a6f62a004096 (patch)
tree8fbe23e682989c387e4ea04cab8a4dfaed7f7b26 /cesar/ce/rx/bitloading/src/bitloading.c
parent772a69ed0a5ef5ffbcbca561beceb2fa5bdfc053 (diff)
Revert "cesar/ce/rx/bl: store optimization tables, refs #1934"
This reverts commit 1dba59698130fdf6001e21104d33604cae627d61.
Diffstat (limited to 'cesar/ce/rx/bitloading/src/bitloading.c')
-rw-r--r--cesar/ce/rx/bitloading/src/bitloading.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/cesar/ce/rx/bitloading/src/bitloading.c b/cesar/ce/rx/bitloading/src/bitloading.c
index 5b2cb3457f..14708ebd5e 100644
--- a/cesar/ce/rx/bitloading/src/bitloading.c
+++ b/cesar/ce/rx/bitloading/src/bitloading.c
@@ -136,7 +136,7 @@ ce_rx_bl_update_tone_map_under_ber_consign (u64 ber_pt,
return ber_weighted_sum;
}
-u16
+void
ce_rx_bl_update_tone_map_at_ber_consign (u64 ber_pt,
tonemask_info_t *tonemask,
ce_rx_bitloading_t *bl,
@@ -169,7 +169,7 @@ ce_rx_bl_update_tone_map_at_ber_consign (u64 ber_pt,
* all the remaining tone that can be increase are already at the
* maximum too. So basically, we should stop the algorithm here. */
if (mod == CE_MOD_COUNT - 1)
- return pos;
+ return;
/* Remove from number of bits of the tone map the current value. */
tm->bits_per_symbol -= CE_BIT_PER_MOD[mod];
/* Remove from the summed BER of the tone map the current value. */
@@ -210,7 +210,6 @@ ce_rx_bl_update_tone_map_at_ber_consign (u64 ber_pt,
if (mod == 0)
(*tone_en)--;
}
- return pos;
}
tonemap_t *
@@ -229,9 +228,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);
- ce_rx_bl_ber_impact_t opti[PHY_FEC_RATE_NB][PHY_CARRIER_NB];
- u16 opti_cursor[PHY_FEC_RATE_NB];
- u16 i;
+ ce_rx_bl_ber_impact_t opti[PHY_CARRIER_NB];
u32 sort[PHY_FEC_RATE_NB];
tonemap_t *tm[PHY_FEC_RATE_NB];
uint tone_en;
@@ -259,21 +256,15 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
ce_rx_bl_update_tone_map_under_ber_consign (ber_cur, tonemask,
fec_rate, bl,
tm[fec_rate],
- opti[fec_rate],
- &tone_en);
+ opti, &tone_en);
/* Sort optimization table. */
- ce_rx_bl_sort_optimization (opti[fec_rate], tonemask->carrier_nb);
+ ce_rx_bl_sort_optimization (opti, tonemask->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,
- bl,
- tm[fec_rate],
- opti[fec_rate],
- &ber_weighted_sum,
- &tone_en);
+ ce_rx_bl_update_tone_map_at_ber_consign
+ (ber_cur, tonemask, bl, tm[fec_rate], opti, &ber_weighted_sum,
+ &tone_en);
/* Store previous BER consign. */
ber_prev[fec_rate] = ber_cur;
/* We may have zero bit per symbol (when NSR is high for example).
@@ -341,11 +332,6 @@ ce_rx_bl_compute_tone_map_iterative (const u64 bpt_initial[PHY_FEC_RATE_NB],
tm[good]->ber_target_reached = ber_reached[good];
/* Configure tone map for usage. */
tm[good]->cpf = true;
- /* Copy the optimization table corresponding to the best tone map. */
- for (i = 0; i < PHY_CARRIER_NB; i++)
- bl->opti_table[i] = opti[good][i].carrier_index;
- /* Store the cursor of the optimization table for this tone map. */
- tm[good]->opti_table_cursor = opti_cursor[good];
/* Return best tone map. */
return tm[good];
}