sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <liboil/liboil.h>
|
sl@0
|
20 |
#include <liboil/liboilfunction.h>
|
sl@0
|
21 |
#include <stdio.h>
|
sl@0
|
22 |
#include <stdlib.h>
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <liboil/globals.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
#define LOG_FILE "c:\\logs\\testsuite_wavelet_log.txt"
|
sl@0
|
27 |
#include "std_log_result.h"
|
sl@0
|
28 |
#define LOG_FILENAME_LINE __FILE__, __LINE__
|
sl@0
|
29 |
|
sl@0
|
30 |
#define SIZE 20
|
sl@0
|
31 |
|
sl@0
|
32 |
void create_xml(int result)
|
sl@0
|
33 |
{
|
sl@0
|
34 |
if(result)
|
sl@0
|
35 |
assert_failed = 1;
|
sl@0
|
36 |
|
sl@0
|
37 |
testResultXml("testsuite_wavelet");
|
sl@0
|
38 |
close_log_file();
|
sl@0
|
39 |
}
|
sl@0
|
40 |
|
sl@0
|
41 |
void test_oil_add2_rshift_add_s16()
|
sl@0
|
42 |
{
|
sl@0
|
43 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n
|
sl@0
|
44 |
int16_t input1[SIZE];
|
sl@0
|
45 |
int16_t input2[SIZE];
|
sl@0
|
46 |
int16_t input3[SIZE];
|
sl@0
|
47 |
int16_t input4[2];
|
sl@0
|
48 |
int16_t output[SIZE];
|
sl@0
|
49 |
int16_t linux_output[] = {0,1,2,3,5,6,7,9,10,11,13,14,15,17,18,19,21,22,23,24};
|
sl@0
|
50 |
int i = 0;
|
sl@0
|
51 |
|
sl@0
|
52 |
for(i=0; i<SIZE; i++)
|
sl@0
|
53 |
{
|
sl@0
|
54 |
input1[i] = i;
|
sl@0
|
55 |
input2[i] = i*2;
|
sl@0
|
56 |
input3[i] = i*3;
|
sl@0
|
57 |
if(i < 2)
|
sl@0
|
58 |
input4[i] = i*4;
|
sl@0
|
59 |
}
|
sl@0
|
60 |
|
sl@0
|
61 |
oil_add2_rshift_add_s16(output, input1, input2, input3, input4, SIZE);
|
sl@0
|
62 |
|
sl@0
|
63 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
64 |
{
|
sl@0
|
65 |
if(output[i] != linux_output[i])
|
sl@0
|
66 |
{
|
sl@0
|
67 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
68 |
assert_failed = 1;
|
sl@0
|
69 |
}
|
sl@0
|
70 |
}
|
sl@0
|
71 |
}
|
sl@0
|
72 |
|
sl@0
|
73 |
void test_oil_add2_rshift_sub_s16()
|
sl@0
|
74 |
{
|
sl@0
|
75 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n
|
sl@0
|
76 |
int16_t input1[SIZE];
|
sl@0
|
77 |
int16_t input2[SIZE];
|
sl@0
|
78 |
int16_t input3[SIZE];
|
sl@0
|
79 |
int16_t input4[2];
|
sl@0
|
80 |
int16_t output[SIZE];
|
sl@0
|
81 |
int16_t linux_output[] = {0,1,2,3,3,4,5,5,6,7,7,8,9,9,10,11,11,12,13,14};
|
sl@0
|
82 |
int i = 0;
|
sl@0
|
83 |
|
sl@0
|
84 |
for(i=0; i<SIZE; i++)
|
sl@0
|
85 |
{
|
sl@0
|
86 |
input1[i] = i;
|
sl@0
|
87 |
input2[i] = i*2;
|
sl@0
|
88 |
input3[i] = i*3;
|
sl@0
|
89 |
if(i < 2)
|
sl@0
|
90 |
input4[i] = i*4;
|
sl@0
|
91 |
}
|
sl@0
|
92 |
|
sl@0
|
93 |
oil_add2_rshift_sub_s16(output, input1, input2, input3, input4, SIZE);
|
sl@0
|
94 |
|
sl@0
|
95 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
96 |
{
|
sl@0
|
97 |
if(output[i] != linux_output[i])
|
sl@0
|
98 |
{
|
sl@0
|
99 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
100 |
assert_failed = 1;
|
sl@0
|
101 |
}
|
sl@0
|
102 |
}
|
sl@0
|
103 |
}
|
sl@0
|
104 |
|
sl@0
|
105 |
void test_oil_add_const_rshift_s16()
|
sl@0
|
106 |
{
|
sl@0
|
107 |
//int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n
|
sl@0
|
108 |
int16_t input1[SIZE];
|
sl@0
|
109 |
int16_t input2[2];
|
sl@0
|
110 |
int16_t output[SIZE];
|
sl@0
|
111 |
int16_t linux_output[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4};
|
sl@0
|
112 |
int i = 0;
|
sl@0
|
113 |
|
sl@0
|
114 |
for(i=0; i<SIZE; i++)
|
sl@0
|
115 |
{
|
sl@0
|
116 |
input1[i] = i;
|
sl@0
|
117 |
if(i < 2)
|
sl@0
|
118 |
input2[i] = i*2;
|
sl@0
|
119 |
}
|
sl@0
|
120 |
|
sl@0
|
121 |
oil_add_const_rshift_s16(output, input1, input2, SIZE);
|
sl@0
|
122 |
|
sl@0
|
123 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
124 |
{
|
sl@0
|
125 |
if(output[i] != linux_output[i])
|
sl@0
|
126 |
{
|
sl@0
|
127 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
128 |
assert_failed = 1;
|
sl@0
|
129 |
}
|
sl@0
|
130 |
}
|
sl@0
|
131 |
}
|
sl@0
|
132 |
|
sl@0
|
133 |
void test_oil_avg2_12xn_u8()
|
sl@0
|
134 |
{
|
sl@0
|
135 |
//uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n
|
sl@0
|
136 |
uint8_t input1[SIZE*12];
|
sl@0
|
137 |
uint8_t input2[SIZE*12];
|
sl@0
|
138 |
uint8_t output[SIZE*12];
|
sl@0
|
139 |
int16_t linux_output[] = {0,2,6,7,11,13,17,18,22,24,28,29,33,35,39,40,44,46,50,51,55,57,61,62,66,68,72,73,77,79,83,84,88,90,94,95,99,101,105,106,108,109,111,112,114,115,117,118,120,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
140 |
int i = 0;
|
sl@0
|
141 |
|
sl@0
|
142 |
for(i=0; i<SIZE*12; i++)
|
sl@0
|
143 |
{
|
sl@0
|
144 |
output[i] = 0;
|
sl@0
|
145 |
input1[i] = i;
|
sl@0
|
146 |
input2[i] = i*2;
|
sl@0
|
147 |
}
|
sl@0
|
148 |
|
sl@0
|
149 |
oil_avg2_12xn_u8(output, 2, input1, 3, input2, 4, SIZE);
|
sl@0
|
150 |
|
sl@0
|
151 |
for(i = 0; i < SIZE*12; i++)
|
sl@0
|
152 |
{
|
sl@0
|
153 |
if(output[i] != linux_output[i])
|
sl@0
|
154 |
{
|
sl@0
|
155 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
156 |
assert_failed = 1;
|
sl@0
|
157 |
}
|
sl@0
|
158 |
}
|
sl@0
|
159 |
}
|
sl@0
|
160 |
|
sl@0
|
161 |
void test_oil_avg2_16xn_u8()
|
sl@0
|
162 |
{
|
sl@0
|
163 |
//uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n
|
sl@0
|
164 |
uint8_t input1[SIZE*16];
|
sl@0
|
165 |
uint8_t input2[SIZE*16];
|
sl@0
|
166 |
uint8_t output[SIZE*16];
|
sl@0
|
167 |
int16_t linux_output[] = {0,2,6,7,11,13,17,18,22,24,28,29,33,35,39,40,44,46,50,51,55,57,61,62,66,68,72,73,77,79,83,84,88,90,94,95,99,101,105,106,108,109,111,112,114,115,117,118,120,121,123,124,126,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
168 |
int i = 0;
|
sl@0
|
169 |
|
sl@0
|
170 |
for(i=0; i<SIZE*16; i++)
|
sl@0
|
171 |
{
|
sl@0
|
172 |
output[i] = 0;
|
sl@0
|
173 |
input1[i] = i;
|
sl@0
|
174 |
input2[i] = i*2;
|
sl@0
|
175 |
}
|
sl@0
|
176 |
|
sl@0
|
177 |
oil_avg2_16xn_u8(output, 2, input1, 3, input2, 4, SIZE);
|
sl@0
|
178 |
|
sl@0
|
179 |
for(i = 0; i < SIZE*16; i++)
|
sl@0
|
180 |
{
|
sl@0
|
181 |
if(output[i] != linux_output[i])
|
sl@0
|
182 |
{
|
sl@0
|
183 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
184 |
assert_failed = 1;
|
sl@0
|
185 |
}
|
sl@0
|
186 |
}
|
sl@0
|
187 |
}
|
sl@0
|
188 |
|
sl@0
|
189 |
void test_oil_avg2_8xn_u8()
|
sl@0
|
190 |
{
|
sl@0
|
191 |
//uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n
|
sl@0
|
192 |
uint8_t input1[SIZE*8];
|
sl@0
|
193 |
uint8_t input2[SIZE*8];
|
sl@0
|
194 |
uint8_t output[SIZE*8];
|
sl@0
|
195 |
int16_t linux_output[] = {0,2,6,7,11,13,17,18,22,24,28,29,33,35,39,40,44,46,50,51,55,57,61,62,66,68,72,73,77,79,83,84,88,90,94,95,99,101,105,106,108,109,111,112,114,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
196 |
int i = 0;
|
sl@0
|
197 |
|
sl@0
|
198 |
for(i=0; i<SIZE*8; i++)
|
sl@0
|
199 |
{
|
sl@0
|
200 |
output[i] = 0;
|
sl@0
|
201 |
input1[i] = i;
|
sl@0
|
202 |
input2[i] = i*2;
|
sl@0
|
203 |
}
|
sl@0
|
204 |
|
sl@0
|
205 |
oil_avg2_8xn_u8(output, 2, input1, 3, input2, 4, SIZE);
|
sl@0
|
206 |
|
sl@0
|
207 |
for(i = 0; i < SIZE*8; i++)
|
sl@0
|
208 |
{
|
sl@0
|
209 |
if(output[i] != linux_output[i])
|
sl@0
|
210 |
{
|
sl@0
|
211 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
212 |
assert_failed = 1;
|
sl@0
|
213 |
}
|
sl@0
|
214 |
}
|
sl@0
|
215 |
}
|
sl@0
|
216 |
|
sl@0
|
217 |
void test_oil_combine2_12xn_u8()
|
sl@0
|
218 |
{
|
sl@0
|
219 |
//uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const int16_t * s3_4, int n
|
sl@0
|
220 |
uint8_t input1[SIZE*12];
|
sl@0
|
221 |
uint8_t input2[SIZE*12];
|
sl@0
|
222 |
int16_t input3[4];
|
sl@0
|
223 |
uint8_t output[SIZE*12];
|
sl@0
|
224 |
int16_t linux_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
225 |
int i = 0;
|
sl@0
|
226 |
|
sl@0
|
227 |
for(i=0; i<SIZE*12; i++)
|
sl@0
|
228 |
{
|
sl@0
|
229 |
output[i] = 0;
|
sl@0
|
230 |
input1[i] = i;
|
sl@0
|
231 |
input2[i] = i*2;
|
sl@0
|
232 |
|
sl@0
|
233 |
if(i < 4)
|
sl@0
|
234 |
input3[i] = i*3;
|
sl@0
|
235 |
}
|
sl@0
|
236 |
|
sl@0
|
237 |
oil_combine2_12xn_u8(output, 2, input1, 3, input2, 4, input3, SIZE);
|
sl@0
|
238 |
|
sl@0
|
239 |
for(i = 0; i < SIZE*12; i++)
|
sl@0
|
240 |
{
|
sl@0
|
241 |
if(output[i] != linux_output[i])
|
sl@0
|
242 |
{
|
sl@0
|
243 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
244 |
assert_failed = 1;
|
sl@0
|
245 |
}
|
sl@0
|
246 |
}
|
sl@0
|
247 |
}
|
sl@0
|
248 |
|
sl@0
|
249 |
void test_oil_combine2_16xn_u8()
|
sl@0
|
250 |
{
|
sl@0
|
251 |
//uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const int16_t * s3_4, int n
|
sl@0
|
252 |
uint8_t input1[SIZE*16];
|
sl@0
|
253 |
uint8_t input2[SIZE*16];
|
sl@0
|
254 |
int16_t input3[4];
|
sl@0
|
255 |
uint8_t output[SIZE*16];
|
sl@0
|
256 |
int16_t linux_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
|
sl@0
|
257 |
int i = 0;
|
sl@0
|
258 |
|
sl@0
|
259 |
for(i=0; i<SIZE*16; i++)
|
sl@0
|
260 |
{
|
sl@0
|
261 |
output[i] = 1;
|
sl@0
|
262 |
input1[i] = i;
|
sl@0
|
263 |
input2[i] = i*2;
|
sl@0
|
264 |
|
sl@0
|
265 |
if(i < 4)
|
sl@0
|
266 |
input3[i] = i*3;
|
sl@0
|
267 |
}
|
sl@0
|
268 |
|
sl@0
|
269 |
oil_combine2_16xn_u8(output, 2, input1, 3, input2, 4, input3, SIZE);
|
sl@0
|
270 |
|
sl@0
|
271 |
for(i = 0; i < SIZE*16; i++)
|
sl@0
|
272 |
{
|
sl@0
|
273 |
if(output[i] != linux_output[i])
|
sl@0
|
274 |
{
|
sl@0
|
275 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
276 |
assert_failed = 1;
|
sl@0
|
277 |
}
|
sl@0
|
278 |
}
|
sl@0
|
279 |
}
|
sl@0
|
280 |
|
sl@0
|
281 |
void test_oil_combine2_8xn_u8()
|
sl@0
|
282 |
{
|
sl@0
|
283 |
//uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const int16_t * s3_4, int n
|
sl@0
|
284 |
uint8_t input1[SIZE*8];
|
sl@0
|
285 |
uint8_t input2[SIZE*8];
|
sl@0
|
286 |
int16_t input3[4];
|
sl@0
|
287 |
uint8_t output[SIZE*8];
|
sl@0
|
288 |
int16_t linux_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2};
|
sl@0
|
289 |
int i = 0;
|
sl@0
|
290 |
|
sl@0
|
291 |
for(i=0; i<SIZE*8; i++)
|
sl@0
|
292 |
{
|
sl@0
|
293 |
output[i] = 2;
|
sl@0
|
294 |
input1[i] = i;
|
sl@0
|
295 |
input2[i] = i*2;
|
sl@0
|
296 |
|
sl@0
|
297 |
if(i < 4)
|
sl@0
|
298 |
input3[i] = i*3;
|
sl@0
|
299 |
}
|
sl@0
|
300 |
|
sl@0
|
301 |
oil_combine2_8xn_u8(output, 2, input1, 3, input2, 4, input3, SIZE);
|
sl@0
|
302 |
|
sl@0
|
303 |
for(i = 0; i < SIZE*8; i++)
|
sl@0
|
304 |
{
|
sl@0
|
305 |
if(output[i] != linux_output[i])
|
sl@0
|
306 |
{
|
sl@0
|
307 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
308 |
assert_failed = 1;
|
sl@0
|
309 |
}
|
sl@0
|
310 |
}
|
sl@0
|
311 |
}
|
sl@0
|
312 |
|
sl@0
|
313 |
void test_oil_combine4_12xn_u8()
|
sl@0
|
314 |
{
|
sl@0
|
315 |
//uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const uint8_t * s3_12xn, int ss3, const uint8_t * s4_12xn, int ss4, const int16_t * s5_6, int n
|
sl@0
|
316 |
uint8_t input1[SIZE*12];
|
sl@0
|
317 |
uint8_t input2[SIZE*12];
|
sl@0
|
318 |
uint8_t input3[SIZE*12];
|
sl@0
|
319 |
uint8_t input4[SIZE*12];
|
sl@0
|
320 |
int16_t input5[6];
|
sl@0
|
321 |
uint8_t output[SIZE*12];
|
sl@0
|
322 |
uint8_t expected_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
|
sl@0
|
323 |
|
sl@0
|
324 |
int i = 0;
|
sl@0
|
325 |
|
sl@0
|
326 |
for(i=0; i<SIZE*12; i++)
|
sl@0
|
327 |
{
|
sl@0
|
328 |
output[i] = 1;
|
sl@0
|
329 |
input1[i] = i;
|
sl@0
|
330 |
input2[i] = i+2;
|
sl@0
|
331 |
input3[i] = i+3;
|
sl@0
|
332 |
input4[i] = i+4;
|
sl@0
|
333 |
|
sl@0
|
334 |
if(i < 6)
|
sl@0
|
335 |
input5[i] = i+5;
|
sl@0
|
336 |
}
|
sl@0
|
337 |
|
sl@0
|
338 |
oil_combine4_12xn_u8(output, 1, input1, 1, input2, 2, input3, 3, input4, 4, input5, SIZE);
|
sl@0
|
339 |
|
sl@0
|
340 |
for(i = 0; i < SIZE*12; i++)
|
sl@0
|
341 |
{
|
sl@0
|
342 |
if(output[i] != expected_output[i])
|
sl@0
|
343 |
{
|
sl@0
|
344 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,expected_output[i],output[i]);
|
sl@0
|
345 |
assert_failed = 1;
|
sl@0
|
346 |
}
|
sl@0
|
347 |
}
|
sl@0
|
348 |
}
|
sl@0
|
349 |
|
sl@0
|
350 |
void test_oil_combine4_16xn_u8()
|
sl@0
|
351 |
{
|
sl@0
|
352 |
//uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const uint8_t * s3_16xn, int ss3, const uint8_t * s4_16xn, int ss4, const int16_t * s5_6, int n
|
sl@0
|
353 |
uint8_t input1[SIZE*16];
|
sl@0
|
354 |
uint8_t input2[SIZE*16];
|
sl@0
|
355 |
uint8_t input3[SIZE*16];
|
sl@0
|
356 |
uint8_t input4[SIZE*16];
|
sl@0
|
357 |
int16_t input5[6];
|
sl@0
|
358 |
uint8_t output[SIZE*16];
|
sl@0
|
359 |
uint8_t expected_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
|
sl@0
|
360 |
int i = 0;
|
sl@0
|
361 |
|
sl@0
|
362 |
for(i=0; i<SIZE*16; i++)
|
sl@0
|
363 |
{
|
sl@0
|
364 |
output[i] = 1;
|
sl@0
|
365 |
input1[i] = i;
|
sl@0
|
366 |
input2[i] = i+2;
|
sl@0
|
367 |
input3[i] = i+3;
|
sl@0
|
368 |
input4[i] = i+4;
|
sl@0
|
369 |
|
sl@0
|
370 |
if(i < 6)
|
sl@0
|
371 |
input5[i] = i+5;
|
sl@0
|
372 |
}
|
sl@0
|
373 |
|
sl@0
|
374 |
oil_combine4_16xn_u8(output, 1, input1, 1, input2, 2, input3, 3, input4, 4, input5, SIZE);
|
sl@0
|
375 |
|
sl@0
|
376 |
for(i = 0; i < SIZE*16; i++)
|
sl@0
|
377 |
{
|
sl@0
|
378 |
if(output[i] != expected_output[i])
|
sl@0
|
379 |
{
|
sl@0
|
380 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,expected_output[i],output[i]);
|
sl@0
|
381 |
assert_failed = 1;
|
sl@0
|
382 |
}
|
sl@0
|
383 |
}
|
sl@0
|
384 |
}
|
sl@0
|
385 |
|
sl@0
|
386 |
void test_oil_combine4_8xn_u8()
|
sl@0
|
387 |
{
|
sl@0
|
388 |
//uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const uint8_t * s3_8xn, int ss3, const uint8_t * s4_8xn, int ss4, const int16_t * s5_6, int n
|
sl@0
|
389 |
uint8_t input1[SIZE*8];
|
sl@0
|
390 |
uint8_t input2[SIZE*8];
|
sl@0
|
391 |
uint8_t input3[SIZE*8];
|
sl@0
|
392 |
uint8_t input4[SIZE*8];
|
sl@0
|
393 |
int16_t input5[6];
|
sl@0
|
394 |
uint8_t output[SIZE*8];
|
sl@0
|
395 |
uint8_t expected_output[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
|
sl@0
|
396 |
int i = 0;
|
sl@0
|
397 |
|
sl@0
|
398 |
for(i=0; i<SIZE*8; i++)
|
sl@0
|
399 |
{
|
sl@0
|
400 |
output[i] = 1;
|
sl@0
|
401 |
input1[i] = i;
|
sl@0
|
402 |
input2[i] = i+2;
|
sl@0
|
403 |
input3[i] = i+3;
|
sl@0
|
404 |
input4[i] = i+4;
|
sl@0
|
405 |
|
sl@0
|
406 |
if(i < 6)
|
sl@0
|
407 |
input5[i] = i+5;
|
sl@0
|
408 |
}
|
sl@0
|
409 |
|
sl@0
|
410 |
oil_combine4_8xn_u8(output, 1, input1, 1, input2, 2, input3, 3, input4, 4, input5, SIZE);
|
sl@0
|
411 |
|
sl@0
|
412 |
for(i = 0; i < SIZE*8; i++)
|
sl@0
|
413 |
{
|
sl@0
|
414 |
if(output[i] != expected_output[i])
|
sl@0
|
415 |
{
|
sl@0
|
416 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,expected_output[i],output[i]);
|
sl@0
|
417 |
assert_failed = 1;
|
sl@0
|
418 |
}
|
sl@0
|
419 |
}
|
sl@0
|
420 |
}
|
sl@0
|
421 |
|
sl@0
|
422 |
void test_oil_deinterleave()
|
sl@0
|
423 |
{
|
sl@0
|
424 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
425 |
int16_t input[SIZE*2];
|
sl@0
|
426 |
int16_t output[SIZE*2];
|
sl@0
|
427 |
int16_t linux_output[] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39};
|
sl@0
|
428 |
int i = 0;
|
sl@0
|
429 |
|
sl@0
|
430 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
431 |
{
|
sl@0
|
432 |
output[i] = 0;
|
sl@0
|
433 |
input[i] = i;
|
sl@0
|
434 |
}
|
sl@0
|
435 |
|
sl@0
|
436 |
oil_deinterleave(output, input, SIZE);
|
sl@0
|
437 |
|
sl@0
|
438 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
439 |
{
|
sl@0
|
440 |
if(output[i] != linux_output[i])
|
sl@0
|
441 |
{
|
sl@0
|
442 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
443 |
assert_failed = 1;
|
sl@0
|
444 |
}
|
sl@0
|
445 |
}
|
sl@0
|
446 |
}
|
sl@0
|
447 |
|
sl@0
|
448 |
void test_oil_deinterleave2_s16()
|
sl@0
|
449 |
{
|
sl@0
|
450 |
//int16_t * d1_n, int16_t * d2_n, const int16_t * s_2xn, int n
|
sl@0
|
451 |
int16_t input[SIZE*2];
|
sl@0
|
452 |
int16_t output1[SIZE];
|
sl@0
|
453 |
int16_t output2[SIZE];
|
sl@0
|
454 |
int16_t linux_output1[] = {0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38};
|
sl@0
|
455 |
int16_t linux_output2[] = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39};
|
sl@0
|
456 |
int i = 0;
|
sl@0
|
457 |
|
sl@0
|
458 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
459 |
{
|
sl@0
|
460 |
if(i < SIZE)
|
sl@0
|
461 |
{
|
sl@0
|
462 |
output1[i] = i+1;
|
sl@0
|
463 |
output2[i] = i+2;
|
sl@0
|
464 |
}
|
sl@0
|
465 |
input[i] = i;
|
sl@0
|
466 |
}
|
sl@0
|
467 |
|
sl@0
|
468 |
oil_deinterleave2_s16(output1, output2, input, SIZE);
|
sl@0
|
469 |
|
sl@0
|
470 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
471 |
{
|
sl@0
|
472 |
if(output1[i] != linux_output1[i])
|
sl@0
|
473 |
{
|
sl@0
|
474 |
std_log(LOG_FILENAME_LINE, "output1[%d]: expected value - %d, actual value - %d", i,linux_output1[i],output1[i]);
|
sl@0
|
475 |
assert_failed = 1;
|
sl@0
|
476 |
}
|
sl@0
|
477 |
|
sl@0
|
478 |
if(output2[i] != linux_output2[i])
|
sl@0
|
479 |
{
|
sl@0
|
480 |
std_log(LOG_FILENAME_LINE, "output2[%d]: expected value - %d, actual value - %d", i,linux_output2[i],output2[i]);
|
sl@0
|
481 |
assert_failed = 1;
|
sl@0
|
482 |
}
|
sl@0
|
483 |
}
|
sl@0
|
484 |
}
|
sl@0
|
485 |
|
sl@0
|
486 |
void test_oil_interleave()
|
sl@0
|
487 |
{
|
sl@0
|
488 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
489 |
int16_t input[SIZE*2];
|
sl@0
|
490 |
int16_t output[SIZE*2];
|
sl@0
|
491 |
int16_t linux_output[] = {0,20,1,21,2,22,3,23,4,24,5,25,6,26,7,27,8,28,9,29,10,30,11,31,12,32,13,33,14,34,15,35,16,36,17,37,18,38,19,39};
|
sl@0
|
492 |
int i = 0;
|
sl@0
|
493 |
|
sl@0
|
494 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
495 |
{
|
sl@0
|
496 |
output[i] = 0;
|
sl@0
|
497 |
input[i] = i;
|
sl@0
|
498 |
}
|
sl@0
|
499 |
|
sl@0
|
500 |
oil_interleave(output, input, SIZE);
|
sl@0
|
501 |
|
sl@0
|
502 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
503 |
{
|
sl@0
|
504 |
if(output[i] != linux_output[i])
|
sl@0
|
505 |
{
|
sl@0
|
506 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
507 |
assert_failed = 1;
|
sl@0
|
508 |
}
|
sl@0
|
509 |
}
|
sl@0
|
510 |
}
|
sl@0
|
511 |
|
sl@0
|
512 |
void test_oil_interleave2_s16()
|
sl@0
|
513 |
{
|
sl@0
|
514 |
//int16_t * d_2xn, const int16_t * s1_n, const int16_t * s2_n, int n
|
sl@0
|
515 |
int16_t input1[SIZE];
|
sl@0
|
516 |
int16_t input2[SIZE];
|
sl@0
|
517 |
int16_t output[SIZE*2];
|
sl@0
|
518 |
int16_t linux_output[] = {1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11};
|
sl@0
|
519 |
int i = 0;
|
sl@0
|
520 |
|
sl@0
|
521 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
522 |
{
|
sl@0
|
523 |
if(i < SIZE)
|
sl@0
|
524 |
{
|
sl@0
|
525 |
input1[i] = i+1;
|
sl@0
|
526 |
input2[i] = i+2;
|
sl@0
|
527 |
}
|
sl@0
|
528 |
output[i] = 0;
|
sl@0
|
529 |
}
|
sl@0
|
530 |
|
sl@0
|
531 |
oil_interleave2_s16(output, input1, input2, SIZE);
|
sl@0
|
532 |
|
sl@0
|
533 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
534 |
{
|
sl@0
|
535 |
if(output[i] != linux_output[i])
|
sl@0
|
536 |
{
|
sl@0
|
537 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
538 |
assert_failed = 1;
|
sl@0
|
539 |
}
|
sl@0
|
540 |
}
|
sl@0
|
541 |
}
|
sl@0
|
542 |
|
sl@0
|
543 |
void test_oil_lift_add_135()
|
sl@0
|
544 |
{
|
sl@0
|
545 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n
|
sl@0
|
546 |
int16_t output[SIZE];
|
sl@0
|
547 |
int16_t input1[SIZE];
|
sl@0
|
548 |
int16_t input2[SIZE];
|
sl@0
|
549 |
int16_t input3[SIZE];
|
sl@0
|
550 |
int16_t input4[SIZE];
|
sl@0
|
551 |
int16_t input5[SIZE];
|
sl@0
|
552 |
int16_t linux_output[] = {15,5,7,10,12,14,16,18,20,22,24,26,28,30,32,34,36,39,41,32};
|
sl@0
|
553 |
int i = 0;
|
sl@0
|
554 |
|
sl@0
|
555 |
for(i=0; i<SIZE; i++)
|
sl@0
|
556 |
{
|
sl@0
|
557 |
input1[i] = i+1;
|
sl@0
|
558 |
input2[i] = i+2;
|
sl@0
|
559 |
input3[i] = i+3;
|
sl@0
|
560 |
input4[i] = i+4;
|
sl@0
|
561 |
input5[i] = i+5;
|
sl@0
|
562 |
|
sl@0
|
563 |
output[i] = 0;
|
sl@0
|
564 |
}
|
sl@0
|
565 |
|
sl@0
|
566 |
oil_lift_add_135(output, input1, input2, input3, input4, input5, SIZE);
|
sl@0
|
567 |
|
sl@0
|
568 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
569 |
{
|
sl@0
|
570 |
if(output[i] != linux_output[i])
|
sl@0
|
571 |
{
|
sl@0
|
572 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
573 |
assert_failed = 1;
|
sl@0
|
574 |
}
|
sl@0
|
575 |
}
|
sl@0
|
576 |
}
|
sl@0
|
577 |
|
sl@0
|
578 |
void test_oil_lift_add_mult_shift12()
|
sl@0
|
579 |
{
|
sl@0
|
580 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n
|
sl@0
|
581 |
int16_t output[SIZE];
|
sl@0
|
582 |
int16_t input1[SIZE];
|
sl@0
|
583 |
int16_t input2[SIZE];
|
sl@0
|
584 |
int16_t input3[SIZE];
|
sl@0
|
585 |
int16_t input4[1];
|
sl@0
|
586 |
int16_t linux_output[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
|
sl@0
|
587 |
int i = 0;
|
sl@0
|
588 |
|
sl@0
|
589 |
input4[0] = 4;
|
sl@0
|
590 |
for(i=0; i<SIZE; i++)
|
sl@0
|
591 |
{
|
sl@0
|
592 |
input1[i] = i+1;
|
sl@0
|
593 |
input2[i] = i+2;
|
sl@0
|
594 |
input3[i] = i+3;
|
sl@0
|
595 |
|
sl@0
|
596 |
output[i] = 0;
|
sl@0
|
597 |
}
|
sl@0
|
598 |
|
sl@0
|
599 |
oil_lift_add_mult_shift12(output, input1, input2, input3, input4, SIZE);
|
sl@0
|
600 |
|
sl@0
|
601 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
602 |
{
|
sl@0
|
603 |
if(output[i] != linux_output[i])
|
sl@0
|
604 |
{
|
sl@0
|
605 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
606 |
assert_failed = 1;
|
sl@0
|
607 |
}
|
sl@0
|
608 |
}
|
sl@0
|
609 |
}
|
sl@0
|
610 |
|
sl@0
|
611 |
void test_oil_lift_add_shift1()
|
sl@0
|
612 |
{
|
sl@0
|
613 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n
|
sl@0
|
614 |
int16_t output[SIZE];
|
sl@0
|
615 |
int16_t input1[SIZE];
|
sl@0
|
616 |
int16_t input2[SIZE];
|
sl@0
|
617 |
int16_t input3[SIZE];
|
sl@0
|
618 |
int16_t linux_output[] = {3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41};
|
sl@0
|
619 |
int i = 0;
|
sl@0
|
620 |
|
sl@0
|
621 |
for(i=0; i<SIZE; i++)
|
sl@0
|
622 |
{
|
sl@0
|
623 |
input1[i] = i+1;
|
sl@0
|
624 |
input2[i] = i+2;
|
sl@0
|
625 |
input3[i] = i+3;
|
sl@0
|
626 |
|
sl@0
|
627 |
output[i] = 0;
|
sl@0
|
628 |
}
|
sl@0
|
629 |
|
sl@0
|
630 |
oil_lift_add_shift1(output, input1, input2, input3, SIZE);
|
sl@0
|
631 |
|
sl@0
|
632 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
633 |
{
|
sl@0
|
634 |
if(output[i] != linux_output[i])
|
sl@0
|
635 |
{
|
sl@0
|
636 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
637 |
assert_failed = 1;
|
sl@0
|
638 |
}
|
sl@0
|
639 |
}
|
sl@0
|
640 |
}
|
sl@0
|
641 |
|
sl@0
|
642 |
void test_oil_lift_add_shift2()
|
sl@0
|
643 |
{
|
sl@0
|
644 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n
|
sl@0
|
645 |
int16_t output[SIZE];
|
sl@0
|
646 |
int16_t input1[SIZE];
|
sl@0
|
647 |
int16_t input2[SIZE];
|
sl@0
|
648 |
int16_t input3[SIZE];
|
sl@0
|
649 |
int16_t linux_output[] = {2,3,5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30};
|
sl@0
|
650 |
int i = 0;
|
sl@0
|
651 |
|
sl@0
|
652 |
for(i=0; i<SIZE; i++)
|
sl@0
|
653 |
{
|
sl@0
|
654 |
input1[i] = i+1;
|
sl@0
|
655 |
input2[i] = i+2;
|
sl@0
|
656 |
input3[i] = i+3;
|
sl@0
|
657 |
|
sl@0
|
658 |
output[i] = 0;
|
sl@0
|
659 |
}
|
sl@0
|
660 |
|
sl@0
|
661 |
oil_lift_add_shift2(output, input1, input2, input3, SIZE);
|
sl@0
|
662 |
|
sl@0
|
663 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
664 |
{
|
sl@0
|
665 |
if(output[i] != linux_output[i])
|
sl@0
|
666 |
{
|
sl@0
|
667 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
668 |
assert_failed = 1;
|
sl@0
|
669 |
}
|
sl@0
|
670 |
}
|
sl@0
|
671 |
}
|
sl@0
|
672 |
|
sl@0
|
673 |
void test_oil_lift_sub_135()
|
sl@0
|
674 |
{
|
sl@0
|
675 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n
|
sl@0
|
676 |
int16_t output[SIZE];
|
sl@0
|
677 |
int16_t input1[SIZE];
|
sl@0
|
678 |
int16_t input2[SIZE];
|
sl@0
|
679 |
int16_t input3[SIZE];
|
sl@0
|
680 |
int16_t input4[SIZE];
|
sl@0
|
681 |
int16_t input5[SIZE];
|
sl@0
|
682 |
int16_t linux_output[] = {-13,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-3,-3,8};
|
sl@0
|
683 |
int i = 0;
|
sl@0
|
684 |
|
sl@0
|
685 |
for(i=0; i<SIZE; i++)
|
sl@0
|
686 |
{
|
sl@0
|
687 |
input1[i] = i+1;
|
sl@0
|
688 |
input2[i] = i+2;
|
sl@0
|
689 |
input3[i] = i+3;
|
sl@0
|
690 |
input4[i] = i+4;
|
sl@0
|
691 |
input5[i] = i+5;
|
sl@0
|
692 |
|
sl@0
|
693 |
output[i] = 0;
|
sl@0
|
694 |
}
|
sl@0
|
695 |
|
sl@0
|
696 |
oil_lift_sub_135(output, input1, input2, input3, input4, input5, SIZE);
|
sl@0
|
697 |
|
sl@0
|
698 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
699 |
{
|
sl@0
|
700 |
if(output[i] != linux_output[i])
|
sl@0
|
701 |
{
|
sl@0
|
702 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
703 |
assert_failed = 1;
|
sl@0
|
704 |
}
|
sl@0
|
705 |
}
|
sl@0
|
706 |
}
|
sl@0
|
707 |
|
sl@0
|
708 |
void test_oil_lift_sub_mult_shift12()
|
sl@0
|
709 |
{
|
sl@0
|
710 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n
|
sl@0
|
711 |
int16_t output[SIZE];
|
sl@0
|
712 |
int16_t input1[SIZE];
|
sl@0
|
713 |
int16_t input2[SIZE];
|
sl@0
|
714 |
int16_t input3[SIZE];
|
sl@0
|
715 |
int16_t input4[1];
|
sl@0
|
716 |
int16_t linux_output[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
|
sl@0
|
717 |
int i = 0;
|
sl@0
|
718 |
|
sl@0
|
719 |
input4[0] = 4;
|
sl@0
|
720 |
for(i=0; i<SIZE; i++)
|
sl@0
|
721 |
{
|
sl@0
|
722 |
input1[i] = i+1;
|
sl@0
|
723 |
input2[i] = i+2;
|
sl@0
|
724 |
input3[i] = i+3;
|
sl@0
|
725 |
|
sl@0
|
726 |
output[i] = 0;
|
sl@0
|
727 |
}
|
sl@0
|
728 |
|
sl@0
|
729 |
oil_lift_sub_mult_shift12(output, input1, input2, input3, input4, SIZE);
|
sl@0
|
730 |
|
sl@0
|
731 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
732 |
{
|
sl@0
|
733 |
if(output[i] != linux_output[i])
|
sl@0
|
734 |
{
|
sl@0
|
735 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
736 |
assert_failed = 1;
|
sl@0
|
737 |
}
|
sl@0
|
738 |
}
|
sl@0
|
739 |
}
|
sl@0
|
740 |
|
sl@0
|
741 |
void test_oil_lift_sub_shift1()
|
sl@0
|
742 |
{
|
sl@0
|
743 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n
|
sl@0
|
744 |
int16_t output[SIZE];
|
sl@0
|
745 |
int16_t input1[SIZE];
|
sl@0
|
746 |
int16_t input2[SIZE];
|
sl@0
|
747 |
int16_t input3[SIZE];
|
sl@0
|
748 |
int16_t linux_output[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
|
sl@0
|
749 |
int i = 0;
|
sl@0
|
750 |
|
sl@0
|
751 |
for(i=0; i<SIZE; i++)
|
sl@0
|
752 |
{
|
sl@0
|
753 |
input1[i] = i+1;
|
sl@0
|
754 |
input2[i] = i+2;
|
sl@0
|
755 |
input3[i] = i+3;
|
sl@0
|
756 |
|
sl@0
|
757 |
output[i] = 0;
|
sl@0
|
758 |
}
|
sl@0
|
759 |
|
sl@0
|
760 |
oil_lift_sub_shift1(output, input1, input2, input3, SIZE);
|
sl@0
|
761 |
|
sl@0
|
762 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
763 |
{
|
sl@0
|
764 |
if(output[i] != linux_output[i])
|
sl@0
|
765 |
{
|
sl@0
|
766 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
767 |
assert_failed = 1;
|
sl@0
|
768 |
}
|
sl@0
|
769 |
}
|
sl@0
|
770 |
}
|
sl@0
|
771 |
|
sl@0
|
772 |
void test_oil_lift_sub_shift2()
|
sl@0
|
773 |
{
|
sl@0
|
774 |
//int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n
|
sl@0
|
775 |
int16_t output[SIZE];
|
sl@0
|
776 |
int16_t input1[SIZE];
|
sl@0
|
777 |
int16_t input2[SIZE];
|
sl@0
|
778 |
int16_t input3[SIZE];
|
sl@0
|
779 |
int16_t linux_output[] = {0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10};
|
sl@0
|
780 |
int i = 0;
|
sl@0
|
781 |
|
sl@0
|
782 |
for(i=0; i<SIZE; i++)
|
sl@0
|
783 |
{
|
sl@0
|
784 |
input1[i] = i+1;
|
sl@0
|
785 |
input2[i] = i+2;
|
sl@0
|
786 |
input3[i] = i+3;
|
sl@0
|
787 |
|
sl@0
|
788 |
output[i] = 0;
|
sl@0
|
789 |
}
|
sl@0
|
790 |
|
sl@0
|
791 |
oil_lift_sub_shift2(output, input1, input2, input3, SIZE);
|
sl@0
|
792 |
|
sl@0
|
793 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
794 |
{
|
sl@0
|
795 |
if(output[i] != linux_output[i])
|
sl@0
|
796 |
{
|
sl@0
|
797 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
798 |
assert_failed = 1;
|
sl@0
|
799 |
}
|
sl@0
|
800 |
}
|
sl@0
|
801 |
}
|
sl@0
|
802 |
|
sl@0
|
803 |
void test_oil_lshift_s16()
|
sl@0
|
804 |
{
|
sl@0
|
805 |
//int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n
|
sl@0
|
806 |
int16_t output[SIZE];
|
sl@0
|
807 |
int16_t input1[SIZE];
|
sl@0
|
808 |
int16_t input2[1];
|
sl@0
|
809 |
int16_t linux_output[] = {1024,2048,3072,4096,5120,6144,7168,8192,9216,10240,11264,12288,13312,14336,15360,16384,17408,18432,19456,20480};
|
sl@0
|
810 |
int i = 0;
|
sl@0
|
811 |
|
sl@0
|
812 |
input2[0] = 10;
|
sl@0
|
813 |
for(i=0; i<SIZE; i++)
|
sl@0
|
814 |
{
|
sl@0
|
815 |
input1[i] = i+1;
|
sl@0
|
816 |
|
sl@0
|
817 |
output[i] = 0;
|
sl@0
|
818 |
}
|
sl@0
|
819 |
|
sl@0
|
820 |
oil_lshift_s16(output, input1, input2, SIZE);
|
sl@0
|
821 |
|
sl@0
|
822 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
823 |
{
|
sl@0
|
824 |
if(output[i] != linux_output[i])
|
sl@0
|
825 |
{
|
sl@0
|
826 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
827 |
assert_failed = 1;
|
sl@0
|
828 |
}
|
sl@0
|
829 |
}
|
sl@0
|
830 |
}
|
sl@0
|
831 |
|
sl@0
|
832 |
void test_oil_multiply_and_acc_12xn_s16_u8()
|
sl@0
|
833 |
{
|
sl@0
|
834 |
//int16_t * i1_12xn, int is1, const int16_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n
|
sl@0
|
835 |
int16_t input1[SIZE*12];
|
sl@0
|
836 |
uint8_t input2[SIZE*12];
|
sl@0
|
837 |
int16_t output[SIZE*12];
|
sl@0
|
838 |
int16_t linux_output[] = {2049,14105,-20630,-27882,1088,9482,6037,-508,-1416,11797,14588,22258,-22445,28216,-31104,-12536,9646,26705,29900,10241,25291,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
839 |
int i = 0;
|
sl@0
|
840 |
|
sl@0
|
841 |
for(i=0; i<SIZE*12; i++)
|
sl@0
|
842 |
{
|
sl@0
|
843 |
input1[i] = i+1;
|
sl@0
|
844 |
input2[i] = i+1;
|
sl@0
|
845 |
|
sl@0
|
846 |
output[i] = 0;
|
sl@0
|
847 |
}
|
sl@0
|
848 |
|
sl@0
|
849 |
oil_multiply_and_acc_12xn_s16_u8(output, 1, input1, 2, input2, 3, SIZE);
|
sl@0
|
850 |
|
sl@0
|
851 |
for(i = 0; i < SIZE*12; i++)
|
sl@0
|
852 |
{
|
sl@0
|
853 |
if(output[i] != linux_output[i])
|
sl@0
|
854 |
{
|
sl@0
|
855 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
856 |
assert_failed = 1;
|
sl@0
|
857 |
}
|
sl@0
|
858 |
}
|
sl@0
|
859 |
}
|
sl@0
|
860 |
|
sl@0
|
861 |
void test_oil_multiply_and_acc_16xn_s16_u8()
|
sl@0
|
862 |
{
|
sl@0
|
863 |
//int16_t * i1_16xn, int is1, const int16_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n
|
sl@0
|
864 |
int16_t input1[SIZE*16];
|
sl@0
|
865 |
uint8_t input2[SIZE*16];
|
sl@0
|
866 |
int16_t output[SIZE*16];
|
sl@0
|
867 |
int16_t linux_output[] = {2562,15902,-16778,-21204,11363,24125,25819,25184,30958,-13657,-8553,1687,16812,-28204,-2288,28512,-32621,-9442,23776,-7240,19842,30750,16744,-30913,10112,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
868 |
int i = 0;
|
sl@0
|
869 |
|
sl@0
|
870 |
for(i=0; i<SIZE*16; i++)
|
sl@0
|
871 |
{
|
sl@0
|
872 |
input1[i] = i+1;
|
sl@0
|
873 |
input2[i] = i+2;
|
sl@0
|
874 |
|
sl@0
|
875 |
output[i] = 0;
|
sl@0
|
876 |
}
|
sl@0
|
877 |
|
sl@0
|
878 |
oil_multiply_and_acc_16xn_s16_u8(output, 1, input1, 2, input2, 3, SIZE);
|
sl@0
|
879 |
|
sl@0
|
880 |
for(i = 0; i < SIZE*16; i++)
|
sl@0
|
881 |
{
|
sl@0
|
882 |
if(output[i] != linux_output[i])
|
sl@0
|
883 |
{
|
sl@0
|
884 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
885 |
assert_failed = 1;
|
sl@0
|
886 |
}
|
sl@0
|
887 |
}
|
sl@0
|
888 |
}
|
sl@0
|
889 |
|
sl@0
|
890 |
void test_oil_multiply_and_acc_24xn_s16_u8()
|
sl@0
|
891 |
{
|
sl@0
|
892 |
//int16_t * i1_24xn, int is1, const int16_t * s1_24xn, int ss1, const uint8_t * s2_24xn, int ss2, int n
|
sl@0
|
893 |
int16_t input1[SIZE*24];
|
sl@0
|
894 |
uint8_t input2[SIZE*24];
|
sl@0
|
895 |
int16_t output[SIZE*24];
|
sl@0
|
896 |
int16_t linux_output[] = {2562,15902,-16778,-21204,11363,24125,25819,25184,30958,-13657,-8553,1687,16812,-28204,-2288,28512,-1083,-25540,20682,6507,-2529,-6425,-5181,1206,15666,28340,30493,13130,-31716,17517,20765,-29431,-11505,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
897 |
int i = 0;
|
sl@0
|
898 |
|
sl@0
|
899 |
for(i=0; i<SIZE*24; i++)
|
sl@0
|
900 |
{
|
sl@0
|
901 |
input1[i] = i+1;
|
sl@0
|
902 |
input2[i] = i+2;
|
sl@0
|
903 |
|
sl@0
|
904 |
output[i] = 0;
|
sl@0
|
905 |
}
|
sl@0
|
906 |
|
sl@0
|
907 |
oil_multiply_and_acc_24xn_s16_u8(output, 1, input1, 2, input2, 3, SIZE);
|
sl@0
|
908 |
|
sl@0
|
909 |
for(i = 0; i < SIZE*24; i++)
|
sl@0
|
910 |
{
|
sl@0
|
911 |
if(output[i] != linux_output[i])
|
sl@0
|
912 |
{
|
sl@0
|
913 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
914 |
assert_failed = 1;
|
sl@0
|
915 |
}
|
sl@0
|
916 |
}
|
sl@0
|
917 |
}
|
sl@0
|
918 |
|
sl@0
|
919 |
void test_oil_multiply_and_acc_6xn_s16_u8()
|
sl@0
|
920 |
{
|
sl@0
|
921 |
//int16_t * i1_6xn, int is1, const int16_t * s1_6xn, int ss1, const uint8_t * s2_6xn, int ss2, int n
|
sl@0
|
922 |
int16_t input1[SIZE*6];
|
sl@0
|
923 |
uint8_t input2[SIZE*6];
|
sl@0
|
924 |
int16_t output[SIZE*6];
|
sl@0
|
925 |
int16_t linux_output[] = {2562,15902,-16778,-21204,11363,24125,3235,19354,6945,31545,-12086,19342,-13979,10284,17859,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
926 |
int i = 0;
|
sl@0
|
927 |
|
sl@0
|
928 |
for(i=0; i<SIZE*6; i++)
|
sl@0
|
929 |
{
|
sl@0
|
930 |
input1[i] = i+1;
|
sl@0
|
931 |
input2[i] = i+2;
|
sl@0
|
932 |
|
sl@0
|
933 |
output[i] = 0;
|
sl@0
|
934 |
}
|
sl@0
|
935 |
|
sl@0
|
936 |
oil_multiply_and_acc_6xn_s16_u8(output, 1, input1, 2, input2, 3, SIZE);
|
sl@0
|
937 |
|
sl@0
|
938 |
for(i = 0; i < SIZE*6; i++)
|
sl@0
|
939 |
{
|
sl@0
|
940 |
if(output[i] != linux_output[i])
|
sl@0
|
941 |
{
|
sl@0
|
942 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
943 |
assert_failed = 1;
|
sl@0
|
944 |
}
|
sl@0
|
945 |
}
|
sl@0
|
946 |
}
|
sl@0
|
947 |
|
sl@0
|
948 |
void test_oil_multiply_and_acc_8xn_s16_u8()
|
sl@0
|
949 |
{
|
sl@0
|
950 |
//int16_t * i1_8xn, int is1, const int16_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n
|
sl@0
|
951 |
int16_t input1[SIZE*8];
|
sl@0
|
952 |
uint8_t input2[SIZE*8];
|
sl@0
|
953 |
int16_t output[SIZE*8];
|
sl@0
|
954 |
int16_t linux_output[] = {2562,15902,-16778,-21204,11363,24125,25819,25184,-2412,19336,-14808,-27096,-26260,-21039,-20171,-32394,-910,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
sl@0
|
955 |
int i = 0;
|
sl@0
|
956 |
|
sl@0
|
957 |
for(i=0; i<SIZE*8; i++)
|
sl@0
|
958 |
{
|
sl@0
|
959 |
input1[i] = i+1;
|
sl@0
|
960 |
input2[i] = i+2;
|
sl@0
|
961 |
|
sl@0
|
962 |
output[i] = 0;
|
sl@0
|
963 |
}
|
sl@0
|
964 |
|
sl@0
|
965 |
oil_multiply_and_acc_8xn_s16_u8(output, 1, input1, 2, input2, 3, SIZE);
|
sl@0
|
966 |
|
sl@0
|
967 |
for(i = 0; i < SIZE*8; i++)
|
sl@0
|
968 |
{
|
sl@0
|
969 |
if(output[i] != linux_output[i])
|
sl@0
|
970 |
{
|
sl@0
|
971 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
972 |
assert_failed = 1;
|
sl@0
|
973 |
}
|
sl@0
|
974 |
}
|
sl@0
|
975 |
|
sl@0
|
976 |
}
|
sl@0
|
977 |
|
sl@0
|
978 |
void test_oil_multiply_and_add_s16()
|
sl@0
|
979 |
{
|
sl@0
|
980 |
//int16_t * d, const int16_t * src1, const int16_t * src2, const int16_t * src3, int n
|
sl@0
|
981 |
int16_t output[SIZE];
|
sl@0
|
982 |
int16_t input1[SIZE];
|
sl@0
|
983 |
int16_t input2[SIZE];
|
sl@0
|
984 |
int16_t input3[SIZE];
|
sl@0
|
985 |
int16_t linux_output[] = {7,14,23,34,47,62,79,98,119,142,167,194,223,254,287,322,359,398,439,482};
|
sl@0
|
986 |
int i = 0;
|
sl@0
|
987 |
|
sl@0
|
988 |
for(i=0; i<SIZE; i++)
|
sl@0
|
989 |
{
|
sl@0
|
990 |
input1[i] = i+1;
|
sl@0
|
991 |
input2[i] = i+2;
|
sl@0
|
992 |
input3[i] = i+3;
|
sl@0
|
993 |
|
sl@0
|
994 |
output[i] = 0;
|
sl@0
|
995 |
}
|
sl@0
|
996 |
|
sl@0
|
997 |
oil_multiply_and_add_s16(output, input1, input2, input3, SIZE);
|
sl@0
|
998 |
|
sl@0
|
999 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
1000 |
{
|
sl@0
|
1001 |
if(output[i] != linux_output[i])
|
sl@0
|
1002 |
{
|
sl@0
|
1003 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1004 |
assert_failed = 1;
|
sl@0
|
1005 |
}
|
sl@0
|
1006 |
}
|
sl@0
|
1007 |
}
|
sl@0
|
1008 |
|
sl@0
|
1009 |
void test_oil_multiply_and_add_s16_u8()
|
sl@0
|
1010 |
{
|
sl@0
|
1011 |
//int16_t * d, const int16_t * src1, const int16_t * src2, const uint8_t * src3, int n
|
sl@0
|
1012 |
int16_t output[SIZE];
|
sl@0
|
1013 |
int16_t input1[SIZE];
|
sl@0
|
1014 |
int16_t input2[SIZE];
|
sl@0
|
1015 |
uint8_t input3[SIZE];
|
sl@0
|
1016 |
int16_t linux_output[] = {7,14,23,34,47,62,79,98,119,142,167,194,223,254,287,322,359,398,439,482};
|
sl@0
|
1017 |
int i = 0;
|
sl@0
|
1018 |
|
sl@0
|
1019 |
for(i=0; i<SIZE; i++)
|
sl@0
|
1020 |
{
|
sl@0
|
1021 |
input1[i] = i+1;
|
sl@0
|
1022 |
input2[i] = i+2;
|
sl@0
|
1023 |
input3[i] = i+3;
|
sl@0
|
1024 |
|
sl@0
|
1025 |
output[i] = 0;
|
sl@0
|
1026 |
}
|
sl@0
|
1027 |
|
sl@0
|
1028 |
oil_multiply_and_add_s16_u8(output, input1, input2, input3, SIZE);
|
sl@0
|
1029 |
|
sl@0
|
1030 |
for(i = 0; i < SIZE; i++)
|
sl@0
|
1031 |
{
|
sl@0
|
1032 |
if(output[i] != linux_output[i])
|
sl@0
|
1033 |
{
|
sl@0
|
1034 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1035 |
assert_failed = 1;
|
sl@0
|
1036 |
}
|
sl@0
|
1037 |
}
|
sl@0
|
1038 |
}
|
sl@0
|
1039 |
|
sl@0
|
1040 |
void test_oil_split_135()
|
sl@0
|
1041 |
{
|
sl@0
|
1042 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1043 |
int16_t output[SIZE*2];
|
sl@0
|
1044 |
int16_t input1[SIZE*2];
|
sl@0
|
1045 |
int16_t linux_output[] = {1,1,3,0,4,0,7,0,9,0,11,0,13,0,15,0,17,0,19,0,21,0,23,0,25,0,27,0,29,0,31,0,33,0,35,0,36,0,39,1};
|
sl@0
|
1046 |
int i = 0;
|
sl@0
|
1047 |
|
sl@0
|
1048 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1049 |
{
|
sl@0
|
1050 |
input1[i] = i+1;
|
sl@0
|
1051 |
output[i] = 0;
|
sl@0
|
1052 |
}
|
sl@0
|
1053 |
|
sl@0
|
1054 |
oil_split_135(output, input1, SIZE);
|
sl@0
|
1055 |
|
sl@0
|
1056 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1057 |
{
|
sl@0
|
1058 |
if(output[i] != linux_output[i])
|
sl@0
|
1059 |
{
|
sl@0
|
1060 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1061 |
assert_failed = 1;
|
sl@0
|
1062 |
}
|
sl@0
|
1063 |
}
|
sl@0
|
1064 |
}
|
sl@0
|
1065 |
|
sl@0
|
1066 |
void test_oil_split_53()
|
sl@0
|
1067 |
{
|
sl@0
|
1068 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1069 |
int16_t output[SIZE*2];
|
sl@0
|
1070 |
int16_t input1[SIZE*2];
|
sl@0
|
1071 |
int16_t linux_output[] = {1,0,3,0,5,0,7,0,9,0,11,0,13,0,15,0,17,0,19,0,21,0,23,0,25,0,27,0,29,0,31,0,33,0,35,0,37,0,39,1};
|
sl@0
|
1072 |
int i = 0;
|
sl@0
|
1073 |
|
sl@0
|
1074 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1075 |
{
|
sl@0
|
1076 |
input1[i] = i+1;
|
sl@0
|
1077 |
output[i] = 0;
|
sl@0
|
1078 |
}
|
sl@0
|
1079 |
|
sl@0
|
1080 |
oil_split_53(output, input1, SIZE);
|
sl@0
|
1081 |
|
sl@0
|
1082 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1083 |
{
|
sl@0
|
1084 |
if(output[i] != linux_output[i])
|
sl@0
|
1085 |
{
|
sl@0
|
1086 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1087 |
assert_failed = 1;
|
sl@0
|
1088 |
}
|
sl@0
|
1089 |
}
|
sl@0
|
1090 |
}
|
sl@0
|
1091 |
|
sl@0
|
1092 |
void test_oil_split_approx97()
|
sl@0
|
1093 |
{
|
sl@0
|
1094 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1095 |
int16_t output[SIZE*2];
|
sl@0
|
1096 |
int16_t input1[SIZE*2];
|
sl@0
|
1097 |
int16_t linux_output[] = {1,1,3,0,5,0,7,0,9,0,11,0,13,0,15,0,17,0,19,0,21,0,23,0,25,0,27,0,29,0,31,0,33,0,35,0,37,0,39,1};
|
sl@0
|
1098 |
int i = 0;
|
sl@0
|
1099 |
|
sl@0
|
1100 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1101 |
{
|
sl@0
|
1102 |
input1[i] = i+1;
|
sl@0
|
1103 |
output[i] = 0;
|
sl@0
|
1104 |
}
|
sl@0
|
1105 |
|
sl@0
|
1106 |
oil_split_approx97(output, input1, SIZE);
|
sl@0
|
1107 |
|
sl@0
|
1108 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1109 |
{
|
sl@0
|
1110 |
if(output[i] != linux_output[i])
|
sl@0
|
1111 |
{
|
sl@0
|
1112 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1113 |
assert_failed = 1;
|
sl@0
|
1114 |
}
|
sl@0
|
1115 |
}
|
sl@0
|
1116 |
}
|
sl@0
|
1117 |
|
sl@0
|
1118 |
void test_oil_split_daub97()
|
sl@0
|
1119 |
{
|
sl@0
|
1120 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1121 |
int16_t output[SIZE*2];
|
sl@0
|
1122 |
int16_t input1[SIZE*2];
|
sl@0
|
1123 |
int16_t linux_output[] = {2,1,4,1,7,1,9,1,12,1,14,0,16,0,19,1,21,0,24,1,26,1,29,0,31,1,34,1,36,1,39,1,41,1,43,0,46,0,48,1};
|
sl@0
|
1124 |
int i = 0;
|
sl@0
|
1125 |
|
sl@0
|
1126 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1127 |
{
|
sl@0
|
1128 |
input1[i] = i+1;
|
sl@0
|
1129 |
output[i] = 0;
|
sl@0
|
1130 |
}
|
sl@0
|
1131 |
|
sl@0
|
1132 |
oil_split_daub97(output, input1, SIZE);
|
sl@0
|
1133 |
|
sl@0
|
1134 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1135 |
{
|
sl@0
|
1136 |
if(output[i] != linux_output[i])
|
sl@0
|
1137 |
{
|
sl@0
|
1138 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1139 |
assert_failed = 1;
|
sl@0
|
1140 |
}
|
sl@0
|
1141 |
}
|
sl@0
|
1142 |
}
|
sl@0
|
1143 |
|
sl@0
|
1144 |
void test_oil_synth_135()
|
sl@0
|
1145 |
{
|
sl@0
|
1146 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1147 |
int16_t output[SIZE*2];
|
sl@0
|
1148 |
int16_t input1[SIZE*2];
|
sl@0
|
1149 |
int16_t linux_output[] = {1,3,2,6,3,9,4,12,5,15,6,18,7,21,8,24,9,27,10,30,11,33,12,36,13,39,14,42,15,45,16,48,17,51,18,54,19,57,20,60};
|
sl@0
|
1150 |
int i = 0;
|
sl@0
|
1151 |
|
sl@0
|
1152 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1153 |
{
|
sl@0
|
1154 |
input1[i] = i+1;
|
sl@0
|
1155 |
output[i] = 0;
|
sl@0
|
1156 |
}
|
sl@0
|
1157 |
|
sl@0
|
1158 |
oil_synth_135(output, input1, SIZE);
|
sl@0
|
1159 |
|
sl@0
|
1160 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1161 |
{
|
sl@0
|
1162 |
if(output[i] != linux_output[i])
|
sl@0
|
1163 |
{
|
sl@0
|
1164 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1165 |
assert_failed = 1;
|
sl@0
|
1166 |
}
|
sl@0
|
1167 |
}
|
sl@0
|
1168 |
}
|
sl@0
|
1169 |
|
sl@0
|
1170 |
void test_oil_synth_53()
|
sl@0
|
1171 |
{
|
sl@0
|
1172 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1173 |
int16_t output[SIZE*2];
|
sl@0
|
1174 |
int16_t input1[SIZE*2];
|
sl@0
|
1175 |
int16_t linux_output[] = {0,3,2,6,3,9,4,12,5,15,6,18,7,21,8,24,9,27,10,30,11,33,12,36,13,39,14,42,15,45,16,48,17,51,18,54,19,57,20,60};
|
sl@0
|
1176 |
int i = 0;
|
sl@0
|
1177 |
|
sl@0
|
1178 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1179 |
{
|
sl@0
|
1180 |
input1[i] = i+1;
|
sl@0
|
1181 |
output[i] = 0;
|
sl@0
|
1182 |
}
|
sl@0
|
1183 |
|
sl@0
|
1184 |
oil_synth_53(output, input1, SIZE);
|
sl@0
|
1185 |
|
sl@0
|
1186 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1187 |
{
|
sl@0
|
1188 |
if(output[i] != linux_output[i])
|
sl@0
|
1189 |
{
|
sl@0
|
1190 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1191 |
assert_failed = 1;
|
sl@0
|
1192 |
}
|
sl@0
|
1193 |
}
|
sl@0
|
1194 |
}
|
sl@0
|
1195 |
|
sl@0
|
1196 |
void test_oil_synth_approx97()
|
sl@0
|
1197 |
{
|
sl@0
|
1198 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1199 |
int16_t output[SIZE*2];
|
sl@0
|
1200 |
int16_t input1[SIZE*2];
|
sl@0
|
1201 |
int16_t linux_output[] = {0,2,2,6,3,9,4,12,5,15,6,18,7,21,8,24,9,27,10,30,11,33,12,36,13,39,14,42,15,45,16,48,17,51,18,54,19,57,20,60};
|
sl@0
|
1202 |
int i = 0;
|
sl@0
|
1203 |
|
sl@0
|
1204 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1205 |
{
|
sl@0
|
1206 |
input1[i] = i+1;
|
sl@0
|
1207 |
output[i] = 0;
|
sl@0
|
1208 |
}
|
sl@0
|
1209 |
|
sl@0
|
1210 |
oil_synth_approx97(output, input1, SIZE);
|
sl@0
|
1211 |
|
sl@0
|
1212 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1213 |
{
|
sl@0
|
1214 |
if(output[i] != linux_output[i])
|
sl@0
|
1215 |
{
|
sl@0
|
1216 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1217 |
assert_failed = 1;
|
sl@0
|
1218 |
}
|
sl@0
|
1219 |
}
|
sl@0
|
1220 |
}
|
sl@0
|
1221 |
|
sl@0
|
1222 |
void test_oil_synth_daub97()
|
sl@0
|
1223 |
{
|
sl@0
|
1224 |
//int16_t * d_2xn, const int16_t * s_2xn, int n
|
sl@0
|
1225 |
int16_t output[SIZE*2];
|
sl@0
|
1226 |
int16_t input1[SIZE*2];
|
sl@0
|
1227 |
int16_t linux_output[] = {0,3,1,6,1,8,1,10,2,13,2,16,3,20,3,22,3,25,4,27,4,29,4,33,5,37,6,40,6,42,6,44,6,46,6,51,8,55,8,57};
|
sl@0
|
1228 |
int i = 0;
|
sl@0
|
1229 |
|
sl@0
|
1230 |
for(i=0; i<SIZE*2; i++)
|
sl@0
|
1231 |
{
|
sl@0
|
1232 |
input1[i] = i+1;
|
sl@0
|
1233 |
output[i] = 0;
|
sl@0
|
1234 |
}
|
sl@0
|
1235 |
|
sl@0
|
1236 |
oil_synth_daub97(output, input1, SIZE);
|
sl@0
|
1237 |
|
sl@0
|
1238 |
for(i = 0; i < SIZE*2; i++)
|
sl@0
|
1239 |
{
|
sl@0
|
1240 |
if(output[i] != linux_output[i])
|
sl@0
|
1241 |
{
|
sl@0
|
1242 |
std_log(LOG_FILENAME_LINE, "output[%d]: expected value - %d, actual value - %d", i,linux_output[i],output[i]);
|
sl@0
|
1243 |
assert_failed = 1;
|
sl@0
|
1244 |
}
|
sl@0
|
1245 |
}
|
sl@0
|
1246 |
}
|
sl@0
|
1247 |
|
sl@0
|
1248 |
int main (int argc, char *argv[])
|
sl@0
|
1249 |
{
|
sl@0
|
1250 |
oil_init();
|
sl@0
|
1251 |
|
sl@0
|
1252 |
std_log(LOG_FILENAME_LINE,"START oil_add2_rshift_add_s16 TEST");
|
sl@0
|
1253 |
test_oil_add2_rshift_add_s16();
|
sl@0
|
1254 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1255 |
|
sl@0
|
1256 |
std_log(LOG_FILENAME_LINE,"START oil_add2_rshift_sub_s16 TEST");
|
sl@0
|
1257 |
test_oil_add2_rshift_sub_s16();
|
sl@0
|
1258 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1259 |
|
sl@0
|
1260 |
std_log(LOG_FILENAME_LINE,"START oil_add_const_rshift_s16 TEST");
|
sl@0
|
1261 |
test_oil_add_const_rshift_s16();
|
sl@0
|
1262 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1263 |
|
sl@0
|
1264 |
std_log(LOG_FILENAME_LINE,"START oil_avg2_12xn_u8 TEST");
|
sl@0
|
1265 |
test_oil_avg2_12xn_u8();
|
sl@0
|
1266 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1267 |
|
sl@0
|
1268 |
std_log(LOG_FILENAME_LINE,"START oil_avg2_16xn_u8 TEST");
|
sl@0
|
1269 |
test_oil_avg2_16xn_u8();
|
sl@0
|
1270 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1271 |
|
sl@0
|
1272 |
std_log(LOG_FILENAME_LINE,"START oil_avg2_8xn_u8 TEST");
|
sl@0
|
1273 |
test_oil_avg2_8xn_u8();
|
sl@0
|
1274 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1275 |
|
sl@0
|
1276 |
std_log(LOG_FILENAME_LINE,"START oil_combine2_12xn_u8 TEST");
|
sl@0
|
1277 |
test_oil_combine2_12xn_u8();
|
sl@0
|
1278 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1279 |
|
sl@0
|
1280 |
std_log(LOG_FILENAME_LINE,"START oil_combine2_16xn_u8 TEST");
|
sl@0
|
1281 |
test_oil_combine2_16xn_u8();
|
sl@0
|
1282 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1283 |
|
sl@0
|
1284 |
std_log(LOG_FILENAME_LINE,"START oil_combine2_8xn_u8 TEST");
|
sl@0
|
1285 |
test_oil_combine2_8xn_u8();
|
sl@0
|
1286 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1287 |
|
sl@0
|
1288 |
std_log(LOG_FILENAME_LINE,"START oil_combine4_12xn_u8 TEST");
|
sl@0
|
1289 |
test_oil_combine4_12xn_u8(); //case fails...getting diff result than linux one.
|
sl@0
|
1290 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1291 |
|
sl@0
|
1292 |
std_log(LOG_FILENAME_LINE,"START oil_combine4_16xn_u8 TEST");
|
sl@0
|
1293 |
test_oil_combine4_16xn_u8(); //case fails...getting diff result than linux one.
|
sl@0
|
1294 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1295 |
|
sl@0
|
1296 |
std_log(LOG_FILENAME_LINE,"START oil_combine4_8xn_u8 TEST");
|
sl@0
|
1297 |
test_oil_combine4_8xn_u8(); //case fails...getting diff result than linux one.
|
sl@0
|
1298 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1299 |
|
sl@0
|
1300 |
std_log(LOG_FILENAME_LINE,"START oil_deinterleave TEST");
|
sl@0
|
1301 |
test_oil_deinterleave();
|
sl@0
|
1302 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1303 |
|
sl@0
|
1304 |
std_log(LOG_FILENAME_LINE,"START oil_deinterleave2_s16 TEST");
|
sl@0
|
1305 |
test_oil_deinterleave2_s16();
|
sl@0
|
1306 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1307 |
|
sl@0
|
1308 |
std_log(LOG_FILENAME_LINE,"START oil_interleave TEST");
|
sl@0
|
1309 |
test_oil_interleave();
|
sl@0
|
1310 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1311 |
|
sl@0
|
1312 |
std_log(LOG_FILENAME_LINE,"START oil_interleave2_s16 TEST");
|
sl@0
|
1313 |
test_oil_interleave2_s16();
|
sl@0
|
1314 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1315 |
|
sl@0
|
1316 |
std_log(LOG_FILENAME_LINE,"START oil_lift_add_135 TEST");
|
sl@0
|
1317 |
test_oil_lift_add_135();
|
sl@0
|
1318 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1319 |
|
sl@0
|
1320 |
std_log(LOG_FILENAME_LINE,"START oil_lift_add_mult_shift12 TEST");
|
sl@0
|
1321 |
test_oil_lift_add_mult_shift12();
|
sl@0
|
1322 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1323 |
|
sl@0
|
1324 |
std_log(LOG_FILENAME_LINE,"START oil_lift_add_shift1 TEST");
|
sl@0
|
1325 |
test_oil_lift_add_shift1();
|
sl@0
|
1326 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1327 |
|
sl@0
|
1328 |
std_log(LOG_FILENAME_LINE,"START oil_interleave2_s16 TEST");
|
sl@0
|
1329 |
test_oil_lift_add_shift2();
|
sl@0
|
1330 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1331 |
|
sl@0
|
1332 |
std_log(LOG_FILENAME_LINE,"START oil_lift_sub_135 TEST");
|
sl@0
|
1333 |
test_oil_lift_sub_135();
|
sl@0
|
1334 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1335 |
|
sl@0
|
1336 |
std_log(LOG_FILENAME_LINE,"START oil_lift_sub_mult_shift12 TEST");
|
sl@0
|
1337 |
test_oil_lift_sub_mult_shift12();
|
sl@0
|
1338 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1339 |
|
sl@0
|
1340 |
std_log(LOG_FILENAME_LINE,"START oil_lift_sub_shift1 TEST");
|
sl@0
|
1341 |
test_oil_lift_sub_shift1();
|
sl@0
|
1342 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1343 |
|
sl@0
|
1344 |
std_log(LOG_FILENAME_LINE,"START oil_lift_sub_shift2 TEST");
|
sl@0
|
1345 |
test_oil_lift_sub_shift2();
|
sl@0
|
1346 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1347 |
|
sl@0
|
1348 |
std_log(LOG_FILENAME_LINE,"START oil_lshift_s16 TEST");
|
sl@0
|
1349 |
test_oil_lshift_s16();
|
sl@0
|
1350 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1351 |
|
sl@0
|
1352 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_acc_12xn_s16_u8 TEST");
|
sl@0
|
1353 |
test_oil_multiply_and_acc_12xn_s16_u8();
|
sl@0
|
1354 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1355 |
|
sl@0
|
1356 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_acc_16xn_s16_u8 TEST");
|
sl@0
|
1357 |
test_oil_multiply_and_acc_16xn_s16_u8();
|
sl@0
|
1358 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1359 |
|
sl@0
|
1360 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_acc_24xn_s16_u8 TEST");
|
sl@0
|
1361 |
test_oil_multiply_and_acc_24xn_s16_u8();
|
sl@0
|
1362 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1363 |
|
sl@0
|
1364 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_acc_6xn_s16_u8 TEST");
|
sl@0
|
1365 |
test_oil_multiply_and_acc_6xn_s16_u8();
|
sl@0
|
1366 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1367 |
|
sl@0
|
1368 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_acc_8xn_s16_u8 TEST");
|
sl@0
|
1369 |
test_oil_multiply_and_acc_8xn_s16_u8();
|
sl@0
|
1370 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1371 |
|
sl@0
|
1372 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_add_s16 TEST");
|
sl@0
|
1373 |
test_oil_multiply_and_add_s16();
|
sl@0
|
1374 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1375 |
|
sl@0
|
1376 |
std_log(LOG_FILENAME_LINE,"START oil_multiply_and_add_s16_u8 TEST");
|
sl@0
|
1377 |
test_oil_multiply_and_add_s16_u8();
|
sl@0
|
1378 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1379 |
|
sl@0
|
1380 |
std_log(LOG_FILENAME_LINE,"START oil_split_135 TEST");
|
sl@0
|
1381 |
test_oil_split_135();
|
sl@0
|
1382 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1383 |
|
sl@0
|
1384 |
std_log(LOG_FILENAME_LINE,"START oil_split_53 TEST");
|
sl@0
|
1385 |
test_oil_split_53();
|
sl@0
|
1386 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1387 |
|
sl@0
|
1388 |
std_log(LOG_FILENAME_LINE,"START oil_split_approx97 TEST");
|
sl@0
|
1389 |
test_oil_split_approx97();
|
sl@0
|
1390 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1391 |
|
sl@0
|
1392 |
std_log(LOG_FILENAME_LINE,"START oil_split_daub97 TEST");
|
sl@0
|
1393 |
test_oil_split_daub97();
|
sl@0
|
1394 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1395 |
|
sl@0
|
1396 |
std_log(LOG_FILENAME_LINE,"START oil_synth_135 TEST");
|
sl@0
|
1397 |
test_oil_synth_135();
|
sl@0
|
1398 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1399 |
|
sl@0
|
1400 |
std_log(LOG_FILENAME_LINE,"START oil_synth_53 TEST");
|
sl@0
|
1401 |
test_oil_synth_53();
|
sl@0
|
1402 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1403 |
|
sl@0
|
1404 |
std_log(LOG_FILENAME_LINE,"START oil_synth_approx97 TEST");
|
sl@0
|
1405 |
test_oil_synth_approx97();
|
sl@0
|
1406 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1407 |
|
sl@0
|
1408 |
std_log(LOG_FILENAME_LINE,"START oil_synth_daub97 TEST");
|
sl@0
|
1409 |
test_oil_synth_daub97();
|
sl@0
|
1410 |
std_log(LOG_FILENAME_LINE,"END TEST\n");
|
sl@0
|
1411 |
|
sl@0
|
1412 |
if(assert_failed)
|
sl@0
|
1413 |
std_log(LOG_FILENAME_LINE,"Test Failed");
|
sl@0
|
1414 |
else
|
sl@0
|
1415 |
std_log(LOG_FILENAME_LINE,"Test Successful");
|
sl@0
|
1416 |
|
sl@0
|
1417 |
create_xml(0);
|
sl@0
|
1418 |
|
sl@0
|
1419 |
return 0;
|
sl@0
|
1420 |
}
|
sl@0
|
1421 |
|