1074 lines
12 KiB
C
1074 lines
12 KiB
C
|
/******************************************************************************
|
||
|
*
|
||
|
* Copyright (C) 2018 The Android Open Source Project
|
||
|
*
|
||
|
* 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:
|
||
|
*
|
||
|
* http://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.
|
||
|
*
|
||
|
*****************************************************************************
|
||
|
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||
|
*/
|
||
|
/*!
|
||
|
******************************************************************************
|
||
|
* \file common_rom.c
|
||
|
*
|
||
|
* \brief
|
||
|
* This file contain square root Table
|
||
|
*
|
||
|
* \date
|
||
|
*
|
||
|
* \author
|
||
|
* ittiam
|
||
|
*
|
||
|
******************************************************************************
|
||
|
*/
|
||
|
/*****************************************************************************/
|
||
|
/* File Includes */
|
||
|
/*****************************************************************************/
|
||
|
/* System include files */
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
/* User include files */
|
||
|
#include "ia_type_def.h"
|
||
|
|
||
|
const WORD32 gi4_sqrt_tab[513] = /*sqrt_tab in Q15*/
|
||
|
{
|
||
|
|
||
|
1073741824,
|
||
|
|
||
|
1074789888,
|
||
|
|
||
|
1075836928,
|
||
|
|
||
|
1076882944,
|
||
|
|
||
|
1077927936,
|
||
|
|
||
|
1078971904,
|
||
|
|
||
|
1080014976,
|
||
|
|
||
|
1081056896,
|
||
|
|
||
|
1082097920,
|
||
|
|
||
|
1083137920,
|
||
|
|
||
|
1084176896,
|
||
|
|
||
|
1085214848,
|
||
|
|
||
|
1086251904,
|
||
|
|
||
|
1087287808,
|
||
|
|
||
|
1088322944,
|
||
|
|
||
|
1089356928,
|
||
|
|
||
|
1090390016,
|
||
|
|
||
|
1091422080,
|
||
|
|
||
|
1092453120,
|
||
|
|
||
|
1093483264,
|
||
|
|
||
|
1094512512,
|
||
|
|
||
|
1095540608,
|
||
|
|
||
|
1096567936,
|
||
|
|
||
|
1097594112,
|
||
|
|
||
|
1098619392,
|
||
|
|
||
|
1099643776,
|
||
|
|
||
|
1100667264,
|
||
|
|
||
|
1101689600,
|
||
|
|
||
|
1102711168,
|
||
|
|
||
|
1103731712,
|
||
|
|
||
|
1104751360,
|
||
|
|
||
|
1105769984,
|
||
|
|
||
|
1106787712,
|
||
|
|
||
|
1107804544,
|
||
|
|
||
|
1108820352,
|
||
|
|
||
|
1109835392,
|
||
|
|
||
|
1110849408,
|
||
|
|
||
|
1111862400,
|
||
|
|
||
|
1112874624,
|
||
|
|
||
|
1113885824,
|
||
|
|
||
|
1114896128,
|
||
|
|
||
|
1115905536,
|
||
|
|
||
|
1116914048,
|
||
|
|
||
|
1117921664,
|
||
|
|
||
|
1118928384,
|
||
|
|
||
|
1119934208,
|
||
|
|
||
|
1120939008,
|
||
|
|
||
|
1121943040,
|
||
|
|
||
|
1122946048,
|
||
|
|
||
|
1123948288,
|
||
|
|
||
|
1124949504,
|
||
|
|
||
|
1125949952,
|
||
|
|
||
|
1126949504,
|
||
|
|
||
|
1127948032,
|
||
|
|
||
|
1128945792,
|
||
|
|
||
|
1129942656,
|
||
|
|
||
|
1130938624,
|
||
|
|
||
|
1131933824,
|
||
|
|
||
|
1132928000,
|
||
|
|
||
|
1133921408,
|
||
|
|
||
|
1134913920,
|
||
|
|
||
|
1135905536,
|
||
|
|
||
|
1136896256,
|
||
|
|
||
|
1137886208,
|
||
|
|
||
|
1138875136,
|
||
|
|
||
|
1139863424,
|
||
|
|
||
|
1140850688,
|
||
|
|
||
|
1141837184,
|
||
|
|
||
|
1142822784,
|
||
|
|
||
|
1143807488,
|
||
|
|
||
|
1144791424,
|
||
|
|
||
|
1145774592,
|
||
|
|
||
|
1146756736,
|
||
|
|
||
|
1147738112,
|
||
|
|
||
|
1148718720,
|
||
|
|
||
|
1149698432,
|
||
|
|
||
|
1150677376,
|
||
|
|
||
|
1151655424,
|
||
|
|
||
|
1152632576,
|
||
|
|
||
|
1153608960,
|
||
|
|
||
|
1154584576,
|
||
|
|
||
|
1155559296,
|
||
|
|
||
|
1156533248,
|
||
|
|
||
|
1157506304,
|
||
|
|
||
|
1158478592,
|
||
|
|
||
|
1159450112,
|
||
|
|
||
|
1160420736,
|
||
|
|
||
|
1161390592,
|
||
|
|
||
|
1162359680,
|
||
|
|
||
|
1163327872,
|
||
|
|
||
|
1164295296,
|
||
|
|
||
|
1165261952,
|
||
|
|
||
|
1166227712,
|
||
|
|
||
|
1167192704,
|
||
|
|
||
|
1168156928,
|
||
|
|
||
|
1169120384,
|
||
|
|
||
|
1170083072,
|
||
|
|
||
|
1171044864,
|
||
|
|
||
|
1172005888,
|
||
|
|
||
|
1172966144,
|
||
|
|
||
|
1173925632,
|
||
|
|
||
|
1174884352,
|
||
|
|
||
|
1175842304,
|
||
|
|
||
|
1176799488,
|
||
|
|
||
|
1177755776,
|
||
|
|
||
|
1178711424,
|
||
|
|
||
|
1179666176,
|
||
|
|
||
|
1180620160,
|
||
|
|
||
|
1181573504,
|
||
|
|
||
|
1182525952,
|
||
|
|
||
|
1183477760,
|
||
|
|
||
|
1184428672,
|
||
|
|
||
|
1185378816,
|
||
|
|
||
|
1186328320,
|
||
|
|
||
|
1187277056,
|
||
|
|
||
|
1188224896,
|
||
|
|
||
|
1189172096,
|
||
|
|
||
|
1190118528,
|
||
|
|
||
|
1191064192,
|
||
|
|
||
|
1192009088,
|
||
|
|
||
|
1192953216,
|
||
|
|
||
|
1193896704,
|
||
|
|
||
|
1194839296,
|
||
|
|
||
|
1195781248,
|
||
|
|
||
|
1196722432,
|
||
|
|
||
|
1197662976,
|
||
|
|
||
|
1198602624,
|
||
|
|
||
|
1199541632,
|
||
|
|
||
|
1200479872,
|
||
|
|
||
|
1201417344,
|
||
|
|
||
|
1202354176,
|
||
|
|
||
|
1203290240,
|
||
|
|
||
|
1204225536,
|
||
|
|
||
|
1205160064,
|
||
|
|
||
|
1206093952,
|
||
|
|
||
|
1207027072,
|
||
|
|
||
|
1207959552,
|
||
|
|
||
|
1208891264,
|
||
|
|
||
|
1209822208,
|
||
|
|
||
|
1210752512,
|
||
|
|
||
|
1211682048,
|
||
|
|
||
|
1212610944,
|
||
|
|
||
|
1213539072,
|
||
|
|
||
|
1214466560,
|
||
|
|
||
|
1215393280,
|
||
|
|
||
|
1216319232,
|
||
|
|
||
|
1217244544,
|
||
|
|
||
|
1218169088,
|
||
|
|
||
|
1219092992,
|
||
|
|
||
|
1220016256,
|
||
|
|
||
|
1220938752,
|
||
|
|
||
|
1221860608,
|
||
|
|
||
|
1222781696,
|
||
|
|
||
|
1223702144,
|
||
|
|
||
|
1224621824,
|
||
|
|
||
|
1225540864,
|
||
|
|
||
|
1226459264,
|
||
|
|
||
|
1227376896,
|
||
|
|
||
|
1228293888,
|
||
|
|
||
|
1229210240,
|
||
|
|
||
|
1230125824,
|
||
|
|
||
|
1231040768,
|
||
|
|
||
|
1231954944,
|
||
|
|
||
|
1232868608,
|
||
|
|
||
|
1233781504,
|
||
|
|
||
|
1234693632,
|
||
|
|
||
|
1235605248,
|
||
|
|
||
|
1236516096,
|
||
|
|
||
|
1237426304,
|
||
|
|
||
|
1238335872,
|
||
|
|
||
|
1239244672,
|
||
|
|
||
|
1240152960,
|
||
|
|
||
|
1241060480,
|
||
|
|
||
|
1241967360,
|
||
|
|
||
|
1242873600,
|
||
|
|
||
|
1243779072,
|
||
|
|
||
|
1244684032,
|
||
|
|
||
|
1245588224,
|
||
|
|
||
|
1246491776,
|
||
|
|
||
|
1247394816,
|
||
|
|
||
|
1248297088,
|
||
|
|
||
|
1249198592,
|
||
|
|
||
|
1250099584,
|
||
|
|
||
|
1250999936,
|
||
|
|
||
|
1251899648,
|
||
|
|
||
|
1252798592,
|
||
|
|
||
|
1253697024,
|
||
|
|
||
|
1254594816,
|
||
|
|
||
|
1255491840,
|
||
|
|
||
|
1256388352,
|
||
|
|
||
|
1257284224,
|
||
|
|
||
|
1258179328,
|
||
|
|
||
|
1259073920,
|
||
|
|
||
|
1259967744,
|
||
|
|
||
|
1260861056,
|
||
|
|
||
|
1261753728,
|
||
|
|
||
|
1262645760,
|
||
|
|
||
|
1263537152,
|
||
|
|
||
|
1264427904,
|
||
|
|
||
|
1265318016,
|
||
|
|
||
|
1266207488,
|
||
|
|
||
|
1267096448,
|
||
|
|
||
|
1267984640,
|
||
|
|
||
|
1268872320,
|
||
|
|
||
|
1269759232,
|
||
|
|
||
|
1270645632,
|
||
|
|
||
|
1271531520,
|
||
|
|
||
|
1272416640,
|
||
|
|
||
|
1273301120,
|
||
|
|
||
|
1274185088,
|
||
|
|
||
|
1275068416,
|
||
|
|
||
|
1275951104,
|
||
|
|
||
|
1276833280,
|
||
|
|
||
|
1277714688,
|
||
|
|
||
|
1278595584,
|
||
|
|
||
|
1279475840,
|
||
|
|
||
|
1280355584,
|
||
|
|
||
|
1281234560,
|
||
|
|
||
|
1282113024,
|
||
|
|
||
|
1282990848,
|
||
|
|
||
|
1283868160,
|
||
|
|
||
|
1284744832,
|
||
|
|
||
|
1285620864,
|
||
|
|
||
|
1286496384,
|
||
|
|
||
|
1287371264,
|
||
|
|
||
|
1288245504,
|
||
|
|
||
|
1289119232,
|
||
|
|
||
|
1289992320,
|
||
|
|
||
|
1290864768,
|
||
|
|
||
|
1291736704,
|
||
|
|
||
|
1292608000,
|
||
|
|
||
|
1293478784,
|
||
|
|
||
|
1294348928,
|
||
|
|
||
|
1295218432,
|
||
|
|
||
|
1296087424,
|
||
|
|
||
|
1296955904,
|
||
|
|
||
|
1297823616,
|
||
|
|
||
|
1298690944,
|
||
|
|
||
|
1299557504,
|
||
|
|
||
|
1300423680,
|
||
|
|
||
|
1301289216,
|
||
|
|
||
|
1302154112,
|
||
|
|
||
|
1303018496,
|
||
|
|
||
|
1303882240,
|
||
|
|
||
|
1304745472,
|
||
|
|
||
|
1305608064,
|
||
|
|
||
|
1306470144,
|
||
|
|
||
|
1307331712,
|
||
|
|
||
|
1308192640,
|
||
|
|
||
|
1309052928,
|
||
|
|
||
|
1309912704,
|
||
|
|
||
|
1310771968,
|
||
|
|
||
|
1311630720,
|
||
|
|
||
|
1312488832,
|
||
|
|
||
|
1313346304,
|
||
|
|
||
|
1314203392,
|
||
|
|
||
|
1315059840,
|
||
|
|
||
|
1315915648,
|
||
|
|
||
|
1316770944,
|
||
|
|
||
|
1317625728,
|
||
|
|
||
|
1318480000,
|
||
|
|
||
|
1319333632,
|
||
|
|
||
|
1320186752,
|
||
|
|
||
|
1321039360,
|
||
|
|
||
|
1321891328,
|
||
|
|
||
|
1322742784,
|
||
|
|
||
|
1323593728,
|
||
|
|
||
|
1324444032,
|
||
|
|
||
|
1325293824,
|
||
|
|
||
|
1326143104,
|
||
|
|
||
|
1326991872,
|
||
|
|
||
|
1327840128,
|
||
|
|
||
|
1328687744,
|
||
|
|
||
|
1329534848,
|
||
|
|
||
|
1330381440,
|
||
|
|
||
|
1331227392,
|
||
|
|
||
|
1332072960,
|
||
|
|
||
|
1332917888,
|
||
|
|
||
|
1333762304,
|
||
|
|
||
|
1334606208,
|
||
|
|
||
|
1335449472,
|
||
|
|
||
|
1336292352,
|
||
|
|
||
|
1337134592,
|
||
|
|
||
|
1337976448,
|
||
|
|
||
|
1338817664,
|
||
|
|
||
|
1339658368,
|
||
|
|
||
|
1340498560,
|
||
|
|
||
|
1341338112,
|
||
|
|
||
|
1342177280,
|
||
|
|
||
|
1343015936,
|
||
|
|
||
|
1343853952,
|
||
|
|
||
|
1344691456,
|
||
|
|
||
|
1345528576,
|
||
|
|
||
|
1346365056,
|
||
|
|
||
|
1347201024,
|
||
|
|
||
|
1348036480,
|
||
|
|
||
|
1348871424,
|
||
|
|
||
|
1349705856,
|
||
|
|
||
|
1350539776,
|
||
|
|
||
|
1351373184,
|
||
|
|
||
|
1352206080,
|
||
|
|
||
|
1353038464,
|
||
|
|
||
|
1353870336,
|
||
|
|
||
|
1354701696,
|
||
|
|
||
|
1355532544,
|
||
|
|
||
|
1356363008,
|
||
|
|
||
|
1357192832,
|
||
|
|
||
|
1358022144,
|
||
|
|
||
|
1358850944,
|
||
|
|
||
|
1359679232,
|
||
|
|
||
|
1360507008,
|
||
|
|
||
|
1361334400,
|
||
|
|
||
|
1362161152,
|
||
|
|
||
|
1362987520,
|
||
|
|
||
|
1363813248,
|
||
|
|
||
|
1364638592,
|
||
|
|
||
|
1365463424,
|
||
|
|
||
|
1366287744,
|
||
|
|
||
|
1367111552,
|
||
|
|
||
|
1367934848,
|
||
|
|
||
|
1368757632,
|
||
|
|
||
|
1369579904,
|
||
|
|
||
|
1370401792,
|
||
|
|
||
|
1371223168,
|
||
|
|
||
|
1372043904,
|
||
|
|
||
|
1372864384,
|
||
|
|
||
|
1373684224,
|
||
|
|
||
|
1374503552,
|
||
|
|
||
|
1375322496,
|
||
|
|
||
|
1376140800,
|
||
|
|
||
|
1376958720,
|
||
|
|
||
|
1377776256,
|
||
|
|
||
|
1378593152,
|
||
|
|
||
|
1379409536,
|
||
|
|
||
|
1380225536,
|
||
|
|
||
|
1381041024,
|
||
|
|
||
|
1381856128,
|
||
|
|
||
|
1382670592,
|
||
|
|
||
|
1383484672,
|
||
|
|
||
|
1384298240,
|
||
|
|
||
|
1385111296,
|
||
|
|
||
|
1385923968,
|
||
|
|
||
|
1386736128,
|
||
|
|
||
|
1387547776,
|
||
|
|
||
|
1388358912,
|
||
|
|
||
|
1389169664,
|
||
|
|
||
|
1389979904,
|
||
|
|
||
|
1390789760,
|
||
|
|
||
|
1391598976,
|
||
|
|
||
|
1392407808,
|
||
|
|
||
|
1393216256,
|
||
|
|
||
|
1394024064,
|
||
|
|
||
|
1394831488,
|
||
|
|
||
|
1395638528,
|
||
|
|
||
|
1396445056,
|
||
|
|
||
|
1397251072,
|
||
|
|
||
|
1398056576,
|
||
|
|
||
|
1398861696,
|
||
|
|
||
|
1399666304,
|
||
|
|
||
|
1400470528,
|
||
|
|
||
|
1401274240,
|
||
|
|
||
|
1402077440,
|
||
|
|
||
|
1402880256,
|
||
|
|
||
|
1403682560,
|
||
|
|
||
|
1404484480,
|
||
|
|
||
|
1405285888,
|
||
|
|
||
|
1406086912,
|
||
|
|
||
|
1406887296,
|
||
|
|
||
|
1407687424,
|
||
|
|
||
|
1408487040,
|
||
|
|
||
|
1409286144,
|
||
|
|
||
|
1410084864,
|
||
|
|
||
|
1410883072,
|
||
|
|
||
|
1411680896,
|
||
|
|
||
|
1412478208,
|
||
|
|
||
|
1413275136,
|
||
|
|
||
|
1414071552,
|
||
|
|
||
|
1414867456,
|
||
|
|
||
|
1415662976,
|
||
|
|
||
|
1416458112,
|
||
|
|
||
|
1417252736,
|
||
|
|
||
|
1418046976,
|
||
|
|
||
|
1418840704,
|
||
|
|
||
|
1419634048,
|
||
|
|
||
|
1420426880,
|
||
|
|
||
|
1421219328,
|
||
|
|
||
|
1422011392,
|
||
|
|
||
|
1422802816,
|
||
|
|
||
|
1423593984,
|
||
|
|
||
|
1424384640,
|
||
|
|
||
|
1425174912,
|
||
|
|
||
|
1425964672,
|
||
|
|
||
|
1426754048,
|
||
|
|
||
|
1427542912,
|
||
|
|
||
|
1428331392,
|
||
|
|
||
|
1429119488,
|
||
|
|
||
|
1429907072,
|
||
|
|
||
|
1430694272,
|
||
|
|
||
|
1431480960,
|
||
|
|
||
|
1432267264,
|
||
|
|
||
|
1433053184,
|
||
|
|
||
|
1433838592,
|
||
|
|
||
|
1434623616,
|
||
|
|
||
|
1435408256,
|
||
|
|
||
|
1436192384,
|
||
|
|
||
|
1436976128,
|
||
|
|
||
|
1437759488,
|
||
|
|
||
|
1438542336,
|
||
|
|
||
|
1439324800,
|
||
|
|
||
|
1440106752,
|
||
|
|
||
|
1440888448,
|
||
|
|
||
|
1441669632,
|
||
|
|
||
|
1442450304,
|
||
|
|
||
|
1443230720,
|
||
|
|
||
|
1444010624,
|
||
|
|
||
|
1444790144,
|
||
|
|
||
|
1445569152,
|
||
|
|
||
|
1446347776,
|
||
|
|
||
|
1447126016,
|
||
|
|
||
|
1447903872,
|
||
|
|
||
|
1448681216,
|
||
|
|
||
|
1449458304,
|
||
|
|
||
|
1450234880,
|
||
|
|
||
|
1451010944,
|
||
|
|
||
|
1451786752,
|
||
|
|
||
|
1452562048,
|
||
|
|
||
|
1453336960,
|
||
|
|
||
|
1454111360,
|
||
|
|
||
|
1454885504,
|
||
|
|
||
|
1455659136,
|
||
|
|
||
|
1456432384,
|
||
|
|
||
|
1457205248,
|
||
|
|
||
|
1457977728,
|
||
|
|
||
|
1458749696,
|
||
|
|
||
|
1459521408,
|
||
|
|
||
|
1460292608,
|
||
|
|
||
|
1461063424,
|
||
|
|
||
|
1461833728,
|
||
|
|
||
|
1462603776,
|
||
|
|
||
|
1463373312,
|
||
|
|
||
|
1464142592,
|
||
|
|
||
|
1464911360,
|
||
|
|
||
|
1465679744,
|
||
|
|
||
|
1466447744,
|
||
|
|
||
|
1467215232,
|
||
|
|
||
|
1467982464,
|
||
|
|
||
|
1468749184,
|
||
|
|
||
|
1469515520,
|
||
|
|
||
|
1470281600,
|
||
|
|
||
|
1471047168,
|
||
|
|
||
|
1471812352,
|
||
|
|
||
|
1472577024,
|
||
|
|
||
|
1473341440,
|
||
|
|
||
|
1474105472,
|
||
|
|
||
|
1474868992,
|
||
|
|
||
|
1475632256,
|
||
|
|
||
|
1476395008,
|
||
|
|
||
|
1477157376,
|
||
|
|
||
|
1477919360,
|
||
|
|
||
|
1478681088,
|
||
|
|
||
|
1479442304,
|
||
|
|
||
|
1480203136,
|
||
|
|
||
|
1480963584,
|
||
|
|
||
|
1481723648,
|
||
|
|
||
|
1482483200,
|
||
|
|
||
|
1483242496,
|
||
|
|
||
|
1484001408,
|
||
|
|
||
|
1484759936,
|
||
|
|
||
|
1485518080,
|
||
|
|
||
|
1486275712,
|
||
|
|
||
|
1487033088,
|
||
|
|
||
|
1487790080,
|
||
|
|
||
|
1488546560,
|
||
|
|
||
|
1489302784,
|
||
|
|
||
|
1490058624,
|
||
|
|
||
|
1490813952,
|
||
|
|
||
|
1491569024,
|
||
|
|
||
|
1492323712,
|
||
|
|
||
|
1493078016,
|
||
|
|
||
|
1493831808,
|
||
|
|
||
|
1494585344,
|
||
|
|
||
|
1495338496,
|
||
|
|
||
|
1496091264,
|
||
|
|
||
|
1496843648,
|
||
|
|
||
|
1497595648,
|
||
|
|
||
|
1498347264,
|
||
|
|
||
|
1499098496,
|
||
|
|
||
|
1499849344,
|
||
|
|
||
|
1500599808,
|
||
|
|
||
|
1501349888,
|
||
|
|
||
|
1502099712,
|
||
|
|
||
|
1502849024,
|
||
|
|
||
|
1503598080,
|
||
|
|
||
|
1504346624,
|
||
|
|
||
|
1505094912,
|
||
|
|
||
|
1505842816,
|
||
|
|
||
|
1506590208,
|
||
|
|
||
|
1507337344,
|
||
|
|
||
|
1508084096,
|
||
|
|
||
|
1508830592,
|
||
|
|
||
|
1509576576,
|
||
|
|
||
|
1510322176,
|
||
|
|
||
|
1511067520,
|
||
|
|
||
|
1511812480,
|
||
|
|
||
|
1512556928,
|
||
|
|
||
|
1513301120,
|
||
|
|
||
|
1514044928,
|
||
|
|
||
|
1514788480,
|
||
|
|
||
|
1515531520,
|
||
|
|
||
|
1516274304,
|
||
|
|
||
|
1517016576,
|
||
|
|
||
|
1517758592,
|
||
|
|
||
|
1518500249
|
||
|
|
||
|
};
|