mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
4.5 KiB
C
127 lines
4.5 KiB
C
11 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
9 years ago
|
* Copyright 2013-2015 Software Radio Systems Limited
|
||
11 years ago
|
*
|
||
|
* \section LICENSE
|
||
|
*
|
||
10 years ago
|
* This file is part of the srsLTE library.
|
||
11 years ago
|
*
|
||
10 years ago
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
10 years ago
|
* it under the terms of the GNU Affero General Public License as
|
||
11 years ago
|
* published by the Free Software Foundation, either version 3 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
10 years ago
|
* srsLTE is distributed in the hope that it will be useful,
|
||
11 years ago
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
10 years ago
|
* GNU Affero General Public License for more details.
|
||
11 years ago
|
*
|
||
10 years ago
|
* A copy of the GNU Affero General Public License can be found in
|
||
11 years ago
|
* the LICENSE file in the top-level directory of this distribution
|
||
|
* and at http://www.gnu.org/licenses/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
10 years ago
|
/******************************************************************************
|
||
|
* File: interp.h
|
||
|
*
|
||
|
* Description: Linear and vector interpolation
|
||
|
*
|
||
|
* Reference:
|
||
|
*****************************************************************************/
|
||
|
|
||
11 years ago
|
#ifndef INTERP_H
|
||
11 years ago
|
#define INTERP_H
|
||
|
|
||
|
#include <stdint.h>
|
||
9 years ago
|
#include <stdbool.h>
|
||
11 years ago
|
|
||
10 years ago
|
#include "srslte/config.h"
|
||
11 years ago
|
|
||
11 years ago
|
|
||
10 years ago
|
/************* STATIC LINEAR INTERPOLATION FUNCTIONS */
|
||
|
|
||
10 years ago
|
SRSLTE_API cf_t srslte_interp_linear_onesample(cf_t input0,
|
||
9 years ago
|
cf_t input1);
|
||
10 years ago
|
|
||
10 years ago
|
SRSLTE_API cf_t srslte_interp_linear_onesample_cabs(cf_t input0,
|
||
10 years ago
|
cf_t input1);
|
||
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_offset_cabs(cf_t *input,
|
||
10 years ago
|
cf_t *output,
|
||
|
uint32_t M,
|
||
|
uint32_t len,
|
||
|
uint32_t off_st,
|
||
|
uint32_t off_end);
|
||
10 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_f(float *input,
|
||
10 years ago
|
float *output,
|
||
|
uint32_t M,
|
||
|
uint32_t len);
|
||
10 years ago
|
|
||
|
|
||
|
|
||
|
/* Interpolation between vectors */
|
||
|
|
||
|
typedef struct {
|
||
|
cf_t *diff_vec;
|
||
|
uint32_t vector_len;
|
||
10 years ago
|
} srslte_interp_linsrslte_vec_t;
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_interp_linear_vector_init(srslte_interp_linsrslte_vec_t *q,
|
||
|
uint32_t vector_len);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_vector_free(srslte_interp_linsrslte_vec_t *q);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_vector(srslte_interp_linsrslte_vec_t *q,
|
||
|
cf_t *in0,
|
||
|
cf_t *in1,
|
||
|
cf_t *between,
|
||
9 years ago
|
uint32_t in1_in0_d,
|
||
10 years ago
|
uint32_t M);
|
||
11 years ago
|
|
||
9 years ago
|
SRSLTE_API void srslte_interp_linear_vector2(srslte_interp_linsrslte_vec_t *q,
|
||
9 years ago
|
cf_t *in0,
|
||
|
cf_t *in1,
|
||
|
cf_t *start,
|
||
|
cf_t *between,
|
||
9 years ago
|
uint32_t in1_in0_d,
|
||
9 years ago
|
uint32_t M);
|
||
|
|
||
|
SRSLTE_API void srslte_interp_linear_vector3(srslte_interp_linsrslte_vec_t *q,
|
||
|
cf_t *in0,
|
||
|
cf_t *in1,
|
||
|
cf_t *start,
|
||
|
cf_t *between,
|
||
9 years ago
|
uint32_t in1_in0_d,
|
||
9 years ago
|
uint32_t M,
|
||
|
bool to_right,
|
||
|
uint32_t len);
|
||
10 years ago
|
|
||
10 years ago
|
/* Interpolation within a vector */
|
||
|
|
||
|
typedef struct {
|
||
|
cf_t *diff_vec;
|
||
|
cf_t *diff_vec2;
|
||
|
float *ramp;
|
||
|
uint32_t vector_len;
|
||
|
uint32_t M;
|
||
10 years ago
|
} srslte_interp_lin_t;
|
||
10 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_interp_linear_init(srslte_interp_lin_t *q,
|
||
10 years ago
|
uint32_t vector_len,
|
||
|
uint32_t M);
|
||
10 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_free(srslte_interp_lin_t *q);
|
||
10 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_interp_linear_offset(srslte_interp_lin_t *q,
|
||
10 years ago
|
cf_t *input,
|
||
|
cf_t *output,
|
||
|
uint32_t off_st,
|
||
|
uint32_t off_end);
|
||
11 years ago
|
|
||
11 years ago
|
|
||
|
#endif // INTERP_H
|