ippac.h 289 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058
  1. /*
  2. //
  3. // INTEL CORPORATION PROPRIETARY INFORMATION
  4. // This software is supplied under the terms of a license agreement or
  5. // nondisclosure agreement with Intel Corporation and may not be copied
  6. // or disclosed except in accordance with the terms of that agreement.
  7. // Copyright (c) 2001-2009 Intel Corporation. All Rights Reserved.
  8. //
  9. // Intel(R) Integrated Performance Primitives
  10. // Audio Coding (ippAC)
  11. //
  12. */
  13. #if !defined(__IPPAC_H__) || defined(_OWN_BLDPCS)
  14. #define __IPPAC_H__
  15. #if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall)
  16. #define _IPP_STDCALL_CDECL
  17. #undef __stdcall
  18. #endif
  19. #include "ippdefs.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*
  24. // Data Structures and Macro
  25. */
  26. #if !defined(_OWN_BLDPCS)
  27. /*
  28. // FDP
  29. */
  30. struct FDPState_32f;
  31. typedef struct FDPState_32f IppsFDPState_32f;
  32. /*
  33. // FIR Block
  34. */
  35. struct FIRBlockState_32f;
  36. typedef struct FIRBlockState_32f IppsFIRBlockState_32f;
  37. /*
  38. // MDCT
  39. */
  40. struct MDCTFwdSpec_32f;
  41. typedef struct MDCTFwdSpec_32f IppsMDCTFwdSpec_32f;
  42. struct MDCTInvSpec_32f;
  43. typedef struct MDCTInvSpec_32f IppsMDCTInvSpec_32f;
  44. struct MDCTFwdSpec_16s;
  45. typedef struct MDCTFwdSpec_16s IppsMDCTFwdSpec_16s;
  46. /*
  47. // Filter_SBR
  48. */
  49. struct IppsFilterContext_SBR_32f;
  50. typedef struct IppsFilterContext_SBR_32f IppsFilterSpec_SBR_C_32fc;
  51. typedef struct IppsFilterContext_SBR_32f IppsFilterSpec_SBR_C_32f;
  52. typedef struct IppsFilterContext_SBR_32f IppsFilterSpec_SBR_R_32f;
  53. struct IppsFilterContext_SBR_32s;
  54. typedef struct IppsFilterContext_SBR_32s IppsFilterSpec_SBR_C_32sc;
  55. typedef struct IppsFilterContext_SBR_32s IppsFilterSpec_SBR_R_32s;
  56. /*
  57. // Filter_PQMF
  58. */
  59. struct IppsFilterContext_PQMF_MP3;
  60. typedef struct IppsFilterContext_PQMF_MP3 IppsFilterSpec_PQMF_MP3;
  61. /*
  62. // Filter_DTS
  63. */
  64. struct IppsFilterContext_DTS_32f;
  65. typedef struct IppsFilterContext_DTS_32f IppsFilterSpec_DTS_32f;
  66. /*
  67. // MP3 codec defines
  68. */
  69. #define IPP_MP3_GRANULE_LEN 576 /* maximum number of frequency
  70. decoded lines */
  71. #define IPP_MP3_SF_BUF_LEN 40 /* scalefactor buffer length */
  72. #define IPP_MP3_V_BUF_LEN 512 /* V data buffers length (32-bit words) */
  73. #define IPP_MP3_ID_MPEG2 0 /* MPEG-2 frame identifier */
  74. #define IPP_MP3_ID_MPEG1 1 /* MPEG-1 frame identifier */
  75. /*
  76. // Scalefactor band table length for short block
  77. */
  78. #define IPP_MP3_SFB_TABLE_LONG_LEN 138
  79. typedef const Ipp16s IppMP3ScaleFactorBandTableLong[IPP_MP3_SFB_TABLE_LONG_LEN];
  80. /*
  81. // Scalefactor band table length for long block
  82. */
  83. #define IPP_MP3_SFB_TABLE_SHORT_LEN 84
  84. typedef const Ipp16s IppMP3ScaleFactorBandTableShort[IPP_MP3_SFB_TABLE_SHORT_LEN];
  85. /*
  86. // Mixed block partition table
  87. */
  88. #define IPP_MP3_MBP_TABLE_LEN 12
  89. typedef const Ipp16s IppMP3MixedBlockPartitionTable[IPP_MP3_MBP_TABLE_LEN];
  90. /* Example mixed block partition table
  91. For mixed blocks only, this partition table informs
  92. the Huffman decoder of how many SFBs to count for region0.
  93. IppMP3MixedBlockPartitionTable Modified_Mbp_Table =
  94. {
  95. // MPEG-2
  96. // 22.050 kHz
  97. // Long block SFBs Short block SFBs
  98. 6, 2,
  99. // MPEG-2
  100. // 24 kHz
  101. // Long block SFBs Short block SFBs
  102. 6, 2,
  103. // MPEG-2
  104. // 16 kHz
  105. // Long block SFBs Short block SFBs
  106. 6, 2,
  107. // MPEG-1
  108. // 44.1 kHz
  109. // Long block SFBs Short block SFBs
  110. 8, 0,
  111. // MPEG-1
  112. // 48 kHz
  113. // Long block SFBs Short block SFBs
  114. 8, 0,
  115. // MPEG-1
  116. // 32 kHz
  117. // Long block SFBs Short block SFBs
  118. 8, 0
  119. };
  120. */
  121. typedef enum {
  122. IPPAC_DTS_NONPERFECT = 0,
  123. IPPAC_DTS_PERFECT = 1
  124. } IppAC_DTS_SYNTHESIS;
  125. typedef enum {
  126. IPP_CDBK_UNKNOWN = 0,
  127. IPP_CDBK_STANDARD = 1
  128. } Ipp_Cdbk_VQ_Hint;
  129. typedef enum {
  130. IPPAC_PS_CONF0 = 0,
  131. IPPAC_PS_CONF1 = 1,
  132. IPPAC_PS_CONF2 = 2,
  133. IPPAC_PS_CONF3 = 3,
  134. IPPAC_PS_CONF4 = 4
  135. } IppAC_PS_DEC_ANALYSIS;
  136. typedef struct CdbkState_VQ_32f IppsVQCodeBookState_32f;
  137. /*
  138. // MPEG-1, MPEG-2 BC header, 32 bits.
  139. // See ISO/IEC 11172-3, sect 2.4.1.3, 2.4.2.3, 2.4.2.4
  140. */
  141. typedef struct {
  142. int id; /* ID: 1 - MPEG-1, 0 - MPEG-2 */
  143. int layer; /* layer index: 0x3 - Layer I
  144. 0x2 - Layer II
  145. 0x1 - Layer III */
  146. int protectionBit; /* CRC flag 0: CRC on, 1: CRC off */
  147. int bitRate; /* bit rate index */
  148. int samplingFreq; /* sampling frequency index */
  149. int paddingBit; /* padding flag:
  150. 0 - no padding,
  151. 1 - padding */
  152. int privateBit; /* private_bit, no use */
  153. int mode; /* mono/stereo select information */
  154. int modeExt; /* extension to mode */
  155. int copyright; /* copyright or not:
  156. 0 - no,
  157. 1 - yes */
  158. int originalCopy; /* original bitstream or copy:
  159. 0 - copy,
  160. 1 - original */
  161. int emphasis; /* flag indicates the type of de-emphasis
  162. that shall be used */
  163. int CRCWord; /* CRC-check word */
  164. } IppMP3FrameHeader;
  165. /*
  166. // MP3 side information structure, for each granule.
  167. // Other info main_data_begin, private_bits, scfsi are not included
  168. // here.
  169. // Please refer to reference ISO/IEC 11172-3:1993, 2.4.1.7, 2.4.2.7.
  170. // ISO/IEC 13818-3:1998, 2.4.1.7 ).
  171. */
  172. typedef struct {
  173. int part23Len; /* the number of bits for scale factors
  174. and Huffman data */
  175. int bigVals; /* the half number of Huffman data whose
  176. maximum amplitudes are greater than 1 */
  177. int globGain; /* the quantizer step size information */
  178. int sfCompress; /* information to select the number of
  179. bits used for the transmission of the
  180. scale factors */
  181. int winSwitch; /* flag signals that the block uses an
  182. other than normal window */
  183. int blockType; /* flag indicates the window type */
  184. int mixedBlock; /* flag indicates type of block:
  185. 0 - non mixed block,
  186. 1 - mixed block */
  187. int pTableSelect[3]; /* Huffman table index for the 3 regions
  188. in big-values field */
  189. int pSubBlkGain[3]; /* gain offset from the global gain for
  190. one subblock */
  191. int reg0Cnt; /* the number of scale factor bands at
  192. the boundary of the first region of
  193. the big-values field */
  194. int reg1Cnt; /* the number of scale factor bands at
  195. the boundary of the second region of
  196. the big-values field */
  197. int preFlag; /* flag of high frequency amplification */
  198. int sfScale; /* scale to the scale factors */
  199. int cnt1TabSel; /* Huffman table index for the count1
  200. region of quadruples */
  201. } IppMP3SideInfo;
  202. /*
  203. // Global Macro Definitions for AAC codec
  204. */
  205. #define IPP_AAC_ELT_NUM 16 /* maximum number of elements for
  206. one program */
  207. #define IPP_AAC_CR_ID_LEN 9 /* copyright id length */
  208. #define IPP_AAC_LFE_ELT_NUM (1<<2) /* maximum Low Frequency
  209. Enhance elements number for one
  210. program */
  211. #define IPP_AAC_DATA_ELT_NUM (1<<3) /* maximum data elements number
  212. for one program */
  213. #define IPP_AAC_COMMENTS_LEN (1<<8) /* maximum length of the comment
  214. field in bytes */
  215. #define IPP_AAC_TAG_LEN 4 /* length of AAC data element tag */
  216. #define IPP_AAC_MAX_SFB 51 /* maximum scalefactor band for all
  217. sampling frequencies */
  218. #define IPP_AAC_GROUP_NUM_MAX 8 /* max groups number for one frame */
  219. #define IPP_AAC_SF_MAX 60 /* max number of sfb in one window */
  220. #define IPP_AAC_PRED_SFB_MAX 41 /* maximum prediction scalefactor
  221. bands number for one frame */
  222. #define IPP_AAC_SF_LEN 120 /* scale factor buffer length */
  223. #define IPP_AAC_TNS_FILT_MAX 8 /* maximum filters number for one
  224. frame */
  225. #define ADIF_ID 0x41444946 /* ASCII-"ADIF" */
  226. /*
  227. // ADIF Header
  228. */
  229. typedef struct {
  230. Ipp32u ADIFId; /* 32-bit, "ADIF" ASCII code */
  231. int copyIdPres; /* copy id flag:
  232. 0 - off,
  233. 1 - on */
  234. int originalCopy; /* copyright bit:
  235. 0 - no copyright on the coded
  236. bitstream,
  237. 1 - copyright protected */
  238. int home; /* original/home bit:
  239. 0 - the bitstream is a copy,
  240. 1 - the bitstream is an original*/
  241. int bitstreamType; /* bitstream flag:
  242. 0 - constant rate bitstream,
  243. 1 - variable rate bitstream */
  244. int bitRate; /* bit rate; if 0, unkown bit rate */
  245. int numPrgCfgElt; /* number of program configure
  246. elements */
  247. int pADIFBufFullness[IPP_AAC_ELT_NUM]; /* buffer fullness */
  248. Ipp8u pCopyId[IPP_AAC_CR_ID_LEN]; /* copy id */
  249. } IppAACADIFHeader;
  250. /*
  251. // AAC Program Config Element
  252. */
  253. typedef struct {
  254. int eltInsTag; /* element instance tag */
  255. int profile; /* profile index:
  256. 0 - main,
  257. 1 - Low Complexity,
  258. 2 - Scaleable Sampling Rate,
  259. 3 - reserved */
  260. int samplingRateIndex; /* sampling rate index */
  261. int numFrontElt; /* number of front elements */
  262. int numSideElt; /* number of side elements */
  263. int numBackElt; /* number of back elements */
  264. int numLfeElt; /* number of LFE elements */
  265. int numDataElt; /* number of data elements */
  266. int numValidCcElt; /* number of coupling channel
  267. elements */
  268. int monoMixdownPres; /* mono mixdown flag:
  269. 0 - off,
  270. 1 - on */
  271. int monoMixdownEltNum; /* number of mono mixdown elements */
  272. int stereoMixdownPres; /* stereo mixdown flag:
  273. 0 - off,
  274. 1 - on */
  275. int stereoMixdownEltNum; /* number of stereo mixdown
  276. elements */
  277. int matrixMixdownIdxPres; /* matrix mixdown flag:
  278. 0 - off,
  279. 1 - on */
  280. int matrixMixdownIdx; /* identifier of the surround
  281. mixdown coefficient */
  282. int pseudoSurroundEnable; /* pseudo surround:
  283. 0 - off,
  284. 1 - on */
  285. int pFrontIsCpe[IPP_AAC_ELT_NUM]; /* channel pair flag for
  286. front elements */
  287. int pFrontTagSel[IPP_AAC_ELT_NUM]; /* instance tag for front
  288. elements */
  289. int pSideIsCpe[IPP_AAC_ELT_NUM]; /* channel pair flag for
  290. side elements */
  291. int pSideTagSel[IPP_AAC_ELT_NUM]; /* instance tag for side
  292. elements */
  293. int pBackIsCpe[IPP_AAC_ELT_NUM]; /* channel pair flag for
  294. back elements */
  295. int pBackTagSel[IPP_AAC_ELT_NUM]; /* instance tag for back
  296. elements */
  297. int pLfeTagSel[IPP_AAC_LFE_ELT_NUM]; /* channel pair flag for
  298. LFE elements */
  299. int pDataTagSel[IPP_AAC_DATA_ELT_NUM]; /* instance tag for data
  300. elements */
  301. int pCceIsIndSw[IPP_AAC_ELT_NUM]; /* independent flag for
  302. coupling */
  303. /* channel elements */
  304. int pCceTagSel[IPP_AAC_ELT_NUM]; /* instance tag for coupling
  305. channel elements */
  306. int numComBytes; /* number of comment field
  307. bytes */
  308. Ipp8s pComFieldData[IPP_AAC_COMMENTS_LEN]; /* the comment buffer
  309. field */
  310. } IppAACPrgCfgElt;
  311. /*
  312. // MPEG-2 AAC ADTS frame header See ISO/IEC 13838-7, Table 6.5
  313. */
  314. typedef struct {
  315. /* ADTS fixed header */
  316. int id; /* ID 1 */
  317. int layer; /* layer index:
  318. 0x3 - Layer I,
  319. 0x2 - Layer II,
  320. 0x1 - Layer III */
  321. int protectionBit; /* CRC flag:
  322. 0 - CRC on,
  323. 1 - CRC off */
  324. int profile; /* profile:
  325. 0 - MP,
  326. 1 - LP,
  327. 2 - SSR */
  328. int samplingRateIndex; /* sampling frequency index */
  329. int privateBit; /* private_bit, no use */
  330. int chConfig; /* channel configuration */
  331. int originalCopy; /* copyright bit:
  332. 0 - no copyright on the coded
  333. bitstream,
  334. 1 - copyright protected */
  335. int home; /* original/home bit:
  336. 0 - the bitstream is a copy,
  337. 1 - the bitstream is an original */
  338. int emphasis; /* no in ISO/IEC 13818-7, but used */
  339. /* by ISO/IEC 14490-3 */
  340. /* ADTS variable header */
  341. int cpRightIdBit; /* copyright id bit */
  342. int cpRightIdStart; /* copyright id start */
  343. int frameLen; /* frame length in bytes */
  344. int ADTSBufFullness; /* buffer fullness */
  345. int numRawBlock; /* n of raw data blocks in the frame */
  346. /* ADTS CRC error check, 16bits */
  347. int CRCWord; /* CRC-check word */
  348. } IppAACADTSFrameHeader;
  349. /*
  350. // Channel Pair Element Structure
  351. */
  352. typedef struct {
  353. int commonWin; /* common window flag:
  354. 0 - off,
  355. 1 - on */
  356. int msMaskPres; /* MS stereo mask present flag */
  357. Ipp8u ppMsMask[IPP_AAC_GROUP_NUM_MAX][IPP_AAC_SF_MAX];
  358. /* MS stereo flag buffer for each
  359. scalefactor band */
  360. } IppAACChanPairElt;
  361. /*
  362. // Individual Channel Side Information Structure.
  363. */
  364. typedef struct {
  365. /* unpacked from the bitstream */
  366. int icsReservedBit; /* reserved bit */
  367. int winSequence; /* window sequence flag */
  368. int winShape; /* window shape flag:
  369. 0 - sine window,
  370. 1 - KBD window */
  371. int maxSfb; /* maximum effective scale factor bands */
  372. int sfGrouping; /* scale factor grouping information */
  373. int predDataPres; /* prediction data present flag for one
  374. frame:
  375. 0 - prediction off,
  376. 1 - prediction on */
  377. int predReset; /* prediction reset flag:
  378. 0 - off,
  379. 1 - on */
  380. int predResetGroupNum; /* prediction reset group number */
  381. Ipp8u pPredUsed[IPP_AAC_PRED_SFB_MAX+3];
  382. /* prediction flag buffer for each scale
  383. factor band:
  384. 0 - off,
  385. 1 - on buffer length 44 bytes, 4-byte
  386. align */
  387. /* decoded from the above info */
  388. int numWinGrp; /* window group number */
  389. int pWinGrpLen[IPP_AAC_GROUP_NUM_MAX]; /* buffer for number of
  390. windows in each group */
  391. } IppAACIcsInfo;
  392. /*
  393. // MPEG 4 Layer
  394. */
  395. #define IPP_AAC_TNS_COEF_LEN 60 /* TNS coefficients buffer length */
  396. #define IPP_AAC_MAX_LTP_SFB 40 /* maximum length of Long Term
  397. Prediction buffer for long block */
  398. #define IPP_AAC_WIN_MAX 8 /* maximum length of Long Term
  399. Prediction buffer for short block */
  400. #define IPP_AAC_CHAN_NUM 2 /* number of AAC channels */
  401. #define NOISE_HCB 13 /* code of HCB noise in scalefactor code book */
  402. #define IPP_AAC_FRAME_LEN 1024 /* size of data in one AAC frame */
  403. #define IPP_LTP_BLOCK_LEN (1024*3) /* size of data in one AAC LTP block */
  404. /*
  405. // AAC Channel Information Structure
  406. */
  407. typedef struct {
  408. int tag; /* channel tag */
  409. int id; /* element id */
  410. int samplingRateIndex; /* sampling rate index */
  411. int predSfbMax; /* maximum prediction scale factor bands */
  412. int preWinShape; /* previous block window shape */
  413. int winLen; /* 128: if short window, 1024: others */
  414. int numWin; /* 1 for long block, 8 for short block */
  415. int numSwb; /* decided by sampling frequency and
  416. block type */
  417. /* unpacking from the bitstream */
  418. int globGain; /* global gain */
  419. int pulseDataPres; /* pulse data present flag:
  420. 0 - off,
  421. 1 - on */
  422. int tnsDataPres; /* TNS data present flag:
  423. 0 - off,
  424. 1 - on */
  425. int gainContrDataPres; /* gain control data present flag:
  426. 0 - off,
  427. 1 - on */
  428. /* Ics Info pointer */
  429. IppAACIcsInfo *pIcsInfo; /* pointer to IppAACIcsInfo structure */
  430. /* channel pair element pointer */
  431. IppAACChanPairElt *pChanPairElt; /* pointer to IppAACChanPairElt
  432. structure */
  433. /* section data */
  434. Ipp8u pSectCb[IPP_AAC_SF_LEN]; /* section code book buffer */
  435. Ipp8u pSectEnd[IPP_AAC_SF_LEN]; /* end of scale factor offset
  436. in each section */
  437. int pMaxSect[IPP_AAC_GROUP_NUM_MAX]; /* maximum section number
  438. for each group */
  439. /* TNS data */
  440. int pTnsNumFilt[IPP_AAC_GROUP_NUM_MAX]; /* TNS number filter
  441. number buffer */
  442. int pTnsFiltCoefRes[IPP_AAC_GROUP_NUM_MAX]; /* TNS coefficients
  443. resolution flag */
  444. int pTnsRegionLen[IPP_AAC_TNS_FILT_MAX]; /* TNS filter length */
  445. int pTnsFiltOrder[IPP_AAC_TNS_FILT_MAX]; /* TNS filter order */
  446. int pTnsDirection[IPP_AAC_TNS_FILT_MAX]; /* TNS filter direction
  447. flag */
  448. } IppAACChanInfo;
  449. /*
  450. // TNS Information Structure
  451. */
  452. typedef struct {
  453. int tnsDataPresent; /* if TNS is used */
  454. int pTnsNumFilt[IPP_AAC_GROUP_NUM_MAX]; /* Number of TNS filter */
  455. int pTnsFiltCoefRes[IPP_AAC_GROUP_NUM_MAX]; /* TNS coefficient
  456. resolution */
  457. int pTnsRegionLen[IPP_AAC_TNS_FILT_MAX]; /* TNS filter length */
  458. int pTnsFiltOrder[IPP_AAC_TNS_FILT_MAX]; /* TNS filter order */
  459. int pTnsDirection[IPP_AAC_TNS_FILT_MAX]; /* TNS filter direction
  460. flag */
  461. int pTnsCoefCompress[IPP_AAC_GROUP_NUM_MAX]; /* TNS compress
  462. coefficients */
  463. Ipp8s pTnsFiltCoef[IPP_AAC_TNS_COEF_LEN]; /* TNS filter
  464. coefficients */
  465. } IppAACTnsInfo;
  466. /*
  467. // Long Term Prediction (LTP) Structure
  468. */
  469. typedef struct{
  470. int ltpDataPresent; /* if LTP is used */
  471. int ltpLag; /* optimal delay from 0 to 2047 */
  472. Ipp16s ltpCoef; /* indicate the LTP coefficient */
  473. int pLtpLongUsed[IPP_AAC_SF_MAX+1]; /* if long block use ltp */
  474. int pLtpShortUsed[IPP_AAC_WIN_MAX]; /* if short block use ltp */
  475. int pLtpShortLagPresent[IPP_AAC_WIN_MAX]; /* if short lag
  476. is transmitted */
  477. int pLtpShortLag[IPP_AAC_WIN_MAX]; /* relative delay
  478. for short window */
  479. } IppAACLtpInfo;
  480. /*
  481. // AAC Scalable Main Element Header
  482. */
  483. typedef struct {
  484. int windowSequence; /* the windows is short or long type */
  485. int windowShape; /* what window is used for the right hand,
  486. part of this analysis window */
  487. int maxSfb; /* number of scale factor band transmitted */
  488. int sfGrouping; /* grouping of short spectral data */
  489. int numWinGrp; /* window group number */
  490. int pWinGrpLen[IPP_AAC_GROUP_NUM_MAX]; /* length of every group */
  491. int msMode; /* MS stereo flag:
  492. 0 - none,
  493. 1 - different for every sfb,
  494. 2 - all */
  495. Ipp8u (*ppMsMask)[IPP_AAC_SF_MAX]; /* if MS's used in one sfb,
  496. when msMode == 1 */
  497. IppAACTnsInfo pTnsInfo[IPP_AAC_CHAN_NUM]; /* TNS structure for
  498. two channels */
  499. IppAACLtpInfo pLtpInfo[IPP_AAC_CHAN_NUM]; /* LTP structure for
  500. two channels */
  501. } IppAACMainHeader;
  502. /*
  503. // AAC Scalable Extension Element Header
  504. */
  505. typedef struct{
  506. int msMode; /* Mode:
  507. 0 - non,
  508. 1 - part,
  509. 2 - all */
  510. int maxSfb; /* number of scale factor band for extension layer */
  511. Ipp8u (*ppMsMask)[IPP_AAC_SF_MAX]; /* if MS is used */
  512. IppAACTnsInfo pTnsInfo[IPP_AAC_CHAN_NUM]; /* TNS structure
  513. for Stereo */
  514. int pDiffControlLr[IPP_AAC_CHAN_NUM][IPP_AAC_MAX_SFB]; /*
  515. FSS information for stereo */
  516. } IppAACExtHeader;
  517. /*
  518. // MP3 encoder
  519. */
  520. #define IPP_MP3_CHANNEL_NUM 2 /* Number MP3 channels */
  521. #define IPP_MP3_PSY_BAND_LONG_NUM 63 /* Number MP3 partition energy for long blocks */
  522. #define IPP_MP3_PSY_BAND_SHORT_NUM 42 /* Number MP3 partition energy for short blocks */
  523. #define FIRST_6_CW 6 /* Number calculated lines are used for
  524. unpredictability measure */
  525. #define IPP_MP3_BIT_RATE_FREE 0 /* Type value for free bit rate */
  526. #define IPP_MP3_BIT_RATE_32 1 /* Type value for 32 bit rate */
  527. #define IPP_MP3_BIT_RATE_40 2 /* Type value for 40 bit rate */
  528. #define IPP_MP3_BIT_RATE_48 3 /* Type value for 48 bit rate */
  529. #define IPP_MP3_BIT_RATE_56 4 /* Type value for 56 bit rate */
  530. #define IPP_MP3_BIT_RATE_64 5 /* Type value for 64 bit rate */
  531. #define IPP_MP3_BIT_RATE_80 6 /* Type value for 80 bit rate */
  532. #define IPP_MP3_BIT_RATE_96 7 /* Type value for 96 bit rate */
  533. #define IPP_MP3_BIT_RATE_112 8 /* Type value for 112 bit rate */
  534. #define IPP_MP3_BIT_RATE_128 9 /* Type value for 128 bit rate */
  535. #define IPP_MP3_BIT_RATE_160 10 /* Type value for 160 bit rate */
  536. #define IPP_MP3_BIT_RATE_192 11 /* Type value for 192 bit rate */
  537. #define IPP_MP3_BIT_RATE_224 12 /* Type value for 224 bit rate */
  538. #define IPP_MP3_BIT_RATE_256 13 /* Type value for 256 bit rate */
  539. #define IPP_MP3_BIT_RATE_320 14 /* Type value for 320 bit rate */
  540. #define IPP_MP3_SAMPLE_RATE_32000 2 /* Type value for 32000 sample rate */
  541. #define IPP_MP3_SAMPLE_RATE_44100 0 /* Type value for 44100 sample rate */
  542. #define IPP_MP3_SAMPLE_RATE_48000 1 /* Type value for 48000 sample rate */
  543. #define IPP_MP3_NONINTERLEAVED_PCM 1 /* Type value for non interleaved PCM */
  544. #define IPP_MP3_INTERLEAVED_PCM 2 /* Type value for interleaved PCM */
  545. /*
  546. // MP3 Huffman Table Structure
  547. */
  548. typedef struct {
  549. int tableSize; /* number of rows in table */
  550. int linbits; /* variable used for encode if the
  551. magnitude of encoded value is
  552. greater or equal to 15 */
  553. int maxBitsValue; /* maximum bit length of codewords */
  554. Ipp16u *pHcod; /* pointer to Huffman code table */
  555. Ipp8u *pSlen; /* pointer to Huffman length table */
  556. } IppMP3HuffmanTable;
  557. /*
  558. // MP3 Quant Information Structure
  559. */
  560. typedef struct {
  561. int ScaleFactorBits; /* number of bits used to
  562. encode scale factors */
  563. Ipp32s pEnergy[IPP_MP3_SF_BUF_LEN]; /* energy of each scale
  564. factor band */
  565. Ipp32s pDistortion[IPP_MP3_SF_BUF_LEN]; /* allowed distortion
  566. of each scale factor
  567. band */
  568. Ipp32s pXmin[IPP_MP3_SF_BUF_LEN]; /* allowed distortion of
  569. each scale factor band */
  570. Ipp32s pNMR[IPP_MP3_SF_BUF_LEN]; /* Noise-Mask-Ratio array */
  571. int quantizeStepSize; /* quantization step */
  572. int pSfbMaxIndex[40]; /* index array of Scalefactor
  573. band maximum values */
  574. int minBits; /* minimum bits decided by the bit reservoir
  575. and used bits */
  576. int maxBits; /* decided by estimatedBits and bit reservoir */
  577. int count1; /* number of Huffman symbols whose magnitude
  578. is no greater than 1 */
  579. int hufSize; /* number of bits used for Huffman symbols */
  580. int pRegionCount[3]; /* pointer to the number of Hufman symbols
  581. in each region for the big values part */
  582. } IppMP3QuantInfo;
  583. /*
  584. // MP3 Bit Reservoir
  585. */
  586. typedef struct {
  587. int BitsRemaining; /* bits currently remaining in the reservoir */
  588. int MaxBits; /* maximum possible reservoir size, in bits,
  589. determined as follows: min(7680-avg_frame_len,
  590. 2^9*8), where avg_frame_len is the average frame
  591. length, in bits, including padding bits and
  592. excluding side information bits */
  593. } IppMP3BitReservoir;
  594. /*
  595. // Psychoacoustic Model Two State
  596. */
  597. typedef struct {
  598. Ipp64s pPrevMaskedThresholdLong[2][63]; /* long block masked
  599. threshold history buffer; Contains masked threshold
  600. estimates for the threshold calculation partitions
  601. associated with the two most recent long blocks */
  602. Ipp64s pPrevMaskedThresholdShort[IPP_MP3_PSY_BAND_SHORT_NUM]; /*
  603. short block masked threshold history buffer; Contains
  604. masked threshold estimates for the threshold
  605. calculation partitions associated with the two most
  606. recent long blocks */
  607. Ipp32sc pPrevFFT[2][FIRST_6_CW]; /* FFT history buffer;
  608. contains real and imaginary FFT components associated
  609. with the two most recent long blocks */
  610. Ipp32s pPrevFFTMag[2][FIRST_6_CW]; /* FFT magnitude history
  611. buffer; contains FFT component magnitudes associated
  612. with the two most recent long blocks */
  613. int nextPerceptualEntropy; /* PE estimate for next
  614. granule; one granule delay provided for synchronization
  615. with analysis filterbank */
  616. int nextBlockType; /* Expected block type for
  617. next granule; either long (normal), short, or stop.
  618. Depending upon analysis results for the granule
  619. following the next, a long block could change to a
  620. start block, and a stop block could change to a short
  621. block. This buffer provides one granule of delay for
  622. synchronization with the analysis filterbank */
  623. Ipp32s pNextMSRLong[IPP_MP3_SF_BUF_LEN]; /* long block MSR
  624. estimates for next granule. One granule delay provided
  625. for synchronization with analysis filterbank */
  626. Ipp32s pNextMSRShort[IPP_MP3_SF_BUF_LEN]; /* short block MSR
  627. estimates for next granule. One granule delay provided
  628. for synchronization with analysis filterbank */
  629. } IppMP3PsychoacousticModelTwoState;
  630. /*
  631. // MP3 Psychoacoustic Model Two Analysis
  632. */
  633. typedef struct {
  634. Ipp32s pMSR[36]; /* MSRs for one granule/channel. For long blocks,
  635. elements 0-20 represent the thresholds
  636. associated with the 21 SFBs. For short blocks,
  637. elements 0,3,6,..,33, elements 1,4,...,34, and
  638. elements 2,5,...,35, respectively, represent
  639. the thresholds associated with the 12 SFBs for
  640. each of the 3 consecutive short blocks in one
  641. granule/channel. That is, the block thresholds
  642. are interleaved such that the thresholds are
  643. grouped by SFB. */
  644. Ipp32s PE; /* Estimated perceptual entropy, one
  645. granule/channel */
  646. } IppMP3PsychoacousticModelTwoAnalysis;
  647. #endif /* _OWN_BLDPCS */
  648. /*******************************************************************/
  649. /* ///////////////////////////////////////////////////////////////////////////
  650. // Name:
  651. // ippacGetLibVersion
  652. //
  653. // Purpose:
  654. // Get the library version.
  655. //
  656. // Parameters:
  657. //
  658. // Returns:
  659. // The structure of information about version of ippac library.
  660. //
  661. // Notes:
  662. // Not necessary to release the returned structure.
  663. */
  664. IPPAPI(const IppLibraryVersion*, ippacGetLibVersion, (void))
  665. /* ///////////////////////////////////////////////////////////////////////////
  666. // Name:
  667. // ippsFDPReset_32f
  668. //
  669. // Purpose:
  670. // Resets predictors for all spectral lines.
  671. //
  672. // Parameters:
  673. // pFDPState Pointer to the predictor specific state structure.
  674. //
  675. // Returns:
  676. // ippStsNoErr Indicates no error.
  677. // ippStsNullPtrErr Indicates an error when the pFDPState pointer is
  678. // NULL.
  679. // ippStsContextMatchErr Indicates an error when the state structure is
  680. // invalid.
  681. */
  682. IPPAPI(IppStatus, ippsFDPReset_32f, (IppsFDPState_32f *pFDPState))
  683. /* ///////////////////////////////////////////////////////////////////////////
  684. // Name:
  685. // ippsFDPResetSfb_32f
  686. //
  687. // Purpose:
  688. // Resets predictor-specific information in some scale factor bands.
  689. //
  690. // Parameters:
  691. // pSfbOffset Pointer to the band offset vector.
  692. // sfbNumber Number of bands.
  693. // pResetFlag Array of flags showing whether predictors for
  694. // spectral lines in a certain scale factor band
  695. // need to be reset. pFDPState Pointer to the
  696. // predictor specific state structure.
  697. //
  698. // Returns:
  699. // ippStsNoErr Indicates no error.
  700. // ippStsNullPtrErr Indicates an error when one of the specified
  701. // pointers is NULL.
  702. // ippStsSizeErr Indicates an error when sfbNumber is less than
  703. // or equal to 0.
  704. // ippStsContextMatchErr Indicates an error when the state structure is
  705. // invalid.
  706. */
  707. IPPAPI(IppStatus, ippsFDPResetSfb_32f, (const int* pSfbOffset, int sfbNumber, const Ipp8u* pResetFlag, IppsFDPState_32f* pFDPState))
  708. /* ///////////////////////////////////////////////////////////////////////////
  709. // Name:
  710. // ippsFDPResetGroup_32f
  711. //
  712. // Purpose:
  713. // Resets predictors for group of spectral lines.
  714. //
  715. // Parameters:
  716. // resetGroupNumber Number of the group to be reset.
  717. // step Distance between two neighboring spectral lines
  718. // in the group.
  719. // pFDPState Pointer to the predictor specific state structure.
  720. //
  721. // Returns:
  722. // ippStsNoErr Indicates no error.
  723. // ippStsNullPtrErr Indicates an error when the pFDPState pointer is
  724. // NULL.
  725. // ippStsSizeErr Indicates an error when resetGroupNumber or step
  726. // is less than or equal to 0.
  727. // ippStsContextMatchErr Indicates an error when the state structure is
  728. // invalid.
  729. */
  730. IPPAPI(IppStatus, ippsFDPResetGroup_32f, (int resetGroupNumber, int step, IppsFDPState_32f* pFDPState))
  731. /* ///////////////////////////////////////////////////////////////////////////
  732. // Name:
  733. // ippsFDPInitAlloc_32f
  734. //
  735. // Purpose:
  736. // Creates and initializes predictor state.
  737. //
  738. // Parameters:
  739. // ppFDPState Pointer to pointer to the FDP state structure to
  740. // be created.
  741. // len Number of spectral lines to be processed. Audio
  742. // Coding Functions 10 10-29
  743. //
  744. // Returns:
  745. // ippStsNoErr Indicates no error.
  746. // ippStsNullPtrErr Indicates an error when the ppFDPState pointer is
  747. // NULL.
  748. // ippStsSizeErr Indicates an error when the len is less than
  749. // or equal to 0.
  750. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  751. */
  752. IPPAPI(IppStatus, ippsFDPInitAlloc_32f, (IppsFDPState_32f** ppFDPState, int len))
  753. /* ///////////////////////////////////////////////////////////////////////////
  754. // Name:
  755. // ippsFDPFree_32f
  756. //
  757. // Purpose:
  758. // Closes FDP state.
  759. //
  760. // Parameters:
  761. // pFDPState Pointer to the FDP state structure to be closed.
  762. //
  763. // Returns:
  764. // ippStsNoErr Indicates no error.
  765. // ippStsNullPtrErr Indicates an error when the pFDPState pointer is
  766. // NULL.
  767. // ippStsContextMatchErr Indicates an error when the state structure is
  768. // invalid.
  769. */
  770. IPPAPI(IppStatus, ippsFDPFree_32f, (IppsFDPState_32f *pFDPState))
  771. /* ///////////////////////////////////////////////////////////////////////////
  772. // Name:
  773. // ippsFDPFwd_32f
  774. //
  775. // Purpose:
  776. // Performs frequency domain prediction procedure and calculates
  777. // prediction error.
  778. //
  779. // Parameters:
  780. // pSrc Pointer to the input data array.
  781. // pDst Pointer to the data array to be filled with
  782. // prediction errors.
  783. // pFDPState Pointer to the predictor specific state structure.
  784. //
  785. // Returns:
  786. // ippStsNoErr Indicates no error.
  787. // ippStsNullPtrErr Indicates an error when the pFDPState pointer is
  788. // NULL.
  789. // ippStsContextMatchErr Indicates an error when the state structure is
  790. // invalid.
  791. // ippStsMisalignedBuf Indicates misaligned arrays. Supply aligned data
  792. // for better performance.
  793. */
  794. IPPAPI(IppStatus, ippsFDPFwd_32f, (const Ipp32f* pSrc, Ipp32f* pDst, IppsFDPState_32f* pFDPState))
  795. /* ///////////////////////////////////////////////////////////////////////////
  796. // Name:
  797. // ippsFDPInv_32f_I
  798. //
  799. // Purpose:
  800. // Retrieves input signal from prediction error, using frequency domain
  801. // prediction procedure.
  802. //
  803. // Parameters:
  804. // pSrcDst Pointer to the input and output data array for
  805. // the in-place operation.
  806. // pBandsOffset Pointer to the band offset vector.
  807. // predictorBandsNumber Number of scale factor bands.
  808. // pPredictionUsed Pointer to array of flags showing whether
  809. // prediction will be used in certain scale factor
  810. // band.
  811. // pFDPState Pointer to the predictor specific state structure.
  812. //
  813. // Returns:
  814. // ippStsNoErr Indicates no error.
  815. // ippStsNullPtrErr Indicates an error when one of the specified
  816. // pointers is NULL.
  817. // ippStsSizeErr Indicates an error when predictorBandsNumber is
  818. // less than or equal to 0.
  819. // ippStsContextMatchErr Indicates an error when the state structure is
  820. // invalid.
  821. // ippStsMisalignedBuf Indicates misaligned arrays. Supply aligned data
  822. // for better performance.
  823. */
  824. IPPAPI(IppStatus, ippsFDPInv_32f_I, (Ipp32f* pSrcDst, const int* pBandOffset, int predictorBandsNumber, const Ipp8u* pPredictionUsed, IppsFDPState_32f* pFDPState))
  825. /* ///////////////////////////////////////////////////////////////////////////
  826. // Name:
  827. // ippsFDPInit_32f
  828. //
  829. // Purpose:
  830. // Initializes predictor state.
  831. //
  832. // Parameters:
  833. // ppFDPState Pointer to pointer to the FDP state structure to
  834. // be initialized.
  835. // len Number of spectral lines to be processed.
  836. // pMemSpec Pointer to the area for FDP state structure.
  837. //
  838. // Returns:
  839. // ippStsNoErr Indicates no error.
  840. // ippStsNullPtrErr Indicates an error when ppFDPState or pMemSpec
  841. // is NULL.
  842. // ippStsSizeErr Indicates an error when the len is less than
  843. // or equal to 0.
  844. */
  845. IPPAPI(IppStatus, ippsFDPInit_32f, (IppsFDPState_32f **ppFDPState, int len, Ipp8u *pMemSpec))
  846. /* ///////////////////////////////////////////////////////////////////////////
  847. // Name:
  848. // ippsFDPGetSize_32f
  849. //
  850. // Purpose:
  851. // Gets size of FDP state structure.
  852. //
  853. // Parameters:
  854. // len Number of spectral lines to be processed.
  855. // pSizeState Address of size value in bytes of the frequency
  856. // domain predictor state structure.
  857. //
  858. // Returns:
  859. // ippStsNoErr Indicates no error.
  860. // ippStsNullPtrErr Indicates an error when the pSizeState pointer
  861. // is NULL.
  862. // ippStsSizeErr Indicates an error when the length is less than
  863. // or equal to 0.
  864. */
  865. IPPAPI(IppStatus, ippsFDPGetSize_32f, (int len, int *pSizeState))
  866. /* ///////////////////////////////////////////////////////////////////////////
  867. // Name:
  868. // ippsFIRBlockInitAlloc_32f
  869. //
  870. // Purpose:
  871. // Initializes FIR block filter state.
  872. //
  873. // Parameters:
  874. // pState Pointer to the FIR block filter state structure
  875. // to be created.
  876. // order Number of elements in the array containing the
  877. // tap values.
  878. // len Number of input signals.
  879. //
  880. // Returns:
  881. // ippStsNoErr Indicates no error.
  882. // ippStsNullPtrErr Indicates an error when the pointers to data
  883. // arrays are null.
  884. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  885. // ippStsFIRLenErr Indicates an error when order or len is less
  886. // than or equal to 0.
  887. */
  888. IPPAPI(IppStatus, ippsFIRBlockInitAlloc_32f,(IppsFIRBlockState_32f** pState,
  889. int order, int len))
  890. /* ///////////////////////////////////////////////////////////////////////////
  891. // Name:
  892. // ippsFIRBlockFree_32f
  893. //
  894. // Purpose:
  895. // Closes FIR block filter state.
  896. //
  897. // Parameters:
  898. // pState Pointer to the FIR block filter state structure
  899. // to be closed.
  900. //
  901. // Returns:
  902. // ippStsNoErr Indicates no error.
  903. // ippStsNullPtrErr Indicates an error when the pointers to data
  904. // arrays are null.
  905. // ippStsContextMatchErr Indicates an error when the state structure is
  906. // invalid.
  907. */
  908. IPPAPI(IppStatus, ippsFIRBlockFree_32f,(IppsFIRBlockState_32f* pState))
  909. /* ///////////////////////////////////////////////////////////////////////////
  910. // Name:
  911. // ippsFIRBlockOne_32f
  912. //
  913. // Purpose:
  914. // Filters vector of samples through FIR block filter.
  915. //
  916. // Parameters:
  917. // pSrc Pointer to the input vector of samples to be
  918. // filtered.
  919. // pDst Pointer to the vector of filtered output samples.
  920. // pState Pointer to the FIR filter state structure.
  921. // pTaps Pointer to the vector of filter taps.
  922. //
  923. // Returns:
  924. // ippStsNoErr Indicates no error.
  925. // ippStsNullPtrErr Indicates an error when one of the specified
  926. // pointers is NULL.
  927. // ippStsContextMatchErr Indicates an error when the state structure is
  928. // invalid.
  929. // ippStsMisalignedBuf Indicates misaligned arrays. Supply aligned data
  930. // for better performance.
  931. // ippStsFIRLenErr Indicates an error when one of following conditions is true:
  932. // 1)pState->len is less than or equal to 0;
  933. // 2)pState->order is less than or equal to 0;
  934. // 3)pState->queue_end is less than 0;
  935. // 4)pState->queue_end is greater or equal to pState->order.
  936. */
  937. IPPAPI(IppStatus, ippsFIRBlockOne_32f,(Ipp32f *pSrc, Ipp32f* pDst, IppsFIRBlockState_32f* pState, Ipp32f *pTaps))
  938. /* ///////////////////////////////////////////////////////////////////////////
  939. // Name:
  940. // ippsMDCTFwdInitAlloc_32f
  941. //
  942. // Purpose:
  943. // Create and initialize modified discrete cosine transform specification
  944. // structure.
  945. //
  946. // Parameters:
  947. // ppMDCTSpec Pointer to pointer to MDCT specification
  948. // structure to be created.
  949. // len Number of samples in MDCT. Since this set of
  950. // functions was designed specially for audio
  951. // coding, only the following values of length are
  952. // supported: 12, 36, and , where . These values
  953. // are the only values that appear in audio coding.
  954. //
  955. // Returns:
  956. // ippStsNoErr Indicates no error.
  957. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec pointer
  958. // is NULL.
  959. // ippStsSizeErr Indicates an error when len does not belong to
  960. // the above set of admissible values.
  961. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  962. */
  963. IPPAPI(IppStatus, ippsMDCTFwdInitAlloc_32f,(IppsMDCTFwdSpec_32f** ppMDCTSpec, int len))
  964. /* ///////////////////////////////////////////////////////////////////////////
  965. // Name:
  966. // ippsMDCTInvInitAlloc_32f
  967. //
  968. // Purpose:
  969. // Create and initialize modified discrete cosine transform specification
  970. // structure.
  971. //
  972. // Parameters:
  973. // ppMDCTSpec Pointer to pointer to MDCT specification
  974. // structure to be created.
  975. // len Number of samples in MDCT. Since this set of
  976. // functions was designed specially for audio
  977. // coding, only the following values of length are
  978. // supported: 12, 36, and , where . These values
  979. // are the only values that appear in audio coding.
  980. //
  981. // Returns:
  982. // ippStsNoErr Indicates no error.
  983. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec pointer
  984. // is NULL.
  985. // ippStsSizeErr Indicates an error when len does not belong to
  986. // the above set of admissible values.
  987. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  988. */
  989. IPPAPI(IppStatus, ippsMDCTInvInitAlloc_32f,(IppsMDCTInvSpec_32f** ppMDCTSpec, int len))
  990. /* ///////////////////////////////////////////////////////////////////////////
  991. // Name:
  992. // ippsMDCTFwdFree_32f
  993. //
  994. // Purpose:
  995. // Closes modified discrete cosine transform specification structure.
  996. //
  997. // Parameters:
  998. // pMDCTSpec Pointer to the MDCT specification structure to
  999. // be closed.
  1000. //
  1001. // Returns:
  1002. // ippStsNoErr Indicates no error.
  1003. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer is
  1004. // NULL.
  1005. */
  1006. IPPAPI(IppStatus, ippsMDCTFwdFree_32f,(IppsMDCTFwdSpec_32f* pMDCTSpec))
  1007. /* ///////////////////////////////////////////////////////////////////////////
  1008. // Name:
  1009. // ippsMDCTInvFree_32f
  1010. //
  1011. // Purpose:
  1012. // Closes modified discrete cosine transform specification structure.
  1013. //
  1014. // Parameters:
  1015. // pMDCTSpec Pointer to the MDCT specification structure to
  1016. // be closed.
  1017. //
  1018. // Returns:
  1019. // ippStsNoErr Indicates no error.
  1020. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer is
  1021. // NULL.
  1022. */
  1023. IPPAPI(IppStatus, ippsMDCTInvFree_32f,(IppsMDCTInvSpec_32f* pMDCTSpec))
  1024. /* ///////////////////////////////////////////////////////////////////////////
  1025. // Name:
  1026. // ippsMDCTFwdGetBufSize_32f
  1027. //
  1028. // Purpose:
  1029. // Gets the size of MDCT work buffer.
  1030. //
  1031. // Parameters:
  1032. // pMDCTSpec Pointer to the MDCT specification structure.
  1033. // pSize Address of the MDCT work buffer size value in
  1034. // bytes.
  1035. //
  1036. // Returns:
  1037. // ippStsNoErr Indicates no error.
  1038. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer or
  1039. // pSize value is NULL.
  1040. // ippStsContextMatchErr Indicates an error when the specification
  1041. // structure pMDCTSpec is invalid.
  1042. */
  1043. IPPAPI(IppStatus, ippsMDCTFwdGetBufSize_32f,(const IppsMDCTFwdSpec_32f* pMDCTSpec,
  1044. int* pSize))
  1045. /* ///////////////////////////////////////////////////////////////////////////
  1046. // Name:
  1047. // ippsMDCTInvGetBufSize_32f
  1048. //
  1049. // Purpose:
  1050. // Gets the size of MDCT work buffer.
  1051. //
  1052. // Parameters:
  1053. // pMDCTSpec Pointer to the MDCT specification structure.
  1054. // pSize Address of the MDCT work buffer size value in
  1055. // bytes.
  1056. //
  1057. // Returns:
  1058. // ippStsNoErr Indicates no error.
  1059. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer or
  1060. // pSize value is NULL.
  1061. // ippStsContextMatchErr Indicates an error when the specification
  1062. // structure pMDCTSpec is invalid.
  1063. */
  1064. IPPAPI(IppStatus, ippsMDCTInvGetBufSize_32f,(const IppsMDCTInvSpec_32f* pMDCTSpec,
  1065. int* pSize))
  1066. /* ///////////////////////////////////////////////////////////////////////////
  1067. // Name:
  1068. // ippsMDCTFwd_32f
  1069. //
  1070. // Purpose:
  1071. // Computes forward or inverse modified discrete cosine transform (MDCT)
  1072. // of a signal.
  1073. //
  1074. // Parameters:
  1075. // pSrc Pointer to the input data array.
  1076. // pDst Pointer to the output data array.
  1077. // pSrcDst Pointer to the input and output data array for
  1078. // the in-place operations.
  1079. // pMDCTSpec Pointer to the MDCT specification structure.
  1080. // pBuffer Pointer to the MDCT work buffer.
  1081. // scaleFactor Scalefactor value.
  1082. //
  1083. // Returns:
  1084. // ippStsNoErr Indicates no error.
  1085. // ippStsNullPtrErr Indicates an error when one of the specified
  1086. // pointers is NULL.
  1087. // ippStsContextMatchErr Indicates an error when the specification
  1088. // structure pMDCTSpec is invalid.
  1089. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1090. // for better performance.
  1091. */
  1092. IPPAPI(IppStatus, ippsMDCTFwd_32f,(const Ipp32f* pSrc, Ipp32f* pDst,
  1093. const IppsMDCTFwdSpec_32f* pMDCTSpec, Ipp8u* pBuffer))
  1094. /* ///////////////////////////////////////////////////////////////////////////
  1095. // Name:
  1096. // ippsMDCTInv_32f
  1097. //
  1098. // Purpose:
  1099. // Computes forward or inverse modified discrete cosine transform (MDCT)
  1100. // of a signal.
  1101. //
  1102. // Parameters:
  1103. // pSrc Pointer to the input data array.
  1104. // pDst Pointer to the output data array.
  1105. // pMDCTSpec Pointer to the MDCT specification structure.
  1106. // pBuffer Pointer to the MDCT work buffer.
  1107. //
  1108. // Returns:
  1109. // ippStsNoErr Indicates no error.
  1110. // ippStsNullPtrErr Indicates an error when one of the specified
  1111. // pointers is NULL.
  1112. // ippStsContextMatchErr Indicates an error when the specification
  1113. // structure pMDCTSpec is invalid.
  1114. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1115. // for better performance.
  1116. */
  1117. IPPAPI(IppStatus, ippsMDCTInv_32f,(const Ipp32f* pSrc, Ipp32f* pDst,
  1118. const IppsMDCTInvSpec_32f* pMDCTSpec, Ipp8u* pBuffer))
  1119. /* ///////////////////////////////////////////////////////////////////////////
  1120. // Name:
  1121. // ippsMDCTFwd_32f_I
  1122. //
  1123. // Purpose:
  1124. // Computes forward or inverse modified discrete cosine transform (MDCT)
  1125. // of a signal.
  1126. //
  1127. // Parameters:
  1128. // pSrcDst Pointer to the input and output data array for
  1129. // the in-place operations.
  1130. // pMDCTSpec Pointer to the MDCT specification structure.
  1131. // pBuffer Pointer to the MDCT work buffer.
  1132. //
  1133. // Returns:
  1134. // ippStsNoErr Indicates no error.
  1135. // ippStsNullPtrErr Indicates an error when one of the specified
  1136. // pointers is NULL.
  1137. // ippStsContextMatchErr Indicates an error when the specification
  1138. // structure pMDCTSpec is invalid.
  1139. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1140. // for better performance.
  1141. */
  1142. IPPAPI(IppStatus, ippsMDCTFwd_32f_I,(Ipp32f* pSrcDst, const IppsMDCTFwdSpec_32f* pMDCTSpec, Ipp8u* pBuffer))
  1143. /* ///////////////////////////////////////////////////////////////////////////
  1144. // Name:
  1145. // ippsMDCTInv_32f_I
  1146. //
  1147. // Purpose:
  1148. // Computes forward or inverse modified discrete cosine transform (MDCT)
  1149. // of a signal.
  1150. //
  1151. // Parameters:
  1152. // pSrcDst Pointer to the input and output data array for
  1153. // the in-place operations.
  1154. // pMDCTSpec Pointer to the MDCT specification structure.
  1155. // pBuffer Pointer to the MDCT work buffer.
  1156. //
  1157. // Returns:
  1158. // ippStsNoErr Indicates no error.
  1159. // ippStsNullPtrErr Indicates an error when one of the specified
  1160. // pointers is NULL.
  1161. // ippStsContextMatchErr Indicates an error when the specification
  1162. // structure pMDCTSpec is invalid.
  1163. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1164. // for better performance.
  1165. */
  1166. IPPAPI(IppStatus, ippsMDCTInv_32f_I,(Ipp32f* pSrcDst, const IppsMDCTInvSpec_32f* pMDCTSpec, Ipp8u* pBuffer))
  1167. /* ///////////////////////////////////////////////////////////////////////////
  1168. // Name:
  1169. // ippsMDCTFwd_16s_Sfs
  1170. //
  1171. // Purpose:
  1172. // Computes forward or inverse modified discrete cosine transform (MDCT)
  1173. // of a signal.
  1174. //
  1175. // Parameters:
  1176. // pSrc Pointer to the input data array.
  1177. // pDst Pointer to the output data array.
  1178. // pMDCTSpec Pointer to the MDCT specification structure.
  1179. // scaleFactor Scalefactor value.
  1180. // pBuffer Pointer to the MDCT work buffer.
  1181. //
  1182. // Returns:
  1183. // ippStsNoErr Indicates no error.
  1184. // ippStsNullPtrErr Indicates an error when one of the specified
  1185. // pointers is NULL.
  1186. // ippStsContextMatchErr Indicates an error when the specification
  1187. // structure pMDCTSpec is invalid.
  1188. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1189. // for better performance.
  1190. */
  1191. IPPAPI(IppStatus, ippsMDCTFwd_16s_Sfs,
  1192. (const Ipp16s *pSrc, Ipp16s *pDst,
  1193. const IppsMDCTFwdSpec_16s* pMDCTSpec,
  1194. int scaleFactor, Ipp8u* pBuffer))
  1195. /* ///////////////////////////////////////////////////////////////////////////
  1196. // Name:
  1197. // ippsMDCTFwdInitAlloc_16s
  1198. //
  1199. // Purpose:
  1200. // Create and initialize modified discrete cosine transform specification
  1201. // structure.
  1202. //
  1203. // Parameters:
  1204. // ppMDCTSpec Pointer to pointer to MDCT specification
  1205. // structure to be created.
  1206. // len Number of samples in MDCT. Since this set of
  1207. // functions was designed specially for audio
  1208. // coding, only the following values of length are
  1209. // supported: 12, 36, and 2**k, where k>=5. These
  1210. // values are the only values that appear in audio
  1211. // coding.
  1212. //
  1213. // Returns:
  1214. // ippStsNoErr Indicates no error.
  1215. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec pointer
  1216. // is NULL.
  1217. // ippStsSizeErr Indicates an error when len does not belong to
  1218. // the above set of admissible values.
  1219. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  1220. */
  1221. IPPAPI(IppStatus, ippsMDCTFwdInitAlloc_16s, (IppsMDCTFwdSpec_16s** ppMDCTSpec, int len))
  1222. /* ///////////////////////////////////////////////////////////////////////////
  1223. // Name:
  1224. // ippsMDCTFwdFree_32f
  1225. //
  1226. // Purpose:
  1227. // Closes modified discrete cosine transform specification structure.
  1228. //
  1229. // Parameters:
  1230. // pMDCTSpec Pointer to the MDCT specification structure to
  1231. // be closed.
  1232. //
  1233. // Returns:
  1234. // ippStsNoErr Indicates no error.
  1235. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer is
  1236. // NULL.
  1237. */
  1238. IPPAPI(IppStatus, ippsMDCTFwdFree_16s, (IppsMDCTFwdSpec_16s* pMDCTSpec))
  1239. /* ///////////////////////////////////////////////////////////////////////////
  1240. // Name:
  1241. // ippsMDCTFwdGetSize_16s
  1242. //
  1243. // Purpose:
  1244. // Get the sizes of MDCT specification structure, MDCT initialization,
  1245. // and MDCT work buffer.
  1246. //
  1247. // Parameters:
  1248. // len Number of samples in MDCT. Since this set of
  1249. // functions is designed specially for audio
  1250. // coding, only the following values of length are
  1251. // supported: 12, 36, and 2**k, where k>=5. These
  1252. // values are the only values that appear in audio
  1253. // coding.
  1254. // pSizeSpec Address of the MDCT specification structure size
  1255. // value in bytes.
  1256. // pSizeInit Address of the MDCT initialization buffer size
  1257. // value in bytes.
  1258. // pSizeBuf Address of the MDCT work buffer size value in
  1259. // bytes.
  1260. //
  1261. // Returns:
  1262. // ippStsNoErr Indicates no error.
  1263. // ippStsNullPtrErr Indicates an error when the pSizeSpec,
  1264. // pSizeInit, or pSizeBuf pointer is NULL.
  1265. // ippStsSizeErr Indicates an error when len does not belong to
  1266. // the above set of admissible values.
  1267. */
  1268. IPPAPI(IppStatus, ippsMDCTFwdGetSize_16s, (int len, int* pSizeSpec, int* pSizeInit, int* pSizeBuf))
  1269. /* ///////////////////////////////////////////////////////////////////////////
  1270. // Name:
  1271. // ippsMDCTFwdGetBufSize_16s
  1272. //
  1273. // Purpose:
  1274. // Gets the size of MDCT work buffer.
  1275. //
  1276. // Parameters:
  1277. // pMDCTSpec Pointer to the MDCT specification structure.
  1278. // pSize Address of the MDCT work buffer size value in
  1279. // bytes.
  1280. //
  1281. // Returns:
  1282. // ippStsNoErr Indicates no error.
  1283. // ippStsNullPtrErr Indicates an error when the pMDCTSpec pointer or
  1284. // pSize value is NULL.
  1285. // ippStsContextMatchErr Indicates an error when the specification
  1286. // structure pMDCTSpec is invalid.
  1287. */
  1288. IPPAPI(IppStatus, ippsMDCTFwdGetBufSize_16s,
  1289. (const IppsMDCTFwdSpec_16s *pMDCTSpec, int *pSize))
  1290. /* ///////////////////////////////////////////////////////////////////////////
  1291. // Name:
  1292. // ippsMDCTInvGetSize_32f
  1293. //
  1294. // Purpose:
  1295. // Get the sizes of MDCT specification structure, MDCT initialization,
  1296. // and MDCT work buffer.
  1297. //
  1298. // Parameters:
  1299. // len Number of samples in MDCT. Since this set of
  1300. // functions is designed specially for audio
  1301. // coding, only the following values of length are
  1302. // supported: 12, 36, and 2**k, where k>=5. These
  1303. // values are the only values that appear in audio
  1304. // coding.
  1305. // pSizeSpec Address of the MDCT specification structure size
  1306. // value in bytes.
  1307. // pSizeInit Address of the MDCT initialization buffer size
  1308. // value in bytes.
  1309. // pSizeBuf Address of the MDCT work buffer size value in
  1310. // bytes.
  1311. //
  1312. // Returns:
  1313. // ippStsNoErr Indicates no error.
  1314. // ippStsNullPtrErr Indicates an error when the pSizeSpec,
  1315. // pSizeInit, or pSizeBuf pointer is NULL.
  1316. // ippStsSizeErr Indicates an error when len does not belong to
  1317. // the above set of admissible values.
  1318. */
  1319. IPPAPI(IppStatus, ippsMDCTInvGetSize_32f, (int len, int *pSizeSpec, int *pSizeInit, int *pSizeBuf))
  1320. /* ///////////////////////////////////////////////////////////////////////////
  1321. // Name:
  1322. // ippsMDCTFwdGetSize_32f
  1323. //
  1324. // Purpose:
  1325. // Get the sizes of MDCT specification structure, MDCT initialization,
  1326. // and MDCT work buffer.
  1327. //
  1328. // Parameters:
  1329. // len Number of samples in MDCT. Since this set of
  1330. // functions is designed specially for audio
  1331. // coding, only the following values of length are
  1332. // supported: 12, 36, and 2**k, where k>=5. These
  1333. // values are the only values that appear in audio
  1334. // coding.
  1335. // pSizeSpec Address of the MDCT specification structure size
  1336. // value in bytes.
  1337. // pSizeInit Address of the MDCT initialization buffer size
  1338. // value in bytes.
  1339. // pSizeBuf Address of the MDCT work buffer size value in
  1340. // bytes.
  1341. //
  1342. // Returns:
  1343. // ippStsNoErr Indicates no error.
  1344. // ippStsNullPtrErr Indicates an error when the pSizeSpec,
  1345. // pSizeInit, or pSizeBuf pointer is NULL.
  1346. // ippStsSizeErr Indicates an error when len does not belong to
  1347. // the above set of admissible values.
  1348. */
  1349. IPPAPI(IppStatus, ippsMDCTFwdGetSize_32f, (int len, int *pSizeSpec, int *pSizeInit, int *pSizeBuf))
  1350. /* ///////////////////////////////////////////////////////////////////////////
  1351. // Name:
  1352. // ippsMDCTFwdInit_32f
  1353. //
  1354. // Purpose:
  1355. // Initialize modified discrete cosine transform specification structure.
  1356. //
  1357. // Parameters:
  1358. // ppMDCTSpec Pointer to pointer to MDCT specification
  1359. // structure to be created.
  1360. // len Number of samples in MDCT. Since this set of
  1361. // functions was designed specially for audio
  1362. // coding, only the following values of length are
  1363. // supported: 12, 36, and 2**k, where k>=5. These
  1364. // values are the only values that appear in audio
  1365. // coding.
  1366. // pMemSpec Pointer to the area for MDCT specification
  1367. // structure.
  1368. // pMemInit Pointer to the buffer that is used for
  1369. // initialization.
  1370. //
  1371. // Returns:
  1372. // ippStsNoErr Indicates no error.
  1373. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec, pMemSpec
  1374. // or pMemInit pointer is NULL.
  1375. // ippStsSizeErr Indicates an error when len does not belong to
  1376. // the above set of admissible values.
  1377. */
  1378. IPPAPI(IppStatus, ippsMDCTFwdInit_32f, (IppsMDCTFwdSpec_32f** ppMDCTSpec, int len, Ipp8u* pMemSpec, Ipp8u* pMemInit))
  1379. /* ///////////////////////////////////////////////////////////////////////////
  1380. // Name:
  1381. // ippsMDCTInvInit_32f
  1382. //
  1383. // Purpose:
  1384. // Initialize modified discrete cosine transform specification structure.
  1385. //
  1386. // Parameters:
  1387. // ppMDCTSpec Pointer to pointer to MDCT specification
  1388. // structure to be created.
  1389. // len Number of samples in MDCT. Since this set of
  1390. // functions was designed specially for audio
  1391. // coding, only the following values of length are
  1392. // supported: 12, 36, and 2**k, where k>=5. These
  1393. // values are the only values that appear in audio
  1394. // coding.
  1395. // pMemSpec Pointer to the area for MDCT specification
  1396. // structure.
  1397. // pMemInit Pointer to the buffer that is used for
  1398. // initialization.
  1399. //
  1400. // Returns:
  1401. // ippStsNoErr Indicates no error.
  1402. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec, pMemSpec
  1403. // or pMemInit pointer is NULL.
  1404. // ippStsSizeErr Indicates an error when len does not belong to
  1405. // the above set of admissible values.
  1406. */
  1407. IPPAPI(IppStatus, ippsMDCTInvInit_32f,(IppsMDCTInvSpec_32f** ppMDCTSpec, int len, Ipp8u* pMemSpec, Ipp8u* pMemInit))
  1408. /* ///////////////////////////////////////////////////////////////////////////
  1409. // Name:
  1410. // ippsMDCTFwdInit_16s
  1411. //
  1412. // Purpose:
  1413. // Initialize modified discrete cosine transform specification structure.
  1414. //
  1415. // Parameters:
  1416. // ppMDCTSpec Pointer to pointer to MDCT specification
  1417. // structure to be created.
  1418. // len Number of samples in MDCT. Since this set of
  1419. // functions was designed specially for audio
  1420. // coding, only the following values of length are
  1421. // supported: 12, 36, and 2**k, where k>=5. These
  1422. // values are the only values that appear in audio
  1423. // coding.
  1424. // pMemSpec Pointer to the area for MDCT specification
  1425. // structure.
  1426. // pMemInit Pointer to the buffer that is used for
  1427. // initialization.
  1428. //
  1429. // Returns:
  1430. // ippStsNoErr Indicates no error.
  1431. // ippStsNullPtrErr Indicates an error when the ppMDCTSpec, pMemSpec
  1432. // or pMemInit pointer is NULL.
  1433. // ippStsSizeErr Indicates an error when len does not belong to
  1434. // the above set of admissible values.
  1435. */
  1436. IPPAPI(IppStatus, ippsMDCTFwdInit_16s,(IppsMDCTFwdSpec_16s** ppMDCTSpec, int len, Ipp8u* pMemSpec, Ipp8u* pMemInit))
  1437. /* ///////////////////////////////////////////////////////////////////////////
  1438. // Name:
  1439. // ippsSpread_16s_Sfs
  1440. //
  1441. // Purpose:
  1442. // Computes spreading function.
  1443. //
  1444. // Parameters:
  1445. // Src1 Input data 1.
  1446. // Src2 Input data 2.
  1447. // inScaleFactor Input value scalefactor value.
  1448. // pDst Pointer to the output data vector, output data
  1449. // is in Q15 format.
  1450. //
  1451. // Returns:
  1452. // ippStsNoErr Indicates no error.
  1453. // ippStsNullPtrErr Indicates an error when pDst pointer is NULL.
  1454. */
  1455. IPPAPI(IppStatus, ippsSpread_16s_Sfs,
  1456. (Ipp16s src1, Ipp16s src2, int inScaleFactor, Ipp16s* pDst))
  1457. /* ///////////////////////////////////////////////////////////////////////////
  1458. // Name:
  1459. // ippsInterleave_16s
  1460. //
  1461. // Purpose:
  1462. // Converts signal from non-interleaved to interleaved format.
  1463. //
  1464. // Parameters:
  1465. // pSrc Array of pointers to the vectors [len]
  1466. // containing samples for particular channels.
  1467. // ch_num Number of channels.
  1468. // len Number of samples in each channel.
  1469. // pDst Pointer to the destination vector [ch_num * len]
  1470. // in interleaved format.
  1471. //
  1472. // Returns:
  1473. // ippStsNoErr Indicates no error.
  1474. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1475. // is NULL.
  1476. // ippStsSizeErr Indicates an error when len is less than or
  1477. // equal to 0.
  1478. // ippStsNumChannelsErr Indicates an error when ch_num is less than or
  1479. // equal to 0.
  1480. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1481. // for better performance.
  1482. */
  1483. IPPAPI(IppStatus, ippsInterleave_16s, (const Ipp16s **pSrc,
  1484. int ch_num,
  1485. int len,
  1486. Ipp16s *pDst))
  1487. /* ///////////////////////////////////////////////////////////////////////////
  1488. // Name:
  1489. // ippsInterleave_32f
  1490. //
  1491. // Purpose:
  1492. // Converts signal from non-interleaved to interleaved format.
  1493. //
  1494. // Parameters:
  1495. // pSrc Array of pointers to the vectors [len]
  1496. // containing samples for particular channels.
  1497. // ch_num Number of channels.
  1498. // len Number of samples in each channel.
  1499. // pDst Pointer to the destination vector [ch_num * len]
  1500. // in interleaved format.
  1501. //
  1502. // Returns:
  1503. // ippStsNoErr Indicates no error.
  1504. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1505. // is NULL.
  1506. // ippStsSizeErr Indicates an error when len is less than or
  1507. // equal to 0.
  1508. // ippStsNumChannelsErr Indicates an error when ch_num is less than or
  1509. // equal to 0.
  1510. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1511. // for better performance.
  1512. */
  1513. IPPAPI(IppStatus, ippsInterleave_32f, (const Ipp32f **pSrc,
  1514. int ch_num,
  1515. int len,
  1516. Ipp32f *pDst))
  1517. /* ///////////////////////////////////////////////////////////////////////////
  1518. // Name:
  1519. // ippsDeinterleave_16s
  1520. //
  1521. // Purpose:
  1522. // Converts signal from interleaved to non-interleaved format.
  1523. //
  1524. // Parameters:
  1525. // pSrc Pointer to vector [ch_num * len] of interleaved
  1526. // samples.
  1527. // ch_num Number of channels.
  1528. // len Number of samples in each channel.
  1529. // pDst Array of pointers to the vectors [len] to be
  1530. // filled with samples of particular channels.
  1531. //
  1532. // Returns:
  1533. // ippStsNoErr Indicates no error.
  1534. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1535. // is NULL.
  1536. // ippStsSizeErr Indicates an error when len or ch_num is less
  1537. // than or equal to 0.
  1538. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1539. // for better performance.
  1540. */
  1541. IPPAPI(IppStatus, ippsDeinterleave_16s, (const Ipp16s* pSrc, int ch_num,
  1542. int len, Ipp16s** pDst))
  1543. /* ///////////////////////////////////////////////////////////////////////////
  1544. // Name:
  1545. // ippsDeinterleave_32f
  1546. //
  1547. // Purpose:
  1548. // Converts signal from interleaved to non-interleaved format.
  1549. //
  1550. // Parameters:
  1551. // pSrc Pointer to vector [ch_num * len] of interleaved
  1552. // samples.
  1553. // ch_num Number of channels.
  1554. // len Number of samples in each channel.
  1555. // pDst Array of pointers to the vectors [len] to be
  1556. // filled with samples of particular channels.
  1557. //
  1558. // Returns:
  1559. // ippStsNoErr Indicates no error.
  1560. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1561. // is NULL.
  1562. // ippStsSizeErr Indicates an error when len or ch_num is less
  1563. // than or equal to 0.
  1564. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1565. // for better performance.
  1566. */
  1567. IPPAPI(IppStatus, ippsDeinterleave_32f, (const Ipp32f* pSrc, int ch_num,
  1568. int len, Ipp32f** pDst))
  1569. /* ///////////////////////////////////////////////////////////////////////////
  1570. // Name:
  1571. // ippsPow34_32f16s
  1572. //
  1573. // Purpose:
  1574. // Raises a vector to the power of 3/4.
  1575. //
  1576. // Parameters:
  1577. // pSrc Pointer to the input data vector [len].
  1578. // pDst Pointer to the output data vector [len].
  1579. // len Number of elements in the input and output
  1580. // vectors.
  1581. //
  1582. // Returns:
  1583. // ippStsNoErr Indicates no error.
  1584. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1585. // is NULL.
  1586. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1587. // for better performance.
  1588. // ippStsSizeErr Indicates an error when len is less than or
  1589. // equal to 0.
  1590. */
  1591. IPPAPI(IppStatus, ippsPow34_32f16s, (const Ipp32f* pSrc, Ipp16s* pDst, int len))
  1592. /* ///////////////////////////////////////////////////////////////////////////
  1593. // Name:
  1594. // ippsPow43_16s32f
  1595. //
  1596. // Purpose:
  1597. // Raises a vector to the power of 4/3.
  1598. //
  1599. // Parameters:
  1600. // pSrc Pointer to the input data vector [len].
  1601. // pDst Pointer to the output data vector [len].
  1602. // len Number of elements in the input and output
  1603. // vectors.
  1604. //
  1605. // Returns:
  1606. // ippStsNoErr Indicates no error.
  1607. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1608. // is NULL.
  1609. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data for
  1610. // better performance.
  1611. // ippStsSizeErr Indicates an error when len is less than or
  1612. // equal to 0.
  1613. */
  1614. IPPAPI(IppStatus, ippsPow43_16s32f, (const Ipp16s* pSrc, Ipp32f* pDst, int len))
  1615. IPPAPI(IppStatus, ippsPow43Scale_16s32s_Sf, (const Ipp16s* pSrc, Ipp32s* pDst,
  1616. const Ipp16s *pScaleFactor, const Ipp32s *pBandOffset,
  1617. int offset, int bandsNumber, int groupLen, int scalef))
  1618. /* ///////////////////////////////////////////////////////////////////////////
  1619. // Name:
  1620. // ippsPow34_32f
  1621. //
  1622. // Purpose:
  1623. // Raises a vector to the power of 3/4.
  1624. //
  1625. // Parameters:
  1626. // pSrc Pointer to the input data vector [len].
  1627. // pDst Pointer to the output data vector [len].
  1628. // len Number of elements in the input and output
  1629. // vectors.
  1630. //
  1631. // Returns:
  1632. // ippStsNoErr Indicates no error.
  1633. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1634. // is NULL.
  1635. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1636. // for better performance.
  1637. // ippStsSizeErr Indicates an error when len is less than or
  1638. // equal to 0.
  1639. */
  1640. IPPAPI(IppStatus, ippsPow34_32f,(const Ipp32f* pSrc, Ipp32f* pDst, int len))
  1641. /* ///////////////////////////////////////////////////////////////////////////
  1642. // Name:
  1643. // ippsPow34_16s_Sfs
  1644. //
  1645. // Purpose:
  1646. // Raises a vector to the power of 3/4.
  1647. //
  1648. // Parameters:
  1649. // pSrc Pointer to the input data vector [len].
  1650. // inscaleFactor Input data scalefactor value.
  1651. // pDst Pointer to the output data vector [len].
  1652. // scaleFactor Scalefactor value.
  1653. // len Number of elements in the input and output
  1654. // vectors.
  1655. //
  1656. // Returns:
  1657. // ippStsNoErr Indicates no error.
  1658. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1659. // is NULL.
  1660. // ippStsMisalignedBuf Indicates misaligned data. Supply aligned data
  1661. // for better performance.
  1662. // ippStsSizeErr Indicates an error when len is less than or
  1663. // equal to 0.
  1664. */
  1665. IPPAPI(IppStatus, ippsPow34_16s_Sfs,(const Ipp16s* pSrc, int inScaleFactor, Ipp16s* pDst, int ScaleFactor, int len))
  1666. /* ///////////////////////////////////////////////////////////////////////////
  1667. // Name:
  1668. // ippsCalcSF_16s32f
  1669. //
  1670. // Purpose:
  1671. // Restores actual scale factors from the bit stream values.
  1672. //
  1673. // Parameters:
  1674. // pSrc Pointer to the input data array.
  1675. // offset Scale factors offset.
  1676. // pDst Pointer to the output data array.
  1677. // len Number of elements in the vector.
  1678. //
  1679. // Returns:
  1680. // ippStsNoErr Indicates no error.
  1681. // ippStsNullPtrErr Indicates an error when the pSrc or pDst pointer
  1682. // is NULL.
  1683. // ippStsSizeErr Indicates an error when len is less than or
  1684. // equal to 0.
  1685. */
  1686. IPPAPI(IppStatus,ippsCalcSF_16s32f, (const Ipp16s* pSrc, int offset,Ipp32f *pDst, int len))
  1687. /* ///////////////////////////////////////////////////////////////////////////
  1688. // Name:
  1689. // ippsScale_32f_I
  1690. //
  1691. // Purpose:
  1692. // Applies scale factors to spectral bands in accordance with spectral
  1693. // bands boundaries.
  1694. //
  1695. // Parameters:
  1696. // pSrcDst Pointer to the input and output data array. The
  1697. // size of array must be not less than pBandOffset[
  1698. // bands_number].
  1699. // pSF Pointer to the data array containing scale
  1700. // factors. The size of the array must be not less
  1701. // than bands_number.
  1702. // pBandOffset Pointer to the vector of band offsets. The size
  1703. // of array must be not less than bands_number + 1.
  1704. // bandsNumber Number of bands to which scale factors are
  1705. // applied.
  1706. //
  1707. // Returns:
  1708. // ippStsNoErr Indicates no error.
  1709. // ippStsNullPtrErr Indicates an error when the pSrcDst or
  1710. // pBandsOffset pointer is NULL.
  1711. // ippStsSizeErr Indicates an error when bandsNumber is less than
  1712. // or equal to 0.
  1713. */
  1714. IPPAPI(IppStatus, ippsScale_32f_I, (Ipp32f* pSrcDst, Ipp32f* pSF, const Ipp32s* pBandOffset, int bandsNumber))
  1715. /* ///////////////////////////////////////////////////////////////////////////
  1716. // Name:
  1717. // ippsMakeFloat_16s32f
  1718. //
  1719. // Purpose:
  1720. // Converts mantissa and exponent arrays to float arrays.
  1721. //
  1722. // Parameters:
  1723. // inmant Array of mantissas.
  1724. // inexp Array of exponents.
  1725. // size Number of array elements.
  1726. // outfloat Array of resulting float arrays.
  1727. //
  1728. // Returns:
  1729. // ippStsNoErr Indicates no error.
  1730. // ippStsNullPtrErr Indicates an error when the inmant, inexp or
  1731. // outfloat pointer is NULL.
  1732. // ippStsSizeErr Indicates an error when size is less than or
  1733. // equal to 0.
  1734. */
  1735. IPPAPI(IppStatus, ippsMakeFloat_16s32f, (Ipp16s* inmant, Ipp16s* inexp, Ipp32s size, Ipp32f* outfloat))
  1736. /* ///////////////////////////////////////////////////////////////////////////
  1737. // Name:
  1738. // ippsVQCodeBookInitAlloc_32f
  1739. //
  1740. // Purpose:
  1741. // Creates and initializes the codebook structure.
  1742. //
  1743. // Parameters:
  1744. // pInputTable Pointer to the codebook table of the size step *
  1745. // height containing height quantization vectors of
  1746. // the length step.
  1747. // ppCodeBook Pointer to pointer to the codebook structure to
  1748. // be created.
  1749. // step Step to the next line in the table InputTable,
  1750. // quantization vector length.
  1751. // height Table height, number of quantization vectors.
  1752. //
  1753. // Returns:
  1754. // ippStsNoErr Indicates no error.
  1755. // ippStsNullPtrErr Indicates an error when ppCodeBook or
  1756. // pInputTable pointer is NULL.
  1757. // ippStsSizeErr Indicates an error when the step or height is
  1758. // less than or equal to 0.
  1759. // ippStsMemAllocErr Indicates an error when no memory is allocated.
  1760. */
  1761. IPPAPI(IppStatus, ippsVQCodeBookInitAlloc_32f, (const Ipp32f* pInputTable, IppsVQCodeBookState_32f** ppCodeBooks, int step, int height))
  1762. /* ///////////////////////////////////////////////////////////////////////////
  1763. // Name:
  1764. // ippsVQCodeBookFree_32f
  1765. //
  1766. // Purpose:
  1767. // Closes the IppsVQCodeBookState_32f structure created by the function
  1768. // ippsVQCodeBookInitAlloc.
  1769. //
  1770. // Parameters:
  1771. // pCodeBook Pointer to specified IppsVQCodeBookState_32f
  1772. // structure.
  1773. //
  1774. // Returns:
  1775. // ippStsNoErr Indicates no error.
  1776. // ippStsNullPtrErr Indicates an error when pCodeBook pointer is
  1777. // NULL.
  1778. */
  1779. IPPAPI(IppStatus, ippsVQCodeBookFree_32f, (IppsVQCodeBookState_32f* pCodeBook))
  1780. /* ///////////////////////////////////////////////////////////////////////////
  1781. // Name:
  1782. // ippsVQCodeBookInit_32f
  1783. //
  1784. // Purpose:
  1785. // Initializes the codebook structure.
  1786. //
  1787. // Parameters:
  1788. // pInputTable Pointer to the codebook table of the size step *
  1789. // height containing height quantization vectors of
  1790. // the length step.
  1791. // ppCodeBook Pointer to pointer to the codebook structure to
  1792. // be created.
  1793. // step Step to the next line in the table InputTable,
  1794. // quantization vector length.
  1795. // height Table height, number of quantization vectors.
  1796. // pMemSpec Pointer to the area for the codebook structure.
  1797. //
  1798. // Returns:
  1799. // ippStsNoErr Indicates no error.
  1800. // ippStsNullPtrErr Indicates an error when pInputTable, ppCodeBook
  1801. // or pMemSpec pointer is NULL.
  1802. // ippStsSizeErr Indicates an error when the step or height is
  1803. // less than or equal to 0.
  1804. */
  1805. IPPAPI(IppStatus, ippsVQCodeBookInit_32f, (const Ipp32f* pInputTable, IppsVQCodeBookState_32f** ppCodeBook , int step, int height, Ipp8u* pMemSpec))
  1806. /* ///////////////////////////////////////////////////////////////////////////
  1807. // Name:
  1808. // ippsVQPreliminarySelect_32f
  1809. //
  1810. // Purpose:
  1811. // Selects candidates for the nearest code vector of codebooks.
  1812. //
  1813. // Parameters:
  1814. // pSrc Source vector to be quantized.
  1815. // pWeights Pointer to the vector of weights.
  1816. // nDiv Number of fragmentations of the src and weights
  1817. // vectors.
  1818. // pLengths Pointer to an array of lengths of fragmentations.
  1819. // pIndx Pointer to the output vector of indexes of the
  1820. // nCand minimum candidates.
  1821. // pSign Pointer to the output vector of signs of nCand
  1822. // minimum candidates: - The value of 1 indicates
  1823. // that the minimal distortion appears when the
  1824. // norm is negative; - The value of 0 indicates
  1825. // that the minimal distortion appears when the
  1826. // norm is positive.
  1827. // nCand Number of output candidates.
  1828. // pPolbits Pointer to the polbits flag vector.
  1829. // pCodeBook Pointer to the specified IppsVQCodeBookState_32f
  1830. // structure.
  1831. //
  1832. // Returns:
  1833. // ippStsNoErr Indicates no error.
  1834. // ippStsNullPtrErr Indicates an error when pCodeBook or pSrc
  1835. // pointer is NULL.
  1836. */
  1837. IPPAPI(IppStatus, ippsVQPreliminarySelect_32f, (const Ipp32f* pSrc, const Ipp32f* pWeights, int nDiv, const Ipp32s* pLengths, Ipp32s* pIndx, Ipp32s* pSign, int nCand, int* polbits, IppsVQCodeBookState_32f* pCodeBook))
  1838. /* ///////////////////////////////////////////////////////////////////////////
  1839. // Name:
  1840. // ippsVQMainSelect_32f
  1841. //
  1842. // Purpose:
  1843. // Finds optimal indexes with minimal distortion.
  1844. //
  1845. // Parameters:
  1846. // pSrc Source vector to be quantized.
  1847. // pWeights Pointer to the vector of weights.
  1848. // nDiv Number of fragmentations of the src and weights
  1849. // vectors.
  1850. // pLengths Pointer to an array of lengths of fragmentations.
  1851. // nCand Number of input candidates.
  1852. // ppIndexCand Pointer to pointer to the input vectors of
  1853. // indexes of nCand minimum candidates.
  1854. // ppSignCand Pointer to pointer to the input vectors of signs
  1855. // of nCand minimum candidates.
  1856. // ppIndx Pointer to pointer to the output vectors of
  1857. // indexes.
  1858. // ppSign Pointer to pointer to the output vectors of signs.
  1859. // ppCodeBooks Pointer to pointer to the specified
  1860. // IppsVQCodeBookState_32f structures.
  1861. // nCodeBooks Number of codebooks.
  1862. //
  1863. // Returns:
  1864. // ippStsNoErr Indicates no error.
  1865. // ippStsNullPtrErr Indicates an error when one of the specified
  1866. // pointers is NULL.
  1867. */
  1868. IPPAPI(IppStatus, ippsVQMainSelect_32f, (const Ipp32f* pSrc, const Ipp32f* pWeights, const Ipp32s* pLengths, int nDiv, int nCand, Ipp32s** ppIndexCand, Ipp32s** ppSignCand, Ipp32s** ppIndx, Ipp32s** ppSign, IppsVQCodeBookState_32f** ppCodeBooks, int nCodeBooks))
  1869. /* ///////////////////////////////////////////////////////////////////////////
  1870. // Name:
  1871. // ippsVQIndexSelect_32f
  1872. //
  1873. // Purpose:
  1874. // Finds optimal vector set for specified number of codebooks.
  1875. //
  1876. // Parameters:
  1877. // pSrc Source vector to be quantized.
  1878. // pWeights Pointer to the vector of weights.
  1879. // nDiv Number of fragmentations of the src and weights
  1880. // vectors.
  1881. // pLengths Pointer to an array of lengths of fragmentations.
  1882. // nCand Number of input candidates.
  1883. // ppPolbits Indicates whether one or two norms should be
  1884. // used to compute the optimal vector set for the
  1885. // specified number of codebooks.
  1886. // ppIndx Pointer to pointer to the output vectors of
  1887. // indexes.
  1888. // ppSign Pointer to pointer to the output vectors of signs.
  1889. // - The value of 1 indicates that the minimal
  1890. // distortion appears when the norm is negative.
  1891. // - The value of 0 indicates that the minimal
  1892. // distortion appears when the norm is positive.
  1893. // ppCodeBooks Pointer to pointer to the specified
  1894. // IppsVQCodeBookState_32f structures.
  1895. // nCodeBooks Number of codebooks.
  1896. //
  1897. // Returns:
  1898. // ippStsNoErr Indicates no error.
  1899. // ippStsNullPtrErr Indicates an error when one of the specified
  1900. // pointers is NULL.
  1901. */
  1902. IPPAPI(IppStatus, ippsVQIndexSelect_32f, (const Ipp32f* pSrc, const Ipp32f* pWeights, int nDiv, const Ipp32s* pLengths, int nCand, int** ppPolbits, Ipp32s** ppIndx, Ipp32s** ppSign, IppsVQCodeBookState_32f** ppCodeBooks, int nCodeBooks))
  1903. /* ///////////////////////////////////////////////////////////////////////////
  1904. // Name:
  1905. // ippsVQReconstruction_32f
  1906. //
  1907. // Purpose:
  1908. // Reconstructs vectors from indexes.
  1909. //
  1910. // Parameters:
  1911. // ppIndx Pointer to pointer to an array of input vectors
  1912. // of indexes for each codebook.
  1913. // ppSign Pointer to pointer to an array of input vectors
  1914. // of signs for each codebook containing either 1
  1915. // or -1.
  1916. // pLengths Pointer to an array of lengths of partitions of
  1917. // output vector.
  1918. // pDst Pointer to the reconstructed vector of spectrum
  1919. // values.
  1920. // nDiv Number of partitions of output vector.
  1921. // ppCodeBooks Pointer to pointer to an array of pointers to
  1922. // specified IppsVQCodeBookState_32f structures.
  1923. // nCodeBooks Number of codebooks.
  1924. //
  1925. // Returns:
  1926. // ippStsNoErr Indicates no error.
  1927. // ippStsNullPtrErr Indicates an error when one of the specified
  1928. // pointers is NULL.
  1929. */
  1930. IPPAPI(IppStatus, ippsVQReconstruction_32f, (const Ipp32s** ppIndx, const Ipp32s** ppSign, const Ipp32s* pLength, int nDiv, int nStream, Ipp32f* pDst, IppsVQCodeBookState_32f** ppCodeBooks))
  1931. /* ///////////////////////////////////////////////////////////////////////////
  1932. // Name:
  1933. // ippsVQCodeBookGetSize_32f
  1934. //
  1935. // Purpose:
  1936. // Gets the size of the codebook structure.
  1937. //
  1938. // Parameters:
  1939. // step Step to the next line in the codebook table,
  1940. // quantization vector length.
  1941. // height Table height, number of quantization vectors.
  1942. // pSizeState Address of the codebook structure size value in
  1943. // bytes.
  1944. //
  1945. // Returns:
  1946. // ippStsNoErr Indicates no error.
  1947. // ippStsNullPtrErr Indicates an error when pSizeState pointer is
  1948. // NULL.
  1949. // ippStsSizeErr Indicates an error when the step or height is
  1950. // less than or equal to 0.
  1951. */
  1952. IPPAPI(IppStatus, ippsVQCodeBookGetSize_32f, (int step, int height, int *pSizeState))
  1953. /****************************************************************************
  1954. * MPEG4-SBR AUDIO
  1955. ****************************************************************************/
  1956. /*
  1957. // DECODER PART
  1958. */
  1959. /* ///////////////////////////////////////////////////////////////////////////
  1960. // Name:
  1961. // ippsAnalysisFilterGetSize_SBR_RToC_32f,
  1962. // ippsAnalysisFilterGetSize_SBR_RToC_32f32fc,
  1963. // ippsAnalysisFilterGetSize_SBR_RToR_32f,
  1964. // ippsSynthesisFilterGetSize_SBR_CToR_32f,
  1965. // ippsSynthesisFilterGetSize_SBR_CToR_32fc32f,
  1966. // ippsSynthesisFilterGetSize_SBR_RToR_32f
  1967. // ippsSynthesisDownFilterGetSize_SBR_CToR_32f,
  1968. // ippsSynthesisDownFilterGetSize_SBR_CToR_32fc32f,
  1969. // ippsSynthesisDownFilterGetSize_SBR_RToR_32f
  1970. //
  1971. // Purpose:
  1972. // Returns size of QMF specification structures, init and work buffers.
  1973. //
  1974. // Parameters:
  1975. // pSizeSpec Address of the FilterSpec_SBR specification
  1976. // structure size value in bytes.
  1977. // pSizeInitBuf Address size of the buffer for initialization
  1978. // functions in bytes.
  1979. // pSizeWorkBuf Address of the work buffer size value in bytes.
  1980. //
  1981. // Returns:
  1982. // ippStsNoErr Indicates no error.
  1983. */
  1984. IPPAPI( IppStatus, ippsAnalysisFilterGetSize_SBR_RToC_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1985. IPPAPI( IppStatus, ippsAnalysisFilterGetSize_SBR_RToC_32f32fc, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1986. IPPAPI( IppStatus, ippsAnalysisFilterGetSize_SBR_RToR_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1987. IPPAPI( IppStatus, ippsSynthesisFilterGetSize_SBR_CToR_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1988. IPPAPI(IppStatus, ippsSynthesisFilterGetSize_SBR_CToR_32fc32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1989. IPPAPI( IppStatus, ippsSynthesisFilterGetSize_SBR_RToR_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1990. IPPAPI( IppStatus, ippsSynthesisDownFilterGetSize_SBR_CToR_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1991. IPPAPI( IppStatus, ippsSynthesisDownFilterGetSize_SBR_CToR_32fc32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1992. IPPAPI( IppStatus, ippsSynthesisDownFilterGetSize_SBR_RToR_32f, ( int* pSizeSpec, int* pSizeInitBuf, int* pSizeWorkBuf ))
  1993. /* ///////////////////////////////////////////////////////////////////////////
  1994. // Name:
  1995. // ippsAnalysisFilterInit_SBR_RToC_32f
  1996. //
  1997. // Purpose:
  1998. // Initializes analysis specification structure.
  1999. //
  2000. // Parameters:
  2001. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2002. // specification structure is written. Onlt the
  2003. // main function uses this structure.
  2004. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2005. // specification structure.
  2006. // pInitBuf Pointer to the Init buffer.
  2007. //
  2008. // Returns:
  2009. // ippStsNoErr Indicates no error.
  2010. // ippStsNullPtrErr Indicates an error when at least one of the
  2011. // specified pointers is NULL.
  2012. // ippStsContextMatchErr Indicates an error when the identifier
  2013. // pFilterSpec is incorrect.
  2014. */
  2015. IPPAPI( IppStatus, ippsAnalysisFilterInit_SBR_RToC_32f,
  2016. ( IppsFilterSpec_SBR_C_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2017. /* ///////////////////////////////////////////////////////////////////////////
  2018. // Name:
  2019. // ippsSynthesisFilterInit_SBR_CToR_32fc32f
  2020. //
  2021. // Purpose:
  2022. // Initializes analysis specification structure.
  2023. //
  2024. // Parameters:
  2025. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2026. // specification structure is written. Onlt the
  2027. // main function uses this structure.
  2028. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2029. // specification structure.
  2030. // pInitBuf Pointer to the Init buffer.
  2031. //
  2032. // Returns:
  2033. // ippStsNoErr Indicates no error.
  2034. // ippStsNullPtrErr Indicates an error when at least one of the
  2035. // specified pointers is NULL.
  2036. // ippStsContextMatchErr Indicates an error when the identifier
  2037. // pFilterSpec is incorrect.
  2038. */
  2039. IPPAPI( IppStatus, ippsSynthesisFilterInit_SBR_CToR_32fc32f,
  2040. ( IppsFilterSpec_SBR_C_32fc** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2041. /* ///////////////////////////////////////////////////////////////////////////
  2042. // Name:
  2043. // ippsAnalysisFilterInit_SBR_RToC_32f32fc
  2044. //
  2045. // Purpose:
  2046. // Initializes analysis specification structure.
  2047. //
  2048. // Parameters:
  2049. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2050. // specification structure is written. Onlt the
  2051. // main function uses this structure.
  2052. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2053. // specification structure.
  2054. // pInitBuf Pointer to the Init buffer.
  2055. //
  2056. // Returns:
  2057. // ippStsNoErr Indicates no error.
  2058. // ippStsNullPtrErr Indicates an error when at least one of the
  2059. // specified pointers is NULL.
  2060. // ippStsContextMatchErr Indicates an error when the identifier
  2061. // pFilterSpec is incorrect.
  2062. */
  2063. IPPAPI( IppStatus, ippsAnalysisFilterInit_SBR_RToC_32f32fc,
  2064. ( IppsFilterSpec_SBR_C_32fc** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2065. /* ///////////////////////////////////////////////////////////////////////////
  2066. // Name:
  2067. // ippsAnalysisFilterInit_SBR_RToR_32f
  2068. //
  2069. // Purpose:
  2070. // Initializes analysis specification structure.
  2071. //
  2072. // Parameters:
  2073. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2074. // specification structure is written. Onlt the
  2075. // main function uses this structure.
  2076. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2077. // specification structure.
  2078. // pInitBuf Pointer to the Init buffer.
  2079. //
  2080. // Returns:
  2081. // ippStsNoErr Indicates no error.
  2082. // ippStsNullPtrErr Indicates an error when at least one of the
  2083. // specified pointers is NULL.
  2084. // ippStsContextMatchErr Indicates an error when the identifier
  2085. // pFilterSpec is incorrect.
  2086. */
  2087. IPPAPI( IppStatus, ippsAnalysisFilterInit_SBR_RToR_32f,
  2088. ( IppsFilterSpec_SBR_R_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2089. /* ///////////////////////////////////////////////////////////////////////////
  2090. // Name:
  2091. // ippsSynthesisFilterInit_SBR_CToR_32fc32f
  2092. //
  2093. // Purpose:
  2094. // Initializes synthesis specification structure.
  2095. //
  2096. // Parameters:
  2097. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2098. // specification structure is written. Onlt the
  2099. // main function uses this structure.
  2100. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2101. // specification structure.
  2102. // pInitBuf Pointer to the Init buffer.
  2103. //
  2104. // Returns:
  2105. // ippStsNoErr Indicates no error.
  2106. // ippStsNullPtrErr Indicates an error when at least one of the
  2107. // specified pointers is NULL.
  2108. // ippStsContextMatchErr Indicates an error when the identifier
  2109. // pFilterSpec is incorrect.
  2110. */
  2111. IPPAPI( IppStatus, ippsSynthesisFilterInit_SBR_CToR_32f,
  2112. ( IppsFilterSpec_SBR_C_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2113. /* ///////////////////////////////////////////////////////////////////////////
  2114. // Name:
  2115. // ippsSynthesisFilterInit_SBR_RToR_32f
  2116. //
  2117. // Purpose:
  2118. // Initializes synthesis specification structure.
  2119. //
  2120. // Parameters:
  2121. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2122. // specification structure is written. Onlt the
  2123. // main function uses this structure.
  2124. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2125. // specification structure.
  2126. // pInitBuf Pointer to the Init buffer.
  2127. //
  2128. // Returns:
  2129. // ippStsNoErr Indicates no error.
  2130. // ippStsNullPtrErr Indicates an error when at least one of the
  2131. // specified pointers is NULL.
  2132. // ippStsContextMatchErr Indicates an error when the identifier
  2133. // pFilterSpec is incorrect.
  2134. */
  2135. IPPAPI( IppStatus, ippsSynthesisFilterInit_SBR_RToR_32f,
  2136. ( IppsFilterSpec_SBR_R_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2137. /* ///////////////////////////////////////////////////////////////////////////
  2138. // Name:
  2139. // ippsSynthesisDownFilterInit_SBR_CToR_32f
  2140. //
  2141. // Purpose:
  2142. // Initializes synthesis specification structure.
  2143. //
  2144. // Parameters:
  2145. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2146. // specification structure is written. Onlt the
  2147. // main function uses this structure.
  2148. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2149. // specification structure.
  2150. // pInitBuf Pointer to the Init buffer.
  2151. //
  2152. // Returns:
  2153. // ippStsNoErr Indicates no error.
  2154. // ippStsNullPtrErr Indicates an error when at least one of the
  2155. // specified pointers is NULL.
  2156. // ippStsContextMatchErr Indicates an error when the identifier
  2157. // pFilterSpec is incorrect.
  2158. */
  2159. IPPAPI( IppStatus, ippsSynthesisDownFilterInit_SBR_CToR_32f,
  2160. ( IppsFilterSpec_SBR_C_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2161. /* ///////////////////////////////////////////////////////////////////////////
  2162. // Name:
  2163. // ippsSynthesisDownFilterInit_SBR_CToR_32fc32f
  2164. //
  2165. // Purpose:
  2166. // Initializes down sample synthesis specification structure.
  2167. //
  2168. // Parameters:
  2169. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2170. // specification structure is written. Onlt the
  2171. // main function uses this structure.
  2172. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2173. // specification structure.
  2174. // pInitBuf Pointer to the Init buffer.
  2175. //
  2176. // Returns:
  2177. // ippStsNoErr Indicates no error.
  2178. // ippStsNullPtrErr Indicates an error when at least one of the
  2179. // specified pointers is NULL.
  2180. // ippStsContextMatchErr Indicates an error when the identifier
  2181. // pFilterSpec is incorrect.
  2182. */
  2183. IPPAPI( IppStatus, ippsSynthesisDownFilterInit_SBR_CToR_32fc32f,
  2184. ( IppsFilterSpec_SBR_C_32fc** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2185. /* ///////////////////////////////////////////////////////////////////////////
  2186. // Name:
  2187. // ippsSynthesisDownFilterInit_SBR_RToR_32f
  2188. //
  2189. // Purpose:
  2190. // Initializes down sample synthesis specification structure.
  2191. //
  2192. // Parameters:
  2193. // ppFilterSpec Pointer to where pointer to the FilterSpec_SBR
  2194. // specification structure is written. Onlt the
  2195. // main function uses this structure.
  2196. // pMemSpec Pointer to the area for the FilterSpec_SBR
  2197. // specification structure.
  2198. // pInitBuf Pointer to the Init buffer.
  2199. //
  2200. // Returns:
  2201. // ippStsNoErr Indicates no error.
  2202. // ippStsNullPtrErr Indicates an error when at least one of the
  2203. // specified pointers is NULL.
  2204. // ippStsContextMatchErr Indicates an error when the identifier
  2205. // pFilterSpec is incorrect.
  2206. */
  2207. IPPAPI( IppStatus, ippsSynthesisDownFilterInit_SBR_RToR_32f,
  2208. ( IppsFilterSpec_SBR_R_32f** ppFilterSpec, Ipp8u* pMemSpec, Ipp8u* pInitBuf))
  2209. /* ///////////////////////////////////////////////////////////////////////////
  2210. // Name:
  2211. // ippsAnalysisFilter_SBR_RToC_32f_D2L
  2212. // ippsAnalysisFilter_SBR_RToC_32f32fc_D2L
  2213. // ippsAnalysisFilter_SBR_RToR_32f_D2L
  2214. //
  2215. // Purpose:
  2216. // Splits time domain signal output from the core decoder into 32
  2217. // subband signals.
  2218. //
  2219. // Parameters:
  2220. // pSrc Pointer to the input audio signal.
  2221. // pDst array of pointers, holds subband samples.
  2222. // pDstRe array of pointers that contains real parts of subband samples.
  2223. // pDstIm array of pointers that contains imaginary parts of subband
  2224. // samples.
  2225. // pSbrTableWindowDown Pointer to the window table that is used by decoder SBR Analysis Filter.
  2226. // offset Desired displacement in number of rows when the matrix pDst is calculated. offset >=0
  2227. // NumLoop Parameter equal to 32 if frame size of the core decoded signal is 1024
  2228. // 30 if frame size of the core decoded signal is 960.
  2229. // kx first SBR subband in the SBR range.
  2230. // pFilterSpec Pointer to the FilterSpec_SBR specification structure.
  2231. // pWorkBuf Pointer to the work buffer.
  2232. //
  2233. // Returns:
  2234. // ippStsNoErr Indicates no error.
  2235. // ippStsNullPtrErr Indicates an error when at least one of the
  2236. // specified pointers is NULL.
  2237. // ippStsContextMatchErr Indicates an error when the identifier
  2238. // pFilterSpec is incorrect.
  2239. */
  2240. IPPAPI( IppStatus, ippsAnalysisFilter_SBR_RToC_32f_D2L,
  2241. (const Ipp32f* pSrc, Ipp32f* pDstRe[], Ipp32f* pDstIm[], const Ipp32f* pSbrTableWinDown,
  2242. int NumLoop, int offset, int kx,
  2243. const IppsFilterSpec_SBR_C_32f* pFilterSpec, Ipp8u* pWorkBuf))
  2244. IPPAPI( IppStatus, ippsAnalysisFilter_SBR_RToC_32f32fc_D2L,
  2245. (const Ipp32f* pSrc, Ipp32fc* pDst[], const Ipp32f* pSbrTableWinDown,
  2246. int NumLoop, int offset, int kx,
  2247. const IppsFilterSpec_SBR_C_32fc* pFilterSpec, Ipp8u* pWorkBuf))
  2248. IPPAPI( IppStatus, ippsAnalysisFilter_SBR_RToR_32f_D2L,
  2249. (const Ipp32f* pSrc, Ipp32f* pDst[], const Ipp32f* pSbrTableWinDown,
  2250. int NumLoop, int offset, int kx,
  2251. const IppsFilterSpec_SBR_R_32f* pFilterSpec, Ipp8u* pWorkBuf))
  2252. /* ///////////////////////////////////////////////////////////////////////////
  2253. // Name:
  2254. // ippsSynthesisFilter_SBR_CToR_32f_D2L
  2255. // ippsSynthesisFilter_SBR_CToR_32fc32f_D2L
  2256. // ippsSynthesisFilter_SBR_RToR_32f_D2L
  2257. //
  2258. // Purpose:
  2259. // Transforms SBR-processed subband signals into time domain samples.
  2260. //
  2261. // Parameters:
  2262. // pSrc - array of pointers, holds SBR-processed subband signals.
  2263. // pSrcRe - array of pointers that contains real parts of SBR-processed subband signals.
  2264. // pSrcIm - array of pointers that contains imaginary parts of SBR-processed subband signals.
  2265. // pDst - Pointer to the output vector, holds time domain output samples.
  2266. // pSbrTableWindow - Pointer to the window table that is used by SBR Analysis Filter.
  2267. // NumLoop - Parameter equal to 32 if frame size of the core decoded signal is 1024
  2268. // 30 if frame size of the core decoded signal is 960.
  2269. // pFilterSpec- Pointer to the FilterSpec_SBR specification structure.
  2270. // pWorkBuf - Pointer to the work buffer used by the filter.
  2271. //
  2272. // Returns:
  2273. // ippStsNoErr Indicates no error.
  2274. // ippStsNullPtrErr Indicates an error when at least one of the
  2275. // specified pointers is NULL.
  2276. // ippStsContextMatchErr Indicates an error when the identifier
  2277. // pFilterSpec is incorrect.
  2278. */
  2279. IPPAPI( IppStatus, ippsSynthesisFilter_SBR_CToR_32f_D2L,
  2280. (const Ipp32f* pSrcRe[], const Ipp32f* pSrcIm[], Ipp32f* pDst, const Ipp32f* pSbrTableWindow,
  2281. int NumLoop, const IppsFilterSpec_SBR_C_32f* pFilterSpec, Ipp8u* pWorkBuf))
  2282. IPPAPI( IppStatus, ippsSynthesisFilter_SBR_CToR_32fc32f_D2L,
  2283. (const Ipp32fc* pSrc[], Ipp32f* pDst, const Ipp32f* pSbrTableWindow, int NumLoop,
  2284. const IppsFilterSpec_SBR_C_32fc* pFilterSpec, Ipp8u* pWorkBuf ))
  2285. IPPAPI( IppStatus, ippsSynthesisFilter_SBR_RToR_32f_D2L,
  2286. (const Ipp32f* pSrc[], Ipp32f* pDst, const Ipp32f* pSbrTableWindow, int NumLoop,
  2287. const IppsFilterSpec_SBR_R_32f* pFilterSpec, Ipp8u* pWorkBuf ))
  2288. /* ///////////////////////////////////////////////////////////////////////////
  2289. // Name: ippsSynthesisDownFilter_SBR_CToR_32f_D2L, ippsSynthesisDownFilter_SBR_CToR_32fc32f_D2L, ippsSynthesisDownFilter_SBR_RToR_32f_D2L
  2290. // Purpose: Transforms SBR-processed subband signals into time domain samples and
  2291. // performs downsampling at the same time.
  2292. //
  2293. // Parameters:
  2294. // pSrc - array of pointers, holds SBR-processed subband signals.
  2295. // pSrcRe - array of pointers that contains real parts of SBR-processed subband signals.
  2296. // pSrcIm - array of pointers that contains imaginary parts of SBR-processed subband signals.
  2297. // pDst - Pointer to the output vector, holds time domain output samples.
  2298. // pSbrTableWindowDown - Pointer to the window table that is used by SBR Analysis Filter.
  2299. // NumLoop- Parameter equal to 32 if frame size of the core decoded signal is 1024
  2300. // 30 if frame size of the core decoded signal is 960.
  2301. // pFilterSpec - Pointer to the FilterSpec_SBR specification structure.
  2302. // pWorkBuf - Pointer to the work buffer used by the filter.
  2303. //
  2304. // Return Values: status
  2305. */
  2306. IPPAPI( IppStatus, ippsSynthesisDownFilter_SBR_CToR_32f_D2L,
  2307. (const Ipp32f* pSrcRe[],const Ipp32f* pSrcIm[], Ipp32f* pDst,
  2308. const Ipp32f* pSbrTableWindowDown, int NumLoop,
  2309. const IppsFilterSpec_SBR_C_32f* pFilterSpec, Ipp8u* pWorkBuf ))
  2310. IPPAPI( IppStatus, ippsSynthesisDownFilter_SBR_CToR_32fc32f_D2L,
  2311. (const Ipp32fc* pSrc[], Ipp32f* pDst, const Ipp32f* pSbrTableWindowDown, int NumLoop,
  2312. const IppsFilterSpec_SBR_C_32fc* pFilterSpec, Ipp8u* pWorkBuf ))
  2313. IPPAPI( IppStatus, ippsSynthesisDownFilter_SBR_RToR_32f_D2L,
  2314. (const Ipp32f* pSrc[], Ipp32f* pDst, const Ipp32f* pSbrTableWindowDown, int NumLoop,
  2315. const IppsFilterSpec_SBR_R_32f* pFilterSpec, Ipp8u* pWorkBuf ))
  2316. /* ///////////////////////////////////////////////////////////////////////////
  2317. // Name: ippsPredictCoef_SBR_R_32f_D2L, ippsPredictCoef_SBR_C_32fc_D2L, ippsPredictCoef_SBR_C_32f_D2L
  2318. // Purpose: Obtains prediction filter coefficients using covariance method.
  2319. //
  2320. // Parameters:
  2321. // pSrc - array of pointers holds input real or complex matrix ([40][32]),
  2322. // holds Low Frequency QMF-processed subband signals.
  2323. // pSrcRe - array of pointers ([40][32]) that contains real
  2324. // parts of Low Frequency SBR-processed subband signals.
  2325. // pSrcIm - array of pointers ([40][32]) that contains
  2326. // imaginary parts of Low Frequency SBR-processed subband signals.
  2327. // k0 - First QMF subband in the f_master table.
  2328. // len - Size autocorrelation.
  2329. // pAlpha0, pAlpha1 - Pointers to the arrays that contain complex
  2330. // or real Prediction filter coefficients used by High Frequency filter.
  2331. // pAlpha0Re, pAlpha1Re - Pointers to the arrays that contain real parts of the
  2332. // corresponding complex filter coefficients.
  2333. // pAlpha0Im, pAlpha1Im - Pointers to the arrays that contain imaginary parts of the
  2334. // corresponding complex filter coefficients.
  2335. //
  2336. // Return Values: status
  2337. */
  2338. IPPAPI( IppStatus, ippsPredictCoef_SBR_R_32f_D2L,
  2339. (const Ipp32f* pSrc[], Ipp32f* pAlpha0, Ipp32f* pAlpha1, int k0, int len))
  2340. IPPAPI( IppStatus, ippsPredictCoef_SBR_C_32fc_D2L,
  2341. (const Ipp32fc* pSrc[], Ipp32fc* pAlpha0, Ipp32fc* pAlpha1, int k0, int len))
  2342. IPPAPI( IppStatus, ippsPredictCoef_SBR_C_32f_D2L,
  2343. (const Ipp32f* pSrcRe[], const Ipp32f* pSrcIm[],
  2344. Ipp32f* pAlpha0Re, Ipp32f* pAlpha0Im,
  2345. Ipp32f* pAlpha1Re, Ipp32f* pAlpha1Im,
  2346. int k0, int len))
  2347. IPPAPI( IppStatus, ippsPredictOneCoef_SBRHQ_32sc_D2L,
  2348. (const Ipp32sc* pSrc[], Ipp32sc* pAlpha0, Ipp32sc* pAlpha1, int k, int lenCorr))
  2349. IPPAPI( IppStatus, ippsPredictOneCoef_SBRLP_32s_D2L,
  2350. (const Ipp32s* pSrc[], Ipp32s* pAlpha0, Ipp32s* pAlpha1,
  2351. Ipp32s* pRefCoef, int k, int lenCorr, int flag))
  2352. /****************************************************************************
  2353. * FIXED-POINT VERSION
  2354. *
  2355. *
  2356. ****************************************************************************/
  2357. /* <-------------------- HQ MODE --------------------------> */
  2358. /* GET SIZE */
  2359. IPPAPI( IppStatus, ippsAnalysisFilterGetSize_SBRHQ_32s32sc, ( int* pSizeSpec ))
  2360. IPPAPI( IppStatus, ippsSynthesisFilterGetSize_SBRHQ_32sc32s, ( int* pSizeSpec ))
  2361. IPPAPI( IppStatus, ippsSynthesisDownFilterGetSize_SBRHQ_32sc32s, ( int* pSizeSpec))
  2362. /* INIT */
  2363. IPPAPI( IppStatus, ippsAnalysisFilterInit_SBRHQ_32s32sc,
  2364. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2365. IPPAPI( IppStatus, ippsSynthesisFilterInit_SBRHQ_32sc32s,
  2366. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2367. IPPAPI( IppStatus, ippsSynthesisDownFilterInit_SBRHQ_32sc32s,
  2368. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2369. /* INITALLOC */
  2370. IPPAPI( IppStatus, ippsAnalysisFilterInitAlloc_SBRHQ_32s32sc,
  2371. ( IppsFilterSpec_SBR_C_32sc** ppFilterSpec))
  2372. IPPAPI( IppStatus, ippsSynthesisFilterInitAlloc_SBRHQ_32sc32s,
  2373. ( IppsFilterSpec_SBR_C_32sc** ppFilterSpec))
  2374. IPPAPI( IppStatus, ippsSynthesisDownFilterInitAlloc_SBRHQ_32sc32s,
  2375. ( IppsFilterSpec_SBR_C_32sc** ppFilterSpec))
  2376. /* FREE */
  2377. IPPAPI( IppStatus, ippsAnalysisFilterFree_SBRHQ_32s32sc,
  2378. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2379. IPPAPI( IppStatus, ippsSynthesisFilterFree_SBRHQ_32sc32s,
  2380. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2381. IPPAPI( IppStatus, ippsSynthesisDownFilterFree_SBRHQ_32sc32s,
  2382. ( IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2383. /* MAIN */
  2384. IPPAPI( IppStatus, ippsAnalysisFilter_SBRHQ_32s32sc,
  2385. (const Ipp32s* pSrc, Ipp32sc* pDst,int kx,
  2386. const IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2387. IPPAPI( IppStatus, ippsSynthesisFilter_SBRHQ_32sc32s,
  2388. (const Ipp32sc* pSrc, Ipp32s* pDst,
  2389. const IppsFilterSpec_SBR_C_32sc* pFilterSpec))
  2390. IPPAPI( IppStatus, ippsSynthesisDownFilter_SBRHQ_32sc32s,
  2391. (const Ipp32sc* pSrc, Ipp32s* pDst,
  2392. const IppsFilterSpec_SBR_C_32sc* pFilterSpec ))
  2393. /* <-----------------------LP MODE -----------------------> */
  2394. /* GET SIZE */
  2395. IPPAPI( IppStatus, ippsAnalysisFilterGetSize_SBRLP_32s, ( int* pSizeSpec ))
  2396. IPPAPI( IppStatus, ippsSynthesisFilterGetSize_SBRLP_32s, ( int* pSizeSpec ))
  2397. IPPAPI( IppStatus, ippsSynthesisDownFilterGetSize_SBRLP_32s, ( int* pSizeSpec ))
  2398. /* INIT */
  2399. IPPAPI( IppStatus, ippsAnalysisFilterInit_SBRLP_32s,
  2400. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2401. IPPAPI( IppStatus, ippsSynthesisFilterInit_SBRLP_32s,
  2402. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2403. IPPAPI( IppStatus, ippsSynthesisDownFilterInit_SBRLP_32s,
  2404. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2405. /* INITALLOC */
  2406. IPPAPI( IppStatus, ippsAnalysisFilterInitAlloc_SBRLP_32s,
  2407. ( IppsFilterSpec_SBR_R_32s** ppFilterSpec))
  2408. IPPAPI( IppStatus, ippsSynthesisFilterInitAlloc_SBRLP_32s,
  2409. ( IppsFilterSpec_SBR_R_32s** ppFilterSpec))
  2410. IPPAPI( IppStatus, ippsSynthesisDownFilterInitAlloc_SBRLP_32s,
  2411. ( IppsFilterSpec_SBR_R_32s** ppFilterSpec))
  2412. /* FREE */
  2413. IPPAPI( IppStatus, ippsAnalysisFilterFree_SBRLP_32s,
  2414. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2415. IPPAPI( IppStatus, ippsSynthesisFilterFree_SBRLP_32s,
  2416. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2417. IPPAPI( IppStatus, ippsSynthesisDownFilterFree_SBRLP_32s,
  2418. ( IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2419. /* MAIN */
  2420. IPPAPI( IppStatus, ippsAnalysisFilter_SBRLP_32s,
  2421. (const Ipp32s* pSrc, Ipp32s* pDst,int kx,
  2422. const IppsFilterSpec_SBR_R_32s* pFilterSpec))
  2423. IPPAPI( IppStatus, ippsSynthesisFilter_SBRLP_32s,
  2424. (const Ipp32s* pSrc, Ipp32s* pDst,
  2425. const IppsFilterSpec_SBR_R_32s* pFilterSpec ))
  2426. IPPAPI( IppStatus, ippsSynthesisDownFilter_SBRLP_32s,
  2427. (const Ipp32s* pSrc, Ipp32s* pDst,
  2428. const IppsFilterSpec_SBR_R_32s* pFilterSpec ))
  2429. /*
  2430. // ENCODER PART
  2431. */
  2432. /* ///////////////////////////////////////////////////////////////////////////
  2433. // Name:
  2434. // ippsAnalysisFilterEncGetSize_SBR_32f
  2435. //
  2436. // Purpose:
  2437. // Returns size of FilterSpec_SBR specification structures & init buffer.
  2438. //
  2439. // Parameters:
  2440. // pSizeSpec Address of the FilterSpec_SBR specification
  2441. // structure size value in bytes.
  2442. // pSizeInitBuf Address size of the buffer for initialization
  2443. // functions in bytes.
  2444. //
  2445. // Returns:
  2446. // ippStsNoErr Indicates no error.
  2447. // ippStsNullPtrErr Indicates an error when any of the specified
  2448. // pointers is NULL.
  2449. */
  2450. IPPAPI(IppStatus, ippsAnalysisFilterEncGetSize_SBR_32f,
  2451. (int *pSizeSpec,
  2452. int *pSizeInitBuf))
  2453. /* ///////////////////////////////////////////////////////////////////////////
  2454. // Name:
  2455. // ippsAnalysisFilterInitEnc_SBR_32f
  2456. //
  2457. // Purpose:
  2458. // Initializes analysis specification structure.
  2459. //
  2460. // Parameters:
  2461. // ppFilterSpec Pointer to FilterSpec_SBR specification structure
  2462. //
  2463. // pInitBuf Pointer to the Init buffer.
  2464. //
  2465. // Returns:
  2466. // ippStsNoErr Indicates no error.
  2467. // ippStsNullPtrErr Indicates an error when any of the specified
  2468. // pointers is NULL.
  2469. // ippStsContextMatchErr Indicates an error when the identifier pFilterSpec is
  2470. // incorrect.
  2471. */
  2472. IPPAPI(IppStatus, ippsAnalysisFilterEncInit_SBR_32f,
  2473. (IppsFilterSpec_SBR_C_32fc *ppFilterSpec,
  2474. Ipp8u *pInitBuf))
  2475. /* ///////////////////////////////////////////////////////////////////////////
  2476. // Name:
  2477. // ippsAnalysisFilterEncInitAlloc_SBR_32f
  2478. //
  2479. // Purpose:
  2480. // Allocate memory for analysis specification structure and initializes it.
  2481. //
  2482. // Parameters:
  2483. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_SBR
  2484. // specification structure is written.
  2485. //
  2486. // Returns:
  2487. // ippStsNoErr Indicates no error.
  2488. // ippStsNullPtrErr Indicates an error when ppFilterSpec is NULL.
  2489. */
  2490. IPPAPI(IppStatus, ippsAnalysisFilterEncInitAlloc_SBR_32f, (IppsFilterSpec_SBR_C_32f **ppFilterSpec))
  2491. /* ///////////////////////////////////////////////////////////////////////////
  2492. // Name:
  2493. // ippsAnalysisFilterEncFree_SBR_32f
  2494. //
  2495. // Purpose:
  2496. // Frees memory allocated for internal IppsFilterSpec_SBR structure.
  2497. //
  2498. // Parameters:
  2499. // pFilterSpec Pointer to the IppsFilterSpec_SBR specification
  2500. // structure.
  2501. //
  2502. // Returns:
  2503. // ippStsNoErr Indicates no error.
  2504. // ippStsNullPtrErr Indicates an error when pFilterSpec is NULL.
  2505. // ippStsContextMatchErr Indicates an error when the identifier
  2506. // pFilterSpec is incorrect.
  2507. */
  2508. IPPAPI(IppStatus, ippsAnalysisFilterEncFree_SBR_32f, (IppsFilterSpec_SBR_C_32f *pFilterSpec))
  2509. /* ///////////////////////////////////////////////////////////////////////////
  2510. // Name:
  2511. // ippsAnalysisFilterEnc_SBR_32f32fc
  2512. //
  2513. // Purpose:
  2514. // Splits time domain signal output from the core decoder into 32 subband
  2515. // signals.
  2516. //
  2517. // Parameters:
  2518. // pSrc Pointer to the input audio signal.
  2519. //
  2520. // pDst Pointer to the output signal
  2521. //
  2522. // pFilterSpec Pointer to the FilterSpec_SBR specification
  2523. // structure.
  2524. //
  2525. // Returns:
  2526. // ippStsNoErr Indicates no error.
  2527. //
  2528. // ippStsNullPtrErr Indicates an error when any of the specified
  2529. // pointers is NULL.
  2530. //
  2531. // ippStsContextMatchErr Indicates an error when the identifier
  2532. // pFilterSpec is incorrect.
  2533. */
  2534. IPPAPI(IppStatus, ippsAnalysisFilterEnc_SBR_32f32fc,
  2535. (const Ipp32f *pSrc,
  2536. Ipp32fc *pDst,
  2537. const IppsFilterSpec_SBR_C_32f *pFilterSpec))
  2538. /* ///////////////////////////////////////////////////////////////////////////
  2539. // Name:
  2540. // ippsDetectTransient_SBR_32f
  2541. //
  2542. // Purpose:
  2543. // Transient detection is done by function.
  2544. //
  2545. // Parameters:
  2546. // pSrc pointer to the vector which stores the spectrum component of audio signal.
  2547. //
  2548. // pInOutThr Pointer to the threshold of deviation.
  2549. //
  2550. // pDst pointer to the transient threshold
  2551. //
  2552. // Returns:
  2553. // ippStsNoErr Indicates no error.
  2554. // ippStsNullPtrErr Indicates an error when any of the specified
  2555. // pointers is NULL.
  2556. */
  2557. IPPAPI( IppStatus, ippsDetectTransient_SBR_32f, (const Ipp32f* pSrc, Ipp32f* pInOutThr, Ipp32f* pDst))
  2558. /* ///////////////////////////////////////////////////////////////////////////
  2559. // Name:
  2560. // ippsEstimateTNR_SBR_32f
  2561. //
  2562. // Purpose:
  2563. // Function estimates Tonality-To-Noise Ratio of audio signal.
  2564. //
  2565. // Parameters:
  2566. // pSrc pointer to the vector which stores the spectrum component of audio signal
  2567. //
  2568. // pTNR0 Pointer to first estimation of TNR.
  2569. //
  2570. // pTNR1 Pointer to second estimation of TNR
  2571. //
  2572. // pMeanNrg pointer
  2573. //
  2574. // Returns:
  2575. // ippStsNoErr Indicates no error.
  2576. // ippStsNullPtrErr Indicates an error when any of the specified
  2577. // pointers is NULL.
  2578. */
  2579. IPPAPI( IppStatus, ippsEstimateTNR_SBR_32f, (const Ipp32fc* pSrc, Ipp32f* pTNR0, Ipp32f* pTNR1, Ipp32f* pMeanNrg))
  2580. /* ///////////////////////////////////////////////////////////////////////////
  2581. // Name:
  2582. // ippsUnpackFrameHeader_MP3
  2583. //
  2584. // Purpose:
  2585. // Unpacks audio frame header.
  2586. //
  2587. // Parameters:
  2588. // ppBitStream Pointer to the pointer to the first byte of the
  2589. // MP3 frame header (*ppBitstream will be updated
  2590. // in the function).
  2591. // pFrameHeader Pointer to the MP3 frame header structure.
  2592. //
  2593. // Returns:
  2594. // ippStsNoErr Indicates no error.
  2595. // ippStsNullPtrErr Indicates an error when ppBitStreamp or
  2596. // FrameHeader is NULL.
  2597. */
  2598. IPPAPI( IppStatus, ippsAnalysisFilter_PS_32fc_D2, (const Ipp32fc* pSrc, Ipp32fc ppDst[32][12],
  2599. IppAC_PS_DEC_ANALYSIS config))
  2600. /* ///////////////////////////////////////////////////////////////////////////
  2601. // Name:
  2602. // ippsAnalysisFilter_PS_32fc_D2
  2603. //
  2604. // Purpose:
  2605. // Increases frequency resolution of the first few lower subbands by hybrid filtering
  2606. //
  2607. // Parameters:
  2608. // pSrc Pointer to the lower QMF subband
  2609. // ppDst Output matrix, contains hybrid subband samples
  2610. // config flag describing configuration of hybrid filtering
  2611. //
  2612. // Returns:
  2613. // ippStsNoErr Indicates no error.
  2614. // ippStsNullPtrErr Indicates an error when at least one of the specified pointers is NULL.
  2615. // ippStsBadArgErr Indicates an error when config isn't correct
  2616. */
  2617. IPPAPI(IppStatus, ippsUnpackFrameHeader_MP3, (
  2618. Ipp8u** ppBitStream,
  2619. IppMP3FrameHeader* pFrameHeader))
  2620. /* ///////////////////////////////////////////////////////////////////////////
  2621. // Name:
  2622. // ippsUnpackSideInfo_MP3
  2623. //
  2624. // Purpose:
  2625. // Unpacks side information from input bitstream for use during decoding
  2626. // of associated frame.
  2627. //
  2628. // Parameters:
  2629. // ppBitStream Pointer to the pointer to the first byte of the
  2630. // side information associated with the current
  2631. // frame in the bit stream buffer. The function
  2632. // updates this parameter.
  2633. // pFrameHeader Pointer to the structure that contains the
  2634. // unpacked MP3 frame header. The header structure
  2635. // provides format information about the input
  2636. // bitstream. Both single- and dual-channel MPEG-1
  2637. // and MPEG-2 modes are supported.
  2638. // pDstSideInfo Pointer to the MP3 side information structure.
  2639. // The structure contains side information that
  2640. // applies to all granules and all channels for the
  2641. // current frame. One or more of the structures are
  2642. // placed contiguously in the buffer pointed to by
  2643. // pDstSideInfo in the following order:
  2644. // {granule 0 (channel 0, channel 1), granule 1 (channel
  2645. // channel 1)}.
  2646. // pDstMainDataBegin Pointer to the main_data_begin field.
  2647. // pDstPrivateBits Pointer to the private bits field.
  2648. // pDstScfsi Pointer to the scale factor selection
  2649. // information associated with the current frame.
  2650. // The data is organized contiguously in the buffer
  2651. // pointed to by pDstScfsi in the following order:
  2652. // {channel 0 (scfsi_band 0, scfsi_band 1, ...,
  2653. // scfsi_band 3), channel 1 (scfsi_band 0,
  2654. // scfsi_band 1, ..., [, fsi_band 3)}.
  2655. //
  2656. // Returns:
  2657. // ippStsNoErr Indicates no error.
  2658. // ippStsNullPtrErr Indicates an error when at least one of the
  2659. // pointers ppBitStream, pDstSideInfo,
  2660. // pDstMainDataBegin, pDstPrivateBits, pDstScfsi,
  2661. // pFrameHeader, or ppBitStream is NULL.
  2662. // ippStsMP3FrameHeaderErr Indicates an error when some elements in the
  2663. // MP3 frame header structure are invalid:
  2664. // pFrameHeader->id != IPP_MP3_ID_MPEG1
  2665. // pFrameHeader->id != IPP_MP3_ID_MPEG2
  2666. // pFrameHeader->layer != 1 pFrameHeader->mode < 0
  2667. // pFrameHeader->mode > 3.
  2668. // ippStsMP3SideInfoErr Indicates an error when the value of block_type
  2669. // is zero when window_switching_flag is set.
  2670. */
  2671. IPPAPI(IppStatus, ippsUnpackSideInfo_MP3, (
  2672. Ipp8u** ppBitStream,
  2673. IppMP3SideInfo* pDstSideInfo,
  2674. int* pDstMainDataBegin,
  2675. int* pDstPrivateBits,
  2676. int* pDstScfsi,
  2677. IppMP3FrameHeader* pFrameHeader))
  2678. /* ///////////////////////////////////////////////////////////////////////////
  2679. // Name:
  2680. // ippsUnpackScaleFactors_MP3_1u8s
  2681. //
  2682. // Purpose:
  2683. // Unpacks scalefactors.
  2684. //
  2685. // Parameters:
  2686. // ppBitStream Pointer to the pointer to the first bitstream
  2687. // buffer byte associated with the scale factors
  2688. // for the current frame, granule, and channel. The
  2689. // function updates this parameter.
  2690. // pOffSet Pointer to the next bit in the byte referenced by *
  2691. // ppBitStream. Valid within the range of 0 to 7,
  2692. // where 0 corresponds to the most significant bit
  2693. // and 7 corresponds to the least significant bit.
  2694. // The function updates this parameter.
  2695. // pDstScaleFactor Pointer to the scalefactor vector for long and/
  2696. // or short blocks.
  2697. // pSideInfo Pointer to the MP3 side information structure
  2698. // associated with the current granule and channel.
  2699. // pScfsi Pointer to scale factor selection information
  2700. // for the current channel.
  2701. // pFrameHeader Pointer to MP3 frame header structure for the
  2702. // current frame.
  2703. // granule Granule index. Can take the values
  2704. // of either 0 or 1.
  2705. // channel Channel index. Can take the values of either 0
  2706. // or 1.
  2707. //
  2708. // Returns:
  2709. // ippStsNoErr Indicates no error.
  2710. // ippStsNullPtrErr Indicates an error when ppBitStream, pOffset,
  2711. // pDstScaleFactor, pSideInfo, pScfsi, ppBitStream,
  2712. // or pFrameHeader is NULL.
  2713. */
  2714. IPPAPI(IppStatus, ippsUnpackScaleFactors_MP3_1u8s, (
  2715. Ipp8u** ppBitStream,
  2716. int* pOffset,
  2717. Ipp8s* pDstScaleFactor,
  2718. IppMP3SideInfo* pSideInfo,
  2719. int* pScfsi,
  2720. IppMP3FrameHeader* pFrameHeader,
  2721. int granule,
  2722. int channel))
  2723. /* ///////////////////////////////////////////////////////////////////////////
  2724. // Name:
  2725. // ippsHuffmanDecode_MP3_1u32s
  2726. //
  2727. // Purpose:
  2728. // Decodes Huffman data.
  2729. //
  2730. // Parameters:
  2731. // ppBitStream Pointer to the pointer to the first bit stream
  2732. // byte that contains the Huffman code words
  2733. // associated with the current granule and channel.
  2734. // The function updates this parameter.
  2735. // pOffset Pointer to the starting bit position in the bit
  2736. // stream byte pointed to by *ppBitStream.
  2737. // The parameter is valid within the
  2738. // range of 0 to 7, where 0 corresponds to the most
  2739. // significant bit, and 7 corresponds to the least
  2740. // significant bit. The function updates this
  2741. // parameter.
  2742. // pDstIs Pointer to the vector of decoded Huffman symbols
  2743. // used to compute the quantized values of the 576
  2744. // spectral coefficients associated with the
  2745. // current granule and channel.
  2746. // pDstNonZeroBound Pointer to the spectral region above which all
  2747. // coefficients are set to zero.
  2748. // pSideInfo Pointer to MP3 structure containing side
  2749. // information associated with the current granule
  2750. // and channel.
  2751. // pFrameHeader Pointer to MP3 structure containing the header
  2752. // associated with the current frame.
  2753. // hufSize The number of Huffman code bits associated with
  2754. // the current granule and channel.
  2755. //
  2756. // Returns:
  2757. // ippStsNoErr Indicates no error.
  2758. // ippStsNullPtrErr Indicates an error when at least one of the
  2759. // pointers ppBitStream, pOffset, pDstIs,
  2760. // pDstNonZeroBound, pSideInfo, pFrameHeader, or
  2761. // ppBitStream is NULL or when pOffset < 0 or
  2762. // pOffset > 7.
  2763. // ippStsMP3FrameHeaderErr Indicates an error when some elements in the
  2764. // MP3 frame header structure are invalid.
  2765. // ippStsMP3SideInfoErr Indicates an error when some elements in the MP3
  2766. // side information structure are invalid or when
  2767. // hufSize < 0 or hufSize > pSideInfo->part23Len.
  2768. // ippStsErr Indicates unknown error.
  2769. */
  2770. IPPAPI(IppStatus, ippsHuffmanDecode_MP3_1u32s, (
  2771. Ipp8u** ppBitStream,
  2772. int* pOffset,
  2773. Ipp32s* pDstIs,
  2774. int* pDstNonZeroBound,
  2775. IppMP3SideInfo* pSideInfo,
  2776. IppMP3FrameHeader* pFrameHeader,
  2777. int hufSize))
  2778. /* ///////////////////////////////////////////////////////////////////////////
  2779. // Name:
  2780. // ippsHuffmanDecodeSfb_MP3_1u32s
  2781. //
  2782. // Purpose:
  2783. // Decodes Huffman data.
  2784. //
  2785. // Parameters:
  2786. // ppBitStream Pointer to the pointer to the first bit stream
  2787. // byte that contains the Huffman code words
  2788. // associated with the current granule and channel.
  2789. // The function updates this parameter.
  2790. // pOffset Pointer to the starting bit position in the bit
  2791. // stream byte pointed to by *ppBitStream.
  2792. // The parameter is valid within the
  2793. // range of 0 to 7, where 0 corresponds to the most
  2794. // significant bit, and 7 corresponds to the least
  2795. // significant bit. The function updates this
  2796. // parameter.
  2797. // pDstIs Pointer to the vector of decoded Huffman symbols
  2798. // used to compute the quantized values of the 576
  2799. // spectral coefficients associated with the
  2800. // current granule and channel.
  2801. // pDstNonZeroBound Pointer to the spectral region above which all
  2802. // coefficients are set to zero.
  2803. // pSideInfo Pointer to MP3 structure containing side
  2804. // information associated with the current granule
  2805. // and channel.
  2806. // pFrameHeader Pointer to MP3 structure containing the header
  2807. // associated with the current frame.
  2808. // hufSize The number of Huffman code bits associated with
  2809. // the current granule and channel.
  2810. //
  2811. // Returns:
  2812. // ippStsNoErr Indicates no error.
  2813. // ippStsNullPtrErr Indicates an error when at least one of the
  2814. // pointers ppBitStream, pOffset, pDstIs,
  2815. // pDstNonZeroBound, pSideInfo, pFrameHeader, or
  2816. // ppBitStream is NULL or when pOffset < 0 or
  2817. // pOffset > 7.
  2818. // ippStsMP3FrameHeaderErr Indicates an error when some elements in the
  2819. // MP3 frame header structure are invalid.
  2820. // ippStsMP3SideInfoErr Indicates an error when some elements in the MP3
  2821. // side information structure are invalid or when
  2822. // hufSize < 0 or hufSize > pSideInfo->part23Len.
  2823. // ippStsErr Indicates unknown error.
  2824. */
  2825. IPPAPI(IppStatus, ippsHuffmanDecodeSfb_MP3_1u32s, (
  2826. Ipp8u** ppBitStream,
  2827. int* pOffset,
  2828. Ipp32s* pDstIs,
  2829. int* pDstNonZeroBound,
  2830. IppMP3SideInfo* pSideInfo,
  2831. IppMP3FrameHeader* pFrameHeader,
  2832. int hufSize,
  2833. IppMP3ScaleFactorBandTableLong pSfbTableLong))
  2834. /* ///////////////////////////////////////////////////////////////////////////
  2835. // Name:
  2836. // ippsHuffmanDecodeSfbMbp_MP3_1u32s
  2837. //
  2838. // Purpose:
  2839. // Decodes Huffman data.
  2840. //
  2841. // Parameters:
  2842. // ppBitStream Pointer to the pointer to the first bit stream
  2843. // byte that contains the Huffman code words
  2844. // associated with the current granule and channel.
  2845. // The function updates this parameter.
  2846. // pOffset Pointer to the starting bit position in the bit
  2847. // stream byte pointed to by *ppBitStream.
  2848. // The parameter is valid within the
  2849. // range of 0 to 7, where 0 corresponds to the most
  2850. // significant bit, and 7 corresponds to the least
  2851. // significant bit. The function updates this
  2852. // parameter.
  2853. // pDstIs Pointer to the vector of decoded Huffman symbols
  2854. // used to compute the quantized values of the 576
  2855. // spectral coefficients associated with the
  2856. // current granule and channel.
  2857. // pDstNonZeroBound Pointer to the spectral region above which all
  2858. // coefficients are set to zero.
  2859. // pSideInfo Pointer to MP3 structure containing side
  2860. // information associated with the current granule
  2861. // and channel.
  2862. // pFrameHeader Pointer to MP3 structure containing the header
  2863. // associated with the current frame.
  2864. // hufSize The number of Huffman code bits associated with
  2865. // the current granule and channel.
  2866. // pSfbTableLong Pointer to the scale factor bands table for a
  2867. // long block.
  2868. // pSfbTableShort Pointer to scale factor band table for short
  2869. // block. You can use the default table from
  2870. // MPEG-1, MPEG-2 standards.
  2871. // pMbpTable Pointer to the mixed block partition table.
  2872. //
  2873. // Returns:
  2874. // ippStsNoErr Indicates no error.
  2875. // ippStsNullPtrErr Indicates an error when at least one of the
  2876. // pointers ppBitStream, pOffset, pDstIs,
  2877. // pDstNonZeroBound, pSideInfo, pFrameHeader, or
  2878. // ppBitStream is NULL or when pOffset < 0 or
  2879. // pOffset > 7.
  2880. // ippStsMP3FrameHeaderErr Indicates an error when some elements in the
  2881. // MP3 frame header structure are invalid.
  2882. // ippStsMP3SideInfoErr Indicates an error when some elements in the MP3
  2883. // side information structure are invalid or when
  2884. // hufSize < 0 or hufSize > pSideInfo->part23Len.
  2885. // ippStsErr Indicates unknown error.
  2886. */
  2887. IPPAPI(IppStatus, ippsHuffmanDecodeSfbMbp_MP3_1u32s, (
  2888. Ipp8u** ppBitStream,
  2889. int* pOffset,
  2890. Ipp32s* pDstIs,
  2891. int* pDstNonZeroBound,
  2892. IppMP3SideInfo* pSideInfo,
  2893. IppMP3FrameHeader* pFrameHeader,
  2894. int hufSize,
  2895. IppMP3ScaleFactorBandTableLong pSfbTableLong,
  2896. IppMP3ScaleFactorBandTableShort pSfbTableShort,
  2897. IppMP3MixedBlockPartitionTable pMbpTable))
  2898. /* ///////////////////////////////////////////////////////////////////////////
  2899. // Name:
  2900. // ippsReQuantize_MP3_32s_I
  2901. //
  2902. // Purpose:
  2903. // Requantizes the decoded Huffman symbols.
  2904. //
  2905. // Parameters:
  2906. // pSrcDstIsXr Pointer to the vector of the decoded Huffman
  2907. // symbols. For stereo and dual channel modes,
  2908. // right channel data begins at the address &(
  2909. // pSrcDstIsXr[576]). The function updates this
  2910. // vector.
  2911. // pNonZeroBound Pointer to the spectral bound above which all
  2912. // coefficients are set to zero. For stereo and
  2913. // dual channel modes, the left channel bound is
  2914. // pNonZeroBound [0], and the right channel bound is pNonZeroBound
  2915. // [,\.
  2916. // pScaleFactor Pointer to the scalefactor buffer. For stereo
  2917. // and dual channel modes, the right channel
  2918. // scalefactors begin at & (pScaleFactor [
  2919. // IPP_MP3_SF_BUF_LEN]).
  2920. // pSideInfo Pointer to the side information for the current
  2921. // granule.
  2922. // pFrameHeader Pointer to the frame header for the current frame.
  2923. // pBuffer Pointer to the workspace buffer. The buffer
  2924. // length must be 576 samples.
  2925. // pSfbTableLong Pointer to the scale factor bands table for a
  2926. // long block.
  2927. // pSfbTableShort Pointer to the scale factor bands table for a
  2928. // short block.
  2929. //
  2930. // Returns:
  2931. // ippStsNoErr Indicates no error.
  2932. // ippStsNullPtrErr Indicates an error when pSrcDstIsXr,
  2933. // pNonZeroBound, pScaleFactor, pSideInfo,
  2934. // pFrameHeader, or pBuffer is NULL.
  2935. // ippStsBadArgErr Indicates an error when pNonZeroBound exceeds [0
  2936. // , 576].
  2937. // ippStsMP3FrameHeaderErr Indicates an error when
  2938. // pFrameHeader->id != IPP_MP3_ID_MPEG1
  2939. // pFrameHeader->id != IPP_MP3_ID_MPEG2
  2940. // pFrameHeader->samplingFreq exceeds [0, 2],
  2941. // pFrameHeader->mode exceeds [0, 3],
  2942. // pFrameHeader->modeExt exceeds [0, 3].
  2943. // ippStsMP3SideInfoErr Indicates an error when the bitstream is in the
  2944. // stereo mode, but the block type of left is
  2945. // different from that of right, pSideInfo[ch].
  2946. // blockType exceeds [0, 3], pSideInfo[ch].
  2947. // mixedBlock exceeds [0, 1], pSideInfo[ch].
  2948. // globGain exceeds [0, 255], pSideInfo[ch].sfScale
  2949. // exceeds [0, 1], pSideInfo[ch].preFlag exceeds [0
  2950. // , 1], pSideInfo[ch].pSubBlkGain[w] exceeds [0, 7
  2951. // ], where ch is within the range of 0 to 1, and w
  2952. // is within the range of 0 to 2.
  2953. // ippStsErr Indicates an unknown error.
  2954. */
  2955. IPPAPI(IppStatus, ippsReQuantize_MP3_32s_I, (
  2956. Ipp32s* pSrcDstIsXr,
  2957. int* pNonZeroBound,
  2958. Ipp8s* pScaleFactor,
  2959. IppMP3SideInfo* pSideInfo,
  2960. IppMP3FrameHeader* pFrameHeader,
  2961. Ipp32s* pBuffer))
  2962. /* ///////////////////////////////////////////////////////////////////////////
  2963. // Name:
  2964. // ippsReQuantizeSfb_MP3_32s_I
  2965. //
  2966. // Purpose:
  2967. // Requantizes the decoded Huffman symbols.
  2968. //
  2969. // Parameters:
  2970. // pSrcDstIsXr Pointer to the vector of the decoded Huffman
  2971. // symbols. For stereo and dual channel modes,
  2972. // right channel data begins at the address &(
  2973. // pSrcDstIsXr[576]). The function updates this
  2974. // vector.
  2975. // pNonZeroBound Pointer to the spectral bound above which all
  2976. // coefficients are set to zero. For stereo and
  2977. // dual channel modes, the left channel bound is
  2978. // pNonZeroBound[0], and the right channel bound
  2979. // is pNonZeroBound[1].
  2980. // pScaleFactor Pointer to the scalefactor buffer. For stereo
  2981. // and dual channel modes, the right channel
  2982. // scalefactors begin at & (pScaleFactor [
  2983. // IPP_MP3_SF_BUF_LEN]).
  2984. // pSideInfo Pointer to the side information for the current
  2985. // granule.
  2986. // pFrameHeader Pointer to the frame header for the current frame.
  2987. // pBuffer Pointer to the workspace buffer. The buffer
  2988. // length must be 576 samples.
  2989. // pSfbTableLong Pointer to the scale factor bands table for a
  2990. // long block.
  2991. // pSfbTableShort Pointer to the scale factor bands table for a
  2992. // short block.
  2993. //
  2994. // Returns:
  2995. // ippStsNoErr Indicates no error.
  2996. // ippStsNullPtrErr Indicates an error when pSrcDstIsXr,
  2997. // pNonZeroBound, pScaleFactor, pSideInfo,
  2998. // pFrameHeader, or pBuffer is NULL.
  2999. // ippStsBadArgErr Indicates an error when pNonZeroBound exceeds
  3000. // [0, 576].
  3001. // ippStsMP3FrameHeaderErr Indicates an error when
  3002. // pFrameHeader->id != IPP_MP3_ID_MPEG1
  3003. // pFrameHeader->id != IPP_MP3_ID_MPEG2
  3004. // pFrameHeader->samplingFreq exceeds [0, 2],
  3005. // pFrameHeader->mode exceeds [0, 3],
  3006. // pFrameHeader->modeExt exceeds [0, 3].
  3007. // ippStsMP3SideInfoErr Indicates an error when the bitstream is in the
  3008. // stereo mode, but the block type of left is
  3009. // different from that of right, pSideInfo[ch].
  3010. // blockType exceeds [0, 3], pSideInfo[ch].
  3011. // mixedBlock exceeds [0, 1], pSideInfo[ch].
  3012. // globGain exceeds [0, 255], pSideInfo[ch].sfScale
  3013. // exceeds [0, 1], pSideInfo[ch].preFlag exceeds [0
  3014. // , 1], pSideInfo[ch].pSubBlkGain[w] exceeds [0, 7
  3015. // ], where ch is within the range of 0 to 1, and w
  3016. // is within the range of 0 to 2.
  3017. // ippStsErr Indicates an unknown error.
  3018. */
  3019. IPPAPI(IppStatus, ippsReQuantizeSfb_MP3_32s_I, (
  3020. Ipp32s* pSrcDstIsXr,
  3021. int* pNonZeroBound,
  3022. Ipp8s* pScaleFactor,
  3023. IppMP3SideInfo* pSideInfo,
  3024. IppMP3FrameHeader* pFrameHeader,
  3025. Ipp32s* pBuffer,
  3026. IppMP3ScaleFactorBandTableLong pSfbTableLong,
  3027. IppMP3ScaleFactorBandTableShort pSfbTableShort))
  3028. /* ///////////////////////////////////////////////////////////////////////////
  3029. // Name:
  3030. // ippsMDCTInv_MP3_32s
  3031. //
  3032. // Purpose:
  3033. // Performs the first stage of hybrid synthesis filter bank.
  3034. //
  3035. // Parameters:
  3036. // pSrcXr Pointer to the vector of requantized spectral
  3037. // samples for the current channel and granule,
  3038. // represented in Q5.26 format.
  3039. // pDstY Pointer to the vector of IMDCT outputs in Q7.24
  3040. // format for input to PQMF bank.
  3041. // pSrcDstOverlapAdd Pointer to the overlap-add buffer. Contains the
  3042. // overlapped portion of the previous granule IMDCT
  3043. // output in Q7.24 format. The function updates
  3044. // this buffer.
  3045. // nonZeroBound Limiting bound for spectral coefficients. All
  3046. // spectral coefficients exceeding this boundary
  3047. // become zero for the current granule and channel.
  3048. // pPrevNumOfImdct Pointer to the number of IMDCTs computed for the
  3049. // current channel of the previous granule. The
  3050. // function updates this parameter so that it
  3051. // references the number of IMDCTs for the current
  3052. // granule.
  3053. // blockType Block type indicator.
  3054. // mixedBlock Mixed block indicator.
  3055. //
  3056. // Returns:
  3057. // ippStsNoErr Indicates no error.
  3058. // ippStsBadArgErr Indicates an error condition if at least one of
  3059. // the specified pointers is NULL.
  3060. // ippStsErr Indicates an error when one or more of the
  3061. // following input data errors are detected: either
  3062. // blockType exceeds [0,3], or mixedBlock exceeds [0
  3063. // ,1], or nonZeroBound exceeds [0,576], or *
  3064. // pPrevNumOfImdct exceeds [0,32].
  3065. */
  3066. IPPAPI(IppStatus, ippsMDCTInv_MP3_32s, (
  3067. Ipp32s* pSrcXr,
  3068. Ipp32s* pDstY,
  3069. Ipp32s* pSrcDstOverlapAdd,
  3070. int nonZeroBound,
  3071. int* pPrevNumOfImdct,
  3072. int blockType,
  3073. int mixedBlock))
  3074. /* ///////////////////////////////////////////////////////////////////////////
  3075. // Name:
  3076. // ippsSynthPQMF_MP3_32s16s
  3077. //
  3078. // Purpose:
  3079. // Performs the second stage of hybrid synthesis filter bank.
  3080. //
  3081. // Parameters:
  3082. // pSrcY Pointer to the block of 32 IMDCT sub-band input
  3083. // samples in Q7.24 format.
  3084. // pDstAudioOut Pointer to the block of 32 reconstructed PCM
  3085. // output samples in 16-bit signed little-endian
  3086. // format. Left and right channels are interleaved
  3087. // according to the mode flag.
  3088. // pVBuffer Pointer to the input workspace buffer containing
  3089. // Q7.24 data. The function updates this parameter.
  3090. // NOTE. Note that the pointers pSrcXr and pDstY
  3091. // must reference different buffers. 10-104 10
  3092. // Intel Integrated Performance Primitives
  3093. // Reference Manual: Volume 1
  3094. // pVPosition Pointer to the internal workspace index. The
  3095. // function updates this parameter.
  3096. // mode Flag that indicates whether or not PCM audio
  3097. // output channels should be interleaved. 1
  3098. // indicates not interleaved, 2 indicates
  3099. // interleaved.
  3100. //
  3101. // Returns:
  3102. // ippStsNoErr Indicates no error. ippNullPtrErr Indicates an
  3103. // error when least one of the pointers pSrcY,
  3104. // pDstAudioOut, pVBuffer, or pVPosition is NULL.
  3105. // Audio Coding Functions 10 10-105
  3106. // ippStsBadArgErr Indicates an error when at least one of the
  3107. // specified pointers is NULL, or the value of mode
  3108. // is less than 1 or more than 2, or when the value
  3109. // of pVPosition exceeds [0, 15].
  3110. // ippStsErr Indicates an unknown error.
  3111. //
  3112. // Notes:
  3113. // Because the PQMF bank contains memory, the MP3 application must maintain
  3114. // two state variables in between calls to the primitive.
  3115. // First, the application must preallocate for the PQMF computation
  3116. // a workspace buffer of size 512 x Number of Channels. This buffer is
  3117. // referenced by the pointer pVBuffer, and its elements should be
  3118. // initialized to zero prior to the first call. During subsequent calls,
  3119. // the pVBuffer input for the current call should contain the pVbuffer
  3120. // output generated by the previous call. In addition to pVBuffer, the MP3
  3121. // application must also initialize to zero and thereafter preserve
  3122. // the value of the state variable pVPosition. The MP3 application should
  3123. // modify the values contained in pVBuffer or pVPosition only during
  3124. // decoder reset, and the reset values should always be zero.
  3125. */
  3126. IPPAPI(IppStatus, ippsSynthPQMF_MP3_32s16s, (
  3127. Ipp32s* pSrcY,
  3128. Ipp16s* pDstAudioOut,
  3129. Ipp32s* pVBuffer,
  3130. int* pVPosition,
  3131. int mode))
  3132. /* ///////////////////////////////////////////////////////////////////////////
  3133. // Name:
  3134. // ippsUnpackADIFHeader_AAC
  3135. //
  3136. // Purpose:
  3137. // Gets the AAC ADIF format header.
  3138. //
  3139. // Parameters:
  3140. // ppBitStream Double pointer to the current byte before the
  3141. // ADIF header.
  3142. // pADIFHeader Pointer to the IppACCADIFHeader structure.
  3143. // pPrgCfgElt Pointer to the IppAACPrgCfgElt structure. There
  3144. // must be prgCfgEltMax elements in the buffer.
  3145. // prgCfgEltMax Maximum program configure element number. Must
  3146. // be within the range of [1, 16].
  3147. //
  3148. // Returns:
  3149. // ippStsNoErr Indicates no error. Audio Coding Functions 10 10-
  3150. // 121
  3151. // ippStsNullPtrErr Indicates an error when at least one of the
  3152. // pointers ppBitStream, pADIFHeader, pPrgCfgElt,
  3153. // or *ppBitStream is NULL.
  3154. // ippStsAacPrgNumErr Indicates an error when the decoded pADIFHeader->
  3155. // numPrgCfgElt > prgCfgEltMax, or prgCfgEltMax is
  3156. // outside the range of [1,IPP_AAC_MAX_ELT_NUM].
  3157. //
  3158. // Notes:
  3159. // 1. pADIFHeader->numPrgCfgElt is the number directly unpacked
  3160. // from bitstream plus 1.
  3161. // 2. It is assumed that it is known how many IppAACPrgCfgElt
  3162. // must be supported.
  3163. */
  3164. IPPAPI(IppStatus, ippsUnpackADIFHeader_AAC,(Ipp8u **ppBitStream,
  3165. IppAACADIFHeader *pADIFHeader, IppAACPrgCfgElt *pPrgCfgElt,
  3166. int prgCfgEltMax ))
  3167. /* ///////////////////////////////////////////////////////////////////////////
  3168. // Name:
  3169. // ippsDecodePrgCfgElt_AAC
  3170. //
  3171. // Purpose:
  3172. // Gets program configuration element from the input bitstream.
  3173. //
  3174. // Parameters:
  3175. // ppBitStream Double pointer to the current byte after
  3176. // decoding the program configuration element.
  3177. // pOffset Pointer to the bit position in the byte pointed
  3178. // to by *ppBitStream. Valid within 0 to 7: 0
  3179. // stands for the most significant bit of the byte;
  3180. // 7 stands for the least significant bit of the
  3181. // byte.
  3182. // pPrgCfgElt Pointer to IppAACPrgCfgElt structure.
  3183. //
  3184. // Returns:
  3185. // ippStsNoErr Indicates no error.
  3186. // ippStsNullPtrErr Indicates an error when at least one of the
  3187. // pointers ppBitStream, pOffset, pPrgCfgElt, or *
  3188. // ppBitStream is NULL.
  3189. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of the
  3190. // range of [0,7].
  3191. */
  3192. IPPAPI(IppStatus, ippsDecodePrgCfgElt_AAC,(Ipp8u **ppBitStream, int *pOffset,
  3193. IppAACPrgCfgElt *pPrgCfgElt ))
  3194. /* ///////////////////////////////////////////////////////////////////////////
  3195. // Name:
  3196. // ippsUnpackADTSFrameHeader_AAC
  3197. //
  3198. // Purpose:
  3199. // Gets ADTS frame header from the input bitstream.
  3200. //
  3201. // Parameters:
  3202. // ppBitStream Double pointer to the current byte after
  3203. // unpacking the ADTS frame header.
  3204. // pADTSFrameHeader Pointer to the IppAACADTSFrameHeader structure.
  3205. //
  3206. // Returns:
  3207. // ippStsNoErr Indicates no error.
  3208. // ippStsNullPtrErr Indicates an error when at least one of the
  3209. // pointers ppBitStream, pADTSFrameHeader, or
  3210. // *ppBitStream is NULL.
  3211. */
  3212. IPPAPI(IppStatus, ippsUnpackADTSFrameHeader_AAC, (Ipp8u **ppBitStream,
  3213. IppAACADTSFrameHeader *pADTSFrameHeader))
  3214. /* ///////////////////////////////////////////////////////////////////////////
  3215. // Name:
  3216. // ippsDecodeDatStrElt_AAC
  3217. //
  3218. // Purpose:
  3219. // Gets data stream element from the input bitstream.
  3220. //
  3221. // Parameters:
  3222. // ppBitStream Double pointer to the current byte.
  3223. // pOffset Pointer to the bit position in the byte pointed
  3224. // to by *ppBitStream. Valid within 0 to 7. 0
  3225. // stands for the most significant bit of the byte.
  3226. // 7 stands for the least significant bit of the
  3227. // byte.
  3228. // ppBitStream Double pointer to the current byte after the
  3229. // decode data stream element.
  3230. // pOffset Pointer to the bit position in the byte pointed
  3231. // to by *ppBitStream. Valid within 0 to 7. 0
  3232. // stands for the most significant bit of the byte.
  3233. // 7 stands for the least significant bit of the
  3234. // byte.
  3235. // pDataTag Pointer to element_instance_tag. See Table 6.20
  3236. // of ISO/IEC 13818-7:1997. pDataCn Pointer to the
  3237. // value of data length in bytes.
  3238. // pDstDataElt Pointer to the data stream buffer that contains
  3239. // the data stream extracted from the input
  3240. // bitstream. There are 512 elements in the buffer
  3241. // pointed to by pDstDataElt.
  3242. //
  3243. // Returns:
  3244. // ippStsNoErr Indicates no error.
  3245. // ippStsNullPtrErr Indicates an error when at least one of the
  3246. // pointers ppBitStream, pOffset, *ppBitStream,
  3247. // pDataTag, pDataCnt, or pDstDataElt is NULL.
  3248. // ippStsAacBitOffsetErr Indicates an error when *pOffset is out of range
  3249. // [0,7].
  3250. */
  3251. IPPAPI(IppStatus, ippsDecodeDatStrElt_AAC,(Ipp8u **ppBitStream, int *pOffset,
  3252. int *pDataTag, int *pDataCnt, Ipp8u *pDstDataElt ))
  3253. /* ///////////////////////////////////////////////////////////////////////////
  3254. // Name:
  3255. // ippsDecodeFillElt_AAC
  3256. //
  3257. // Purpose:
  3258. // Gets the fill element from the input bitstream.
  3259. //
  3260. // Parameters:
  3261. // ppBitStream Pointer to the pointer to the current byte after
  3262. // the decode fill element.
  3263. // pOffset Pointer to the bit position in the byte pointed
  3264. // to by *ppBitStream. Valid within 0 to 7. 0
  3265. // stands for the most significant bit of the byte.
  3266. // 7 stands for the least significant bit of the
  3267. // byte.
  3268. // pFillCnt Pointer to the value of the length of total fill
  3269. // data in bytes.
  3270. // pDstFillElt Pointer to the fill data buffer whose length
  3271. // must be equal to or greater than 270.
  3272. //
  3273. // Returns:
  3274. // ippStsNoErr Indicates no error.
  3275. // ippStsNullPtrErr Indicates an error when at least one of the
  3276. // pointers ppBitStream, pOffset, pFillCnt, or
  3277. // pDstFillElt is NULL.
  3278. // ippStsAacBitOffsetErr Indicates an error when *pOffset is out of the
  3279. // range of [0,7].
  3280. */
  3281. IPPAPI(IppStatus, ippsDecodeFillElt_AAC,(Ipp8u **ppBitStream, int *pOffset,
  3282. int *pFillCnt, Ipp8u *pDstFillElt ))
  3283. /* ///////////////////////////////////////////////////////////////////////////
  3284. // Name:
  3285. // ippsDecodeChanPairElt_AAC
  3286. //
  3287. // Purpose:
  3288. // Gets channel_pair_element from the input bitstream.
  3289. //
  3290. // Parameters:
  3291. // ppBitStream Double pointer to the current byte after
  3292. // decoding the channel pair element.
  3293. // pOffset Pointer to the bit position in the byte pointed
  3294. // to by *ppBitStream. Valid within 0 to 7: 0
  3295. // stands for the most significant bit of the byte;
  3296. // 7 stands for the least significant bit of the
  3297. // byte.
  3298. // pIcsInfo Pointer to IppAACIcsInfo structure. If pIcsInfo->
  3299. // predDataPres = 0, set pIcsInfo->predReset = 0.
  3300. // Only the first pIcsInfo->numWinGrp elements in
  3301. // pIcsInfo-> pWinGrpLen are meaningful. You should
  3302. // not change some members of the structure, as
  3303. // shown in Table 10-5.
  3304. // pChanPairElt Pointer to IppAACChanPairElt structure. You
  3305. // should not change some members of the structure,
  3306. // as shown in Table 10-5.
  3307. // predSfbMax Maximum prediction scale factor bands. For LC
  3308. // profile, set predSfbMax = 0.
  3309. //
  3310. // Returns:
  3311. // ippStsNoErr Indicates no error.
  3312. // ippStsNullPtrErr Indicates an error when at least one of the
  3313. // pointers ppBitStream, pOffset, *ppBitStream,
  3314. // pIcsInfo, or pChanPairElt is NULL.
  3315. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of the
  3316. // range of [0,7].
  3317. // ippStsAacMaxSfbErr Indicates an error when pIcsInfo->maxSfb decoded
  3318. // from bitstream is greater than IPP_AAC_MAX_SFB,
  3319. // the maximum scale factor band for all sampling
  3320. // frequencies.
  3321. // ippStsAacPredSfbErr Indicates an error when predSfbMax is out of
  3322. // the range of [0, IPP_AAC_PRED_SFB_MAX].
  3323. */
  3324. IPPAPI(IppStatus, ippsDecodeChanPairElt_AAC, (Ipp8u **ppBitStream,
  3325. int *pOffset,
  3326. IppAACIcsInfo *pIcsInfo,
  3327. IppAACChanPairElt *pChanPairElt,
  3328. int predSfbMax))
  3329. /* ///////////////////////////////////////////////////////////////////////////
  3330. // Name:
  3331. // ippsNoiselessDecoder_LC_AAC
  3332. //
  3333. // Purpose:
  3334. // Decodes all data for one channel.
  3335. //
  3336. // Parameters:
  3337. // ppBitStream Double pointers to bitstream buffer.
  3338. // pOffset Pointer to the offset in one byte.
  3339. // pChanInfo Pointer to the channel information.
  3340. // IppAACChanInfo structure. Denotes pIcsInfo as
  3341. // pChanInfo->pIcsInfo as shown in Table 10-6.
  3342. // commonWin Common window indicator.
  3343. // pDstScalefactor Pointer to the scalefactor or intensity position
  3344. // buffer. Buffer length is more than or equal to
  3345. // 120. Only maxSfb elements are stored for each
  3346. // group. There is no space between sequence groups.
  3347. // pDstQuantizedSpectralCoef Pointer to the quantized spectral
  3348. // coefficients data. For short block, the
  3349. // coefficients are interleaved by scale factor
  3350. // window bands in each group. Buffer length is
  3351. // more than or equal to 1024.
  3352. // pDstSfbCb Pointer to the scale factor band codebook.
  3353. // Buffer length must be more than or equal to 120.
  3354. // Store maxSfb elements for each group. There is
  3355. // no space between the sequence groups.
  3356. // pDstTnsFiltCoef Pointer to TNS coefficients. Buffer length must
  3357. // be more than or equal to 60. The store sequence
  3358. // is TNS order elements for each filter for each
  3359. // window. The elements are not changed if the
  3360. // corresponding TNS order is zero.
  3361. //
  3362. // Returns:
  3363. // ippStsNoErr Indicates no error.
  3364. // ippStsNullPtrErr Indicates an error when at least one of the
  3365. // pointers ppBitStream, pOffset, pChanInfo,
  3366. // pDstScalefactor, pDstQuantizedSpectralCoef,
  3367. // pDstSfbCb, pDstTnsFiltCoef, pChanInfo->pIcsInfo,
  3368. // or *ppBitStream is NULL.
  3369. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of range
  3370. // [0,7].
  3371. // ippStsAacComWinErr Indicates an error when commonWin exceeds [0,1].
  3372. // ippStsAacSmplRateIdxErr Indicates an error when pChanInfo->
  3373. // samplingRateIndex exceeds [0,11].
  3374. // ippStsAacPredSfbErr Indicates an error when pChanInfo->predSfbMax is
  3375. // not equal to 0.
  3376. // ippStsAacMaxSfbErr Indicates an error when pChanInfo->pIcsInfo->
  3377. // maxSfb > pChanInfo->numSwb.
  3378. // ippStsAacSectCbErr Indicates an error when the codebook pointed to
  3379. // by pChanInfo->pSectCb is illegal or when (
  3380. // pChanInfo->pSectCb)==12, 13. pTnsRegionLen As
  3381. // output. Pointer to the length of the region in
  3382. // units of scale factor bands to which one filter
  3383. // is applied in each window. pTnsFiltOrder As
  3384. // output. Pointer to the order of the temporal
  3385. // noise shaping filter applied to each window.
  3386. // pTnsDirection As output. Pointer to the token
  3387. // that indicates whether the filter is applied in
  3388. // the upward or downward direction. 0 stands for
  3389. // upward and 1 for downward. pIcsInfo As input if
  3390. // commonWin == 1. As output if commonWin == 0. If
  3391. // pIcsInfo->predDataPres == 0, set pIcsInfo->
  3392. // predReset = 0. Only the first pIcsInfo->
  3393. // numWinGrp elements in pIcsInfo-> pWinGrpLen are
  3394. // meaningful. Under specific conditions, some
  3395. // members of the structure must remain unchanged.
  3396. // ippStsAacPlsDataErr Indicates an error when the pChanInfo->pIcsInfo->
  3397. // winSequence indicates a short sequence and
  3398. // pChanInfo->pulsePres indicates pulse data present
  3399. // . The start scale factor band for pulse data >=
  3400. // pChanInfo->numSwb, or pulse data position offset
  3401. // >= winLen.
  3402. // ippStsAacGainCtrErr Indicates an error when pChanInfo->
  3403. // gainControlPres is decoded as 1, which means
  3404. // that gain control data is present. Gain control
  3405. // data is not currently supported.
  3406. // ippStsAacCoefValErr Indicates an error when the quantized
  3407. // coefficients value pointed to by pDstCoef
  3408. // exceeds range [-8191, 8191].
  3409. //
  3410. // Notes:
  3411. // User must set pChanInfo->samplingRateIndex, predSfbMax, pIcsInfo,
  3412. // before calling this function.
  3413. */
  3414. IPPAPI(IppStatus, ippsNoiselessDecoder_LC_AAC,(Ipp8u **ppBitStream,
  3415. int *pOffset, int commonWin, IppAACChanInfo *pChanInfo,
  3416. Ipp16s *pDstScalefactor, Ipp32s *pDstQuantizedSpectralCoef,
  3417. Ipp8u *pDstSfbCb, Ipp8s *pDstTnsFiltCoef ))
  3418. /* ///////////////////////////////////////////////////////////////////////////
  3419. // Name:
  3420. // ippsQuantInv_AAC_32s_I
  3421. //
  3422. // Purpose:
  3423. // Performs inverse quantization of Huffman symbols for current channel
  3424. // inplace.
  3425. //
  3426. // Parameters:
  3427. // pSrcDstSpectralCoef On input, pointer to the input quantized
  3428. // coefficients. For short block the coefficients
  3429. // are interleaved by scale factor window bands in
  3430. // each group. Buffer length must be more than or
  3431. // equal to 1024. On output, pointer to the
  3432. // destination inverse quantized coefficient in Q13.
  3433. // 18 format. For short block, the coefficients are
  3434. // interleaved by scale factor window bands in each
  3435. // group. Buffer length must be more than or equal
  3436. // to 1024. The maximum error of output.
  3437. // pSrcDstSpectralCoef[i] is listed in Table 10-7.
  3438. // pScalefactor Pointer to the scalefactor buffer. Buffer length
  3439. // must be more than or equal to 120.
  3440. // numWinGrp Group number.
  3441. // pWinGrpLen Pointer to the number of windows in each group.
  3442. // Buffer length must be more than or equal to 8.
  3443. // maxSfb Maximal scale factor bands number for the
  3444. // current block.
  3445. // pSfbCb Pointer to the scale factor band codebook,
  3446. // buffer length must be more than or equal to 120.
  3447. // Only maxSfb elements for each group are
  3448. // meaningful. There are no spaces between the
  3449. // sequence groups.
  3450. // samplingRateIndex Sampling rate index. Valid within [0, 11]. See
  3451. // Table 6.5 of ISO/IEC 13818-7:1997.
  3452. // winLen Data number in one window.
  3453. //
  3454. // Returns:
  3455. // ippStsNoErr Indicates no error.
  3456. // ippStsNullPtrErr Indicates an error when at least one of the
  3457. // specified pointers is NULL.
  3458. // ippStsAacSmplRateIdxErr Indicates an error when pChanInfo->
  3459. // samplingRateIndex exceeds [0, 11].
  3460. // ippStsAacMaxSfbErr Indicates an error when maxSfb exceeds [0,
  3461. // IPP_AAC_MAX_SFB].
  3462. // ippStsAacWinGrpErr Indicates an error when numWinGrp exceeds [0, 8]
  3463. // for long window or is not equal to 1 for short
  3464. // window.
  3465. // ippStsAacWinLenErr Indicates an error when winLen is not equal to
  3466. // 128 or 1024;
  3467. // ippStsAacCoefValErr Indicates an error when the quantized
  3468. // coefficients value pointed to by
  3469. // pSrcDstSpectralCoef exceeds [-8191,8191].
  3470. */
  3471. IPPAPI(IppStatus, ippsQuantInv_AAC_32s_I,(Ipp32s *pSrcDstSpectralCoef,
  3472. const Ipp16s *pScalefactor, int numWinGrp,
  3473. const int *pWinGrpLen, int maxSfb, const Ipp8u *pSfbCb,
  3474. int samplingRateIndex, int winLen ))
  3475. /* ///////////////////////////////////////////////////////////////////////////
  3476. // Name:
  3477. // ippsDecodeMsStereo_AAC_32s_I
  3478. //
  3479. // Purpose:
  3480. // Processes mid-side (MS) stereo for pair channels in-place.
  3481. //
  3482. // Parameters:
  3483. // pSrcDstL On input, pointer to left channel data in Q13.18
  3484. // format. For short block, the coefficients are
  3485. // interleaved by scale factor window bands in each
  3486. // group. Buffer length must be more than or equal
  3487. // to 1024. On output, pointer to left channel data
  3488. // in Q13.18 format. For short blocks, the
  3489. // coefficients are interleaved by scale factor
  3490. // window bands in each group. Buffer length must
  3491. // be more than or equal to 1024.
  3492. // pSrcDstR On input, pointer to right channel data in Q13.
  3493. // 18 format. For short block, the coefficients are
  3494. // interleaved by scale factor window bands in each
  3495. // group. Buffer length must be more than or equal
  3496. // to 1024. On output, pointer to right channel
  3497. // data in Q13.18 format. For short blocks, the
  3498. // coefficients are interleaved by scale factor
  3499. // window bands in each group. Buffer length must
  3500. // be more than or equal to 1024.
  3501. // msMaskPres MS stereo mask flag: - 0: MS off; - 1: MS on; - 2:
  3502. // MS all bands on.
  3503. // pMsUsed Pointer to the MS Stereo flag buffer. Buffer
  3504. // length must be more than or equal to 120.
  3505. // pSfbCbPointer Pointer to the scale factor band
  3506. // codebook, buffer length must be more than or
  3507. // equal to 120. Store maxSfb elements for each
  3508. // group.There is no space between the sequence
  3509. // groups.
  3510. // numWinGrp Group number.
  3511. // pWinGrpLen Pointer to the number of windows in each group.
  3512. // Buffer length must be more than or equal to 8.
  3513. // maxSfb Maximal scale factor bands number for the
  3514. // current block.
  3515. // samplingRateIndex Sampling rate index. Valid within [0, 11]. See
  3516. // Table 6.5 of ISO/IEC 13818-7:1997.
  3517. // winLen Data number in one window.
  3518. // pSrcDstR Pointer to right channel data in Q13.18 format.
  3519. // For short blocks, the coefficients are
  3520. // interleaved by scale factor window bands in each
  3521. // group. Buffer length must be more than or equal
  3522. // to 1024.
  3523. // pSfbCb Pointer to the scale factor band codebook. If
  3524. // invert_intensity (group, sfb) = -1, and if
  3525. // *pSfbCb = INTERITY_HCB, let
  3526. // *pSfbCb = INTERITY_HCB2.
  3527. // If *pSfbCb = INTERITY_HCB2, let
  3528. // *pSfbCb = INTERITY_HCB. Buffer length must be more
  3529. // than or equal to 120. Store maxSfb elements for
  3530. // each group. There is no space between the
  3531. // sequence groups.
  3532. //
  3533. // Returns:
  3534. // ippStsNoErr Indicates no error.
  3535. // ippStsNullPtrErr Indicates an error when at least one of the
  3536. // specified pointers is NULL.
  3537. // ippStsAacMaxSfbErr Indicates an error when the coefficient index
  3538. // calculated from samplingFreqIndex and maxSfb
  3539. // exceeds winLen in each window.
  3540. // ippStsAacSamplRateIdxErr Indicates an error when pChanInfor->
  3541. // samplingRateIndex exceeds [0,11].
  3542. // ippStsAacWinGrpErr Indicates an error when numWinGrp exceeds [0,8]
  3543. // for long window or is not equal to 1 for short
  3544. // window.
  3545. // ippStsAacWinLenErr Indicates an error when winLen is not equal 128
  3546. // or 1024.
  3547. // ippStsStereoMaskErr Indicates an error when the stereo mask flag is
  3548. // not equal 1 or 2.
  3549. //
  3550. // Notes:
  3551. // Input and output data are in interleaving mode, only for CPE.
  3552. */
  3553. IPPAPI(IppStatus, ippsDecodeMsStereo_AAC_32s_I,(Ipp32s *pSrcDstL,
  3554. Ipp32s *pSrcDstR, int msMaskPres, const Ipp8u *pMsUsed,
  3555. Ipp8u *pSfbCb, int numWinGrp, const int *pWinGrpLen,
  3556. int maxSfb, int samplingRateIndex, int winLen ))
  3557. /* ///////////////////////////////////////////////////////////////////////////
  3558. // Name:
  3559. // ippsDecodeIsStereo_AAC_32s
  3560. //
  3561. // Purpose:
  3562. // Processes intensity stereo for pair channels.
  3563. //
  3564. // Parameters:
  3565. // pSrcL Pointer to left channel data in Q13.18 format.
  3566. // For short block, the coefficients are
  3567. // interleaved by scale factor window bands in each
  3568. // group. Buffer length must be more than or equal
  3569. // to 1024.
  3570. // pDstR Pointer to right channel data in Q13.18 format.
  3571. // For short block, the coefficients are
  3572. // interleaved by scale factor window bands in each
  3573. // group. Buffer length must be more than or equal
  3574. // to 1024.
  3575. // pScalefactor Pointer to the scalefactor buffer. Buffer length
  3576. // must be more than or equal to 120.
  3577. // pSfbCb Pointer to the scale factor band codebook,
  3578. // buffer length must be more than or equal to 120.
  3579. // Store maxSfb elements for each group.There is no
  3580. // space between the sequence groups. Respective
  3581. // values of pSfbCb[sfb] equal to 1, -1, or 0
  3582. // indicate the intensity stereo mode, that is,
  3583. // direct, inverse, or none.
  3584. // numWinGrp Group number.
  3585. // pWinGrpLen Pointer to the number of windows in each group.
  3586. // Buffer length must be more than or equal to 8.
  3587. // maxSfbMax Maximal scale factor bands number for
  3588. // the current block.
  3589. // samplingRateIndex Sampling rate index. Valid within [0, 11]. See
  3590. // Table 6.5 of ISO/IEC 13818-7:1997.
  3591. // winLen Data number in one window.
  3592. //
  3593. // Returns:
  3594. // ippStsNoErr Indicates no error.
  3595. // ippStsNullPtrErr Indicates an error when at least one of the
  3596. // specified pointers is NULL.
  3597. // ippStsAacMaxSfbErr Indicates an error when the coefficient index
  3598. // calculated from samplingFreqIndex and maxSfb
  3599. // exceeds winLen in each window.
  3600. // ippStsAacSamplRateIdxErr Indicates an error when pChanInfor->
  3601. // samplingRateIndex exceeds [0,11].
  3602. */
  3603. IPPAPI(IppStatus, ippsDecodeIsStereo_AAC_32s,(const Ipp32s *pSrcL,
  3604. Ipp32s *pDstR, const Ipp16s *pScalefactor,
  3605. const Ipp8u *pSfbCb, int numWinGrp, const int *pWinGrpLen,
  3606. int maxSfb, int samplingRateIndex, int winLen ))
  3607. /* ///////////////////////////////////////////////////////////////////////////
  3608. // Name:
  3609. // ippsDeinterleaveSpectrum_AAC_32s
  3610. //
  3611. // Purpose:
  3612. // Deinterleaves the coefficients for short block.
  3613. //
  3614. // Parameters:
  3615. // pSrc Pointer to source coefficients buffer. The
  3616. // coefficients are interleaved by scale factor
  3617. // window bands in each group. Buffer length must
  3618. // be more than or equal to 1024.
  3619. // pDst Pointer to the output of coefficients. Data
  3620. // sequence is ordered in pDst[w*128+sfb*sfbWidth[
  3621. // sfb]+i], where w is window index, sfb is scale
  3622. // factor band index, sfbWidth is the scale factor
  3623. // band width table, i is the index within scale
  3624. // factor band. Buffer length must be more than or
  3625. // equal to 1024.
  3626. // numWinGrp Group number.
  3627. // pWinGrpLen Pointer to the number of windows in each group.
  3628. // Buffer length must be more than or equal to 8.
  3629. // maxSfb Maximal scale factor bands number for
  3630. // the current block.
  3631. // samplingRateIndex Sampling rate index. Valid in [0, 11]. See Table
  3632. // 6.5 of ISO/IEC 13818-7:1997.
  3633. // winLen Data number in one window.
  3634. //
  3635. // Returns:
  3636. // ippStsNoErr Indicates no error.
  3637. // ippStsNullPtrErr Indicates an error when at least one of the
  3638. // specified pointers is NULL.
  3639. // ippStsAacMaxSfbErr Indicates an error when the coefficient index
  3640. // calculated from samplingFreqIndex and maxSfb
  3641. // exceeds winLen in each window.
  3642. // ippStsAacSamplRateIdxErr Indicates an error when pChanInfor->
  3643. // samplingRateIndex exceeds [0,11].
  3644. // ippStsAacWinGrpErr Indicates an error when numWinGrp exceeds [0,8].
  3645. // ippStsAacWinLenErr Indicates an error when winLen is not equal to
  3646. // 128.
  3647. */
  3648. IPPAPI(IppStatus, ippsDeinterleaveSpectrum_AAC_32s,(const Ipp32s *pSrc,
  3649. Ipp32s *pDst, int numWinGrp, const int *pWinGrpLen,
  3650. int maxSfb, int samplingRateIndex, int winLen ))
  3651. /* ///////////////////////////////////////////////////////////////////////////
  3652. // Name:
  3653. // ippsDecodeTNS_AAC_32s_I
  3654. //
  3655. // Purpose:
  3656. // Decodes for Temporal Noise Shaping in-place.
  3657. //
  3658. // Parameters:
  3659. // pSrcDstSpectralCoefs On input, pointer to the input spectral
  3660. // coefficients to be filtered by the all-pole
  3661. // filters in Q13.18 format. There are 1024
  3662. // elements in the buffer pointed to by
  3663. // pSrcDstSpectralCoefs. On output, pointer to the
  3664. // output spectral coefficients after filtering by
  3665. // the all-pole filters in Q13.18 format.
  3666. // pTnsNumFilt Pointer to the number of noise shaping filters
  3667. // used for each window of the current frame. There
  3668. // are 8 elements in the buffer pointed to by
  3669. // pTnsNumFilt which are arranged as follows:pTnsNumFilt[w]:
  3670. // the number of noise shaping filters used for
  3671. // window w, w = 0 to numWin-1.
  3672. // pTnsRegionLen Pointer to the length of the region in units of
  3673. // scale factor bands to which one filter is
  3674. // applied in each window of the current frame.
  3675. // There are 8 elements in the buffer pointed to by
  3676. // pTnsRegionLen, which are arranged as follows:
  3677. // pTnsRegionLen[i]: the length of the region to
  3678. // which filter filt is applied in window w w = 0
  3679. // to numWin-1, filt=0 to pTnsNumFilt[w]-1.
  3680. // pTnsFiltOrder Pointer to the order of one noise shaping filter
  3681. // applied to each window of the current frame.
  3682. // There are 8 elements in the buffer pointed to by
  3683. // pTnsFiltOrder, which are arranged as follows:
  3684. // pTnsFiltOrder[i]: the order of one noise shaping
  3685. // filter filt, which is applied to window w w = 0
  3686. // to numWin-1, filt=0 to pTnsNumFilt[w]-1.
  3687. // pTnsFiltCoefRes Pointer to the resolution of 3 bits or 4 bits of
  3688. // the transmitted filter coefficients for each
  3689. // window of the current frame. There are 8
  3690. // elements in the buffer pointed to by
  3691. // pTnsFiltCoefRes, which are arranged as follows:
  3692. // pTnsFiltCoefRes[w]: the resolution of the
  3693. // transmitted filter coefficients for window w, w
  3694. // = 0 to numWin-1.
  3695. // pTnsFiltCoef Pointer to the coefficients of one noise shaping
  3696. // filter applied to each window of the current
  3697. // frame. There are 60 elements in the buffer
  3698. // pointed to by pTnsFiltCoef, which are arranged
  3699. // as follows: pTnsFiltCoef[i], pTnsFiltCoef[i+1],
  3700. // ..., pTnsFiltCoef[i+order-1]: the coefficients of
  3701. // one noise shaping filter filt, which is applied
  3702. // to window w. The order is the same as that of
  3703. // the noise shaping filter filt as applied to
  3704. // window w, w = 0 to numWin-1, filt=0 to
  3705. // pTnsNumFilt[w]-1. For example, pTnsFiltCoef[0],
  3706. // pTnsFiltCoef[1], ..., pTnsFiltCoef[order0-1] are
  3707. // the coefficients of the noise shaping filter 0,
  3708. // which is applied to window 0, if present. If so,
  3709. // pTnsFiltCoef[order0], pTnsFiltCoef[order0+1], ...,
  3710. // pTnsFiltCoef[order0+order1-1] are the
  3711. // coefficients of the noise shaping filter 1
  3712. // applied to window 0, if present, and so on.
  3713. // order0 is the same as that of the noise shaping
  3714. // filter 0 applied to window 0, and order1 is the
  3715. // order of the noise shaping filter 1 applied to
  3716. // window 0. After window 0 is processed, process
  3717. // window 1, then window 2 until all numWin windows
  3718. // are processed.
  3719. // pTnsDirection Pointer to the token that indicates whether the
  3720. // filter is applied in the upward or downward
  3721. // direction. 0 stands for upward and 1 for downward
  3722. // . There are 8 elements in the buffer pointed to
  3723. // by pTnsDirection which are arranged as follows:
  3724. // pTnsDirection[i]: the token indicating whether
  3725. // the filter filt is applied in upward or downward
  3726. // direction to window w w = 0 to numWin-1, filt=0
  3727. // to pTnsNumFilt[w]-1.
  3728. // maxSfb Number of scale factor bands transmitted per
  3729. // window group of the current frame.
  3730. // profile Profile index from Table 7.1 in ISO/IEC 13818-7:
  3731. // 1997.
  3732. // samplingRateIndex Index indicating the sampling rate of the
  3733. // current frame.
  3734. // winLen Data number in one window.
  3735. //
  3736. // Returns:
  3737. // ippStsNoErr Indicates no error.
  3738. // ippStsNullPtrErr Indicates an error when one of the specified
  3739. // pointers is NULL. IppStsTnsProfielErr Indicates
  3740. // an error when profile != 1.
  3741. // ippStsAacTnsNumFiltErr Indicates an error when a data error occurs:
  3742. // for a short window sequence pTnsNumFilt[w]
  3743. // exceeds [0,1]; Table 10-8 Computation Error List
  3744. // for pSrcDstSpectralCoefs MAX(error(
  3745. // pSrcDstSpectralCoefs[i])) Condition 4095 8 ==
  3746. // numWin 32767 1 == numWin NOTE. This function
  3747. // supports LC profile only. 10-142 10 Intel
  3748. // Integrated Performance Primitives Reference
  3749. // Manual: Volume 1 for a long window sequence,
  3750. // pTnsNumFilt[w] exceeds [0,3].
  3751. // ippStsAacTnsLenErr Indicates an error when pTnsRegionLen exceeds
  3752. // [0, numSwb].
  3753. // ippStsAacTnsOrderErr Indicates an error when a data error occurs: for
  3754. // a short window sequence, pTnsFiltOrder exceeds
  3755. // [0,7]; for a long window sequence, pTnsFiltOrder
  3756. // exceeds [0,12].
  3757. // ippStsAacTnsCoefResErr Indicates an error when pTnsFiltCoefRes[w]
  3758. // exceeds [3, 4].
  3759. // ippStsAacTnsCoefErr Indicates an error when *pTnsFiltCoef exceeds
  3760. // [-8, 7].
  3761. // ippStsAacTnsDirectErr Indicates an error when *pTnsDirection exceeds
  3762. // [0, 1].
  3763. //
  3764. // Notes:
  3765. // Input/Output data(pSrcDstSpectralCoefs[]) are in Q3.
  3766. */
  3767. IPPAPI(IppStatus, ippsDecodeTNS_AAC_32s_I,(Ipp32s *pSrcDstSpectralCoefs,
  3768. const int *pTnsNumFilt, const int *pTnsRegionLen,
  3769. const int *pTnsFiltOrder, const int *pTnsFiltCoefRes,
  3770. const Ipp8s *pTnsFiltCoef, const int *pTnsDirection,
  3771. int maxSfb, int profile, int samplingRateIndex, int winLen ))
  3772. /* ///////////////////////////////////////////////////////////////////////////
  3773. // Name:
  3774. // ippsMDCTInv_AAC_32s16s
  3775. //
  3776. // Purpose:
  3777. // Maps time-frequency domain signal into time domain and generates 1024
  3778. // reconstructed 16-bit signed little-endian PCM samples.
  3779. //
  3780. // Parameters:
  3781. // pSrcSpectralCoefs Pointer to the input time-frequency domain
  3782. // samples in Q13.18 format. There are 1024
  3783. // elements in the buffer pointed to by
  3784. // pSrcSpectralCoefs.
  3785. // pSrcDstOverlapAddBuf Pointer to the overlap-add buffer that contains
  3786. // the second half of the previous block windowed
  3787. // sequence in Q13.18. There are 1024 elements in
  3788. // this buffer.
  3789. // winSequence Flag that indicates which window sequence is
  3790. // used for current block.
  3791. // winShape Flag that indicates which window function is
  3792. // selected for current block.
  3793. // prevWinShape Flag that indicates which window function is
  3794. // selected for previous block.
  3795. // pcmMode Flag that indicates whether the PCM audio output
  3796. // is interleaved, that is has the pattern LRLRLR...
  3797. // or not. 1 stands for not interleaved. 2 stands
  3798. // for interleaved
  3799. // pDstPcmAudioOut Pointer to the output 1024 reconstructed 16-bit
  3800. // signed little-endian PCM samples in Q15,
  3801. // interleaved, if needed. The maximum computation
  3802. // error for pDstPcmAudioOut is less than 1 for
  3803. // each vector element. The total quadratic error
  3804. // for the vector is less than 96.
  3805. // pSrcDstOverlapAddBuf Pointer to the overlap-add buffer which contains
  3806. // the second half of the current block windowed
  3807. // sequence in Q13.18. The maximum computation
  3808. // error for pDstPcmAudioOut is less than 4 for
  3809. // each vector element. The total quadratic error
  3810. // for the vector is less than 1536.
  3811. //
  3812. // Returns:
  3813. // ippStsNoErr Indicates no error.
  3814. // ippStsNullPtrErr Indicates an error when one of the specified
  3815. // pointers is NULL.
  3816. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds [0,3].
  3817. // ippStsAacWinShapeErr Indicates an error when winShape or prevWinShape
  3818. // exceeds [0,1].
  3819. // ippStsAacPcmModeErr Indicates an error when pcmMode exceeds [1,2].
  3820. //
  3821. // Notes:
  3822. // Input data (pSrcSpectralCoefs[]) is in Q = _IPP_AAC_FB_Q;
  3823. // data (pSrcDstOverlapAdd[]) is in Q = _IPP_AAC_FB_Q.
  3824. */
  3825. IPPAPI(IppStatus, ippsMDCTInv_AAC_32s16s,(Ipp32s *pSrcSpectralCoefs,
  3826. Ipp16s *pDstPcmAudioOut, Ipp32s *pSrcDstOverlapAddBuf,
  3827. int winSequence, int winShape, int prevWinShape, int pcmMode ))
  3828. IPPAPI(IppStatus, ippsMDCTInv_AAC_32s_I,(Ipp32s *tst_SrcDst, Ipp32s *tst_OverlapBuf,
  3829. int winSeq, int winShape, int prewinShape, int len))
  3830. IPPAPI(IppStatus, ippsMDCTFwd_AAC_32s_I,(Ipp32s *tst_SrcDst, int winSeq, int winShape,
  3831. int prewinShape, int len))
  3832. /* ///////////////////////////////////////////////////////////////////////////
  3833. // Name:
  3834. // ippsDecodeMainHeader_AAC
  3835. //
  3836. // Purpose:
  3837. // Gets main header information and main layer information from bit stream.
  3838. //
  3839. // Parameters:
  3840. // ppBitStream Double pointer to bitstream buffer. *ppBitStream
  3841. // will be updated after decoding.
  3842. // pOffset Pointer to the offset in one byte. *pOffset will
  3843. // be updated after decoding.
  3844. // channelNum Number of channels.
  3845. // monoStereoFlag Current frame has mono and stereo layers.
  3846. // pAACMainHeader Pointer to the main element header.
  3847. //
  3848. // Returns:
  3849. // ippStsNoErr Indicates no error.
  3850. // ippStsNullPtrErr Indicates an error when at least one of the
  3851. // specified pointers is NULL.
  3852. // ippStsAacBitOffsetErr Indicates an error when pOffset exceeds [0,7].
  3853. // ippStsAacChanErr Indicates an error when channelNum exceeds [1,2].
  3854. // ippStsAacMonoStereoErr Indicates an error when monoStereoFlag exceeds
  3855. // [0,1].
  3856. */
  3857. IPPAPI(IppStatus, ippsDecodeMainHeader_AAC,(Ipp8u **ppBitStream,
  3858. int *pOffset, IppAACMainHeader *pAACMainHeader, int channelNum,
  3859. int monoStereoFlag ))
  3860. /* ///////////////////////////////////////////////////////////////////////////
  3861. // Name:
  3862. // ippsDecodeExtensionHeader_AAC
  3863. //
  3864. // Purpose:
  3865. // Gets extension header information and extension layer information from
  3866. // bit stream.
  3867. //
  3868. // Parameters:
  3869. // ppBitStream Double pointer to bitstream buffer. *ppBitStream
  3870. // will be updated after decoding.
  3871. // pOffset Pointer to the offset in one byte. *pOffset will
  3872. // be updated after decoding.
  3873. // monoStereoFlag Flag indicating that the current frame has mono
  3874. // and stereo layers.
  3875. // thisLayerStereo Flag indicating that the current layer is stereo.
  3876. // monoLayerFlag Flag indicating that the current frame has a
  3877. // mono layer.
  3878. // preStereoMaxSfb Previous stereo layer maxSfb.
  3879. // hightstMonoMaxSfb Last mono layer maxSfb.
  3880. // winSequence Window type, short or long.
  3881. // pAACExtHeader Pointer to the extension element header.
  3882. //
  3883. // Returns:
  3884. // ippStsNoErr Indicates no error.
  3885. // ippStsNullPtrErr Indicates an error when at least one of the
  3886. // specified pointers is NULL.
  3887. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of the
  3888. // range of [0,7].
  3889. // ippStsAacStereoLayerErr Indicates an error when thisLayerStereo
  3890. // exceeds [0,1].
  3891. // ippStsAacMonoLayerErr Indicates an error when monoLayerFlag exceeds
  3892. // [0,1].
  3893. // ippStsAacMaxSfbErr Indicates an error when at least one of
  3894. // preStereoMaxSfb, hightstMonoMaxSfb or number of
  3895. // scale factor bands used in this layer exceeds
  3896. // [0,IPP_AAC_MAX_SFB].
  3897. // ippStsAacMonoStereoErr Indicates an error when monoStereoFlag exceeds
  3898. // [0,1].
  3899. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds
  3900. // [0,3].
  3901. //
  3902. */
  3903. IPPAPI(IppStatus, ippsDecodeExtensionHeader_AAC,(Ipp8u **ppBitStream,
  3904. int *pOffset, IppAACExtHeader *pAACExtHeader, int monoStereoFlag,
  3905. int thisLayerStereo, int monoLayerFlag, int preStereoMaxSfb,
  3906. int hightstMonoMaxSfb, int winSequence ))
  3907. /* ///////////////////////////////////////////////////////////////////////////
  3908. // Name:
  3909. // ippsDecodePNS_AAC_32s
  3910. //
  3911. // Purpose:
  3912. // Implements perceptual noise substitution (PNS) coding within
  3913. // individual channel stream (ICS).
  3914. //
  3915. // Parameters:
  3916. // pSrcDstSpec Pointer to spectrum coefficients for perceptual
  3917. // noise substitution (PNS).
  3918. // pSrcDstLtpFlag Pointer to long term predict (LTP) flag.
  3919. // pSfbCb Pointer to the scale factor codebook.
  3920. // pScaleFactor Pointer to the scalefactor value.
  3921. // maxSfb Number of scale factor bands used in this layer.
  3922. // numWinGrp Number of window groups.
  3923. // pWinGrpLen Pointer to the length of every window group.
  3924. // samplingFreqIndex Sampling frequency index.
  3925. // winLen Window length. 1024 for long windows, 128 for
  3926. // short windows.
  3927. // pRandomSeed Random seed for PNS.
  3928. // pSrcDstSpec Pointer to the output spectrum substituted by
  3929. // perceptual noise.
  3930. //
  3931. // Returns:
  3932. // ippStsNoErr Indicates no error.
  3933. // ippStsNullPtrErr Indicates an error when at least one of the
  3934. // specified pointers is NULL.
  3935. // ippStsAacMaxSfbErr Indicates an error when maxSfb exceeds [0,
  3936. // IPP_AAC_MAX_SFB].
  3937. // ippStsAacSmplRateIdxErr Indicates an error when pChanInfo->
  3938. // samplingRateIndex exceeds [0,12].
  3939. // ippStsAacWinLenErr Indicates an error when winLen is not equal to
  3940. // 128 or 1024.
  3941. */
  3942. IPPAPI(IppStatus, ippsDecodePNS_AAC_32s,(Ipp32s *pSrcDstSpec,
  3943. int *pSrcDstLtpFlag, Ipp8u *pSfbCb, Ipp16s *pScaleFactor,
  3944. int maxSfb, int numWinGrp, int *pWinGrpLen, int samplingFreqIndex,
  3945. int winLen, int *pRandomSeed ))
  3946. /* ///////////////////////////////////////////////////////////////////////////
  3947. // Name:
  3948. // ippsDecodeMsPNS_AAC_32s
  3949. //
  3950. // Purpose:
  3951. // Implements perceptual noise substitution coding within an ICS.
  3952. //
  3953. // Parameters:
  3954. // pSrcDstSpec Pointer to spectrum coefficients before PNS.
  3955. // pSrcDstLtpFlag Pointer to the LTP flag.
  3956. // pSfbCb Pointer to the scalefactor code book.
  3957. // pScaleFactor Pointer to the scalefactor coefficients.
  3958. // maxSfb Number of max scalefactor band.
  3959. // numWinGrp Number groups of windows.
  3960. // pWinGrpLen Pointer to the group length.
  3961. // samplingFreqIndex Sampling frequency index.
  3962. // winLen Length of windows.
  3963. // pRandomSeed Random seed.
  3964. // channel Index of current channel:
  3965. // 0: left;
  3966. // 1: right.
  3967. // pMsUsed Pointer to MS used buffer in CPE structure.
  3968. // pNoiseState Pointer to noise state buffer, which stores
  3969. // the left channel's noise random seed for
  3970. // every scalefactor band. When pMsUsed[sfb]==1,
  3971. // the content in this buffer will be used for
  3972. // right channel.
  3973. //
  3974. // Returns:
  3975. // ippStsNoErr Indicates no error.
  3976. // ippStsNullPtrErr Indicates an error when at least one of the
  3977. // specified pointers is NULL.
  3978. // ippStsAacMaxSfbErr Indicates an error when maxSfb exceeds [0,
  3979. // IPP_AAC_MAX_SFB].
  3980. // ippStsAacWinGrpErr Indicates an error when numWinGrp exceeds [0,8].
  3981. // ippStsAacSmplRateIdxErr Indicates an error when samplingFreqIndex
  3982. // exceeds [0,16].
  3983. // ippStsAacWinLenErr Indicates an error when winLen is not equal to
  3984. // 128 or 1024.
  3985. */
  3986. IPPAPI(IppStatus, ippsDecodeMsPNS_AAC_32s,(Ipp32s *pSrcDstSpec,
  3987. int *pSrcDstLtpFlag, Ipp8u *pSfbCb, Ipp16s *pScaleFactor,
  3988. int maxSfb, int numWinGrp, int *pWinGrpLen, int samplingFreqIndex,
  3989. int winLen, int *pRandomSeed, int channel, Ipp8u *pMsUsed, int *pNoiseState ))
  3990. /* ///////////////////////////////////////////////////////////////////////////
  3991. // Name:
  3992. // ippsLongTermReconstruct_AAC_32s
  3993. //
  3994. // Purpose:
  3995. // Uses Long Term Reconstruct (LTR) to reduce signal redundancy between
  3996. // successive coding frames.
  3997. //
  3998. // Parameters:
  3999. // pSrcDstSpec Pointer to spectral coefficients for LTP.
  4000. // pSrcEstSpec Pointer to the frequency domain vector.
  4001. // winSequence Window type, long or short.
  4002. // samplingFreqIndex Sampling frequency index.
  4003. // pLtpFlag Pointer to the LTP flag.
  4004. //
  4005. // Returns:
  4006. // ippStsNoErr Indicates no error.
  4007. // ippStsNullPtrErr Indicates an error when at least one of the
  4008. // specified pointers is NULL.
  4009. // ippStsAacSmplRateIdxErr Indicates an error when pChanInfo->
  4010. // samplingRateIndex exceeds [0,12].
  4011. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds
  4012. // [0,3].
  4013. */
  4014. IPPAPI(IppStatus, ippsLongTermReconstruct_AAC_32s,(Ipp32s *pSrcEstSpec,
  4015. Ipp32s *pSrcDstSpec, int *pLtpFlag, int winSequence,
  4016. int samplingFreqIndex ))
  4017. /* ///////////////////////////////////////////////////////////////////////////
  4018. // Name:
  4019. // ippsEncodeTNS_AAC_32s_I
  4020. //
  4021. // Purpose:
  4022. // Performs reversion of TNS in the Long Term Reconstruct loop in-place.
  4023. //
  4024. // Parameters:
  4025. // pSrcDst On input, pointer to the spectral coefficients
  4026. // for the TNS encoding operation. On output,
  4027. // pointer to the spectral coefficients after the
  4028. // TNS encoding operation.
  4029. // pTnsNumFilt Pointer to the number of TNS filters.
  4030. // pTnsRegionLen Pointer to the length of TNS filter.
  4031. // pTnsFiltOrder Pointer to the TNS filter order.
  4032. // pTnsFiltCoefRes Pointer to the TNS coefficient resolution flag.
  4033. // pTnsFiltCoef Pointer to the TNS filter coefficients.
  4034. // pTnsDirection Pointer to the TNS direction flag.
  4035. // maxSfb Maximum scale factor number.
  4036. // profile Audio profile.
  4037. // samplingFreqIndex Sampling frequency index.
  4038. // winLen Window length.
  4039. //
  4040. // Returns:
  4041. // ippStsNoErr Indicates no error.
  4042. // ippStsNullPtrErr Indicates an error when at least one of the
  4043. // specified pointers is NULL.
  4044. // ippStsTnsProfileErr Indicates an error when profile != 1.
  4045. // ippStsAacTnsNumFiltErr Indicates an error when *pTnsNumFilt exceeds
  4046. // [0, 1] for the short window sequence or [0, 3]
  4047. // for the long window sequence.
  4048. // ippStsAacTnsLenErr Indicates an error when *pTnsRegionLen exceeds
  4049. // [0, numSwb].
  4050. // ippStsAacTnsOrderErr Indicates an error when *pTnsFiltOrder exceeds
  4051. // [0, 7] for the short window sequence or [0, 12]
  4052. // for the long window sequence.
  4053. // ippStsAacTnsCoefResErr Indicates an error when *pTnsFiltCoefRes
  4054. // exceeds [3, 4].
  4055. // ippStsAacTnsCoefErr Indicates an error when *pTnsFiltCoef exceeds
  4056. // [-8, 7].
  4057. // ippStsAacTnsDirectErr Indicates an error when *pTnsDirection exceeds
  4058. // [0, 1].
  4059. // ippStsAacSmplRateIdxErr Indicates an error when samplingRateIndex
  4060. // exceeds [0, 12].
  4061. // ippStsAacWinLenErr Indicates an error when winLen is not equal to
  4062. // 128 or 1024.
  4063. //
  4064. // Notes:
  4065. // Input/Output data(pSrcDstSpectralCoefs[]) are in Q3.
  4066. */
  4067. IPPAPI(IppStatus, ippsEncodeTNS_AAC_32s_I,(Ipp32s *pSrcDstSpectralCoefs,
  4068. const int *pTnsNumFilt, const int *pTnsRegionLen,
  4069. const int *pTnsFiltOrder, const int *pTnsFiltCoefRes,
  4070. const Ipp8s *pTnsFiltCoef, const int *pTnsDirection,
  4071. int maxSfb, int profile, int samplingRateIndex, int winLen ))
  4072. /* ///////////////////////////////////////////////////////////////////////////
  4073. // Name:
  4074. // ippsLongTermPredict_AAC_32s
  4075. //
  4076. // Purpose:
  4077. // Gets the predicted time domain signals in the Long Term Reconstruct
  4078. // (LTP) loop.
  4079. //
  4080. // Parameters:
  4081. // pSrcTimeSignal Pointer to the temporal signals to be predicted
  4082. // in the temporary domain.
  4083. // pDstEstTimeSignal Pointer to the output of samples after LTP.
  4084. // pAACLtpInfo Pointer to the LTP information.
  4085. // winSequence Window type, short or long.
  4086. // pDstEstTimeSignal Pointer to the prediction output in time domain.
  4087. //
  4088. // Returns:
  4089. // ippStsNoErr Indicates no error.
  4090. // ippStsNullPtrErr Indicates an error when at least one of the
  4091. // pointers is NULL.
  4092. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds
  4093. // [0,3].
  4094. */
  4095. IPPAPI(IppStatus, ippsLongTermPredict_AAC_32s,(Ipp32s *pSrcTimeSignal,
  4096. Ipp32s *pDstEstTimeSignal, IppAACLtpInfo *pAACLtpInfo,
  4097. int winSequence ))
  4098. /* ///////////////////////////////////////////////////////////////////////////
  4099. // Name:
  4100. // ippsNoiseLessDecode_AAC
  4101. //
  4102. // Purpose:
  4103. // Performs noiseless decoding.
  4104. //
  4105. // Parameters:
  4106. // ppBitStream Double pointer to the bitstream to be parsed.
  4107. // *ppBitStream will be updated after decoding.
  4108. // pOffset Pointer to the offset in one byte. *pOffset will
  4109. // be updated after decoding.
  4110. // pAACMainHeader Pointer to main header information. Not used for
  4111. // scalable objects. When commonWin == 0 &&
  4112. // scaleFlag==0, you need to decode LTP information
  4113. // and save it in pAACMainHeader->pLtpInfo[].
  4114. // pChanInfo Pointer to channel information structure.
  4115. // windowSequence Window type, short or long.
  4116. // maxSfb Number of scale factor bands.
  4117. // commonWin Indicates if the channel pair uses the same ICS
  4118. // information.
  4119. // scaleFlag Flag indicating whether the scalable type is used.
  4120. // audioObjectType Audio object type indicator: 1 indicates the
  4121. // main type 2 indicates the LC type 6 indicates
  4122. // the scalable mode.
  4123. // pDstScaleFactor Pointer to the parsed scalefactor.
  4124. // pDstQuantizedSpectralCoef Pointer to the quantized spectral
  4125. // coefficients after Huffman decoding.
  4126. // pDstSfbCb Pointer to the scale factor codebook index.
  4127. // pDstTnsFiltCoef Pointer to TNS filter coefficients. Not used for
  4128. // scalable objects.
  4129. //
  4130. // Returns:
  4131. // ippStsNoErr Indicates no error.
  4132. // ippStsNullPtrErr Indicates an error when at least one of the
  4133. // specified pointers is NULL.
  4134. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of the
  4135. // range [0,7].
  4136. // ippStsAacComWinErr Indicates an error when commonWin exceeds [0,1].
  4137. // ippStsAacMaxSfbErr Indicates an error when maxSfb exceeds [0,
  4138. // IPP_AAC_MAX_SFB].
  4139. // ippStsAacSmplRateIdxErr Indicates an error when pChanInfo->
  4140. // samplingRateIndex exceeds [0,11].
  4141. // ippStsAacCoefValErr Indicates an error when the quantized
  4142. // coefficients value pointed to by pDstCoef
  4143. // exceeds the range of [-8191,8191].
  4144. //
  4145. // Notes:
  4146. // User must set pChanInfo,winSequence, maxSfb, commonWin and
  4147. // scaleflag before calling this function; commonWin and scaleFlag
  4148. // are 1 in condition of scaleable;
  4149. // In comparison with AAC LC, only decode section data has little
  4150. // changes when get dpcm_noise_nrg or hcod_sf[dpcm_noise_nrg]
  4151. // information (all are stored in pDstScalefactor).
  4152. */
  4153. IPPAPI(IppStatus, ippsNoiselessDecode_AAC,(Ipp8u **ppBitStream, int *pOffset,
  4154. IppAACMainHeader *pAACMainHeader, Ipp16s *pDstScalefactor,
  4155. Ipp32s *pDstQuantizedSpectralCoef, Ipp8u *pDstSfbCb,
  4156. Ipp8s *pDstTnsFiltCoef, IppAACChanInfo *pChanInfo,
  4157. int winSequence, int maxSfb, int commonWin,
  4158. int scaleFlag, int audioObjectType ))
  4159. /* ///////////////////////////////////////////////////////////////////////////
  4160. // Name:
  4161. // ippsLtpUpdate_AAC_32s
  4162. //
  4163. // Purpose:
  4164. // Performs required buffer update in the Long Term Reconstruct (LTP) loop.
  4165. //
  4166. // Parameters:
  4167. // pSpecVal Pointer to spectral value after TNS decoder in
  4168. // LTP loop.
  4169. // pLtpSaveBuf Pointer to save buffer for LTP. Buffer length
  4170. // should be 3*frameLength. The value is saved for
  4171. // next frame.
  4172. // winSequence Window type:
  4173. // - 0 stands for long
  4174. // - 1 stands for long start
  4175. // - 2 stands for short
  4176. // - 3 stands for long stop.
  4177. // winShape KBD or SIN window shape.
  4178. // preWinShape Previous window shape.
  4179. // pWorkBuf Work buffer for LTP update, length of pWorkBuf
  4180. // should be at least 2048*3 = 6144 words.
  4181. //
  4182. // Returns:
  4183. // ippStsNoErr Indicates no error.
  4184. // ippStsNullPtrErr Indicates an error when at least one of the
  4185. // specified pointers is NULL.
  4186. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds [0,3].
  4187. // ippStsAacWinShapeErr Indicates an error when winShape or preWinShape
  4188. // exceeds [0,1].
  4189. */
  4190. IPPAPI(IppStatus, ippsLtpUpdate_AAC_32s,(Ipp32s *pSpecVal,
  4191. Ipp32s *pLtpSaveBuf, int winSequence, int winShape,
  4192. int preWinShape, Ipp32s *pWorkBuf ))
  4193. /* ///////////////////////////////////////////////////////////////////////////
  4194. // Name:
  4195. // ippsMDCTFwd_AAC_32s
  4196. //
  4197. // Purpose:
  4198. // Generates spectrum coefficient of PCM samples.
  4199. //
  4200. // Parameters:
  4201. // pSrc Pointer to temporal signals to do MDCT.
  4202. // pDst Output of MDCT, the spectral coefficients of PCM
  4203. // samples.
  4204. // pOverlapAdd Pointer to overlap buffer. Not used for MPEG-4
  4205. // AAC decoding.
  4206. // winSequence Window sequence indicating if the block is long
  4207. // or short.
  4208. // winShape Current window shape.
  4209. // preWinShape Previous window shape.
  4210. // pWindowedBuf Work buffer for MDCT. Should be at least 2048
  4211. // words.
  4212. //
  4213. // Returns:
  4214. // ippStsNoErr Indicates no error.
  4215. // ippStsNullPtrErr Indicates an error when at least one of the
  4216. // specified pointers is NULL.
  4217. // ippStsAacWinSeqErr Indicates an error when winSequence exceeds [0,3].
  4218. // ippStsAacWinShapeErr Indicates an error when preWinShape exceeds
  4219. // [0,1].
  4220. */
  4221. IPPAPI(IppStatus, ippsMDCTFwd_AAC_32s,(Ipp32s *pSrc, Ipp32s *pDst,
  4222. Ipp32s *pOverlapAdd, int winSequence, int winShape,
  4223. int preWinShape, Ipp32s *pWindowedBuf ))
  4224. /* ///////////////////////////////////////////////////////////////////////////
  4225. // Name:
  4226. // ippsDecodeChanPairElt_MP4_AAC
  4227. //
  4228. // Purpose:
  4229. // Gets channel_pair_element from the input bitstream.
  4230. //
  4231. // Parameters:
  4232. // ppBitStream Double pointer to the current byte.*ppBitStream
  4233. // will be updated after decoding.
  4234. // pOffset Pointer to the bit position in the byte pointed
  4235. // to by *ppBitStream. Valid within 0 to 7: 0
  4236. // stands for the most significant bit of the byte;
  4237. // 7 stands for the least significant bit of the
  4238. // byte.
  4239. // pIcsInfo Pointer to IppAACIcsInfo structure.
  4240. // pChanPairElt Pointer to IppAACChanPairElt structure.
  4241. // pAACMainHeader Pointer to the main element header.
  4242. // predSfbMax Maximum prediction scale factor bands.
  4243. // audioObjectType Audio object type indicator: 1 indicates the
  4244. // main type 2 indicates the LC type 6 indicates
  4245. // the scalable mode.
  4246. //
  4247. // Returns:
  4248. // ippStsNoErr Indicates no error.
  4249. // ippStsNullPtrErr Indicates an error when at least one of the
  4250. // specified pointers is NULL.
  4251. // ippStsAacBitOffsetErr Indicates an error when pOffset is out of the
  4252. // range of [0,7].
  4253. // ippStsAacMaxSfbErr Indicates an error when pIcsInfo->maxSfb decoded
  4254. // from bitstream is greater than IPP_AAC_MAX_SFB,
  4255. // the maximum scale factor band for all sampling
  4256. // frequencies.
  4257. */
  4258. IPPAPI(IppStatus, ippsDecodeChanPairElt_MP4_AAC,(Ipp8u **ppBitStream, int *pOffset,
  4259. IppAACIcsInfo *pIcsInfo, IppAACChanPairElt *pChanPairElt,
  4260. IppAACMainHeader *pAACMainHeader, int predSfbMax,
  4261. int audioObjectType))
  4262. /* ///////////////////////////////////////////////////////////////////////////
  4263. // Name:
  4264. // ippsVLCDecodeEscBlock_MP3_1u16s
  4265. //
  4266. // Purpose:
  4267. // Parses the bitstream and decodes variable length code for MP3.
  4268. //
  4269. // Parameters:
  4270. // ppBitStream Pointer to pointer to the current byte in the
  4271. // bitstream buffer. *ppBitStream is updated by the
  4272. // function.
  4273. // pBitOffset Pointer to the bit position in the byte pointed
  4274. // by *ppBitStream.
  4275. // *pBitOffset is updated by the function.
  4276. // linbits Length of escape sequence.
  4277. // pData Pointer to the array of decoded values.
  4278. // len Number of values to decode into array pData.
  4279. // pVLCSpec Pointer to VLCDecoder specification structure.
  4280. //
  4281. // Returns:
  4282. // ippStsNoErr Indicates no error.
  4283. // ippStsNullPtrErr Indicates an error when one or more pointers
  4284. // passed to the function is NULL.
  4285. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  4286. // For decode functions it can indicate that
  4287. // bitstream contains code that is not specified
  4288. // inside the used table.
  4289. // ippStsBitOffsetErr Indicates an error when *pBitOffset is less
  4290. // than 0 or more than 7.
  4291. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4292. // created by ippsVLCDecodeInit_32s or
  4293. // ippsVLCDecodeInitAlloc_32s functions.
  4294. */
  4295. IPPAPI(IppStatus, ippsVLCDecodeEscBlock_MP3_1u16s,(Ipp8u **ppBitStream,
  4296. int *pBitOffset,
  4297. int linbits,
  4298. Ipp16s *pData,
  4299. int len,
  4300. const IppsVLCDecodeSpec_32s *pVLCSpec))
  4301. /* ///////////////////////////////////////////////////////////////////////////
  4302. // Name:
  4303. // ippsVLCDecodeEscBlock_AAC_1u16s
  4304. //
  4305. // Purpose:
  4306. // Parses the bitstream and decodes variable length code for AAC.
  4307. //
  4308. // Parameters:
  4309. // ppBitStream Pointer to pointer to the current byte in the
  4310. // bitstream buffer. *ppBitStream is updated by
  4311. / the function.
  4312. // pBitOffset Pointer to the bit position in the byte pointed
  4313. // by *ppBitStream.
  4314. // *pBitOffset is updated by the function.
  4315. // pData Pointer to the array of decoded values.
  4316. // len Number of values to decode into array pData.
  4317. // pVLCSpec Pointer to VLCDecoder specification structure.
  4318. //
  4319. // Returns:
  4320. // ippStsNoErr Indicates no error.
  4321. // ippStsNullPtrErr Indicates an error when one or more pointers
  4322. // passed to the function is NULL.
  4323. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  4324. // For decode functions it can indicate that
  4325. // bitstream contains code that is not specified
  4326. // inside the used table.
  4327. // ippStsBitOffsetErr Indicates an error when *pBitOffset is less
  4328. // than 0 or more than 7.
  4329. // ippStsVLCAACEscCodeLengthErr Indicates an error when bitstream
  4330. // contains AAC-Esc code with the length more than
  4331. // 21.
  4332. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4333. // created by ippsVLCDecodeInit_32s or
  4334. // ippsVLCDecodeInitAlloc_32s functions.
  4335. */
  4336. IPPAPI(IppStatus, ippsVLCDecodeEscBlock_AAC_1u16s,(Ipp8u **ppBitStream,
  4337. int *pBitOffset,
  4338. Ipp16s *pData,
  4339. int len,
  4340. const IppsVLCDecodeSpec_32s *pVLCSpec))
  4341. /* ///////////////////////////////////////////////////////////////////////////
  4342. // Name:
  4343. // ippsVLCEncodeEscBlock_MP3_16s1u
  4344. //
  4345. // Purpose:
  4346. // Encodes an array of values into destination bitstream in MP3 format
  4347. // and advances bitstream pointer.
  4348. //
  4349. // Parameters:
  4350. // pInputData Pointer to the array of source values.
  4351. // len Size of values array pInputData.
  4352. // linbits Length of escape sequence.
  4353. // ppBitStream Pointer to pointer to the current byte in the
  4354. // bitstream buffer. *ppBitStream is updated by
  4355. // the function.
  4356. // pBitOffset Ppointer to the bit position in the byte pointed
  4357. // by *ppBitStream.
  4358. // *pBitOffset is updated by the function.
  4359. // pVLCSpec Pointer to VLCEncoder specification structure.
  4360. //
  4361. // Returns:
  4362. // ippStsNoErr Indicates no error.
  4363. // ippStsNullPtrErr Indicates an error when the pointers to data
  4364. // arrays are NULL.
  4365. // ippStsBitOffsetErr Indicates an error when *pBitOffset is less
  4366. // than 0 or more than 7.
  4367. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4368. // created by ippsVLCEncodeInit_32s or
  4369. // ippsVLCEncodeInitAlloc_32s functions.
  4370. */
  4371. IPPAPI(IppStatus, ippsVLCEncodeEscBlock_MP3_16s1u,(const Ipp16s *pInputData,
  4372. int len,
  4373. int linbits,
  4374. Ipp8u **ppBitStream,
  4375. int *pBitOffset,
  4376. const IppsVLCEncodeSpec_32s *pVLCSpec))
  4377. /* ///////////////////////////////////////////////////////////////////////////
  4378. // Name:
  4379. // ippsVLCEncodeEscBlock_AAC_16s1u
  4380. //
  4381. // Purpose:
  4382. // Encodes an array of values into destination bitstream in AAC format
  4383. // and advances bitstream pointer.
  4384. //
  4385. // Parameters:
  4386. // pInputData Pointer to the array of source values.
  4387. // len Size of values array pInputData.
  4388. // ppBitStream Pointer to pointer to the current byte in the
  4389. // bitstream buffer.
  4390. // *ppBitStream is updated by the function.
  4391. // pBitOffset Pointer to the bit position in the byte pointed
  4392. // by *ppBitStream.
  4393. // *pBitOffset is updated by the function.
  4394. // pVLCSpec Pointer to VLCEncoder specification structure.
  4395. //
  4396. // Returns:
  4397. // ippStsNoErr Indicates no error.
  4398. // ippStsNullPtrErr Indicates an error when the pointers to data
  4399. // arrays are NULL.
  4400. // ippStsBitOffsetErr Indicates an error when *pBitOffset is less
  4401. // than 0 or more than 7.
  4402. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4403. // created by ippsVLCEncodeInit_32s or
  4404. // ippsVLCEncodeInitAlloc_32s functions.
  4405. */
  4406. IPPAPI(IppStatus, ippsVLCEncodeEscBlock_AAC_16s1u,(const Ipp16s *pInputData,
  4407. int len,
  4408. Ipp8u **ppBitStream,
  4409. int *pBitOffset,
  4410. const IppsVLCEncodeSpec_32s *pVLCSpec))
  4411. /* ///////////////////////////////////////////////////////////////////////////
  4412. // Name:
  4413. // ippsVLCCountEscBits_MP3_16s32s
  4414. //
  4415. // Purpose:
  4416. // Calculates the number of bits necessary for encoding in MP3 format.
  4417. //
  4418. // Parameters:
  4419. // pInputData Pointer to the array of source values.
  4420. // len Size of values array pInputData.
  4421. // linbits Length of escape sequence. pCounBits Pointer to
  4422. // calculated length in bits to encode pInputData.
  4423. // pVLCSpec Pointer to VLCEncoder specification structure.
  4424. //
  4425. // Returns:
  4426. // ippStsNoErr Indicates no error.
  4427. // ippStsNullPtrErr Indicates an error when the pointers to data
  4428. // arrays are NULL.
  4429. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4430. // created by ippsVLCEncodeInit_32s or
  4431. // ippsVLCEncodeInitAlloc_32s functions.
  4432. */
  4433. IPPAPI(IppStatus, ippsVLCCountEscBits_MP3_16s32s,(const Ipp16s *pInputData,
  4434. int len,
  4435. int linbits,
  4436. Ipp32s *pCountBits,
  4437. const IppsVLCEncodeSpec_32s *pVLCSpec))
  4438. /* ///////////////////////////////////////////////////////////////////////////
  4439. // Name:
  4440. // ippsVLCCountEscBits_AAC_16s32s
  4441. //
  4442. // Purpose:
  4443. // Calculates the number of bits necessary for encoding in AAC format.
  4444. //
  4445. // Parameters:
  4446. // pInputData Pointer to the array of source values.
  4447. // len Size of values array pInputData.
  4448. // pCountBits Pointer to calculated length in bits to encode
  4449. // pInputData.
  4450. // pVLCSpec Pointer to VLCEncoder specification structure.
  4451. //
  4452. // Returns:
  4453. // ippStsNoErr Indicates no error.
  4454. // ippStsNullPtrErr Indicates an error when the pointers to data
  4455. // arrays are NULL.
  4456. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not
  4457. // created by ippsVLCEncodeInit_32s or
  4458. // ippsVLCEncodeInitAlloc_32s functions.
  4459. */
  4460. IPPAPI(IppStatus, ippsVLCCountEscBits_AAC_16s32s,(const Ipp16s *pInputData,
  4461. int len,
  4462. Ipp32s *pCountBits,
  4463. const IppsVLCEncodeSpec_32s *pVLCSpec))
  4464. /*******************************************************************/
  4465. /*
  4466. // Name: ippsVLCDecodeUTupleEscBlock_MP3_1u16s
  4467. // Purpose: decodes a len element encoded by VLC code from the source data
  4468. // *ppBitStream with *pBitOffset bits offset and stores the result in
  4469. // the destination *pData
  4470. //
  4471. // Arguments:
  4472. // ppBitStream Pointer to pointer to the current byte in the
  4473. // bitstream buffer. *ppBitStream is updated by the function.
  4474. // pBitOffset Pointer to the bit position in the byte pointed by
  4475. // *ppBitStream. Valid within the range 0 to 7.
  4476. // *pBitOffset is updated by the function.
  4477. // linbits Length of escape sequence.
  4478. // pData Pointer to the array of decoded values.
  4479. // len Number of values to decode into array pData.
  4480. // pVLCSpec pointer to VLCDecoder specification structure
  4481. //
  4482. // Return:
  4483. // ippStsNoErr Indicates no error.
  4484. // ippStsNullPtrErr Indicates an error when one or more pointers
  4485. // passed to the function is NULL.
  4486. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  4487. // For decode functions it can indicate that bitstream
  4488. // contains code that is not specified inside the used table.
  4489. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more then 7.
  4490. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  4491. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  4492. //
  4493. */
  4494. IPPAPI(IppStatus, ippsVLCDecodeUTupleEscBlock_MP3_1u16s,(Ipp8u **ppBitStream,
  4495. int *pBitOffset,
  4496. int linbits,
  4497. Ipp16s *pData,
  4498. int len,
  4499. const IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  4500. /*******************************************************************/
  4501. /*
  4502. // Name: ippsVLCDecodeUTupleEscBlock_AAC_1u16s
  4503. // Purpose: decodes a len element encoded by VLC code from the source data
  4504. // *ppBitStream with *pBitOffset bits offset and stores the result in
  4505. // the destination *pData
  4506. //
  4507. // Arguments:
  4508. // ppBitStream Pointer to pointer to the current byte in the
  4509. // bitstream buffer. *ppBitStream is updated by the function.
  4510. // pBitOffset Pointer to the bit position in the byte pointed by
  4511. // *ppBitStream. Valid within the range 0 to 7.
  4512. // *pBitOffset is updated by the function.
  4513. // pData Pointer to the array of decoded values.
  4514. // len Number of values to decode into array pData.
  4515. // pVLCSpec pointer to VLCDecoder specification structure
  4516. //
  4517. // Return:
  4518. // ippStsNoErr Indicates no error.
  4519. // ippStsNullPtrErr Indicates an error when one or more pointers
  4520. // passed to the function is NULL.
  4521. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  4522. // For decode functions it can indicate that bitstream
  4523. // contains code that is not specified inside the used table.
  4524. // ippStsVLCAACEscCodeLengthErr Indicates an error when bitstream contains AAC-Esc code
  4525. // with the length more than 21.
  4526. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more then 7.
  4527. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  4528. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  4529. //
  4530. */
  4531. IPPAPI(IppStatus, ippsVLCDecodeUTupleEscBlock_AAC_1u16s,(Ipp8u **ppBitStream,
  4532. int *pBitOffset,
  4533. Ipp16s *pData,
  4534. int len,
  4535. const IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  4536. /* ///////////////////////////////////////////////////////////////////////////
  4537. // Name:
  4538. // ippsPackFrameHeader_MP3
  4539. //
  4540. // Purpose:
  4541. // Packs the content of the frame header into the bitstream.
  4542. //
  4543. // Parameters:
  4544. // pSrcFrameHeader Pointer to the IppMP3FrameHeader structure. This
  4545. // structure contains all the header information
  4546. // associated with the current frame. All structure
  4547. // fields must contain valid data upon function
  4548. // entry.
  4549. // ppBitStream Pointer to the encoded bitstream buffer - a
  4550. // double pointer to the first byte in the
  4551. // bitstream buffer intended to receive the packed
  4552. // frame header bits generated by this function.
  4553. // The frame header bits are sequentially written
  4554. // into the stream buffer starting from the bit
  4555. // indexed by the combination of byte pointer
  4556. // ppBitStream. The frame header bits
  4557. // are formatted according to the bitstream syntax
  4558. // given in ISO/IEC 11172-3.
  4559. //
  4560. // Returns:
  4561. // ippStsNoErr Indicates no error.
  4562. // ippStsNullPtrErr Indicates an error when pSrcFrameHeader or
  4563. // ppBitStream is NULL.
  4564. */
  4565. IPPAPI(IppStatus, ippsPackFrameHeader_MP3, (
  4566. IppMP3FrameHeader* pSrcFrameHeader,
  4567. Ipp8u** ppBitStream))
  4568. /* ///////////////////////////////////////////////////////////////////////////
  4569. // Name:
  4570. // ippsPackSideInfo_MP3
  4571. //
  4572. // Purpose:
  4573. // Packs the side information into the bitstream buffer.
  4574. //
  4575. // Parameters:
  4576. // pSrcSideInfo Pointer to the IppMP3SideInfo structures. This
  4577. // should contain twice the channel number of
  4578. // elements. The order is the following: - granule 1
  4579. // , channel 1; - granule 1, channel 2; - granule 2,
  4580. // channel 1; - granule 2, channel 2. All fields of
  4581. // all set elements should contain valid data upon
  4582. // the function entry.
  4583. // mainDataBegin Negative bitstream offset, in bytes. The
  4584. // parameter value is typically the number of bytes
  4585. // remaining in the bit reservoir before the start
  4586. // of quantization for the current frame. When
  4587. // computing mainDataBegin, you should exclude the
  4588. // header and side information bytes. The side
  4589. // information formatter packs the 9-bit value of
  4590. // mainDataBegin into the main_data_begin field of
  4591. // the output bitstream.
  4592. // privateBits Depending on the number of channels, the
  4593. // function extracts the appropriate number of
  4594. // least significant bits from the parameter
  4595. // privateBits and packs them into the private_bits
  4596. // field of the output bitstream. The ISO/IEC 11172-3
  4597. // bitstream syntax reserves a channel-dependent
  4598. // number of application-specific (private) bits in
  4599. // the layer III bitstream audio data section
  4600. // immediately following the parameter
  4601. // main_data_begin. See ISO/IEC 11172-3:1993. For
  4602. // dualand single-channel streams, respectively,
  4603. // three and five bits are reserved.
  4604. // pSrcScfsi Pointer to the scale factor selection
  4605. // information table. This vector contains a set of
  4606. // binary flags that indicate whether scalefactors
  4607. // are shared across granules of a frame within
  4608. // predefined scale factor selection groups. For
  4609. // example, bands 0,1,2,3,4,5 form one group and
  4610. // bands 6,7,8,9,10 form the second group, as
  4611. // defined in ISO/IEC 11172-3.
  4612. // The vector is indexed as
  4613. // pDstScfsi[ch][scfsi_band], where:
  4614. // - ch is the channel index, 0 stands for
  4615. // channel 1, 1 stands for channel 2;
  4616. // - scfsi_band is the scale factor selection group
  4617. // number. Group 0 includes SFBs 0-5, group 1
  4618. // includes SFBs 6-10, group 2 includes SFBs 11-15,
  4619. // and group 3 includes SFBs 16-20.
  4620. // pFrameHeader Pointer to the IppMP3FrameHeader structure. Only
  4621. // MPEG-1 (id = 1) is supported. Upon the function
  4622. // entry, the structure fields id, mode, and layer
  4623. // should contain, respectively, the algorithm id
  4624. // (MPEG-1 or MPEG-2), the mono or stereo mode, and
  4625. // the MPEG layer specifier. All other pFrameHeader
  4626. // fields are ignored.
  4627. // ppBitStream Pointer to the encoded bitstream buffer. The
  4628. // parameter is a double pointer to the first byte
  4629. // in the bitstream buffer intended to receive the
  4630. // packed side information bits generated by this
  4631. // function. The side information bits are
  4632. // sequentially written into the stream buffer
  4633. // starting from the byte-aligned location
  4634. // referenced by *ppBitStream.
  4635. // ppBitStream Updated bitstream byte pointer. The parameter *
  4636. // ppBitStream points to the first available
  4637. // bitstream buffer byte immediately following the
  4638. // packed side information bits. The frame header
  4639. // bits are formatted according to the bitstream
  4640. // syntax given in ISO/IEC 11172-3:1993. Description
  4641. //
  4642. // Returns:
  4643. // ippStsNoErr Indicates no error.
  4644. // ippStsNullPtrErr Indicates an error when pSrcSideInfo,
  4645. // ppBitStream, pSrcScfsi, or pFrameHeader is NULL.
  4646. // ippStsMP3FrameHeaderErr Indicates an error when
  4647. // pFrameHeader->id != IPP_MP3_ID_MPEG1
  4648. // pFrameHeader->id != IPP_MP3_ID_MPEG2
  4649. // pFrameHeader->mode exceeds [0, 3].
  4650. */
  4651. IPPAPI(IppStatus, ippsPackSideInfo_MP3, (
  4652. IppMP3SideInfo* pSrcSideInfo,
  4653. Ipp8u** ppBitStream,
  4654. int mainDataBegin,
  4655. int privateBits,
  4656. int* pSrcScfsi,
  4657. IppMP3FrameHeader* pFrameHeader))
  4658. /* ///////////////////////////////////////////////////////////////////////////
  4659. // Name:
  4660. // ippsPackScalefactors_MP3_8s1u
  4661. //
  4662. // Purpose:
  4663. // Applies noiseless coding to scalefactors and packs output into
  4664. // bitstream buffer.
  4665. //
  4666. // Parameters:
  4667. // pSrcScaleFactor Pointer to a vector of scalefactors generated
  4668. // during the quantization process for one channel
  4669. // of one granule. Scale factor vector lengths
  4670. // depend on the block mode. Short block granule
  4671. // scale factor vectors contain 36 elements, or
  4672. // 12 elements for each subblock. Long block
  4673. // granule scale factor vectors contain 21 elements.
  4674. // Thus short block scale factor vectors are indexed
  4675. // as follows: pSrcScaleFactor[sb*12+sfb], where
  4676. // - sb is the subblock index. 0 stands for subblock
  4677. // 1, 1 stands for subblock 2, 2 stands for subblock
  4678. // 3.
  4679. // - sfb is the scale factor band index (0-11).
  4680. // Long block scale factor vectors are indexed as
  4681. // follows:
  4682. // pSrcScaleFactor[sfb], where sfb is the scale
  4683. // factor band index (0-20).
  4684. // The associated side information for an individual
  4685. // granule/channel can be used to select the
  4686. // appropriate indexing scheme.
  4687. // ppBitStream Updated bitstream byte pointer. This parameter
  4688. // points to the first available bitstream buffer
  4689. // byte immediately following the bits generated by
  4690. // the scale factor Huffman encoder and
  4691. // sequentially written into the stream buffer. The
  4692. // scale factor bits are formatted according to the
  4693. // bitstream syntax given in ISO/IEC 11172-3.
  4694. // pOffset Updated bitstream bit pointer. The pOffset
  4695. // parameter indexes the next available bit in the
  4696. // next available byte referenced by the updated
  4697. // bitstream buffer byte pointer ppBitStream. This
  4698. // parameter is valid within the range of 0 to 7,
  4699. // where 0 corresponds to the most significant bit
  4700. // and 7 corresponds to the least significant bit.
  4701. // pFrameHeader Pointer to the IppMP3FrameHeader structure for
  4702. // this frame. Upon the function entry, the
  4703. // structure fields id and modeExt should contain,
  4704. // respectively, the algorithm id (MPEG-1 or MPEG-2
  4705. // ) and the joint stereo coding commands generated
  4706. // by the psychoacoustic model. All other
  4707. // pFrameHeader fields are ignored. Only MPEG-1 (id
  4708. // = 1) is supported.
  4709. // pSideInfo Pointer to the IppMP3SideInfo structure for the
  4710. // current granule and channel. Upon function entry
  4711. // , the structure fields blockType, mixedBlock,
  4712. // and sfCompress should contain, respectively, the
  4713. // block type indicator start, short, or stop,
  4714. // filter bank mixed block analysis mode specifier,
  4715. // and scale factor bit allocation. All other *
  4716. // pSideInfo fields are ignored by the scale factor
  4717. // encoder.
  4718. // pScfsi Pointer to the scale factor selection
  4719. // information table that contains the set of
  4720. // binary flags that indicate whether scalefactors
  4721. // are shared across granules of a frame within the
  4722. // predefined scale factor selection groups. For
  4723. // example, bands 0,1,2,3,4,5 form one group and
  4724. // bands 6,7,8,9,10 form a second group (as defined
  4725. // in ISO/IEC 11172-3). The vector is indexed as
  4726. // follows: pScfsi[ch][scfsi_band], where - ch is
  4727. // the channel index. 0 stands for channel 1, 1
  4728. // stands for channel 2. - scfsi_band is the scale
  4729. // factor selection group number. Group 0 includes
  4730. // SFBs 0-5, group 1 includes SFBs 6-10, group 2
  4731. // includes SFBs 11-15, and group 3 includes SFBs
  4732. // 16-20.
  4733. // granule Index of the current granule. 0 stands for
  4734. // granule 1, 1 stands for granule 2.
  4735. // channel Index of the current channel. 0 stands for
  4736. // channel 1, 1 stands for channel 2.
  4737. //
  4738. // Returns:
  4739. // ippStsNoErr Indicates no error.
  4740. // ippStsNullPtrErr Indicates an error when one of the specified
  4741. // pointers is NULL.
  4742. // ippStsMP3SideInfoErr Indicates an error when
  4743. // pFrameHeader->id == IPP_MP3_ID_MPEG1 and
  4744. // pSideInfo->sfCompress exceeds [0..15];
  4745. // pFrameHeader->id == IPP_MP3_ID_MPEG2 and
  4746. // pSideInfo->sfCompress exceeds [0..511].
  4747. // ippStsMP3FrameHeaderErr Indicates an error when pFrameHeader->id ==
  4748. // IPP_MP3_ID_MPEG2 and pFrameHeader->modeExt
  4749. // exceeds [0..3].
  4750. */
  4751. IPPAPI(IppStatus, ippsPackScaleFactors_MP3_8s1u, (
  4752. const Ipp8s* pSrcScaleFactor,
  4753. Ipp8u** ppBitStream,
  4754. int* pOffset,
  4755. IppMP3FrameHeader* pFrameHeader,
  4756. IppMP3SideInfo* pSideInfo,
  4757. int* pScfsi,
  4758. int granule,
  4759. int channel))
  4760. /* ///////////////////////////////////////////////////////////////////////////
  4761. // Name:
  4762. // ippsHuffmanEncode_MP3_32s1u
  4763. //
  4764. // Purpose:
  4765. // Applies lossless Huffman encoding to quantized samples and packs
  4766. // output into bitstream buffer.
  4767. //
  4768. // Parameters:
  4769. // pSrcIx Pointer to the quantized samples of a granule.
  4770. // The buffer length is 576. Depending on which
  4771. // type of joint coding has been applied, if any,
  4772. // the coefficient vector might be associated with
  4773. // either the L, R, M, S, and/or intensity channel
  4774. // of the quantized spectral data.
  4775. // ppBitStream Updated bitstream byte pointer. The parameter *
  4776. // ppBitStream points to the first available
  4777. // bitstream buffer byte immediately following the
  4778. // bits generated by the spectral coefficient
  4779. // Huffman encoder and sequentially written into
  4780. // the stream buffer. The Huffman symbol bits are
  4781. // formatted according to the bitstream syntax
  4782. // given in ISO/IEC 11172-3.
  4783. // pOffset Updated bitstream bit pointer. The pOffset
  4784. // parameter indexes the next available bit in the
  4785. // next available byte referenced by the updated
  4786. // bitstream buffer byte pointer ppBitStream. This
  4787. // parameter is valid within the range of 0 to 7,
  4788. // where 0 corresponds to the most significant bit
  4789. // and 7 corresponds to the least significant bit.
  4790. // pFrameHeader Pointer to the IppMP3FrameHeader structure for
  4791. // this frame. The Huffman encoder uses the frame
  4792. // header id field in connection with the side
  4793. // information (as described below) to compute the
  4794. // Huffman table region boundaries for the big
  4795. // value spectral region. The Huffman encoder
  4796. // ignores all other frame header fields.Only
  4797. // MPEG-1 (id = 1) is supported.
  4798. // pSideInfo Pointer to the IppMP3SideInfo structure for the
  4799. // current granule and channel. The structure
  4800. // elements bigVals, pTableSelect[0]-[2], reg0Cnt,
  4801. // and reg1Cnt are used to control coding of
  4802. // spectral coefficients in the big value region.
  4803. // The structure element cnt1TabSel is used to
  4804. // select the appropriate Huffman table for the (-1,
  4805. // 0,+1)-valued 4-tuples in the count1 region. For
  4806. // detailed descriptions of all side information
  4807. // elements, see the structure definition header
  4808. // file.
  4809. // count1Len The count1 region length specifier. Indicates
  4810. // the number of spectral samples for the current
  4811. // granule/channel above the big value region that
  4812. // can be combined into 4-tuples in which all
  4813. // elements are of magnitude less than or equal to 1.
  4814. // hufSize Huffman coding bit allocation specifier.
  4815. // Indicates the total number of bits that are
  4816. // required to represent the Huffman-encoded
  4817. // quantized spectral coefficients for the current
  4818. // granule/channel in both the bigvals and count1
  4819. // regions. Whenever necessary, this bit count
  4820. // should be augmented to include the number of
  4821. // bits required to manage the bit reservoir. For
  4822. // frames in which the reservoir has reached
  4823. // maximum capacity, the surplus bits are expended
  4824. // by padding with additional bits the Huffman
  4825. // representation of the spectral samples. The
  4826. // HufSize result returned by the function
  4827. // Quantize_MP3_32s_I reflects these padding
  4828. // requirements. That is, HufSize[i] is equal to
  4829. // the total of the number of bits required for
  4830. // Huffman symbols and the number of padding bits.
  4831. //
  4832. // Returns:
  4833. // ippStsNoErr Indicates no error.
  4834. // ippStsNullPtrErr Indicates an error when one of the specified
  4835. // pointers is NULL.
  4836. // ippStsBadArgErr Indicates an error when pOffset exceeds [0,7].
  4837. // ippStsMP3SideInfoErr Indicates an error when pSideInfo->bigVals*2>
  4838. // IPP_MP3_GRANULE_LEN (pSideInfo->reg0Cnt +
  4839. // pSideInfo->reg1Cnt + 2) >= 23, pSideInfo->
  4840. // cnt1TabSel exceeds [0,1], pSideInfo->pTableSelect
  4841. // [i] exceeds [0..31].
  4842. // ippStsMP3FrameHeader Indicates an error when
  4843. // pFrameHeader->id != IPP_MP3_ID_MPEG1
  4844. // pFrameHeader->layer != 1
  4845. // pFrameHeader->samplingFreq exceeds [0..2].
  4846. */
  4847. IPPAPI(IppStatus, ippsHuffmanEncode_MP3_32s1u, (
  4848. Ipp32s *pSrcIx,
  4849. Ipp8u **ppBitStream,
  4850. int *pOffset,
  4851. IppMP3FrameHeader *pFrameHeader,
  4852. IppMP3SideInfo *pSideInfo,
  4853. int count1Len,
  4854. int hufSize))
  4855. /* ///////////////////////////////////////////////////////////////////////////
  4856. // Name:
  4857. // ippsBitReservoirInit_MP3
  4858. //
  4859. // Purpose:
  4860. // Initializes all elements of the bit reservoir state structure.
  4861. //
  4862. // Parameters:
  4863. // pFrameHeader Pointer to the IppMP3FrameHeader structure that
  4864. // contains the header information associated with
  4865. // the current frame. The frame header fields
  4866. // bitRate and id, bit rate index and algorithm
  4867. // identification, respectively, must contain valid
  4868. // data prior to calling the function
  4869. // BitReservoirInit_MP3 since both are used to
  4870. // generate the bit reservoir initialization
  4871. // parameters. All other frame header parameters
  4872. // are ignored by the bit reservoir initialization
  4873. // function. Only MPEG-1 (id = 1) is supported.
  4874. // pDstBitResv Pointer to the initialized IppMP3BitReservoir
  4875. // state structure. The structure element
  4876. // BitsRemaining is initialized as 0. The structure
  4877. // element MaxBits is initialized to reflect the
  4878. // maximum number of bits that can be contained in
  4879. // the reservoir at the start of any given frame.
  4880. // The appropriate value of MaxBits is directly
  4881. // determined by the selected algorithm (MPEG-1 or
  4882. // MPEG-2) and the stream bit rate indicated by the
  4883. // rate index parameter pFrameHeader.bitRate.
  4884. //
  4885. // Returns:
  4886. // ippStsNoErr Indicates no error.
  4887. // ippStsNullPtrErr Indicates an error when pDstBitResv or
  4888. // pFrameHeader is NULL.
  4889. // ippStsMP3FrameHeaderErr Indicates an error when
  4890. // pFrameHeader->id != IPP_MP3_ID_MPEG1.
  4891. */
  4892. IPPAPI(IppStatus, ippsBitReservoirInit_MP3, (
  4893. IppMP3BitReservoir* pDstBitResv,
  4894. IppMP3FrameHeader* pFrameHeader))
  4895. /* ///////////////////////////////////////////////////////////////////////////
  4896. // Name:
  4897. // ippsMDCTFwd_MP3_32s
  4898. //
  4899. // Purpose:
  4900. // Implements stage 2 of the MP3 hybrid analysis filterbank.
  4901. //
  4902. // Parameters:
  4903. // pSrc Pointer to the start of the 576-element block
  4904. // PQMF analysis output vector containing 18
  4905. // consecutive blocks of 32 subband samples that
  4906. // are indexed as follows:
  4907. // pDstS[32*i+sb], where i = 0,1,...,17 is time series
  4908. // index, sb = 0,1,...,31 is the subband index. All
  4909. // coefficients are represented using the Q7.24
  4910. // format.
  4911. // pDst Pointer to the 576-element spectral coefficient
  4912. // output vector generated by the analysis
  4913. // filterbank.
  4914. // blockType Block type indicator: 0 stands for normal block;
  4915. // 1 stands for start block; 2 stands for short
  4916. // block; 3 stands for stop block.
  4917. // mixedBlock Mixed block indicator: 0 stands for not mixed; 1
  4918. // stands for mixed.
  4919. // pFrameHeader Pointer to the IppMP3FrameHeader structure that
  4920. // contains the header associated with the current
  4921. // frame. Only MPEG-1 (id = 1) is supported.
  4922. // pOverlapBuf Pointer to the MDCT overlap buffer that contains
  4923. // a copy of the most recent 576-element block of
  4924. // PQMF bank outputs. Prior to processing a new
  4925. // audio stream with the analysis filterbank, all
  4926. // elements of the buffer pOverlapBuf should be
  4927. // initialized to the constant value 0.
  4928. //
  4929. // Returns:
  4930. // ippStsNoErr Indicates no error.
  4931. // ippStsNullPtrErr Indicates an error when one of the pointers
  4932. // pSrcXs, pDstXr, pFrameHeader, or pOverlapBuf is
  4933. // NULL.
  4934. */
  4935. IPPAPI(IppStatus, ippsMDCTFwd_MP3_32s, (
  4936. const Ipp32s* pSrc,
  4937. Ipp32s* pDst,
  4938. int blockType,
  4939. int mixedBlock,
  4940. IppMP3FrameHeader* pFrameHeader,
  4941. Ipp32s* pOverlapBuf))
  4942. /* ///////////////////////////////////////////////////////////////////////////
  4943. // Name:
  4944. // ippsMDCTInvWindow_MP3_32s
  4945. //
  4946. // Purpose:
  4947. // Performs 36 or 18 points IMDCT and windowing depending on blockType.
  4948. // Parameters:
  4949. // pSrc pointer to the input buffer which is the
  4950. // output of alias reduction.
  4951. //
  4952. // pDst pointer to the output buffer of IMDCT for
  4953. // long block (36 points) and short block (18 points).
  4954. //
  4955. // blockType Block type indicator: 0 stands for normal window,
  4956. // 1 stands for start block,
  4957. // 2 stands for short block,
  4958. // 3 stands for stop block.
  4959. //
  4960. // Returns:
  4961. // ippStsNoErr Indicates no error.
  4962. // ippStsNullPtrErr Indicates an error when one of the pointers
  4963. // pSrc or pDst is NULL.
  4964. */
  4965. IPPAPI(IppStatus, ippsMDCTInvWindow_MP3_32s,(
  4966. Ipp32s* pSrc,
  4967. Ipp32s* pDst,
  4968. int blockType))
  4969. /* ///////////////////////////////////////////////////////////////////////////
  4970. // Name:
  4971. // ippsAnalysisPQMF_MP3_16s32s
  4972. //
  4973. // Purpose:
  4974. // Implements stage 1 of MP3 hybrid analysis filterbank.
  4975. //
  4976. // Parameters:
  4977. // pSrcPcm Pointer to the start of the buffer containing
  4978. // the input PCM audio vector. The samples conform
  4979. // to the following guidelines: - must be in 16-bit,
  4980. // signed, little-endian, Q15 format; - most
  4981. // recent 480 (512-32) samples should be contained
  4982. // in the vector pSrcPcm[pcmMode*i], where i = 0,1
  4983. // ,..,479; - samples associated with the current
  4984. // granule should be contained in the vector pSrcPcm
  4985. // [pcmMode*j], where j = 480,481,..,1055.
  4986. // pcmMode PCM mode flag. Communicates to PQMF filterbank
  4987. // the type of input PCM vector organization to
  4988. // expect: - pcmMode = 1 denotes non-interleaved
  4989. // PCM input samples; - pcmMode = 2 denotes
  4990. // interleaved PCM input samples.
  4991. // pDstS Pointer to the start of the 576-element block
  4992. // PQMF analysis output vector containing 18
  4993. // consecutive blocks of 32 subband samples under
  4994. // the following index: pDstXs[32*i + sb], where i
  4995. // = 0,1,...,17 is time series index sb = 0,1,...,31 is
  4996. // the subband index.
  4997. //
  4998. // Returns:
  4999. // ippStsNoErr Indicates no error.
  5000. // ippStsNullPtrErr Indicates an error when pSrcPcm or pDstXs is NULL.
  5001. // ippStsErr Indicates an error when pcmMode exceeds [1,2].
  5002. */
  5003. IPPAPI(IppStatus, ippsAnalysisPQMF_MP3_16s32s, (
  5004. const Ipp16s* pSrcPcm,
  5005. Ipp32s* pDstS,
  5006. int mode))
  5007. /* ///////////////////////////////////////////////////////////////////////////
  5008. // Name:
  5009. // ippsJointStereoEncode_MP3_32s_I
  5010. //
  5011. // Purpose:
  5012. // Transforms independent left and right channel spectral coefficient
  5013. // vectors into combined mid/side and/or intensity mode coefficient
  5014. // vectors suitable for quantization.
  5015. //
  5016. // Parameters:
  5017. // pSrcDstXrL Pointer to the 576-element joint stereo spectral
  5018. // coefficient output vector associated with the M
  5019. // channel, as well as the intensity coded
  5020. // coefficients above the intensity lower SFB bound.
  5021. // All elements are represented using the Q5.26
  5022. // format.
  5023. // pSrcDstXrR Pointer to the 576-element joint stereo spectral
  5024. // coefficient output vector associated with the S
  5025. // channel. All elements are represented using the
  5026. // Q5.26 format.
  5027. // pDstScaleFactorR Pointer to the vector of scalefactors associated
  5028. // with one granule of the right/S channel. If
  5029. // intensity coding has been enabled by the
  5030. // psychoacoustic model above a certain SFB lower
  5031. // bound, as indicated by the frame header and the
  5032. // vector pointed to by pIsSfbBound, the function
  5033. // StereoEncode_MP3_32s_I updates with the
  5034. // appropriate scalefactors those elements of
  5035. // pDstScaleFactorR[] that are associated with
  5036. // intensity coded scale factor bands. Other SFB
  5037. // entries in the scale factor vector remain
  5038. // unmodified. The length of the vector referenced
  5039. // by pDstScaleFactorR varies as a function of
  5040. // block size. The vector contains 21 elements for
  5041. // long block granules, or 36 elements for short
  5042. // block granules.
  5043. // pFrameHeader Pointer to the IppMP3FrameHeader structure that
  5044. // contains the header information associated with
  5045. // the current frame. Upon function entry, the
  5046. // structure fields samplingFreq, id, mode, and
  5047. // modeExt should contain, respectively, the sample
  5048. // rate associated with the current input audio,
  5049. // the algorithm id (MPEG-1 or MPEG-2), and the
  5050. // joint stereo coding commands generated by the
  5051. // psychoacoustic model. All other pFrameHeader
  5052. // fields are ignored. Only MPEG-1 (id = 1) is
  5053. // supported.
  5054. // pSideInfo Pointer to the pair of IppMP3SideInfo structures
  5055. // associated with the channel pair to be jointly
  5056. // encoded. The number of elements in the set is 2,
  5057. // and ordering of the set elements is as follows:
  5058. // pSideInfo[0] describes channel 1, and pSideInfo[1
  5059. // ] describes channel 2. Upon the function entry,
  5060. // the blockType side information fields for both
  5061. // channels should reflect the analysis modes (
  5062. // short or long block) selected by the
  5063. // psychoacoustic model on each channel. All other
  5064. // fields in the pSideInfo[0] and pSideInfo[1]
  5065. // structures are ignored.
  5066. // pIsSfbBound Pointer to the list of intensity coding SFB
  5067. // lower bounds for both channels of the current
  5068. // granule above which all L/R channel spectral
  5069. // coefficients are combined into an intensity-
  5070. // coded representation. The number of elements
  5071. // depends on the block type associated with the
  5072. // current granule. For short blocks, the SFB
  5073. // bounds are represented in the following order:
  5074. // pIsSfbBound[0] describes block 1, pIsSfbBound[1]
  5075. // describes block 2, and pIsSfbBound[2] describes
  5076. // block 3. For long blocks, only a single SFB
  5077. // lower bound decision is required and is
  5078. // represented in pIsSfbBound[0]. If both MS and
  5079. // intensity coding are enabled, the SFB intensity
  5080. // coding lower bound simultaneously represents the
  5081. // upper bound SFB for MS coding. If only MS coding
  5082. // is enabled, the SFB bound represents the lowest
  5083. // non-MS SFB.
  5084. //
  5085. // Returns:
  5086. // ippStsNoErr Indicates no error.
  5087. // ippStsNullPtrErr Indicates an error when at least one of the
  5088. // pointers pSrcDstXrL, pSrcDstXrR, pDstScaleFactorR,
  5089. // pFrameHeader, pSideInfo, or pIsSfbBound is NULL.
  5090. // ippStsMP3SideInfoErr Indicates an error if pSideInfo[0].blockType!=
  5091. // pSideInfo[1].blockType when IS or MS is used.
  5092. */
  5093. IPPAPI(IppStatus, ippsJointStereoEncode_MP3_32s_I, (
  5094. Ipp32s* pSrcDstXrL,
  5095. Ipp32s* pSrcDstXrR,
  5096. Ipp8s* pDstScaleFactorR,
  5097. IppMP3FrameHeader* pFrameHeader,
  5098. IppMP3SideInfo* pSideInfo,
  5099. int* pIsSfbBound))
  5100. /* ///////////////////////////////////////////////////////////////////////////
  5101. // Name:
  5102. // ippsQuantize_MP3_32s_I
  5103. //
  5104. // Purpose:
  5105. // Quantizes spectral coefficients generated by analysis filterbank.
  5106. //
  5107. // Parameters:
  5108. // pSrcDstXrIx Pointer to the output set of quantized spectral
  5109. // coefficient vectors. These are suitable for
  5110. // input to the Huffman encoder. The coefficients
  5111. // are indexed as follows: pSrcDstXrIx[gr*1152 + ch*
  5112. // 576 + i] for stereophonic and dual-mono input
  5113. // sources, and pSrcDstXrIx[gr*576 + i] for single
  5114. // channel input sources, where: - i=0,1,...,575 is
  5115. // the spectral coefficient index; - gr is the
  5116. // granule index. 0 stands for granule 1, 1 stands
  5117. // for granule 2; - ch is the channel index. 0
  5118. // stands for channel 1, 1 stands for channel 2.
  5119. // pDstScaleFactor Pointer to the output set of
  5120. // scalefactors generated during the quantization
  5121. // process. These scalefactors determine the
  5122. // quantizer granularity. Scale factor vector
  5123. // lengths depend on the block mode associated with
  5124. // each granule. The order of the elements is: 1. (
  5125. // granule 1, channel 1); 2. (granule 1, channel 2);
  5126. // 3. (granule 2, channel 1); 4. (granule 2,
  5127. // channel 2). Given this general organization, the
  5128. // side information for each granule/channel in
  5129. // conjunction with the flags contained in the vector
  5130. // pDstScfsi can be used to determine the precise
  5131. // scale factor vector indices and lengths.
  5132. // pDstScfsi Pointer to the output vector of scale factor
  5133. // selection information. This vector contains a
  5134. // set of binary flags that indicate whether or not
  5135. // scalefactors are shared across granules of a
  5136. // frame within predefined scale factor selection
  5137. // groups. For example, bands 0,1,2,3,4,5 form one
  5138. // group; bands 6,7,8,9,10 form a second group, as
  5139. // defined in ISO/IEC 11172-3. The vector is
  5140. // indexed as follows: pDstScfsi[ch][scfsi_band],
  5141. // where: - ch is the channel index. 0 stands for
  5142. // channel 1, 1 stands for channel 2; - scfsi_band
  5143. // is the scale factor selection group number.
  5144. // Group 0 includes SFBs 0-5, group 1 includes SFBs
  5145. // 6-10, group 2 includes SFBs 11-15, and group 3
  5146. // includes SFBs 16-20.
  5147. // pDstCount1Len Pointer to an output vector of count1 region
  5148. // length specifiers. For the purposes of Huffman
  5149. // coding spectral coefficients of a higher
  5150. // frequency than the bigvals region, the count1
  5151. // parameter indicates the size of the region in
  5152. // which spectral samples can be combined into
  5153. // quadruples for which all elements are of
  5154. // magnitude less than or equal to 1. The vector
  5155. // contains 2*nchan, elements and is indexed as
  5156. // follows: pDstCount1Len[gr*nchan + ch], where: -
  5157. // gr is the granule index. 0 stands for granule 1,
  5158. // 1 stands for granule 2; - nchan is the number of
  5159. // channels; - ch is the channel index. 0 stands
  5160. // for channel 1, 1 stands for channel 2.
  5161. // pDstHufSize Pointer to an output vector of Huffman coding
  5162. // bit allocation specifiers. For each granule/
  5163. // channel, the specifiers indicate the total
  5164. // number of Huffman bits required to represent the
  5165. // quantized spectral coefficients in the bigvals
  5166. // and count1 regions. Whenever necessary, each
  5167. // HufSize bit count is augmented to include the
  5168. // number of bits required to manage the bit
  5169. // reservoir. For frames in which the reservoir has
  5170. // reached the maximum capacity, the quantizer
  5171. // expends the surplus bits by padding with
  5172. // additional bits the Huffman representation of
  5173. // the spectral samples. The HufSize result
  5174. // returned by the quantizer reflects these padding
  5175. // requirements. That is, HufSize[i] is equal to
  5176. // the sum of the number of bits required for
  5177. // Huffman symbols and the number of padding bits.
  5178. // The vector contains 2*nchan, elements and is
  5179. // indexed as follows: pDstHufSize[gr*nchan+ch],
  5180. // where: - gr is the granule index. 0 stands for
  5181. // granule 1, 1 stands for granule 2; - nchan is
  5182. // the number of channels; - ch is the channel index.
  5183. // 0 stands for channel 1, 1 stands for channel 2.
  5184. // pFrameHeader Pointer to the IppMP3FrameHeader structure that
  5185. // contains the header information associated with
  5186. // the current frame. Upon the function entry, the
  5187. // structure fields samplingFreq, id, mode, and
  5188. // modeExt should contain, respectively, the sample
  5189. // rate associated with the current input audio,
  5190. // the algorithm id, that is, MPEG-1 or MPEG-2, and
  5191. // the joint stereo coding commands generated by
  5192. // the psychoacoustic model. All other *
  5193. // pFrameHeader fields are ignored. Only MPEG-1 (id
  5194. // = 1) is supported.
  5195. // pSideInfo Pointer to the set of IppMP3SideInfo structures
  5196. // associated with all granules and channels. The
  5197. // set should contain 2*nchan, elements and should
  5198. // be indexed as follows: pSideInfo[gr*nchan + ch],
  5199. // where: - gr is the granule index. 0 stands for
  5200. // granule 1, 1 stands for granule 2; - nchan is
  5201. // the number of channels; - ch is the channel index.
  5202. // 0 stands for channel 1, 1 stands for channel 2.
  5203. // Upon the function entry, in all set elements
  5204. // the structure fields blockType, mixedBlock, and
  5205. // winSwitch should contain, respectively, the
  5206. // block type indicator (start, short, or stop),
  5207. // filter bank mixed block analysis mode specifier,
  5208. // and window switching flags (normal
  5209. // or blockType) associated with the current
  5210. // input audio. All other *pSideInfo fields are
  5211. // ignored upon the function entry and updated upon
  5212. // function exit, as described below under the
  5213. // description of output arguments.
  5214. // pPsychoInfo Pointer to the first element in a set of
  5215. // PsychoacousticModelTwoAnalysis structures
  5216. // associated with the current frame. Each set
  5217. // member contains the MSR and PE estimates for one
  5218. // channel of one granule. The set should contain 2*
  5219. // nchan, elements and is indexed as: pPsychoaInfo[
  5220. // gr*nchan+ ch], where: - gr is the granule index.
  5221. // 0 stands for granule 1, 1 stands for granule 2;
  5222. // - nchan is the number of channels; - ch is the
  5223. // channel index. 0 stands for channel 1, 1 stands
  5224. // for channel 2.
  5225. // pFramePsyState Pointer to the first element in a set of
  5226. // IppMP3PsychoacousticModelTwoState structures
  5227. // that contains the psychoacoustic model state
  5228. // information associated with both the current
  5229. // frame and next frame. The number of elements in
  5230. // the set is equal to the number of channels
  5231. // contained in the input audio. That is, a
  5232. // separate analysis is carried for each channel.
  5233. // The quantizer uses the frame type look ahead
  5234. // information nextBlockType to manage the bit
  5235. // reservoir. All other structure elements are
  5236. // ignored by the quantizer.
  5237. // pResv Pointer to the updated IppMP3BitReservoir
  5238. // structure. The quantizer updates the
  5239. // BitsRemaining field to add or remove bits as
  5240. // necessary. All other fields are unmodified by
  5241. // the quantizer.
  5242. // meanBits The number of bits allocated on an average basis
  5243. // for each frame of spectral coefficients and
  5244. // scalefactors given the target bit rate (kilobits
  5245. // per second) specified in the frame header. This
  5246. // number excludes the bits allocated for the frame
  5247. // header and side information. The quantizer uses
  5248. // meanBits as a target allocation for the current
  5249. // frame. Given perceptual bit allocation
  5250. // requirements greater than this target, the
  5251. // quantizer makes use of the surplus bits held in
  5252. // the bit reservoir to satisfy frame-instantaneous
  5253. // demands. Similarly, given perceptual bit
  5254. // allocation requirements below this target, the
  5255. // quantizer will store surplus bits in the bit
  5256. // reservoir for use by future frames.
  5257. // pIsSfbBound Pointer to the list of SFB lower bounds above
  5258. // which all L/R channel spectral coefficients have
  5259. // been combined into an intensity-coded
  5260. // representation. The number of valid elements
  5261. // pointed to by pIsSfbBound
  5262. // depends upon the block types associated with the
  5263. // granules of the current frame. In particular,
  5264. // the list of SFB bounds pointed to by pIsSfbBound
  5265. // is indexed as follows: pIsSfbBound[3*gr] for
  5266. // long block granules, and pIsSfbBound[3*gr + w]
  5267. // for short block granules, where: - gr is the
  5268. // granule index. 0 stands for granule 1, 1 stands
  5269. // for granule 2; - w is the block index. 0 stands
  5270. // for block 1, 1 stands for block 2, 2 stands for
  5271. // block 3. For example, given short-block analysis
  5272. // in granule 1 followed by long block analysis in
  5273. // granule 2, the list of SFB bounds would be
  5274. // expected in the following order: pIsSfbBound[] =
  5275. // {granule 1/block 1, granule 1/block 2, granule 1/
  5276. // block 2, granule 2/long block}. If a granule is
  5277. // configured for long block analysis, then only a
  5278. // single SFB lower bound decision is expected,
  5279. // whereas three are expected for short block
  5280. // granules. If both MS and intensity coding have
  5281. // been enabled, then the SFB intensity coding
  5282. // lower bound simultaneously represents the upper
  5283. // bound SFB for MS coding. If only MS coding has
  5284. // been enabled, then the SFB bound represents the
  5285. // lowest non-MS SFB.
  5286. // pWorkBuffer Pointer to the workspace buffer internally used
  5287. // by the quantizer for storage of intermediate
  5288. // results and other temporary data. The buffer
  5289. // length should be at least 2880 bytes, that is,
  5290. // 720 words of 32-bits each.
  5291. //
  5292. // Returns:
  5293. // ippStsNoErr Indicates no error.
  5294. // ippStsNullPtrErr Indicates an error when pSrcDstXrIx,
  5295. // pDstScaleFactor, pDstScfsi, pDstCount1Len,
  5296. // pDstHufSize, pFrameHeader, pSideInfo, pPsychInfo,
  5297. // pFramePsyState, pResv, pIsSfbBound, or
  5298. // pWorkBuffer is NULL.
  5299. // ippStsMP3SideInfo Indicates an error when pSideInfo->winSwitch and
  5300. // pSideInfo->mixedBlock are both defined.
  5301. // ippStsMP3FrameHeaderErr Indicates an error when pFrameHeader->samplingFreq or
  5302. // pFrameHeader->id is not correct.
  5303. */
  5304. IPPAPI(IppStatus, ippsQuantize_MP3_32s_I, (
  5305. Ipp32s* pSrcDstXrIx,
  5306. Ipp8s* pDstScaleFactor,
  5307. int* pDstScfsi,
  5308. int* pDstCount1Len,
  5309. int* pDstHufSize,
  5310. IppMP3FrameHeader* pFrameHeader,
  5311. IppMP3SideInfo* pSideInfo,
  5312. IppMP3PsychoacousticModelTwoAnalysis* pPsychInfo,
  5313. IppMP3PsychoacousticModelTwoState* pFramePsyState,
  5314. IppMP3BitReservoir* pResv,
  5315. int meanBits,
  5316. int* pIsSfbBound,
  5317. Ipp32s* pWorkBuffer))
  5318. /* ///////////////////////////////////////////////////////////////////////////
  5319. // Name:
  5320. // ippsPsychoacousticModelTwo_MP3_16s
  5321. //
  5322. // Purpose:
  5323. // Implements ISO/IEC 11172-3 psychoacoustic model recommendation 2 to
  5324. // estimate masked threshold and perceptual entropy associated with a
  5325. // block of PCM audio input.
  5326. //
  5327. // Parameters:
  5328. // pSrcPcm Pointer to the start of the buffer containing
  5329. // the input PCM audio vector, the samples of which
  5330. // should conform to the following format
  5331. // specification: - 16-bits per sample, signed,
  5332. // little-endian, Q15; - pSrcPcm buffer should
  5333. // contain 1152 samples, that is, two granules of
  5334. // 576 samples each, if the parameter pFrameHeader
  5335. // -> mode has the value 1 (mono), or 2304 samples,
  5336. // that is, two granules of 576 samples each, if
  5337. // the parameter pFrameHeader -> mode has the value
  5338. // of 2 (stereo, dual mono); - In the stereophonic
  5339. // case, the PCM samples associated with the left
  5340. // and right channels should be organized according
  5341. // to the pcmMode flag. Failure to satisfy any of
  5342. // the above PCM format and/or buffer requirements
  5343. // results in undefined model outputs.
  5344. // pDstPsyInfo Pointer to the first element in a
  5345. // set of PsychoacousticModelTwoAnalysis structures.
  5346. // Each set member contains the MSR and PE
  5347. // estimates for one granule. The number of
  5348. // elements in the set is equal to the number of
  5349. // channels, with the outputs arranged as follows: (
  5350. // Analysis[0] = granule 1, channel 1), (...Analysis[1]
  5351. // = granule 1, channel 2), (...Analysis[2] =
  5352. // granule 2, channel 1), (...Analysis[3] = granule 2,
  5353. // channel 2).
  5354. // pDstIsSfbBound If intensity coding has been enabled,
  5355. // pDstIsSfbBound points to the list of SFB lower
  5356. // bounds above which all spectral coefficients
  5357. // should be processed by the joint stereo
  5358. // intensity coding module. Since the intensity
  5359. // coding SFB lower bound is block-specific, the
  5360. // number of valid elements pointed to by
  5361. // pDstIsSfbBound varies depending upon the
  5362. // individual block types associated with each
  5363. // granule. In particular, the list of SFB bounds
  5364. // is indexed as follows: - pIsSfbBound[3*gr] for
  5365. // long block granules; - pIsSfbBound[3*gr + w] for
  5366. // short block granules, where gr is the granule
  5367. // index (0 indicates granule 1 and 1 indicates
  5368. // granule 2), and w is the block index (0
  5369. // indicates block 1, 1 indicates block 2, 2
  5370. // indicates block 3). For example, given short-
  5371. // block analysis in granule 1 followed by long
  5372. // block analysis in granule 2, the list of SFB:
  5373. // bounds would be generated in the following order
  5374. // pIsSfbBound[] = {granule 1/block 1, granule 1/
  5375. // block 2, granule 1/block 2, granule 2/long
  5376. // block}. Only one SFB lower bound decision is
  5377. // generated for long block granules, whereas three
  5378. // are generated for short block granules. If both
  5379. // MS and intensity coding are enabled, then the
  5380. // SFB intensity coding lower bound simultaneously
  5381. // represents the upper bound SFB for MS coding. If
  5382. // only MS coding has been enabled, then the SFB
  5383. // bound represents the lowest non-MS SFB.
  5384. // pDstSideInfo Pointer to the updated set of IppMP3SideInfo
  5385. // structures associated with all granules and
  5386. // channels. The model updates the following fields
  5387. // in all set elements: blockType, winSwitch, and
  5388. // mixedBlock. The number of elements in the set is
  5389. // equal to 2 times the number of channels.
  5390. // Ordering of the set elements is the same as
  5391. // pDstPsyInfo.
  5392. // pFrameHeader Pointer to the IppMP3FrameHeader structure that
  5393. // contains the header associated with the current
  5394. // frame. The samplingFreq, id, and mode fields of
  5395. // the structure pFrameHeader control the behavior
  5396. // of the psychoacoustic model. All three fields
  5397. // must be appropriately initialized prior to
  5398. // calling this function. All other frame header
  5399. // fields are ignored. Only MPEG-1 (id = 1) is
  5400. // supported.
  5401. // pFramePsyState Pointer to the first element in a set of
  5402. // IppMP3PsychoacousticModelTwoState structures
  5403. // that contains the updated psychoacoustic model
  5404. // state information associated with both the
  5405. // current frame and next frame. The number of
  5406. // elements in the set is equal to the number of
  5407. // channels contained in the input audio. That is,
  5408. // a separate analysis is carried for each channel.
  5409. // Prior to encoding a new audio stream, all
  5410. // elements of the psychoacoustic model state
  5411. // structure pPsychoacousticModelState should be
  5412. // initialized to contain the value 0. In the
  5413. // signal processing domain, this could be
  5414. // accomplished using the function ippsZero_16s as
  5415. // follows: ippsZero_16s ((Ipp16s *)
  5416. // pPsychoacousticModelState,sizeof(
  5417. // IppMP3PsychoacousticModelTwoState)
  5418. // /sizeof(Ipp16s)).
  5419. // pcmMode PCM mode flag. Communicates the psychoacoustic
  5420. // model which type of PCM vector organization to
  5421. // expect: - pcmMode = 1 denotes non-interleaved
  5422. // PCM input samples, that is, pSrcPcm[0..1151]
  5423. // contains the input samples associated with the
  5424. // left channel, and pSrcPcm[1152..2303] contains
  5425. // the input samples associated with the right
  5426. // channel; - pcmMode = 2 denotes interleaved PCM
  5427. // input samples, that is, pSrcPcm[2*i] and pSrcPcm[
  5428. // 2*i+1] contain the samples associated with the
  5429. // left and right channels, respectively, where i =
  5430. // 0,1,...,1151. You can also use appropriately
  5431. // typecast elements ippMP3NonInterleavedPCM and
  5432. // ippMP3InterleavedPCM of the enumerated type
  5433. // IppMP3PcmMode as an alternative to the constants
  5434. // 1 and 2 for pcmMode.
  5435. // pWorkBuffer Pointer to the workspace buffer internally used
  5436. // by the psychoacoustic model for storage of
  5437. // intermediate results and other temporary data.
  5438. // The buffer length must be at least 25,200 bytes,
  5439. // that is, 6300 elements of type Ipp32s.
  5440. //
  5441. // Returns:
  5442. // ippStsNoErr Indicates no error.
  5443. // ippStsNullPtrErr Indicates an error when at least one of the
  5444. // pointers pSrcPcm, pDstPsyInfo, pDstSideInfo,
  5445. // pDstIsSfbBound, pFrameHeader, pDstPsyState, or
  5446. // pWorkBuffer is NULL.
  5447. */
  5448. IPPAPI(IppStatus, ippsPsychoacousticModelTwo_MP3_16s, (
  5449. const Ipp16s* pSrcPcm,
  5450. IppMP3PsychoacousticModelTwoAnalysis* pDstPsyInfo,
  5451. int* pDstIsSfbBound,
  5452. IppMP3SideInfo* pDstSideInfo,
  5453. IppMP3FrameHeader* pFrameHeader,
  5454. IppMP3PsychoacousticModelTwoState* pFramePsyState,
  5455. int pcmMode,
  5456. Ipp32s* pWorkBuffer))
  5457. /* ///////////////////////////////////////////////////////////////////////////
  5458. // Name:
  5459. // ippsSynthesisFilter_PQMF_MP3_32f
  5460. //
  5461. // Purpose:
  5462. // Transforms PQMF MP3-processed subband signals into time domain samples.
  5463. //
  5464. // Parameters:
  5465. // pSrc Array of pointers, holds PQMF MP3-processed subband
  5466. // signals.
  5467. // pDst Pointer to the output vector, holds time domain
  5468. // output samples.
  5469. // pFilterSpec Pointer to the IppsFilterSpec_PQMF_MP3 specification
  5470. // structure.
  5471. // mode Flag that indicates whether or not MP3 audio
  5472. // output channels should be interleaved.
  5473. // 1 - indicates not interleaved,
  5474. // 2 - indicates interleaved.
  5475. //
  5476. // Returns:
  5477. // ippStsNoErr Indicates no error.
  5478. // ippStsNullPtrErr Indicates an error when any of the specified
  5479. // pointers is NULL.
  5480. // ippStsBadArgErr Indicates an error when mode exceeds [1, 2].
  5481. // ippStsContextMatchErr Indicates an error when the identifier
  5482. // pFilterSpec is incorrect.
  5483. */
  5484. IPPAPI(IppStatus, ippsSynthesisFilter_PQMF_MP3_32f, (const Ipp32f *pSrc,
  5485. Ipp32f *pDst,
  5486. const IppsFilterSpec_PQMF_MP3 *pFilterSpec,
  5487. int mode))
  5488. /* ///////////////////////////////////////////////////////////////////////////
  5489. // Name:
  5490. // ippsSynthesisFilterGetSize_PQMF_MP3_32f
  5491. //
  5492. // Purpose:
  5493. // Returns size of IppsFilterSpec_PQMF_MP3 specification structure.
  5494. //
  5495. // Parameters:
  5496. // pSizeSpec Address of the IppsFilterSpec_PQMF_MP3 specification
  5497. // structure size value in bytes.
  5498. //
  5499. // Returns:
  5500. // ippStsNoErr Indicates no error.
  5501. // ippStsNullPtrErr Indicates an error when pSizeSpec is NULL.
  5502. */
  5503. IPPAPI(IppStatus, ippsSynthesisFilterGetSize_PQMF_MP3_32f, (int *pSizeSpec))
  5504. /* ///////////////////////////////////////////////////////////////////////////
  5505. // Name:
  5506. // ippsSynthesisFilterInit_PQMF_MP3_32f
  5507. //
  5508. // Purpose:
  5509. // Initializes synthesis specification structure.
  5510. //
  5511. // Parameters:
  5512. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_PQMF_MP3
  5513. // specification structure is written. Only the
  5514. // main function uses this structure.
  5515. // pMemSpec Pointer to the area for the IppsFilterSpec_PQMF_MP3
  5516. // specification structure.
  5517. //
  5518. // Returns:
  5519. // ippStsNoErr Indicates no error.
  5520. // ippStsNullPtrErr Indicates an error when any of the specified
  5521. // pointers is NULL.
  5522. */
  5523. IPPAPI(IppStatus, ippsSynthesisFilterInit_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 **ppFilterSpec,
  5524. Ipp8u *pMemSpec))
  5525. /* ///////////////////////////////////////////////////////////////////////////
  5526. // Name:
  5527. // ippsSynthesisFilterInitAlloc_PQMF_MP3_32f
  5528. //
  5529. // Purpose:
  5530. // Allocate memory for synthesis specification structure and initializes it.
  5531. //
  5532. // Parameters:
  5533. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_PQMF_MP3
  5534. // specification structure is written.
  5535. //
  5536. // Returns:
  5537. // ippStsNoErr Indicates no error.
  5538. // ippStsNullPtrErr Indicates an error when ppFilterSpec is NULL.
  5539. */
  5540. IPPAPI(IppStatus, ippsSynthesisFilterInitAlloc_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 **ppFilterSpec))
  5541. /* ///////////////////////////////////////////////////////////////////////////
  5542. // Name:
  5543. // ippsSynthesisFilterFree_PQMF_MP3_32f
  5544. //
  5545. // Purpose:
  5546. // Frees memory allocated for internal IppsFilterSpec_PQMF_MP3 structure.
  5547. //
  5548. // Parameters:
  5549. // pFilterSpec Pointer to the IppsFilterSpec_PQMF_MP3 specification
  5550. // structure.
  5551. //
  5552. // Returns:
  5553. // ippStsNoErr Indicates no error.
  5554. // ippStsNullPtrErr Indicates an error when pFilterSpec is NULL.
  5555. // ippStsContextMatchErr Indicates an error when the identifier
  5556. // pFilterSpec is incorrect.
  5557. */
  5558. IPPAPI(IppStatus, ippsSynthesisFilterFree_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 *pFilterSpec))
  5559. /* ///////////////////////////////////////////////////////////////////////////
  5560. // Name:
  5561. // ippsAnalysisFilter_PQMF_MP3_32f
  5562. //
  5563. // Purpose:
  5564. // Transforms time domain samples into PQMF MP3-processed subband signals .
  5565. //
  5566. // Parameters:
  5567. // pSrc Array of pointers, holds PQMF MP3-processed subband
  5568. // signals.
  5569. // pDst Pointer to the output vector, holds time domain
  5570. // output samples.
  5571. // pFilterSpec Pointer to the IppsFilterSpec_PQMF_MP3 specification
  5572. // structure.
  5573. // mode Flag that indicates whether or not MP3 audio
  5574. // output channels should be interleaved.
  5575. // 1 - indicates not interleaved,
  5576. // 2 - indicates interleaved.
  5577. //
  5578. // Returns:
  5579. // ippStsNoErr Indicates no error.
  5580. // ippStsNullPtrErr Indicates an error when any of the specified
  5581. // pointers is NULL.
  5582. // ippStsBadArgErr Indicates an error when mode exceeds [1, 2].
  5583. // ippStsContextMatchErr Indicates an error when the identifier
  5584. // pFilterSpec is incorrect.
  5585. */
  5586. IPPAPI(IppStatus, ippsAnalysisFilter_PQMF_MP3_32f, (const Ipp32f *pSrc,
  5587. Ipp32f *pDst,
  5588. const IppsFilterSpec_PQMF_MP3 *pFilterSpec,
  5589. int mode))
  5590. /* ///////////////////////////////////////////////////////////////////////////
  5591. // Name:
  5592. // ippsAnalysisFilterGetSize_PQMF_MP3_32f
  5593. //
  5594. // Purpose:
  5595. // Returns size of IppsFilterSpec_PQMF_MP3 specification structure.
  5596. //
  5597. // Parameters:
  5598. // pSizeSpec Address of the IppsFilterSpec_PQMF_MP3 specification
  5599. // structure size value in bytes.
  5600. //
  5601. // Returns:
  5602. // ippStsNoErr Indicates no error.
  5603. // ippStsNullPtrErr Indicates an error when pSizeSpec is NULL.
  5604. */
  5605. IPPAPI(IppStatus, ippsAnalysisFilterGetSize_PQMF_MP3_32f, (int *pSizeSpec))
  5606. /* ///////////////////////////////////////////////////////////////////////////
  5607. // Name:
  5608. // ippsAnalysisFilterInit_PQMF_MP3_32f
  5609. //
  5610. // Purpose:
  5611. // Initializes analysis specification structure.
  5612. //
  5613. // Parameters:
  5614. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_PQMF_MP3
  5615. // specification structure is written. Only the
  5616. // main function uses this structure.
  5617. // pMemSpec Pointer to the area for the IppsFilterSpec_PQMF_MP3
  5618. // specification structure.
  5619. //
  5620. // Returns:
  5621. // ippStsNoErr Indicates no error.
  5622. // ippStsNullPtrErr Indicates an error when any of the specified
  5623. // pointers is NULL.
  5624. */
  5625. IPPAPI(IppStatus, ippsAnalysisFilterInit_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 **ppFilterSpec,
  5626. Ipp8u *pMemSpec))
  5627. /* ///////////////////////////////////////////////////////////////////////////
  5628. // Name:
  5629. // ippsAnalysisFilterInitAlloc_PQMF_MP3_32f
  5630. //
  5631. // Purpose:
  5632. // Allocate memory for analysis specification structure and initializes it.
  5633. //
  5634. // Parameters:
  5635. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_PQMF_MP3
  5636. // specification structure is written.
  5637. //
  5638. // Returns:
  5639. // ippStsNoErr Indicates no error.
  5640. // ippStsNullPtrErr Indicates an error when ppFilterSpec is NULL.
  5641. */
  5642. IPPAPI(IppStatus, ippsAnalysisFilterInitAlloc_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 **ppFilterSpec))
  5643. /* ///////////////////////////////////////////////////////////////////////////
  5644. // Name:
  5645. // ippsAnalysisFilterFree_PQMF_MP3_32f
  5646. //
  5647. // Purpose:
  5648. // Frees memory allocated for internal IppsFilterSpec_PQMF_MP3 structure.
  5649. //
  5650. // Parameters:
  5651. // pFilterSpec Pointer to the IppsFilterSpec_PQMF_MP3 specification
  5652. // structure.
  5653. //
  5654. // Returns:
  5655. // ippStsNoErr Indicates no error.
  5656. // ippStsNullPtrErr Indicates an error when pFilterSpec is NULL.
  5657. // ippStsContextMatchErr Indicates an error when the identifier
  5658. // pFilterSpec is incorrect.
  5659. */
  5660. IPPAPI(IppStatus, ippsAnalysisFilterFree_PQMF_MP3_32f, (IppsFilterSpec_PQMF_MP3 *pFilterSpec))
  5661. /* ///////////////////////////////////////////////////////////////////////////
  5662. // Name:
  5663. // ippsSynthesisFilter_DTS_32f
  5664. //
  5665. // Purpose:
  5666. // Transforms QMF DTS processed subband signals into time domain samples.
  5667. //
  5668. // Parameters:
  5669. // pSrc Array of pointers, holds QMF DTS processed subband
  5670. // signals.
  5671. // pDst Pointer to the output vector, holds time domain
  5672. // output samples.
  5673. // pFilterSpec Pointer to the IppsFilterSpec_DTS_32f specification
  5674. // structure.
  5675. // filtType Flag, indicates filter bank.
  5676. // IPPAC_DTS_PERFECT - perfect reconstruction
  5677. // IPPAC_DTS_NONPERFECT - nonperfect reconstruction.
  5678. //
  5679. // Returns:
  5680. // ippStsNoErr Indicates no error.
  5681. // ippStsNullPtrErr Indicates an error when any of the specified
  5682. // pointers is NULL.
  5683. // ippStsBadArgErr Indicates an error when filtType is neither
  5684. // IPPAC_DTS_PERFECT nor IPPAC_DTS_NONPERFECT.
  5685. // ippStsContextMatchErr Indicates an error when the identifier
  5686. // pFilterSpec is incorrect.
  5687. */
  5688. IPPAPI(IppStatus, ippsSynthesisFilter_DTS_32f, (const Ipp32f *pSrc,
  5689. Ipp32f *pDst,
  5690. Ipp32s filt_type,
  5691. const IppsFilterSpec_DTS_32f *pFilterSpec))
  5692. /* ///////////////////////////////////////////////////////////////////////////
  5693. // Name:
  5694. // ippsSynthesisFilterGetSize_DTS_32f
  5695. //
  5696. // Purpose:
  5697. // Returns size of IppsFilterSpec_DTS_32f specification structure.
  5698. //
  5699. // Parameters:
  5700. // pSizeSpec Address of the IppsFilterSpec_DTS_32f specification
  5701. // structure size value in bytes.
  5702. //
  5703. // Returns:
  5704. // ippStsNoErr Indicates no error.
  5705. // ippStsNullPtrErr Indicates an error when pSizeSpec is NULL.
  5706. */
  5707. IPPAPI(IppStatus, ippsSynthesisFilterGetSize_DTS_32f, (int *pSizeSpec))
  5708. /* ///////////////////////////////////////////////////////////////////////////
  5709. // Name:
  5710. // ippsSynthesisFilterInit_DTS_32f
  5711. //
  5712. // Purpose:
  5713. // Initializes DTS synthesis specification structure.
  5714. //
  5715. // Parameters:
  5716. // pFilterSpec Pointer to the IppsFilterSpec_DTS_32f
  5717. // specification structure.
  5718. //
  5719. // Returns:
  5720. // ippStsNoErr Indicates no error.
  5721. // ippStsNullPtrErr Indicates an error when any of the specified
  5722. // pointers is NULL.
  5723. */
  5724. IPPAPI(IppStatus, ippsSynthesisFilterInit_DTS_32f, (IppsFilterSpec_DTS_32f *pFilterSpec))
  5725. /* ///////////////////////////////////////////////////////////////////////////
  5726. // Name:
  5727. // ippsSynthesisFilterInitAlloc_DTS_32f
  5728. //
  5729. // Purpose:
  5730. // Allocate memory for synthesis specification structure and initializes it.
  5731. //
  5732. // Parameters:
  5733. // ppFilterSpec Pointer to where pointer to the IppsFilterSpec_DTS_32f
  5734. // specification structure is written.
  5735. //
  5736. // Returns:
  5737. // ippStsNoErr Indicates no error.
  5738. // ippStsNullPtrErr Indicates an error when ppFilterSpec is NULL.
  5739. */
  5740. IPPAPI(IppStatus, ippsSynthesisFilterInitAlloc_DTS_32f, (IppsFilterSpec_DTS_32f **ppFilterSpec))
  5741. /* ///////////////////////////////////////////////////////////////////////////
  5742. // Name:
  5743. // ippsSynthesisFilterFree_DTS_32f
  5744. //
  5745. // Purpose:
  5746. // Frees memory allocated for internal IppsFilterSpec_DTS_32f structure.
  5747. //
  5748. // Parameters:
  5749. // pFilterSpec Pointer to the IppsFilterSpec_DTS_32f specification
  5750. // structure.
  5751. //
  5752. // Returns:
  5753. // ippStsNoErr Indicates no error.
  5754. // ippStsNullPtrErr Indicates an error when pFilterSpec is NULL.
  5755. // ippStsContextMatchErr Indicates an error when the identifier
  5756. // pFilterSpec is incorrect.
  5757. */
  5758. IPPAPI(IppStatus, ippsSynthesisFilterFree_DTS_32f, (IppsFilterSpec_DTS_32f *pFilterSpec))
  5759. #ifdef __cplusplus
  5760. }
  5761. #endif
  5762. #if defined (_IPP_STDCALL_CDECL)
  5763. #undef _IPP_STDCALL_CDECL
  5764. #define __stdcall __cdecl
  5765. #endif
  5766. #endif /* #if !defined(__IPPAC_H__ ) || defined(_OWN_BLDPCS ) */