CMSIS-DSP: Added f16 versions of linear and bilinear interpolations
parent
d2d691cc23
commit
71218873eb
@ -0,0 +1,33 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: InterpolationFunctions.c
|
||||
* Description: Combination of all interpolation function source files.
|
||||
*
|
||||
* $Date: 22. July 2020
|
||||
* $Revision: V1.0.0
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2020 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_bilinear_interp_f16.c"
|
||||
#include "arm_linear_interp_f16.c"
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,167 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_bilinear_interp_f16.c
|
||||
* Description: Floating-point bilinear interpolation
|
||||
*
|
||||
* $Date: 22 July 2020
|
||||
* $Revision: V1.9.0
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "dsp/interpolation_functions_f16.h"
|
||||
|
||||
#if defined(ARM_FLOAT16_SUPPORTED)
|
||||
|
||||
|
||||
/**
|
||||
@ingroup groupInterpolation
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup BilinearInterpolate Bilinear Interpolation
|
||||
*
|
||||
* Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid.
|
||||
* The underlying function <code>f(x, y)</code> is sampled on a regular grid and the interpolation process
|
||||
* determines values between the grid points.
|
||||
* Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension.
|
||||
* Bilinear interpolation is often used in image processing to rescale images.
|
||||
* The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
|
||||
*
|
||||
* <b>Algorithm</b>
|
||||
* \par
|
||||
* The instance structure used by the bilinear interpolation functions describes a two dimensional data table.
|
||||
* For floating-point, the instance structure is defined as:
|
||||
* <pre>
|
||||
* typedef struct
|
||||
* {
|
||||
* uint16_t numRows;
|
||||
* uint16_t numCols;
|
||||
* float16_t *pData;
|
||||
* } arm_bilinear_interp_instance_f16;
|
||||
* </pre>
|
||||
*
|
||||
* \par
|
||||
* where <code>numRows</code> specifies the number of rows in the table;
|
||||
* <code>numCols</code> specifies the number of columns in the table;
|
||||
* and <code>pData</code> points to an array of size <code>numRows*numCols</code> values.
|
||||
* The data table <code>pTable</code> is organized in row order and the supplied data values fall on integer indexes.
|
||||
* That is, table element (x,y) is located at <code>pTable[x + y*numCols]</code> where x and y are integers.
|
||||
*
|
||||
* \par
|
||||
* Let <code>(x, y)</code> specify the desired interpolation point. Then define:
|
||||
* <pre>
|
||||
* XF = floor(x)
|
||||
* YF = floor(y)
|
||||
* </pre>
|
||||
* \par
|
||||
* The interpolated output point is computed as:
|
||||
* <pre>
|
||||
* f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF))
|
||||
* + f(XF+1, YF) * (x-XF)*(1-(y-YF))
|
||||
* + f(XF, YF+1) * (1-(x-XF))*(y-YF)
|
||||
* + f(XF+1, YF+1) * (x-XF)*(y-YF)
|
||||
* </pre>
|
||||
* Note that the coordinates (x, y) contain integer and fractional components.
|
||||
* The integer components specify which portion of the table to use while the
|
||||
* fractional components control the interpolation processor.
|
||||
*
|
||||
* \par
|
||||
* if (x,y) are outside of the table boundary, Bilinear interpolation returns zero output.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup BilinearInterpolate
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Floating-point bilinear interpolation.
|
||||
* @param[in,out] S points to an instance of the interpolation structure.
|
||||
* @param[in] X interpolation coordinate.
|
||||
* @param[in] Y interpolation coordinate.
|
||||
* @return out interpolated value.
|
||||
*/
|
||||
float16_t arm_bilinear_interp_f16(
|
||||
const arm_bilinear_interp_instance_f16 * S,
|
||||
float16_t X,
|
||||
float16_t Y)
|
||||
{
|
||||
float16_t out;
|
||||
float16_t f00, f01, f10, f11;
|
||||
float16_t *pData = S->pData;
|
||||
int32_t xIndex, yIndex, index;
|
||||
float16_t xdiff, ydiff;
|
||||
float16_t b1, b2, b3, b4;
|
||||
|
||||
xIndex = (int32_t) X;
|
||||
yIndex = (int32_t) Y;
|
||||
|
||||
/* Care taken for table outside boundary */
|
||||
/* Returns zero output when values are outside table boundary */
|
||||
if (xIndex < 0 || xIndex > (S->numCols - 2) || yIndex < 0 || yIndex > (S->numRows - 2))
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Calculation of index for two nearest points in X-direction */
|
||||
index = (xIndex ) + (yIndex ) * S->numCols;
|
||||
|
||||
|
||||
/* Read two nearest points in X-direction */
|
||||
f00 = pData[index];
|
||||
f01 = pData[index + 1];
|
||||
|
||||
/* Calculation of index for two nearest points in Y-direction */
|
||||
index = (xIndex ) + (yIndex+1) * S->numCols;
|
||||
|
||||
|
||||
/* Read two nearest points in Y-direction */
|
||||
f10 = pData[index];
|
||||
f11 = pData[index + 1];
|
||||
|
||||
/* Calculation of intermediate values */
|
||||
b1 = f00;
|
||||
b2 = f01 - f00;
|
||||
b3 = f10 - f00;
|
||||
b4 = f00 - f01 - f10 + f11;
|
||||
|
||||
/* Calculation of fractional part in X */
|
||||
xdiff = X - xIndex;
|
||||
|
||||
/* Calculation of fractional part in Y */
|
||||
ydiff = Y - yIndex;
|
||||
|
||||
/* Calculation of bi-linear interpolated output */
|
||||
out = b1 + b2 * xdiff + b3 * ydiff + b4 * xdiff * ydiff;
|
||||
|
||||
/* return to application */
|
||||
return (out);
|
||||
}
|
||||
|
||||
/**
|
||||
* @} end of BilinearInterpolate group
|
||||
*/
|
||||
|
||||
|
||||
#endif /* #if defined(ARM_FLOAT16_SUPPORTED) */
|
||||
|
||||
@ -0,0 +1,131 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_linear_interp_f16.c
|
||||
* Description: Floating-point linear interpolation
|
||||
*
|
||||
* $Date: 22 July 2020
|
||||
* $Revision: V1.9.0
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "dsp/interpolation_functions_f16.h"
|
||||
|
||||
#if defined(ARM_FLOAT16_SUPPORTED)
|
||||
|
||||
|
||||
/**
|
||||
@ingroup groupInterpolation
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup LinearInterpolate Linear Interpolation
|
||||
*
|
||||
* Linear interpolation is a method of curve fitting using linear polynomials.
|
||||
* Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
|
||||
*
|
||||
* \par
|
||||
* \image html LinearInterp.gif "Linear interpolation"
|
||||
*
|
||||
* \par
|
||||
* A Linear Interpolate function calculates an output value(y), for the input(x)
|
||||
* using linear interpolation of the input values x0, x1( nearest input values) and the output values y0 and y1(nearest output values)
|
||||
*
|
||||
* \par Algorithm:
|
||||
* <pre>
|
||||
* y = y0 + (x - x0) * ((y1 - y0)/(x1-x0))
|
||||
* where x0, x1 are nearest values of input x
|
||||
* y0, y1 are nearest values to output y
|
||||
* </pre>
|
||||
*
|
||||
* \par
|
||||
* This set of functions implements Linear interpolation process
|
||||
* for Q7, Q15, Q31, and floating-point data types. The functions operate on a single
|
||||
* sample of data and each call to the function returns a single processed value.
|
||||
* <code>S</code> points to an instance of the Linear Interpolate function data structure.
|
||||
* <code>x</code> is the input sample value. The functions returns the output value.
|
||||
*
|
||||
* \par
|
||||
* if x is outside of the table boundary, Linear interpolation returns first value of the table
|
||||
* if x is below input range and returns last value of table if x is above range.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup LinearInterpolate
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Process function for the floating-point Linear Interpolation Function.
|
||||
* @param[in,out] S is an instance of the floating-point Linear Interpolation structure
|
||||
* @param[in] x input sample to process
|
||||
* @return y processed output sample.
|
||||
*
|
||||
*/
|
||||
float16_t arm_linear_interp_f16(
|
||||
arm_linear_interp_instance_f16 * S,
|
||||
float16_t x)
|
||||
{
|
||||
float16_t y;
|
||||
float16_t x0, x1; /* Nearest input values */
|
||||
float16_t y0, y1; /* Nearest output values */
|
||||
float16_t xSpacing = S->xSpacing; /* spacing between input values */
|
||||
int32_t i; /* Index variable */
|
||||
float16_t *pYData = S->pYData; /* pointer to output table */
|
||||
|
||||
/* Calculation of index */
|
||||
i = (int32_t) ((x - S->x1) / xSpacing);
|
||||
|
||||
if (i < 0)
|
||||
{
|
||||
/* Iniatilize output for below specified range as least output value of table */
|
||||
y = pYData[0];
|
||||
}
|
||||
else if ((uint32_t)i >= (S->nValues - 1))
|
||||
{
|
||||
/* Iniatilize output for above specified range as last output value of table */
|
||||
y = pYData[S->nValues - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Calculation of nearest input values */
|
||||
x0 = S->x1 + i * xSpacing;
|
||||
x1 = S->x1 + (i + 1) * xSpacing;
|
||||
|
||||
/* Read of nearest output values */
|
||||
y0 = pYData[i];
|
||||
y1 = pYData[i + 1];
|
||||
|
||||
/* Calculation of output */
|
||||
y = y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
|
||||
|
||||
}
|
||||
|
||||
/* returns output value */
|
||||
return (y);
|
||||
}
|
||||
|
||||
/**
|
||||
* @} end of LinearInterpolate group
|
||||
*/
|
||||
|
||||
|
||||
#endif /* #if defined(ARM_FLOAT16_SUPPORTED) */
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
#include "Test.h"
|
||||
#include "Pattern.h"
|
||||
|
||||
#include "dsp/interpolation_functions_f16.h"
|
||||
|
||||
class InterpolationTestsF16:public Client::Suite
|
||||
{
|
||||
public:
|
||||
InterpolationTestsF16(Testing::testID_t id);
|
||||
virtual void setUp(Testing::testID_t,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr);
|
||||
virtual void tearDown(Testing::testID_t,Client::PatternMgr *mgr);
|
||||
private:
|
||||
#include "InterpolationTestsF16_decl.h"
|
||||
|
||||
Client::Pattern<float16_t> input;
|
||||
Client::Pattern<float16_t> y;
|
||||
Client::Pattern<int16_t> config;
|
||||
Client::LocalPattern<float16_t> output;
|
||||
// Reference patterns are not loaded when we are in dump mode
|
||||
Client::RefPattern<float16_t> ref;
|
||||
|
||||
arm_linear_interp_instance_f16 S;
|
||||
arm_bilinear_interp_instance_f16 SBI;
|
||||
|
||||
|
||||
Client::Pattern<float16_t> inputX;
|
||||
Client::Pattern<float16_t> inputY;
|
||||
Client::Pattern<float16_t> outputX;
|
||||
|
||||
Client::LocalPattern<float16_t> buffer;
|
||||
Client::LocalPattern<float16_t> splineCoefs;
|
||||
|
||||
};
|
||||
@ -0,0 +1,6 @@
|
||||
H
|
||||
2
|
||||
// 7
|
||||
0x0007
|
||||
// 8
|
||||
0x0008
|
||||
@ -0,0 +1,82 @@
|
||||
H
|
||||
40
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.500000
|
||||
0x3e00
|
||||
// 2.500000
|
||||
0x4100
|
||||
// 3.500000
|
||||
0x4300
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 6.500000
|
||||
0x4680
|
||||
// 7.500000
|
||||
0x4780
|
||||
// 8.500000
|
||||
0x4840
|
||||
// 9.500000
|
||||
0x48c0
|
||||
// 10.500000
|
||||
0x4940
|
||||
// 11.500000
|
||||
0x49c0
|
||||
// 12.500000
|
||||
0x4a40
|
||||
// 13.500000
|
||||
0x4ac0
|
||||
// 14.500000
|
||||
0x4b40
|
||||
// 15.500000
|
||||
0x4bc0
|
||||
// 16.500000
|
||||
0x4c20
|
||||
// 17.500000
|
||||
0x4c60
|
||||
// 18.500000
|
||||
0x4ca0
|
||||
// 19.500000
|
||||
0x4ce0
|
||||
// 20.500000
|
||||
0x4d20
|
||||
// 21.500000
|
||||
0x4d60
|
||||
// 22.500000
|
||||
0x4da0
|
||||
// 23.500000
|
||||
0x4de0
|
||||
// 24.500000
|
||||
0x4e20
|
||||
// 25.500000
|
||||
0x4e60
|
||||
// 26.500000
|
||||
0x4ea0
|
||||
// 27.500000
|
||||
0x4ee0
|
||||
// 28.500000
|
||||
0x4f20
|
||||
// 29.500000
|
||||
0x4f60
|
||||
// 30.500000
|
||||
0x4fa0
|
||||
// 31.500000
|
||||
0x4fe0
|
||||
// 32.500000
|
||||
0x5010
|
||||
// 33.500000
|
||||
0x5030
|
||||
// 34.500000
|
||||
0x5050
|
||||
// 35.500000
|
||||
0x5070
|
||||
// 36.500000
|
||||
0x5090
|
||||
// 37.500000
|
||||
0x50b0
|
||||
// 38.500000
|
||||
0x50d0
|
||||
// 39.500000
|
||||
0x50f0
|
||||
@ -0,0 +1,602 @@
|
||||
H
|
||||
300
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 0.857143
|
||||
0x3adb
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 1.214286
|
||||
0x3cdb
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 1.571429
|
||||
0x3e49
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 1.928571
|
||||
0x3fb7
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 2.285714
|
||||
0x4092
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 2.642857
|
||||
0x4149
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 3.357143
|
||||
0x42b7
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 3.714286
|
||||
0x436e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 4.071429
|
||||
0x4412
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 4.428571
|
||||
0x446e
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 4.785714
|
||||
0x44c9
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 5.142857
|
||||
0x4525
|
||||
// 0.500000
|
||||
0x3800
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 0.944444
|
||||
0x3b8e
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 1.388889
|
||||
0x3d8e
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 1.833333
|
||||
0x3f55
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 2.277778
|
||||
0x408e
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 2.722222
|
||||
0x4172
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 3.166667
|
||||
0x4255
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 3.611111
|
||||
0x4339
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 4.055556
|
||||
0x440e
|
||||
// 5.500000
|
||||
0x4580
|
||||
// 4.500000
|
||||
0x4480
|
||||
// 5.500000
|
||||
0x4580
|
||||
@ -0,0 +1,10 @@
|
||||
H
|
||||
4
|
||||
// 0.000000
|
||||
0x0
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 10.000000
|
||||
0x4900
|
||||
// 20.000000
|
||||
0x4d00
|
||||
@ -0,0 +1,20 @@
|
||||
H
|
||||
9
|
||||
// 0.000000
|
||||
0x0
|
||||
// 0.785398
|
||||
0x3a48
|
||||
// 1.570796
|
||||
0x3e48
|
||||
// 2.356194
|
||||
0x40b6
|
||||
// 3.141593
|
||||
0x4248
|
||||
// 3.926991
|
||||
0x43db
|
||||
// 4.712389
|
||||
0x44b6
|
||||
// 5.497787
|
||||
0x457f
|
||||
// 6.283185
|
||||
0x4648
|
||||
@ -0,0 +1,8 @@
|
||||
H
|
||||
3
|
||||
// 0.000000
|
||||
0x0
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 10.000000
|
||||
0x4900
|
||||
@ -0,0 +1,10 @@
|
||||
H
|
||||
4
|
||||
// 0.000000
|
||||
0x0
|
||||
// 9.000000
|
||||
0x4880
|
||||
// 100.000000
|
||||
0x5640
|
||||
// 400.000000
|
||||
0x5e40
|
||||
@ -0,0 +1,20 @@
|
||||
H
|
||||
9
|
||||
// 0.000000
|
||||
0x0
|
||||
// 0.707107
|
||||
0x39a8
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 0.707107
|
||||
0x39a8
|
||||
// 0.000000
|
||||
0x0
|
||||
// -0.707107
|
||||
0xb9a8
|
||||
// -1.000000
|
||||
0xbc00
|
||||
// -0.707107
|
||||
0xb9a8
|
||||
// -0.000000
|
||||
0x8000
|
||||
@ -0,0 +1,8 @@
|
||||
H
|
||||
3
|
||||
// 0.000000
|
||||
0x0
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 10.000000
|
||||
0x4900
|
||||
@ -0,0 +1,42 @@
|
||||
H
|
||||
20
|
||||
// 0.000000
|
||||
0x0
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 2.000000
|
||||
0x4000
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 4.000000
|
||||
0x4400
|
||||
// 5.000000
|
||||
0x4500
|
||||
// 6.000000
|
||||
0x4600
|
||||
// 7.000000
|
||||
0x4700
|
||||
// 8.000000
|
||||
0x4800
|
||||
// 9.000000
|
||||
0x4880
|
||||
// 10.000000
|
||||
0x4900
|
||||
// 11.000000
|
||||
0x4980
|
||||
// 12.000000
|
||||
0x4a00
|
||||
// 13.000000
|
||||
0x4a80
|
||||
// 14.000000
|
||||
0x4b00
|
||||
// 15.000000
|
||||
0x4b80
|
||||
// 16.000000
|
||||
0x4c00
|
||||
// 17.000000
|
||||
0x4c40
|
||||
// 18.000000
|
||||
0x4c80
|
||||
// 19.000000
|
||||
0x4cc0
|
||||
@ -0,0 +1,68 @@
|
||||
H
|
||||
33
|
||||
// 0.000000
|
||||
0x0
|
||||
// 0.196350
|
||||
0x3248
|
||||
// 0.392699
|
||||
0x3648
|
||||
// 0.589049
|
||||
0x38b6
|
||||
// 0.785398
|
||||
0x3a48
|
||||
// 0.981748
|
||||
0x3bdb
|
||||
// 1.178097
|
||||
0x3cb6
|
||||
// 1.374447
|
||||
0x3d7f
|
||||
// 1.570796
|
||||
0x3e48
|
||||
// 1.767146
|
||||
0x3f12
|
||||
// 1.963495
|
||||
0x3fdb
|
||||
// 2.159845
|
||||
0x4052
|
||||
// 2.356194
|
||||
0x40b6
|
||||
// 2.552544
|
||||
0x411b
|
||||
// 2.748894
|
||||
0x417f
|
||||
// 2.945243
|
||||
0x41e4
|
||||
// 3.141593
|
||||
0x4248
|
||||
// 3.337942
|
||||
0x42ad
|
||||
// 3.534292
|
||||
0x4312
|
||||
// 3.730641
|
||||
0x4376
|
||||
// 3.926991
|
||||
0x43db
|
||||
// 4.123340
|
||||
0x4420
|
||||
// 4.319690
|
||||
0x4452
|
||||
// 4.516039
|
||||
0x4484
|
||||
// 4.712389
|
||||
0x44b6
|
||||
// 4.908739
|
||||
0x44e9
|
||||
// 5.105088
|
||||
0x451b
|
||||
// 5.301438
|
||||
0x454d
|
||||
// 5.497787
|
||||
0x457f
|
||||
// 5.694137
|
||||
0x45b2
|
||||
// 5.890486
|
||||
0x45e4
|
||||
// 6.086836
|
||||
0x4616
|
||||
// 6.283185
|
||||
0x4648
|
||||
@ -0,0 +1,62 @@
|
||||
H
|
||||
30
|
||||
// -10.000000
|
||||
0xc900
|
||||
// -9.000000
|
||||
0xc880
|
||||
// -8.000000
|
||||
0xc800
|
||||
// -7.000000
|
||||
0xc700
|
||||
// -6.000000
|
||||
0xc600
|
||||
// -5.000000
|
||||
0xc500
|
||||
// -4.000000
|
||||
0xc400
|
||||
// -3.000000
|
||||
0xc200
|
||||
// -2.000000
|
||||
0xc000
|
||||
// -1.000000
|
||||
0xbc00
|
||||
// 0.000000
|
||||
0x0
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 2.000000
|
||||
0x4000
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 4.000000
|
||||
0x4400
|
||||
// 5.000000
|
||||
0x4500
|
||||
// 6.000000
|
||||
0x4600
|
||||
// 7.000000
|
||||
0x4700
|
||||
// 8.000000
|
||||
0x4800
|
||||
// 9.000000
|
||||
0x4880
|
||||
// 10.000000
|
||||
0x4900
|
||||
// 11.000000
|
||||
0x4980
|
||||
// 12.000000
|
||||
0x4a00
|
||||
// 13.000000
|
||||
0x4a80
|
||||
// 14.000000
|
||||
0x4b00
|
||||
// 15.000000
|
||||
0x4b80
|
||||
// 16.000000
|
||||
0x4c00
|
||||
// 17.000000
|
||||
0x4c40
|
||||
// 18.000000
|
||||
0x4c80
|
||||
// 19.000000
|
||||
0x4cc0
|
||||
@ -0,0 +1,82 @@
|
||||
H
|
||||
40
|
||||
// 0.999836
|
||||
0x3c00
|
||||
// 0.997208
|
||||
0x3bfa
|
||||
// 0.984118
|
||||
0x3bdf
|
||||
// 0.945255
|
||||
0x3b90
|
||||
// 0.859251
|
||||
0x3ae0
|
||||
// 0.702426
|
||||
0x399f
|
||||
// 0.456301
|
||||
0x374d
|
||||
// 0.119531
|
||||
0x2fa6
|
||||
// -0.277482
|
||||
0xb471
|
||||
// -0.661314
|
||||
0xb94a
|
||||
// -0.918537
|
||||
0xbb59
|
||||
// -0.925695
|
||||
0xbb68
|
||||
// -0.611097
|
||||
0xb8e4
|
||||
// -0.030945
|
||||
0xa7ec
|
||||
// 0.589481
|
||||
0x38b7
|
||||
// 0.915804
|
||||
0x3b54
|
||||
// 0.695054
|
||||
0x398f
|
||||
// -0.004498
|
||||
0x9c9b
|
||||
// -0.712082
|
||||
0xb9b2
|
||||
// -0.829765
|
||||
0xbaa3
|
||||
// -0.183298
|
||||
0xb1de
|
||||
// 0.647457
|
||||
0x392e
|
||||
// 0.765024
|
||||
0x3a1f
|
||||
// -0.024301
|
||||
0xa639
|
||||
// -0.770387
|
||||
0xba2a
|
||||
// -0.447708
|
||||
0xb72a
|
||||
// 0.521104
|
||||
0x382b
|
||||
// 0.650064
|
||||
0x3933
|
||||
// -0.298863
|
||||
0xb4c8
|
||||
// -0.688210
|
||||
0xb981
|
||||
// 0.207648
|
||||
0x32a5
|
||||
// 0.656951
|
||||
0x3941
|
||||
// -0.253282
|
||||
0xb40d
|
||||
// -0.570816
|
||||
0xb891
|
||||
// 0.398647
|
||||
0x3661
|
||||
// 0.379176
|
||||
0x3611
|
||||
// -0.548368
|
||||
0xb863
|
||||
// -0.036721
|
||||
0xa8b3
|
||||
// 0.524152
|
||||
0x3831
|
||||
// -0.358152
|
||||
0xb5bb
|
||||
@ -0,0 +1,302 @@
|
||||
H
|
||||
150
|
||||
// 0.373384
|
||||
0x35f9
|
||||
// 0.203820
|
||||
0x3286
|
||||
// 0.011612
|
||||
0x21f2
|
||||
// -0.183830
|
||||
0xb1e2
|
||||
// -0.345125
|
||||
0xb586
|
||||
// -0.485933
|
||||
0xb7c6
|
||||
// -0.560815
|
||||
0xb87d
|
||||
// -0.525820
|
||||
0xb835
|
||||
// -0.435634
|
||||
0xb6f8
|
||||
// 0.040890
|
||||
0x293c
|
||||
// 0.026219
|
||||
0x26b6
|
||||
// -0.324983
|
||||
0xb533
|
||||
// -0.122774
|
||||
0xafdc
|
||||
// 0.158492
|
||||
0x3112
|
||||
// 0.004431
|
||||
0x1c8a
|
||||
// -0.410827
|
||||
0xb693
|
||||
// -0.590305
|
||||
0xb8b9
|
||||
// -0.376814
|
||||
0xb607
|
||||
// -0.151634
|
||||
0xb0da
|
||||
// 0.155369
|
||||
0x30f9
|
||||
// -0.057384
|
||||
0xab58
|
||||
// -0.300094
|
||||
0xb4cd
|
||||
// -0.099685
|
||||
0xae61
|
||||
// 0.164026
|
||||
0x3140
|
||||
// 0.075748
|
||||
0x2cd9
|
||||
// -0.223723
|
||||
0xb329
|
||||
// -0.350221
|
||||
0xb59b
|
||||
// -0.188431
|
||||
0xb208
|
||||
// -0.028933
|
||||
0xa768
|
||||
// 0.114515
|
||||
0x2f54
|
||||
// 0.034722
|
||||
0x2872
|
||||
// 0.093922
|
||||
0x2e03
|
||||
// 0.028388
|
||||
0x2744
|
||||
// -0.054967
|
||||
0xab09
|
||||
// -0.038428
|
||||
0xa8eb
|
||||
// 0.038047
|
||||
0x28df
|
||||
// 0.069578
|
||||
0x2c74
|
||||
// 0.026203
|
||||
0x26b5
|
||||
// -0.013765
|
||||
0xa30c
|
||||
// -0.029893
|
||||
0xa7a7
|
||||
// 0.126828
|
||||
0x300f
|
||||
// 0.487939
|
||||
0x37cf
|
||||
// 0.156461
|
||||
0x3102
|
||||
// -0.273959
|
||||
0xb462
|
||||
// -0.152604
|
||||
0xb0e2
|
||||
// 0.299816
|
||||
0x34cc
|
||||
// 0.489377
|
||||
0x37d4
|
||||
// 0.240837
|
||||
0x33b5
|
||||
// 0.001402
|
||||
0x15be
|
||||
// -0.174301
|
||||
0xb194
|
||||
// -0.145827
|
||||
0xb0ab
|
||||
// 0.144655
|
||||
0x30a1
|
||||
// 0.077152
|
||||
0x2cf0
|
||||
// -0.041492
|
||||
0xa950
|
||||
// 0.115844
|
||||
0x2f6a
|
||||
// 0.438769
|
||||
0x3705
|
||||
// 0.583165
|
||||
0x38aa
|
||||
// 0.430014
|
||||
0x36e1
|
||||
// 0.250144
|
||||
0x3401
|
||||
// -0.116764
|
||||
0xaf79
|
||||
// -0.509673
|
||||
0xb814
|
||||
// -0.382953
|
||||
0xb621
|
||||
// -0.054002
|
||||
0xaaea
|
||||
// 0.303839
|
||||
0x34dd
|
||||
// 0.479948
|
||||
0x37ae
|
||||
// 0.547017
|
||||
0x3860
|
||||
// 0.595451
|
||||
0x38c3
|
||||
// 0.612827
|
||||
0x38e7
|
||||
// 0.557279
|
||||
0x3875
|
||||
// -0.008740
|
||||
0xa07a
|
||||
// -0.873518
|
||||
0xbafd
|
||||
// -0.910562
|
||||
0xbb49
|
||||
// -0.185156
|
||||
0xb1ed
|
||||
// 0.649170
|
||||
0x3932
|
||||
// 0.844051
|
||||
0x3ac1
|
||||
// 0.655264
|
||||
0x393e
|
||||
// 0.607736
|
||||
0x38dd
|
||||
// 0.795640
|
||||
0x3a5d
|
||||
// 0.864414
|
||||
0x3aea
|
||||
// 0.099283
|
||||
0x2e5b
|
||||
// -0.814436
|
||||
0xba84
|
||||
// -0.928275
|
||||
0xbb6d
|
||||
// -0.201519
|
||||
0xb273
|
||||
// 0.645323
|
||||
0x392a
|
||||
// 0.793662
|
||||
0x3a59
|
||||
// 0.522901
|
||||
0x382f
|
||||
// 0.437868
|
||||
0x3702
|
||||
// 0.662386
|
||||
0x394d
|
||||
// 0.777657
|
||||
0x3a39
|
||||
// 0.128210
|
||||
0x301a
|
||||
// -0.755355
|
||||
0xba0b
|
||||
// -0.945988
|
||||
0xbb91
|
||||
// -0.217881
|
||||
0xb2f9
|
||||
// 0.641475
|
||||
0x3922
|
||||
// 0.743273
|
||||
0x39f2
|
||||
// 0.390537
|
||||
0x3640
|
||||
// 0.268001
|
||||
0x344a
|
||||
// 0.529132
|
||||
0x383c
|
||||
// 0.690901
|
||||
0x3987
|
||||
// 0.157136
|
||||
0x3107
|
||||
// -0.719795
|
||||
0xb9c2
|
||||
// -0.950653
|
||||
0xbb9b
|
||||
// -0.225545
|
||||
0xb338
|
||||
// 0.636130
|
||||
0x3917
|
||||
// 0.712439
|
||||
0x39b3
|
||||
// 0.317528
|
||||
0x3515
|
||||
// 0.175498
|
||||
0x319e
|
||||
// 0.454936
|
||||
0x3747
|
||||
// 0.640823
|
||||
0x3920
|
||||
// 0.171852
|
||||
0x3180
|
||||
// -0.778323
|
||||
0xba3a
|
||||
// -0.903125
|
||||
0xbb3a
|
||||
// -0.198415
|
||||
0xb259
|
||||
// 0.624797
|
||||
0x3900
|
||||
// 0.759823
|
||||
0x3a14
|
||||
// 0.481938
|
||||
0x37b6
|
||||
// 0.392455
|
||||
0x3647
|
||||
// 0.616975
|
||||
0x38f0
|
||||
// 0.737463
|
||||
0x39e6
|
||||
// 0.129721
|
||||
0x3027
|
||||
// -0.836852
|
||||
0xbab2
|
||||
// -0.855598
|
||||
0xbad8
|
||||
// -0.171286
|
||||
0xb17b
|
||||
// 0.613463
|
||||
0x38e8
|
||||
// 0.807207
|
||||
0x3a75
|
||||
// 0.646348
|
||||
0x392c
|
||||
// 0.609412
|
||||
0x38e0
|
||||
// 0.779014
|
||||
0x3a3b
|
||||
// 0.834102
|
||||
0x3aac
|
||||
// 0.087591
|
||||
0x2d9b
|
||||
// -0.681885
|
||||
0xb975
|
||||
// -0.591371
|
||||
0xb8bb
|
||||
// -0.101033
|
||||
0xae77
|
||||
// 0.446422
|
||||
0x3725
|
||||
// 0.648792
|
||||
0x3931
|
||||
// 0.644111
|
||||
0x3927
|
||||
// 0.668335
|
||||
0x3959
|
||||
// 0.740732
|
||||
0x39ed
|
||||
// 0.717385
|
||||
0x39bd
|
||||
// 0.023824
|
||||
0x2619
|
||||
// -0.206676
|
||||
0xb29d
|
||||
// -0.002096
|
||||
0x984b
|
||||
// 0.033904
|
||||
0x2857
|
||||
// 0.045820
|
||||
0x29dd
|
||||
// 0.181680
|
||||
0x31d0
|
||||
// 0.391905
|
||||
0x3645
|
||||
// 0.490207
|
||||
0x37d8
|
||||
// 0.401969
|
||||
0x366e
|
||||
// 0.280633
|
||||
0x347d
|
||||
// -0.072398
|
||||
0xaca2
|
||||
@ -0,0 +1,42 @@
|
||||
H
|
||||
20
|
||||
// 0.000000
|
||||
0x0
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 4.000000
|
||||
0x4400
|
||||
// 9.000000
|
||||
0x4880
|
||||
// 16.000000
|
||||
0x4c00
|
||||
// 25.000000
|
||||
0x4e40
|
||||
// 36.000000
|
||||
0x5080
|
||||
// 49.000000
|
||||
0x5220
|
||||
// 64.000000
|
||||
0x5400
|
||||
// 81.000000
|
||||
0x5510
|
||||
// 100.000000
|
||||
0x5640
|
||||
// 121.000000
|
||||
0x5790
|
||||
// 144.000000
|
||||
0x5880
|
||||
// 169.000000
|
||||
0x5948
|
||||
// 196.000000
|
||||
0x5a20
|
||||
// 225.000000
|
||||
0x5b08
|
||||
// 256.000000
|
||||
0x5c00
|
||||
// 289.000000
|
||||
0x5c84
|
||||
// 324.000000
|
||||
0x5d10
|
||||
// 361.000000
|
||||
0x5da4
|
||||
@ -0,0 +1,68 @@
|
||||
H
|
||||
33
|
||||
// 0.000000
|
||||
0x0
|
||||
// 0.194708
|
||||
0x323b
|
||||
// 0.382243
|
||||
0x361e
|
||||
// 0.555433
|
||||
0x3872
|
||||
// 0.707107
|
||||
0x39a8
|
||||
// 0.830791
|
||||
0x3aa5
|
||||
// 0.922816
|
||||
0x3b62
|
||||
// 0.980209
|
||||
0x3bd7
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 0.980209
|
||||
0x3bd7
|
||||
// 0.922816
|
||||
0x3b62
|
||||
// 0.830791
|
||||
0x3aa5
|
||||
// 0.707107
|
||||
0x39a8
|
||||
// 0.555433
|
||||
0x3872
|
||||
// 0.382243
|
||||
0x361e
|
||||
// 0.194708
|
||||
0x323b
|
||||
// 0.000000
|
||||
0x0
|
||||
// -0.194708
|
||||
0xb23b
|
||||
// -0.382243
|
||||
0xb61e
|
||||
// -0.555433
|
||||
0xb872
|
||||
// -0.707107
|
||||
0xb9a8
|
||||
// -0.830791
|
||||
0xbaa5
|
||||
// -0.922816
|
||||
0xbb62
|
||||
// -0.980209
|
||||
0xbbd7
|
||||
// -1.000000
|
||||
0xbc00
|
||||
// -0.980209
|
||||
0xbbd7
|
||||
// -0.922816
|
||||
0xbb62
|
||||
// -0.830791
|
||||
0xbaa5
|
||||
// -0.707107
|
||||
0xb9a8
|
||||
// -0.555433
|
||||
0xb872
|
||||
// -0.382243
|
||||
0xb61e
|
||||
// -0.194708
|
||||
0xb23b
|
||||
// -0.000000
|
||||
0x8000
|
||||
@ -0,0 +1,62 @@
|
||||
H
|
||||
30
|
||||
// -10.000000
|
||||
0xc900
|
||||
// -9.000000
|
||||
0xc880
|
||||
// -8.000000
|
||||
0xc800
|
||||
// -7.000000
|
||||
0xc700
|
||||
// -6.000000
|
||||
0xc600
|
||||
// -5.000000
|
||||
0xc500
|
||||
// -4.000000
|
||||
0xc400
|
||||
// -3.000000
|
||||
0xc200
|
||||
// -2.000000
|
||||
0xc000
|
||||
// -1.000000
|
||||
0xbc00
|
||||
// 0.000000
|
||||
0x0
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 2.000000
|
||||
0x4000
|
||||
// 3.000000
|
||||
0x4200
|
||||
// 4.000000
|
||||
0x4400
|
||||
// 5.000000
|
||||
0x4500
|
||||
// 6.000000
|
||||
0x4600
|
||||
// 7.000000
|
||||
0x4700
|
||||
// 8.000000
|
||||
0x4800
|
||||
// 9.000000
|
||||
0x4880
|
||||
// 10.000000
|
||||
0x4900
|
||||
// 11.000000
|
||||
0x4980
|
||||
// 12.000000
|
||||
0x4a00
|
||||
// 13.000000
|
||||
0x4a80
|
||||
// 14.000000
|
||||
0x4b00
|
||||
// 15.000000
|
||||
0x4b80
|
||||
// 16.000000
|
||||
0x4c00
|
||||
// 17.000000
|
||||
0x4c40
|
||||
// 18.000000
|
||||
0x4c80
|
||||
// 19.000000
|
||||
0x4cc0
|
||||
@ -0,0 +1,84 @@
|
||||
H
|
||||
41
|
||||
// 1.000000
|
||||
0x3c00
|
||||
// 0.999671
|
||||
0x3bff
|
||||
// 0.994745
|
||||
0x3bf5
|
||||
// 0.973491
|
||||
0x3bca
|
||||
// 0.917019
|
||||
0x3b56
|
||||
// 0.801483
|
||||
0x3a69
|
||||
// 0.603369
|
||||
0x38d4
|
||||
// 0.309233
|
||||
0x34f3
|
||||
// -0.070172
|
||||
0xac7e
|
||||
// -0.484793
|
||||
0xb7c2
|
||||
// -0.837836
|
||||
0xbab4
|
||||
// -0.999238
|
||||
0xbbfe
|
||||
// -0.852151
|
||||
0xbad1
|
||||
// -0.370043
|
||||
0xb5ec
|
||||
// 0.308154
|
||||
0x34ee
|
||||
// 0.870807
|
||||
0x3af7
|
||||
// 0.960802
|
||||
0x3bb0
|
||||
// 0.429307
|
||||
0x36de
|
||||
// -0.438304
|
||||
0xb703
|
||||
// -0.985860
|
||||
0xbbe3
|
||||
// -0.673670
|
||||
0xb964
|
||||
// 0.307075
|
||||
0x34ea
|
||||
// 0.987839
|
||||
0x3be7
|
||||
// 0.542209
|
||||
0x3856
|
||||
// -0.590811
|
||||
0xb8ba
|
||||
// -0.949963
|
||||
0xbb9a
|
||||
// 0.054547
|
||||
0x2afb
|
||||
// 0.987662
|
||||
0x3be7
|
||||
// 0.312466
|
||||
0x3500
|
||||
// -0.910193
|
||||
0xbb48
|
||||
// -0.466228
|
||||
0xb776
|
||||
// 0.881524
|
||||
0x3b0d
|
||||
// 0.432377
|
||||
0x36eb
|
||||
// -0.938941
|
||||
0xbb83
|
||||
// -0.202690
|
||||
0xb27c
|
||||
// 0.999984
|
||||
0x3c00
|
||||
// -0.241631
|
||||
0xb3bb
|
||||
// -0.855104
|
||||
0xbad7
|
||||
// 0.781662
|
||||
0x3a41
|
||||
// 0.266643
|
||||
0x3444
|
||||
// -0.982948
|
||||
0xbbdd
|
||||
@ -0,0 +1,114 @@
|
||||
H
|
||||
56
|
||||
// 0.764099
|
||||
0x3a1d
|
||||
// 0.954734
|
||||
0x3ba3
|
||||
// -0.986643
|
||||
0xbbe5
|
||||
// -0.438943
|
||||
0xb706
|
||||
// -0.922467
|
||||
0xbb61
|
||||
// 0.683706
|
||||
0x3978
|
||||
// -0.724533
|
||||
0xb9cc
|
||||
// 0.364190
|
||||
0x35d4
|
||||
// -0.589486
|
||||
0xb8b7
|
||||
// 0.472403
|
||||
0x378f
|
||||
// -0.708934
|
||||
0xb9ac
|
||||
// -0.067933
|
||||
0xac59
|
||||
// 0.470253
|
||||
0x3786
|
||||
// 0.886085
|
||||
0x3b17
|
||||
// -0.328930
|
||||
0xb543
|
||||
// 0.619429
|
||||
0x38f5
|
||||
// -0.505195
|
||||
0xb80b
|
||||
// 0.681926
|
||||
0x3975
|
||||
// 0.030388
|
||||
0x27c8
|
||||
// -0.436752
|
||||
0xb6fd
|
||||
// -0.902880
|
||||
0xbb39
|
||||
// -0.831844
|
||||
0xbaa8
|
||||
// -0.915192
|
||||
0xbb52
|
||||
// 0.962043
|
||||
0x3bb2
|
||||
// 0.537273
|
||||
0x384c
|
||||
// 0.960055
|
||||
0x3bae
|
||||
// -0.761489
|
||||
0xba18
|
||||
// 0.642363
|
||||
0x3924
|
||||
// -0.424511
|
||||
0xb6cb
|
||||
// -0.991667
|
||||
0xbbef
|
||||
// 0.964409
|
||||
0x3bb7
|
||||
// 0.023198
|
||||
0x25f0
|
||||
// 0.676648
|
||||
0x396a
|
||||
// -0.316092
|
||||
0xb50f
|
||||
// 0.946295
|
||||
0x3b92
|
||||
// -0.922467
|
||||
0xbb61
|
||||
// -0.821471
|
||||
0xba92
|
||||
// 0.892290
|
||||
0x3b23
|
||||
// 0.688341
|
||||
0x3982
|
||||
// 0.995808
|
||||
0x3bf7
|
||||
// -0.871183
|
||||
0xbaf8
|
||||
// 0.484313
|
||||
0x37c0
|
||||
// 0.048810
|
||||
0x2a3f
|
||||
// 0.868424
|
||||
0x3af3
|
||||
// -0.791713
|
||||
0xba55
|
||||
// 0.358250
|
||||
0x35bb
|
||||
// -0.346284
|
||||
0xb58a
|
||||
// -0.067933
|
||||
0xac59
|
||||
// -0.998178
|
||||
0xbbfc
|
||||
// -0.201840
|
||||
0xb275
|
||||
// -0.934347
|
||||
0xbb7a
|
||||
// 0.876246
|
||||
0x3b03
|
||||
// -0.210401
|
||||
0xb2bc
|
||||
// 0.486444
|
||||
0x37c8
|
||||
// -0.086315
|
||||
0xad86
|
||||
// 0.995582
|
||||
0x3bf7
|
||||
@ -0,0 +1,202 @@
|
||||
#include "InterpolationTestsF16.h"
|
||||
#include <stdio.h>
|
||||
#include "Error.h"
|
||||
|
||||
#define SNR_THRESHOLD 55
|
||||
|
||||
/*
|
||||
|
||||
Reference patterns are generated with
|
||||
a double precision computation.
|
||||
|
||||
*/
|
||||
|
||||
#define REL_ERROR (5.0e-3)
|
||||
#define ABS_ERROR (5.0e-3)
|
||||
|
||||
|
||||
|
||||
void InterpolationTestsF16::test_linear_interp_f16()
|
||||
{
|
||||
const float16_t *inp = input.ptr();
|
||||
float16_t *outp = output.ptr();
|
||||
|
||||
unsigned long nb;
|
||||
for(nb = 0; nb < input.nbSamples(); nb++)
|
||||
{
|
||||
outp[nb] = arm_linear_interp_f16(&S,inp[nb]);
|
||||
}
|
||||
|
||||
ASSERT_EMPTY_TAIL(output);
|
||||
|
||||
ASSERT_SNR(output,ref,(float16_t)SNR_THRESHOLD);
|
||||
|
||||
ASSERT_CLOSE_ERROR(output,ref,ABS_ERROR,REL_ERROR);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void InterpolationTestsF16::test_bilinear_interp_f16()
|
||||
{
|
||||
const float16_t *inp = input.ptr();
|
||||
float16_t *outp = output.ptr();
|
||||
float16_t x,y;
|
||||
unsigned long nb;
|
||||
for(nb = 0; nb < input.nbSamples(); nb += 2)
|
||||
{
|
||||
x = inp[nb];
|
||||
y = inp[nb+1];
|
||||
*outp++=arm_bilinear_interp_f16(&SBI,x,y);
|
||||
}
|
||||
|
||||
ASSERT_EMPTY_TAIL(output);
|
||||
|
||||
ASSERT_SNR(output,ref,(float16_t)SNR_THRESHOLD);
|
||||
|
||||
ASSERT_CLOSE_ERROR(output,ref,ABS_ERROR,REL_ERROR);
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
void InterpolationTestsF16::test_spline_square_f16()
|
||||
{
|
||||
const float16_t *inpX = inputX.ptr();
|
||||
const float16_t *inpY = inputY.ptr();
|
||||
const float16_t *outX = outputX.ptr();
|
||||
float16_t *outp = output.ptr();
|
||||
float16_t *buf = buffer.ptr(); // ((2*4-1)*sizeof(float16_t))
|
||||
float16_t *coef = splineCoefs.ptr(); // ((3*(4-1))*sizeof(float16_t))
|
||||
|
||||
arm_spline_instance_f16 S;
|
||||
arm_spline_init_f16(&S, ARM_SPLINE_PARABOLIC_RUNOUT, inpX, inpY, 4, coef, buf);
|
||||
arm_spline_f16(&S, outX, outp, 20);
|
||||
|
||||
ASSERT_EMPTY_TAIL(buffer);
|
||||
ASSERT_EMPTY_TAIL(splineCoefs);
|
||||
ASSERT_EMPTY_TAIL(output);
|
||||
ASSERT_SNR(output,ref,(float16_t)SNR_THRESHOLD);
|
||||
}
|
||||
|
||||
void InterpolationTestsF16::test_spline_sine_f16()
|
||||
{
|
||||
const float16_t *inpX = inputX.ptr();
|
||||
const float16_t *inpY = inputY.ptr();
|
||||
const float16_t *outX = outputX.ptr();
|
||||
float16_t *outp = output.ptr();
|
||||
float16_t *buf = buffer.ptr(); // ((2*9-1)*sizeof(float16_t))
|
||||
float16_t *coef = splineCoefs.ptr(); // ((3*(9-1))*sizeof(float16_t))
|
||||
|
||||
arm_spline_instance_f16 S;
|
||||
arm_spline_init_f16(&S, ARM_SPLINE_NATURAL, inpX, inpY, 9, coef, buf);
|
||||
arm_spline_f16(&S, outX, outp, 33);
|
||||
|
||||
ASSERT_EMPTY_TAIL(buffer);
|
||||
ASSERT_EMPTY_TAIL(splineCoefs);
|
||||
ASSERT_EMPTY_TAIL(output);
|
||||
ASSERT_SNR(output,ref,(float16_t)SNR_THRESHOLD);
|
||||
}
|
||||
|
||||
void InterpolationTestsF16::test_spline_ramp_f16()
|
||||
{
|
||||
const float16_t *inpX = inputX.ptr();
|
||||
const float16_t *inpY = inputY.ptr();
|
||||
const float16_t *outX = outputX.ptr();
|
||||
float16_t *outp = output.ptr();
|
||||
float16_t *buf = buffer.ptr(); // ((2*3-1)*sizeof(float16_t))
|
||||
float16_t *coef = splineCoefs.ptr(); // ((3*(3-1))*sizeof(float16_t))
|
||||
|
||||
arm_spline_instance_f16 S;
|
||||
arm_spline_init_f16(&S, ARM_SPLINE_PARABOLIC_RUNOUT, inpX, inpY, 3, coef, buf);
|
||||
arm_spline_f16(&S, outX, outp, 30);
|
||||
|
||||
ASSERT_EMPTY_TAIL(buffer);
|
||||
ASSERT_EMPTY_TAIL(splineCoefs);
|
||||
ASSERT_EMPTY_TAIL(output);
|
||||
ASSERT_SNR(output,ref,(float16_t)SNR_THRESHOLD);
|
||||
}
|
||||
#endif
|
||||
|
||||
void InterpolationTestsF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
|
||||
{
|
||||
|
||||
const int16_t *pConfig;
|
||||
Testing::nbSamples_t nb=MAX_NB_SAMPLES;
|
||||
(void)params;
|
||||
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case InterpolationTestsF16::TEST_LINEAR_INTERP_F16_1:
|
||||
input.reload(InterpolationTestsF16::INPUT_F16_ID,mgr,nb);
|
||||
y.reload(InterpolationTestsF16::YVAL_F16_ID,mgr,nb);
|
||||
ref.reload(InterpolationTestsF16::REF_LINEAR_F16_ID,mgr,nb);
|
||||
|
||||
|
||||
S.nValues=y.nbSamples(); /**< nValues */
|
||||
/* Those values must be coherent with the ones in the
|
||||
Python script generating the patterns */
|
||||
S.x1=0.0; /**< x1 */
|
||||
S.xSpacing=1.0; /**< xSpacing */
|
||||
S.pYData=y.ptr(); /**< pointer to the table of Y values */
|
||||
break;
|
||||
|
||||
case InterpolationTestsF16::TEST_BILINEAR_INTERP_F16_2:
|
||||
input.reload(InterpolationTestsF16::INPUTBI_F16_ID,mgr,nb);
|
||||
config.reload(InterpolationTestsF16::CONFIGBI_S16_ID,mgr,nb);
|
||||
y.reload(InterpolationTestsF16::YVALBI_F16_ID,mgr,nb);
|
||||
ref.reload(InterpolationTestsF16::REF_BILINEAR_F16_ID,mgr,nb);
|
||||
|
||||
pConfig = config.ptr();
|
||||
|
||||
SBI.numRows = pConfig[1];
|
||||
SBI.numCols = pConfig[0];
|
||||
|
||||
SBI.pData = y.ptr();
|
||||
|
||||
break;
|
||||
#if 0
|
||||
case TEST_SPLINE_SQUARE_F16_3:
|
||||
inputX.reload(InterpolationTestsF16::INPUT_SPLINE_SQU_X_F16_ID,mgr,4);
|
||||
inputY.reload(InterpolationTestsF16::INPUT_SPLINE_SQU_Y_F16_ID,mgr,4);
|
||||
outputX.reload(InterpolationTestsF16::OUTPUT_SPLINE_SQU_X_F16_ID,mgr,20);
|
||||
ref.reload(InterpolationTestsF16::REF_SPLINE_SQU_F16_ID,mgr,20);
|
||||
splineCoefs.create(3*(4-1),InterpolationTestsF16::COEFS_SPLINE_F16_ID,mgr);
|
||||
|
||||
buffer.create(2*4-1,InterpolationTestsF16::TEMP_SPLINE_F16_ID,mgr);
|
||||
output.create(20,InterpolationTestsF16::OUT_SAMPLES_F16_ID,mgr);
|
||||
break;
|
||||
|
||||
case TEST_SPLINE_SINE_F16_4:
|
||||
inputX.reload(InterpolationTestsF16::INPUT_SPLINE_SIN_X_F16_ID,mgr,9);
|
||||
inputY.reload(InterpolationTestsF16::INPUT_SPLINE_SIN_Y_F16_ID,mgr,9);
|
||||
outputX.reload(InterpolationTestsF16::OUTPUT_SPLINE_SIN_X_F16_ID,mgr,33);
|
||||
ref.reload(InterpolationTestsF16::REF_SPLINE_SIN_F16_ID,mgr,33);
|
||||
splineCoefs.create(3*(9-1),InterpolationTestsF16::COEFS_SPLINE_F16_ID,mgr);
|
||||
|
||||
buffer.create(2*9-1,InterpolationTestsF16::TEMP_SPLINE_F16_ID,mgr);
|
||||
output.create(33,InterpolationTestsF16::OUT_SAMPLES_F16_ID,mgr);
|
||||
break;
|
||||
|
||||
case TEST_SPLINE_RAMP_F16_5:
|
||||
inputX.reload(InterpolationTestsF16::INPUT_SPLINE_RAM_X_F16_ID,mgr,3);
|
||||
inputY.reload(InterpolationTestsF16::INPUT_SPLINE_RAM_Y_F16_ID,mgr,3);
|
||||
outputX.reload(InterpolationTestsF16::OUTPUT_SPLINE_RAM_X_F16_ID,mgr,30);
|
||||
ref.reload(InterpolationTestsF16::REF_SPLINE_RAM_F16_ID,mgr,30);
|
||||
splineCoefs.create(3*(3-1),InterpolationTestsF16::COEFS_SPLINE_F16_ID,mgr);
|
||||
|
||||
buffer.create(2*3-1,InterpolationTestsF16::TEMP_SPLINE_F16_ID,mgr);
|
||||
output.create(30,InterpolationTestsF16::OUT_SAMPLES_F16_ID,mgr);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
output.create(ref.nbSamples(),InterpolationTestsF16::OUT_SAMPLES_F16_ID,mgr);
|
||||
}
|
||||
|
||||
void InterpolationTestsF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
|
||||
{
|
||||
(void)id;
|
||||
output.dump(mgr);
|
||||
}
|
||||
Loading…
Reference in New Issue