summaryrefslogtreecommitdiff
path: root/ce
diff options
context:
space:
mode:
authorlacour2008-01-09 15:58:55 +0000
committerlacour2008-01-09 15:58:55 +0000
commit8e85cfc0414a8910a3f3c7b7f3ae446f82ac6328 (patch)
tree67afd1871f7876a16eb052d882873b5c3221f32e /ce
parente009da9c773417d7e8295118661fb1f2ab43f0ea (diff)
Adapt CE behavior with tonemap_index_t enumeration.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1249 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'ce')
-rwxr-xr-xce/src/rx.c5
-rwxr-xr-xce/test/common/src/print_utils.c3
-rwxr-xr-xce/test/rx/Makefile2
-rwxr-xr-xce/test/rx/src/test_rx.c12
-rwxr-xr-xce/test/rx/src/test_sar_integration.c14
5 files changed, 14 insertions, 22 deletions
diff --git a/ce/src/rx.c b/ce/src/rx.c
index e08d2bd85c..d1c120d1b5 100755
--- a/ce/src/rx.c
+++ b/ce/src/rx.c
@@ -87,7 +87,6 @@ sar_mpdu_measurement_cb (void*user, pbproc_rx_params_t *rx_params,
bool
compute_scf (void)
{
- //my_print ("compute scf\n");
bool ret = false;
sta_t *sta;
tonemaps_t *tms;
@@ -120,7 +119,7 @@ compute_scf (void)
{
sta = mac_store_sta_get(ctx.mac_store_ctx, ctx.sound_param.stei);
tms = sta->rx_tonemaps;
- if (tms->default_tmi != TONEMAP_INDEX_NULL)
+ if (tms->default_tmi != TONEMAP_INDEX_INITIAL_START)
{
ret = true;
}
@@ -157,7 +156,7 @@ rxce_compute_measurement (void)
sta_t *ssta = mac_store_sta_get (ctx.mac_store_ctx, rx_params->tei);
dbg_assert (ssta);
//cyg_thread_delay (1);
- if ( ssta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL ) // no default_tonemap
+ if ( ssta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START ) // no default_tonemap
{
rxce_initial (ssta, frame_measurement);
}
diff --git a/ce/test/common/src/print_utils.c b/ce/test/common/src/print_utils.c
index 9301033410..3346765e40 100755
--- a/ce/test/common/src/print_utils.c
+++ b/ce/test/common/src/print_utils.c
@@ -68,7 +68,6 @@ ce_print_tonemap (tonemap_t *tm)
uint i;
if(tm)
{
- ce_print(" present:%d ",tm->present);
ce_print("strict:%d ",tm->strict);
ce_print("cpf:%d ",tm->cpf);
ce_print("fecratio : %d ",tm->fecrate);
@@ -113,7 +112,7 @@ ce_print_tonemaps (tonemaps_t *tms)
for (i=0; i<(int)intervals->intervals_nb; i++)
{
ce_print ("interval[%d]={%.0f,%d} ", i,intervals->interval[i].end_offset_atu*10.24,
- intervals->interval[i].tmi_av);
+ intervals->interval[i].tmi);
}
ce_print ("\n");
}
diff --git a/ce/test/rx/Makefile b/ce/test/rx/Makefile
index de09c440de..241507cdb5 100755
--- a/ce/test/rx/Makefile
+++ b/ce/test/rx/Makefile
@@ -18,7 +18,7 @@ test_fm_host_linux_i386_MODULES = lib mac/common ce ce/test/common
#test_speed_host_linux_i386_MODULES = lib mac/common ce ce/test/common
-ce_MODULE_SOURCES = cei_param.c frame_measurement.c io_utils.c
+ce_MODULE_SOURCES = cei_param.c frame_measurement.c
ce_test_common_MODULE_SOURCES = print_utils.c gaussian.c
mac_common_MODULE_SOURCES = tonemap.c tonemask.c store.c mfs.c sta.c
diff --git a/ce/test/rx/src/test_rx.c b/ce/test/rx/src/test_rx.c
index a569c0e781..f2bc7c148d 100755
--- a/ce/test/rx/src/test_rx.c
+++ b/ce/test/rx/src/test_rx.c
@@ -87,7 +87,7 @@ over_pbproc_init (void)
bool
pbproc_send_scf (void)
{
- //my_print ("\t\t\t\t ACK with scf = %d\n", next_scf);
+ ce_print ("\t\t\t\t ACK with scf = %d\n", next_scf);
bool ret = next_scf;
next_scf = false;
return (ret);
@@ -196,10 +196,9 @@ frame_process (cyg_addrword_t data)
frame->noise = noise;
frame_new (frame);
nb_frame++;
- test_fail_if (status.sta->rxce.stable_ROBO_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_NULL);
- test_fail_if (status.sta->rxce.stable_ROBO_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL);
+ test_fail_if (status.sta->rxce.stable_ROBO_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
+ test_fail_if (status.sta->rxce.stable_ROBO_nb>FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && status.sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START);
blk_release (frame);
- //blk_release (rx_params);
} while (!pbproc_send_scf ());
bitstream_t stream;
bitstream_init (&stream, status.sta->rx_tonemaps->tm[status.sta->rx_tonemaps->default_tmi]->tmdma_desc_head->data, BLK_SIZE, BITSTREAM_READ);
@@ -213,26 +212,21 @@ frame_process (cyg_addrword_t data)
bitstream_access (&stream, &mod, 4);
if (mod==0)
{
- //my_print ("c%d %d > %d?\n",j, worst[j], THR3[1][0]);
test_fail_if (worst[j] <=THR3[1][0]);
}
else
{
if (mod==7)
{
- //my_print ("c%d %d <= %d?\n",j, worst[j], THR3[1][6]);
test_fail_if (worst[j] > THR3[1][6]);
}
else
{
- //my_print ("c%d %d E ]%d,%d]?\n",j, worst[j], THR3[1][mod], THR3[1][mod-1]);
test_fail_if (worst[j]<=THR3[1][mod] || worst[j]>THR3[1][mod-1]);
}
}
}
-
- //my_print ("nb_frame sended = %d\n", nb_frame);
} test_end;
// rxce_process can end to process and free pending frames.
cyg_thread_delay (1);
diff --git a/ce/test/rx/src/test_sar_integration.c b/ce/test/rx/src/test_sar_integration.c
index 6b109cca2b..34512ba582 100755
--- a/ce/test/rx/src/test_sar_integration.c
+++ b/ce/test/rx/src/test_sar_integration.c
@@ -156,7 +156,7 @@ frame_process (cyg_addrword_t data)
cyg_thread_delay (1); //rxce can process
test_begin (test, "check rxce status")
{
- test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_NULL);
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
test_fail_if (!sta->rxce.tm_in_build);
} test_end;
END (sar_ctx, sta, ca);
@@ -171,7 +171,7 @@ frame_process (cyg_addrword_t data)
cyg_thread_delay (1); //rxce can process
test_begin (test, "check rxce status")
{
- test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_NULL);
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
test_fail_if (!sta->rxce.tm_in_build);
} test_end;
END (sar_ctx, sta, ca);
@@ -186,7 +186,7 @@ frame_process (cyg_addrword_t data)
cyg_thread_delay (1); //rxce can process
test_begin (test, "check rxce status")
{
- test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_NULL);
+ test_fail_if (sta->rx_tonemaps->default_tmi != TONEMAP_INDEX_INITIAL_START);
test_fail_if (!sta->rxce.tm_in_build);
} test_end;
END (sar_ctx, sta, ca);
@@ -203,7 +203,7 @@ frame_process (cyg_addrword_t data)
{
run_one_reassembly (sar_ctx, 0);
cyg_thread_delay (1); //rxce can process
- tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
tmp_exists = (int) sta->rxce.tm_in_build;
test_fail_if (n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
test_fail_if (n<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmp_exists);
@@ -230,7 +230,7 @@ frame_process (cyg_addrword_t data)
{
cyg_thread_delay (1); //rxce can process
uint frame_nb = sta->rxce.measurement_computed_nb-1;
- tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
tmp_exists = (int) sta->rxce.tm_in_build;
//my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
@@ -243,7 +243,7 @@ frame_process (cyg_addrword_t data)
{
cyg_thread_delay (1); //rxce can process
uint frame_nb = sta->rxce.measurement_computed_nb-1;
- tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
tmp_exists = (int) sta->rxce.tm_in_build;
//my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);
@@ -256,7 +256,7 @@ frame_process (cyg_addrword_t data)
{
cyg_thread_delay (1); //rxce can process
uint frame_nb = sta->rxce.measurement_computed_nb-1;
- tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_NULL;
+ tmi_null = sta->rx_tonemaps->default_tmi == TONEMAP_INDEX_INITIAL_START;
tmp_exists = (int) sta->rxce.tm_in_build;
//my_print ("%d, tmi_null=%d, tmp_exists=%d\n",frame_nb, tmi_null, tmp_exists);
test_fail_if (frame_nb<FRAME_NB_TO_COMPUTE_IN_INITIAL_STEP && !tmi_null);