int sss_synch_init(sss_synch_t *q, uint32_t fft_size) { if (q != NULL && fft_size < 2048) { uint32_t N_id_2; struct sss_tables sss_tables; bzero(q, sizeof(sss_synch_t)); if (dft_plan(&q->dftp_input, fft_size, FORWARD, COMPLEX)) { sss_synch_free(q); return LIBLTE_ERROR; } q->fft_size = fft_size; generate_N_id_1_table(q->N_id_1_table); dft_plan_set_mirror(&q->dftp_input, true); dft_plan_set_dc(&q->dftp_input, true); for (N_id_2=0;N_id_2<3;N_id_2++) { generate_sss_all_tables(&sss_tables, N_id_2); convert_tables(&q->fc_tables[N_id_2], &sss_tables); } q->N_id_2 = 0; return LIBLTE_SUCCESS; } return LIBLTE_ERROR_INVALID_INPUTS; }
void sync_free(sync_t *q) { if (q) { pss_synch_free(&q->pss); sss_synch_free(&q->sss); cfo_free(&q->cfocorr); } }
void sync_free(sync_t *q) { int N_id_2; for (N_id_2=0;N_id_2<3;N_id_2++) { pss_synch_free(&q->pss[N_id_2]); sss_synch_free(&q->sss[N_id_2]); } }
int sss_synch_realloc(sss_synch_t *q, uint32_t fft_size) { if (q != NULL && fft_size < 2048) { dft_plan_free(&q->dftp_input); if (dft_plan(&q->dftp_input, fft_size, FORWARD, COMPLEX)) { sss_synch_free(q); return LIBLTE_ERROR; } dft_plan_set_mirror(&q->dftp_input, true); dft_plan_set_dc(&q->dftp_input, true); q->fft_size = fft_size; return LIBLTE_SUCCESS; } return LIBLTE_ERROR_INVALID_INPUTS; }
int sss_synch_stop(sss_synch_hl* hl) { sss_synch_free(&hl->obj); return LIBLTE_SUCCESS; }
int sss_synch_stop(sss_synch_hl* hl) { sss_synch_free(&hl->obj); return 0; }