[FFmpeg-soc] [soc]: r338 - in qcelp: qcelpdata.h qcelpdec.c

reynaldo subversion at mplayerhq.hu
Sat Jul 7 08:17:53 CEST 2007


Author: reynaldo
Date: Sat Jul  7 08:17:53 2007
New Revision: 338

Log:
more tables and a dummy close()

Modified:
   qcelp/qcelpdata.h
   qcelp/qcelpdec.c

Modified: qcelp/qcelpdata.h
==============================================================================
--- qcelp/qcelpdata.h	(original)
+++ qcelp/qcelpdata.h	Sat Jul  7 08:17:53 2007
@@ -182,6 +182,133 @@ static const QCELPBitmap QCELP_REFERENCE
 #define QCELP_LSP0_POS    66    /*!< only in rate 1/8 packets    */
 #define QCELP_CBSEED_POS  76    /*!< only in rate 1/8 packets    */
 
+typedef struct {
+    float x;
+    float y;
+} qcelp_fvector;
+
+static const qcelp_fvector qcelp_lspvq1[]={
+{.0327,.0118},{.0919,.0111},{.0427,.0440},{.1327,.0185},
+{.0469,.0050},{.1272,.0091},{.0892,.0059},{.1771,.0193},
+{.0222,.0158},{.1100,.0127},{.0827,.0055},{.0978,.0791},
+{.0665,.0047},{.0700,.1401},{.0670,.0859},{.1913,.1048},
+{.0471,.0215},{.1046,.0125},{.0645,.0298},{.1599,.0160},
+{.0593,.0039},{.1187,.0462},{.0749,.0341},{.1520,.0511},
+{.0290,.0792},{.0909,.0362},{.0753,.0081},{.1111,.1058},
+{.0519,.0253},{.0828,.0839},{.0685,.0541},{.1421,.1258},
+{.0386,.0130},{.0962,.0119},{.0542,.0387},{.1431,.0185},
+{.0526,.0051},{.1175,.0260},{.0831,.0167},{.1728,.0510},
+{.0273,.0437},{.1172,.0113},{.0771,.0144},{.1122,.0751},
+{.0619,.0119},{.0492,.1276},{.0658,.0695},{.1882,.0615},
+{.0415,.0200},{.1018,.0088},{.0681,.0339},{.1436,.0325},
+{.0555,.0122},{.1042,.0485},{.0826,.0345},{.1374,.0743},
+{.0383,.1018},{.1005,.0358},{.0704,.0086},{.1301,.0586},
+{.0597,.0241},{.0832,.0621},{.0555,.0573},{.1504,.0839}};
+
+static const qcelp_fvector qcelp_lspvq2[]={
+{.0255,.0293},{.0904,.0219},{.0151,.1211},{.1447,.0498},
+{.0470,.0253},{.1559,.0177},{.1547,.0994},{.2394,.0242},
+{.0091,.0813},{.0857,.0590},{.0934,.1326},{.1889,.0282},
+{.0813,.0472},{.1057,.1494},{.0450,.3315},{.2163,.1895},
+{.0538,.0532},{.1399,.0218},{.0146,.1552},{.1755,.0626},
+{.0822,.0202},{.1299,.0663},{.0706,.1732},{.2656,.0401},
+{.0418,.0745},{.0762,.1038},{.0583,.1748},{.1746,.1285},
+{.0527,.1169},{.1314,.0830},{.0556,.2116},{.1073,.2321},
+{.0297,.0570},{.0981,.0403},{.0468,.1103},{.1740,.0243},
+{.0725,.0179},{.1255,.0474},{.1374,.1362},{.1922,.0912},
+{.0285,.0947},{.0930,.0700},{.0593,.1372},{.1909,.0576},
+{.0588,.0916},{.1110,.1116},{.0224,.2719},{.1633,.2220},
+{.0402,.0520},{.1061,.0448},{.0402,.1352},{.1499,.0775},
+{.0664,.0589},{.1081,.0727},{.0801,.2206},{.2165,.1157},
+{.0566,.0802},{.0911,.1116},{.0306,.1703},{.1792,.0836},
+{.0655,.0999},{.1061,.1038},{.0298,.2089},{.1110,.1753},
+{.0361,.0311},{.0970,.0239},{.0265,.1231},{.1495,.0573},
+{.0566,.0262},{.1569,.0293},{.1341,.1144},{.2271,.0544},
+{.0214,.0877},{.0847,.0719},{.0794,.1384},{.2067,.0274},
+{.0703,.0688},{.1099,.1306},{.0391,.2947},{.2024,.1670},
+{.0471,.0525},{.1245,.0290},{.0264,.1557},{.1568,.0807},
+{.0718,.0399},{.1193,.0685},{.0883,.1594},{.2729,.0764},
+{.0500,.0754},{.0809,.1108},{.0541,.1648},{.1523,.1385},
+{.0614,.1196},{.1209,.0847},{.0345,.2242},{.1442,.1747},
+{.0199,.0560},{.1092,.0194},{.0349,.1253},{.1653,.0507},
+{.0625,.0354},{.1376,.0431},{.1187,.1465},{.2164,.0872},
+{.0360,.0974},{.1008,.0698},{.0704,.1346},{.2114,.0452},
+{.0720,.0816},{.1240,.1089},{.0439,.2475},{.1498,.2040},
+{.0336,.0718},{.1213,.0187},{.0451,.1450},{.1368,.0885},
+{.0592,.0578},{.1131,.0531},{.0861,.1855},{.1764,.1500},
+{.0444,.0970},{.0935,.0903},{.0424,.1687},{.1633,.1102},
+{.0793,.0897},{.1060,.0897},{.0185,.2011},{.1205,.1855}};
+
+static const qcelp_fvector qcelp_lspvq3[]={
+{.0225,.0283},{.1296,.0355},{.0543,.0343},{.2073,.0274},
+{.0204,.1099},{.1562,.0523},{.1388,.0161},{.2784,.0274},
+{.0112,.0849},{.1870,.0175},{.1189,.0160},{.1490,.1088},
+{.0969,.1115},{.0659,.3322},{.1158,.1073},{.3183,.1363},
+{.0517,.0223},{.1740,.0223},{.0704,.0387},{.2637,.0234},
+{.0692,.1005},{.1287,.1610},{.0952,.0532},{.2393,.0646},
+{.0490,.0552},{.1619,.0657},{.0845,.0670},{.1784,.2280},
+{.0191,.1775},{.0272,.2868},{.0942,.0952},{.2628,.1479},
+{.0278,.0579},{.1565,.0218},{.0814,.0180},{.2379,.0187},
+{.0276,.1444},{.1199,.1223},{.1200,.0349},{.3009,.0307},
+{.0312,.0844},{.1898,.0306},{.0863,.0470},{.1685,.1241},
+{.0513,.1727},{.0711,.2233},{.1085,.0864},{.3398,.0527},
+{.0414,.0440},{.1356,.0612},{.0964,.0147},{.2173,.0738},
+{.0465,.1292},{.0877,.1749},{.1104,.0689},{.2105,.1311},
+{.0580,.0864},{.1895,.0752},{.0652,.0609},{.1485,.1699},
+{.0514,.1400},{.0386,.2131},{.0933,.0798},{.2473,.0986},
+{.0334,.0360},{.1375,.0398},{.0621,.0276},{.2183,.0280},
+{.0311,.1114},{.1382,.0807},{.1284,.0175},{.2605,.0636},
+{.0230,.0816},{.1739,.0408},{.1074,.0176},{.1619,.1120},
+{.0784,.1371},{.0448,.3050},{.1189,.0880},{.3039,.1165},
+{.0424,.0241},{.1672,.0186},{.0815,.0333},{.2432,.0324},
+{.0584,.1029},{.1137,.1546},{.1015,.0585},{.2198,.0995},
+{.0574,.0581},{.1746,.0647},{.0733,.0740},{.1938,.1737},
+{.0347,.1710},{.0373,.2429},{.0787,.1061},{.2439,.1438},
+{.0185,.0536},{.1489,.0178},{.0703,.0216},{.2178,.0487},
+{.0154,.1421},{.1414,.0994},{.1103,.0352},{.3072,.0473},
+{.0408,.0819},{.2055,.0168},{.0998,.0354},{.1917,.1140},
+{.0665,.1799},{.0993,.2213},{.1234,.0631},{.3003,.0762},
+{.0373,.0620},{.1518,.0425},{.0913,.0300},{.1966,.0836},
+{.0402,.1185},{.0948,.1385},{.1121,.0555},{.1802,.1509},
+{.0474,.0886},{.1888,.0610},{.0739,.0585},{.1231,.2379},
+{.0661,.1335},{.0205,.2211},{.0823,.0822},{.2480,.1179}};
+
+static const qcelp_fvector qcelp_lspvq4[]={
+{.0348,.0311},{.0812,.1145},{.0552,.0461},{.1826,.0263},
+{.0601,.0675},{.1730,.0172},{.1523,.0193},{.2449,.0277},
+{.0334,.0668},{.0805,.1441},{.1319,.0207},{.1684,.0910},
+{.0582,.1318},{.1403,.1098},{.0979,.0832},{.2700,.1359},
+{.0624,.0228},{.1292,.0979},{.0800,.0195},{.2226,.0285},
+{.0730,.0862},{.1537,.0601},{.1115,.0509},{.2720,.0354},
+{.0218,.1167},{.1212,.1538},{.1074,.0247},{.1674,.1710},
+{.0322,.2142},{.1263,.0777},{.0981,.0556},{.2119,.1710},
+{.0193,.0596},{.1035,.0957},{.0694,.0397},{.1997,.0253},
+{.0743,.0603},{.1584,.0321},{.1346,.0346},{.2221,.0708},
+{.0451,.0732},{.1040,.1415},{.1184,.0230},{.1853,.0919},
+{.0310,.1661},{.1625,.0706},{.0856,.0843},{.2902,.0702},
+{.0467,.0348},{.1108,.1048},{.0859,.0306},{.1964,.0463},
+{.0560,.1013},{.1425,.0533},{.1142,.0634},{.2391,.0879},
+{.0397,.1084},{.1345,.1700},{.0976,.0248},{.1887,.1189},
+{.0644,.2087},{.1262,.0603},{.0877,.0550},{.2203,.1307}};
+
+static const qcelp_fvector qcelp_lspvq5[]={
+{.0360,.0222},{.0820,.1097},{.0601,.0319},{.1656,.0198},
+{.0604,.0513},{.1552,.0141},{.1391,.0155},{.2474,.0261},
+{.0269,.0785},{.1463,.0646},{.1123,.0191},{.2015,.0223},
+{.0785,.0844},{.1202,.1011},{.0980,.0807},{.3014,.0793},
+{.0570,.0180},{.1135,.1382},{.0778,.0256},{.1901,.0179},
+{.0807,.0622},{.1461,.0458},{.1231,.0178},{.2028,.0821},
+{.0387,.0927},{.1496,.1004},{.0888,.0392},{.2246,.0341},
+{.0295,.1462},{.1156,.0694},{.1022,.0473},{.2226,.1364},
+{.0210,.0478},{.1029,.1020},{.0722,.0181},{.1730,.0251},
+{.0730,.0488},{.1465,.0293},{.1303,.0326},{.2595,.0387},
+{.0458,.0584},{.1569,.0742},{.1029,.0173},{.1910,.0495},
+{.0605,.1159},{.1268,.0719},{.0973,.0646},{.2872,.0428},
+{.0443,.0334},{.0835,.1465},{.0912,.0138},{.1716,.0442},
+{.0620,.0778},{.1316,.0450},{.1186,.0335},{.1446,.1665},
+{.0486,.1050},{.1675,.1019},{.0880,.0278},{.2214,.0202},
+{.0539,.1564},{.1142,.0533},{.0984,.0391},{.2130,.1089}};
+
 /* rest is currently unused */
 
 static const int   qcelp_cumulative_gainloss[]={0,1,2,6};

Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c	(original)
+++ qcelp/qcelpdec.c	Sat Jul  7 08:17:53 2007
@@ -71,6 +71,14 @@ static int qcelp_decode_init(AVCodecCont
     return 0;
 }
 
+static int qcelp_decode_close(AVCodecContext *avctx)
+{
+    QCELPContext *q = avctx->priv_data;
+
+    av_free(q->frame);
+
+    return 0;
+}
 
 static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
            int *data_size, uint8_t *buf, int buf_size)



More information about the FFmpeg-soc mailing list