1 /****************************************************************************** 2 * @file interpolation_functions_f16.h 3 * @brief Public header file for CMSIS DSP Library 4 * @version V1.9.0 5 * @date 23 April 2021 6 * Target Processor: Cortex-M and Cortex-A cores 7 ******************************************************************************/ 8 /* 9 * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved. 10 * 11 * SPDX-License-Identifier: Apache-2.0 12 * 13 * Licensed under the Apache License, Version 2.0 (the License); you may 14 * not use this file except in compliance with the License. 15 * You may obtain a copy of the License at 16 * 17 * www.apache.org/licenses/LICENSE-2.0 18 * 19 * Unless required by applicable law or agreed to in writing, software 20 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 21 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 * See the License for the specific language governing permissions and 23 * limitations under the License. 24 */ 25 26 27 #ifndef _INTERPOLATION_FUNCTIONS_F16_H_ 28 #define _INTERPOLATION_FUNCTIONS_F16_H_ 29 30 #include "arm_math_types_f16.h" 31 #include "arm_math_memory.h" 32 33 #include "dsp/none.h" 34 #include "dsp/utils.h" 35 36 #ifdef __cplusplus 37 extern "C" 38 { 39 #endif 40 41 #if defined(ARM_FLOAT16_SUPPORTED) 42 43 typedef struct 44 { 45 uint32_t nValues; /**< nValues */ 46 float16_t x1; /**< x1 */ 47 float16_t xSpacing; /**< xSpacing */ 48 float16_t *pYData; /**< pointer to the table of Y values */ 49 } arm_linear_interp_instance_f16; 50 51 /** 52 * @brief Instance structure for the floating-point bilinear interpolation function. 53 */ 54 typedef struct 55 { 56 uint16_t numRows;/**< number of rows in the data table. */ 57 uint16_t numCols;/**< number of columns in the data table. */ 58 float16_t *pData; /**< points to the data table. */ 59 } arm_bilinear_interp_instance_f16; 60 61 /** 62 * @addtogroup LinearInterpolate 63 * @{ 64 */ 65 66 /** 67 * @brief Process function for the floating-point Linear Interpolation Function. 68 * @param[in,out] S is an instance of the floating-point Linear Interpolation structure 69 * @param[in] x input sample to process 70 * @return y processed output sample. 71 * 72 */ 73 float16_t arm_linear_interp_f16( 74 arm_linear_interp_instance_f16 * S, 75 float16_t x); 76 77 /** 78 * @} end of LinearInterpolate group 79 */ 80 81 /** 82 * @addtogroup BilinearInterpolate 83 * @{ 84 */ 85 86 /** 87 * @brief Floating-point bilinear interpolation. 88 * @param[in,out] S points to an instance of the interpolation structure. 89 * @param[in] X interpolation coordinate. 90 * @param[in] Y interpolation coordinate. 91 * @return out interpolated value. 92 */ 93 float16_t arm_bilinear_interp_f16( 94 const arm_bilinear_interp_instance_f16 * S, 95 float16_t X, 96 float16_t Y); 97 98 99 /** 100 * @} end of BilinearInterpolate group 101 */ 102 #endif /*defined(ARM_FLOAT16_SUPPORTED)*/ 103 #ifdef __cplusplus 104 } 105 #endif 106 107 #endif /* ifndef _INTERPOLATION_FUNCTIONS_F16_H_ */ 108