ippdc.h 135 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996
  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) 2004-2009 Intel Corporation. All Rights Reserved.
  8. //
  9. // Intel(R) Performance Primitives
  10. // Data Compression Library (ippDC)
  11. //
  12. */
  13. #if !defined( __IPPDC_H__ ) || defined( _OWN_BLDPCS )
  14. #define __IPPDC_H__
  15. #if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall)
  16. #define _IPP_STDCALL_CDECL
  17. #undef __stdcall
  18. #endif
  19. #ifndef __IPPDEFS_H__
  20. #include "ippdefs.h"
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /********************* Data Structures and Macro ****************************/
  26. #if !defined( _OWN_BLDPCS )
  27. /*
  28. // VLC
  29. */
  30. typedef struct {
  31. Ipp32s value; /* current value */
  32. Ipp32s code; /* the real bits code for the index */
  33. Ipp32s length; /* the bit length of the value */
  34. } IppsVLCTable_32s;
  35. #endif /* _OWN_BLDPCS */
  36. /* /////////////////////////////////////////////////////////////////////////////
  37. ////////////////////////////////////////////////////////////////////////////////
  38. // Functions declarations
  39. ////////////////////////////////////////////////////////////////////////////////
  40. ///////////////////////////////////////////////////////////////////////////// */
  41. /* /////////////////////////////////////////////////////////////////////////////
  42. // Name: ippdcGetLibVersion
  43. // Purpose: getting of the library version
  44. // Returns: the structure of information about version
  45. // of ippDC library
  46. // Parameters:
  47. //
  48. // Notes: not necessary to release the returned structure
  49. */
  50. IPPAPI( const IppLibraryVersion*, ippdcGetLibVersion, (void) )
  51. /* Run Length Encoding */
  52. /* /////////////////////////////////////////////////////////////////////////////
  53. // Name: ippsEncodeRLE_8u
  54. // Purpose: Performs the RLE encoding
  55. //
  56. // Parameters:
  57. // pSrc Pointer to the source vector
  58. // pSrcLen Pointer to the length of source vector on input,
  59. // pointer to the size of remainder on output
  60. // pDst Pointer to the destination vector
  61. // pDstLen Pointer to the size of destination buffer on input,
  62. // pointer to the resulting length of the destination vector
  63. // on output.
  64. // Return:
  65. // ippStsNullPtrErr One or several pointer(s) is NULL
  66. // ippStsSizeErr Lengths of the source/destination vector are less
  67. // or equal zero
  68. // ippStsDstSizeLessExpected The size of destination vector less expected
  69. // ippStsNoErr No errors
  70. //
  71. */
  72. IPPAPI(IppStatus, ippsEncodeRLE_8u, ( Ipp8u** ppSrc, int* pSrcLen,
  73. Ipp8u* pDst, int* pDstLen ))
  74. /* /////////////////////////////////////////////////////////////////////////////
  75. // Name: ippsDecodeRLE_8u
  76. // Purpose: Performs the RLE decoding
  77. //
  78. // Parameters:
  79. // pSrc Pointer to the source vector
  80. // pSrcLen Pointer to the length of source vector on input,
  81. // pointer to the size of remainder on output
  82. // pDst Pointer to the destination vector
  83. // pDstLen Pointer to the size of destination buffer on input,
  84. // pointer to the resulting length of the destination vector
  85. // on output.
  86. // Return:
  87. // ippStsNullPtrErr One or several pointer(s) is NULL
  88. // ippStsSizeErr Lengths of the source/destination vector are less
  89. // or equal zero
  90. // ippStsDstSizeLessExpected The size of destination vector less expected
  91. // ippStsSrcDataErr The source vector contains unsupported data
  92. // ippStsNoErr No errors
  93. //
  94. */
  95. IPPAPI(IppStatus, ippsDecodeRLE_8u, ( Ipp8u** ppSrc, int* pSrcLen,
  96. Ipp8u* pDst, int* pDstLen ))
  97. /* Move To Front */
  98. #if !defined ( _OWN_BLDPCS )
  99. struct MTFState_8u;
  100. typedef struct MTFState_8u IppMTFState_8u;
  101. #endif
  102. /* /////////////////////////////////////////////////////////////////////////////
  103. // Name: ippsMTFInitAlloc_8u
  104. // Purpose: Allocates necessary memory and initializes structure for
  105. // the MTF transform
  106. //
  107. // Parameters:
  108. // pMTFState Pointer to the structure containing parameters for
  109. // the MTF transform
  110. //
  111. // Return:
  112. // ippStsNullPtrErr Pointer to structure is NULL
  113. // ippMemAllocErr Can't allocate memory for pMTFState
  114. // ippStsNoErr No errors
  115. //
  116. */
  117. IPPAPI(IppStatus, ippsMTFInitAlloc_8u, ( IppMTFState_8u** ppMTFState ))
  118. /* /////////////////////////////////////////////////////////////////////////////
  119. // Name: ippsMTFInit_8u
  120. // Purpose: Initializes parameters for the MTF transform
  121. //
  122. // Parameters:
  123. // pMTFState Pointer to the structure containing parameters for
  124. // the MTF transform
  125. //
  126. // Return:
  127. // ippStsNullPtrErr Pointer to structure is NULL
  128. // ippStsNoErr No errors
  129. //
  130. */
  131. IPPAPI(IppStatus, ippsMTFInit_8u, ( IppMTFState_8u* pMTFState ))
  132. /* /////////////////////////////////////////////////////////////////////////////
  133. // Name: ippsMTFGetSize_8u
  134. // Purpose: Computes the size of necessary memory (in bytes) for
  135. // structure of the MTF transform
  136. //
  137. // Parameters:
  138. // pMTFStateSize Pointer to the computed size of structure
  139. //
  140. // Return:
  141. // ippStsNullPtrErr Pointer is NULL
  142. // ippStsNoErr No errors
  143. //
  144. */
  145. IPPAPI(IppStatus, ippsMTFGetSize_8u, ( int* pMTFStateSize ))
  146. /* /////////////////////////////////////////////////////////////////////////////
  147. // Name: ippsMTFFree_8u
  148. // Purpose: Frees allocated memory for MTF transform structure
  149. //
  150. // Parameters:
  151. // pMTFState Pointer to the structure containing parameters for
  152. // the MTF transform
  153. //
  154. */
  155. IPPAPI(void, ippsMTFFree_8u, ( IppMTFState_8u* pMTFState ))
  156. /* /////////////////////////////////////////////////////////////////////////////
  157. // Name: ippsMTFFwd_8u
  158. // Purpose: Performs the forward MTF transform
  159. //
  160. // Parameters:
  161. // pSrc Pointer to the source vector
  162. // pDst Pointer to the destination vector
  163. // len Length of source/destination vectors
  164. // pMTFState Pointer to the structure containing parameters for
  165. // the MTF transform
  166. // Return:
  167. // ippStsNullPtrErr One or several pointer(s) is NULL
  168. // ippStsSizeErr Length of the source vector is less or equal zero
  169. // ippStsNoErr No errors
  170. //
  171. */
  172. IPPAPI(IppStatus, ippsMTFFwd_8u, ( const Ipp8u* pSrc, Ipp8u* pDst, int len,
  173. IppMTFState_8u* pMTFState ))
  174. /* /////////////////////////////////////////////////////////////////////////////
  175. // Name: ippsMTFInv_8u
  176. // Purpose: Performs the inverse MTF transform
  177. //
  178. // Parameters:
  179. // pSrc Pointer to the source vector
  180. // pDst Pointer to the destination vector
  181. // len Length of source/destination vectors
  182. // pMTFState Pointer to the structure containing parameters for
  183. // the MTF transform
  184. // Return:
  185. // ippStsNullPtrErr One or several pointer(s) is NULL
  186. // ippStsSizeErr Length of the source vector is less or equal zero
  187. // ippStsNoErr No errors
  188. //
  189. */
  190. IPPAPI(IppStatus, ippsMTFInv_8u, ( const Ipp8u* pSrc, Ipp8u* pDst, int len,
  191. IppMTFState_8u* pMTFState ))
  192. /* Burrows - Wheeler Transform */
  193. /* /////////////////////////////////////////////////////////////////////////////
  194. // Name: ippsBWTFwdGetSize_8u
  195. // Purpose: Computes the size of necessary memory (in bytes) for
  196. // additional buffer for the forward BWT transform
  197. //
  198. // Parameters:
  199. // wndSize Window size for the BWT transform
  200. // pBWTFwdBuffSize Pointer to the computed size of buffer
  201. //
  202. // Return:
  203. // ippStsNullPtrErr Pointer is NULL
  204. // ippStsNoErr No errors
  205. //
  206. */
  207. IPPAPI(IppStatus, ippsBWTFwdGetSize_8u, ( int wndSize, int* pBWTFwdBuffSize ))
  208. /* /////////////////////////////////////////////////////////////////////////////
  209. // Name: ippsBWTFwd_8u
  210. // Purpose: Performs the forward BWT transform
  211. //
  212. // Parameters:
  213. // pSrc Pointer to the source vector
  214. // pDst Pointer to the destination vector
  215. // len Length of source/destination vectors
  216. // index Pointer to the index of first position for
  217. // the inverse BWT transform
  218. // pBWTFwdBuff Pointer to the additional buffer
  219. //
  220. // Return:
  221. // ippStsNullPtrErr One or several pointer(s) is NULL
  222. // ippStsSizeErr Length of source/destination vectors is less or equal zero
  223. // ippStsNoErr No errors
  224. //
  225. */
  226. IPPAPI(IppStatus, ippsBWTFwd_8u, ( const Ipp8u* pSrc, Ipp8u* pDst, int len,
  227. int* index, Ipp8u* pBWTFwdBuff ))
  228. /* /////////////////////////////////////////////////////////////////////////////
  229. // Name: ippsBWTInvGetSize_8u
  230. // Purpose: Computes the size of necessary memory (in bytes) for
  231. // additional buffer for the inverse BWT transform
  232. //
  233. // Parameters:
  234. // wndSize Window size for the BWT transform
  235. // pBWTInvBuffSize Pointer to the computed size of buffer
  236. //
  237. // Return:
  238. // ippStsNullPtrErr Pointer is NULL
  239. // ippStsNoErr No errors
  240. //
  241. */
  242. IPPAPI(IppStatus, ippsBWTInvGetSize_8u, ( int wndSize, int* pBWTInvBuffSize ))
  243. /* /////////////////////////////////////////////////////////////////////////////
  244. // Name: ippsBWTInv_8u
  245. // Purpose: Performs the inverse BWT transform
  246. //
  247. // Parameters:
  248. // pSrc Pointer to the source vector
  249. // pDst Pointer to the destination vector
  250. // len Length of source/destination vectors
  251. // index Index of first position for the inverse BWT transform
  252. // pBWTInvBuff Pointer to the additional buffer
  253. //
  254. // Return:
  255. // ippStsNullPtrErr One or several pointer(s) is NULL
  256. // ippStsSizeErr Length of source/destination vectors is less or
  257. // equal zero or index greater or equal srcLen
  258. // ippStsNoErr No errors
  259. //
  260. */
  261. IPPAPI(IppStatus, ippsBWTInv_8u, ( const Ipp8u* pSrc, Ipp8u* pDst, int len,
  262. int index, Ipp8u* pBWTInvBuff ))
  263. /* /////////////////////////////////////////////////////////////////////////////
  264. // Name: ippsBWTGetSize_SmallBlock_8u
  265. // Purpose: Computes the size of necessary memory (in bytes) for
  266. // additional buffer for the forward/inverse BWT transform
  267. //
  268. // Parameters:
  269. // wndSize Window size for the BWT transform
  270. // pBWTBuffSize Pointer to the computed size of buffer
  271. //
  272. // Return:
  273. // ippStsNullPtrErr Pointer is NULL
  274. // ippStsSizeErr wndSize less or equal 0 or more than 32768
  275. // ippStsNoErr No errors
  276. //
  277. */
  278. IPPAPI(IppStatus, ippsBWTGetSize_SmallBlock_8u, ( int wndSize, int* pBuffSize ))
  279. /* /////////////////////////////////////////////////////////////////////////////
  280. // Name: ippsBWTFwd_SmallBlock_8u
  281. // Purpose: Performs the forward BWT transform. This function is
  282. // destined for processing of small blocks <= 32768
  283. //
  284. // Parameters:
  285. // pSrc Pointer to the source vector
  286. // pDst Pointer to the destination vector
  287. // len Length of source/destination vectors
  288. // index Pointer to the index of first position for
  289. // the inverse BWT transform
  290. // pBWTBuff Pointer to the additional buffer
  291. //
  292. // Return:
  293. // ippStsNullPtrErr One or several pointer(s) is NULL
  294. // ippStsSizeErr Length of vectors is less or equal 0 or more than 32768
  295. // ippStsNoErr No errors
  296. //
  297. */
  298. IPPAPI(IppStatus, ippsBWTFwd_SmallBlock_8u, ( const Ipp8u* pSrc, Ipp8u* pDst,
  299. int len, int* index,
  300. Ipp8u* pBWTBuff ))
  301. /* /////////////////////////////////////////////////////////////////////////////
  302. // Name: ippsBWTInv_SmallBlock_8u
  303. // Purpose: Performs the inverse BWT transform. This function is
  304. // destined for processing of small blocks <= 32768
  305. //
  306. // Parameters:
  307. // pSrc Pointer to the source vector
  308. // pDst Pointer to the destination vector
  309. // len Length of source/destination vectors
  310. // index Index of first position for the inverse BWT transform
  311. // pBWTBuff Pointer to the additional buffer
  312. //
  313. // Return:
  314. // ippStsNullPtrErr One or several pointer(s) is NULL
  315. // ippStsSizeErr Length of source/destination vectors is less or
  316. // equal 0 or more than 32768 or index greater or equal srcLen
  317. // ippStsNoErr No errors
  318. //
  319. */
  320. IPPAPI(IppStatus, ippsBWTInv_SmallBlock_8u, ( const Ipp8u* pSrc, Ipp8u* pDst,
  321. int len, int index,
  322. Ipp8u* pBWTBuff ))
  323. /* Huffman Coding */
  324. #if !defined ( _OWN_BLDPCS )
  325. struct HuffState_8u;
  326. typedef struct HuffState_8u IppHuffState_8u;
  327. #endif
  328. /* /////////////////////////////////////////////////////////////////////////////
  329. // Name: ippsEncodeHuffInit_8u
  330. // Purpose: Initializes structure for Huffman encoding
  331. //
  332. // Parameters:
  333. // freqTable Table of symbols' frequencies
  334. // pHuffState Pointer to the structure containing parameters for
  335. // Huffman coding
  336. //
  337. // Return:
  338. // ippStsNullPtrErr One or several pointer(s) is NULL
  339. // ippStsFreqTableErr Invalid freqTable
  340. // ippStsMaxLenHuffCodeErr Max length of Huffman code more expected
  341. // ippStsNoErr No errors
  342. //
  343. */
  344. IPPAPI(IppStatus, ippsEncodeHuffInit_8u, ( const int freqTable[256],
  345. IppHuffState_8u* pHuffState ))
  346. /* /////////////////////////////////////////////////////////////////////////////
  347. // Name: ippsHuffGetSize_8u
  348. // Purpose: Computes the size of necessary memory (in bytes) for
  349. // structure of Huffman coding
  350. //
  351. // Parameters:
  352. // pHuffStateSize Pointer to the computed size of structure
  353. //
  354. // Return:
  355. // ippStsNullPtrErr Pointer is NULL
  356. // ippStsNoErr No errors
  357. //
  358. */
  359. IPPAPI(IppStatus, ippsHuffGetSize_8u, ( int* pHuffStateSize ))
  360. /* /////////////////////////////////////////////////////////////////////////////
  361. // Name: ippsEncodeHuffInitAlloc_8u
  362. // Purpose: Allocates necessary memory and initializes structure for
  363. // Huffman encoding
  364. //
  365. // Parameters:
  366. // freqTable Table of symbols' frequencies
  367. // pHuffState Pointer to the structure containing parameters for
  368. // Huffman coding
  369. //
  370. // Return:
  371. // ippStsNullPtrErr One or several pointer(s) is NULL
  372. // ippMemAllocErr Can't allocate memory for pHuffState
  373. // ippStsFreqTableErr Invalid freqTable
  374. // ippStsMaxLenHuffCodeErr Max length of Huffman code more expected
  375. // ippStsNoErr No errors
  376. //
  377. */
  378. IPPAPI(IppStatus, ippsEncodeHuffInitAlloc_8u, ( const int freqTable[256],
  379. IppHuffState_8u** ppHuffState ))
  380. /* /////////////////////////////////////////////////////////////////////////////
  381. // Name: ippsHuffFree_8u
  382. // Purpose: Frees allocated memory for Huffman coding structure
  383. //
  384. // Parameters:
  385. // pHuffState Pointer to the structure containing parameters for
  386. // Huffman coding
  387. //
  388. */
  389. IPPAPI(void, ippsHuffFree_8u, ( IppHuffState_8u* pHuffState ))
  390. /* /////////////////////////////////////////////////////////////////////////////
  391. // Name: ippsEncodeHuffOne_8u
  392. // Purpose: Performs Huffman encoding of the one source element
  393. //
  394. // Parameters:
  395. // src Source element
  396. // pDst Pointer to the destination vector
  397. // dstOffsetBits Offset in the destination vector, starting with high bit
  398. // pHuffState Pointer to the structure containing parameters for
  399. // Huffman coding
  400. // Return:
  401. // ippStsNullPtrErr One or several pointer(s) is NULL
  402. // ippStsCodeLenTableErr Invalid codeLenTable
  403. // ippStsSizeErr dstOffsetBits less than 0 or more than 7
  404. // ippStsNoErr No errors
  405. //
  406. */
  407. IPPAPI(IppStatus, ippsEncodeHuffOne_8u, ( Ipp8u src, Ipp8u* pDst, int dstOffsetBits,
  408. IppHuffState_8u* pHuffState ))
  409. /* /////////////////////////////////////////////////////////////////////////////
  410. // Name: ippsEncodeHuff_8u
  411. // Purpose: Performs Huffman encoding
  412. //
  413. // Parameters:
  414. // pSrc Pointer to the source vector
  415. // srcLen Length of source vector
  416. // pDst Pointer to the destination vector
  417. // pDstLen Pointer to the resulting length of the destination vector
  418. // on output.
  419. // pHuffState Pointer to the structure containing parameters for
  420. // Huffman coding
  421. // Return:
  422. // ippStsNullPtrErr One or several pointer(s) is NULL
  423. // ippStsSizeErr Length of the source vector is less or equal zero
  424. // ippStsNoErr No errors
  425. //
  426. */
  427. IPPAPI(IppStatus, ippsEncodeHuff_8u, ( const Ipp8u* pSrc, int srcLen,
  428. Ipp8u* pDst, int* pDstLen,
  429. IppHuffState_8u* pHuffState ))
  430. /* /////////////////////////////////////////////////////////////////////////////
  431. // Name: ippsEncodeHuffFinal_8u
  432. // Purpose: Flushes remainder after Huffman encoding
  433. //
  434. // Parameters:
  435. // pDst Pointer to the destination vector
  436. // pDstLen Pointer to the resulting length of the destination vector
  437. // on output.
  438. // pHuffState Pointer to the structure containing parameters for
  439. // Huffman coding
  440. // Return:
  441. // ippStsNullPtrErr One or several pointer(s) is NULL
  442. // ippStsNoErr No errors
  443. //
  444. */
  445. IPPAPI(IppStatus, ippsEncodeHuffFinal_8u, ( Ipp8u* pDst, int* pDstLen,
  446. IppHuffState_8u* pHuffState ))
  447. /* /////////////////////////////////////////////////////////////////////////////
  448. // Name: ippsHuffGetLenCodeTable_8u
  449. // Purpose: Gives back the table with lengths of Huffman codes from
  450. // pHuffState
  451. //
  452. // Parameters:
  453. // codeLenTable Destination table with lengths of Huffman codes
  454. // pHuffState Pointer to the structure containing parameters for
  455. // Huffman coding
  456. // Return:
  457. // ippStsNullPtrErr One or several pointer(s) is NULL
  458. // ippStsNoErr No errors
  459. //
  460. */
  461. IPPAPI(IppStatus, ippsHuffGetLenCodeTable_8u, ( int codeLenTable[256],
  462. IppHuffState_8u* pHuffState ))
  463. /* /////////////////////////////////////////////////////////////////////////////
  464. // Name: ippsDecodeHuffInit_8u
  465. // Purpose: Initializes structure for Huffman decoding
  466. //
  467. // Parameters:
  468. // codeLenTable Table with lengths of Huffman codes
  469. // pHuffState Pointer to the structure containing parameters for
  470. // Huffman coding
  471. //
  472. // Return:
  473. // ippStsNullPtrErr One or several pointer(s) is NULL
  474. // ippStsCodeLenTableErr Invalid codeLenTable
  475. // ippStsNoErr No errors
  476. //
  477. */
  478. IPPAPI(IppStatus, ippsDecodeHuffInit_8u, ( const int codeLenTable[256],
  479. IppHuffState_8u* pHuffState ))
  480. /* /////////////////////////////////////////////////////////////////////////////
  481. // Name: ippsDecodeHuffInitAlloc_8u
  482. // Purpose: Allocates necessary memory and initializes structure for
  483. // Huffman decoding
  484. //
  485. // Parameters:
  486. // codeLenTable Table with lengths of Huffman codes
  487. // pHuffState Pointer to the structure containing parameters for
  488. // Huffman coding
  489. //
  490. // Return:
  491. // ippStsNullPtrErr One or several pointer(s) is NULL
  492. // ippMemAllocErr Can't allocate memory for pHuffState
  493. // ippStsCodeLenTableErr Invalid codeLenTable
  494. // ippStsNoErr No errors
  495. //
  496. */
  497. IPPAPI(IppStatus, ippsDecodeHuffInitAlloc_8u, ( const int codeLenTable[256],
  498. IppHuffState_8u** ppHuffState ))
  499. /* /////////////////////////////////////////////////////////////////////////////
  500. // Name: ippsDecodeHuffOne_8u
  501. // Purpose: Performs Huffman decoding of the one destination element
  502. //
  503. // Parameters:
  504. // pSrc Pointer to the source vector
  505. // srcOffsetBits Offset in the source vector, starting with high bit
  506. // pDst Pointer to the destination vector
  507. // pHuffState Pointer to the structure containing parameters for
  508. // Huffman coding
  509. // Return:
  510. // ippStsNullPtrErr One or several pointer(s) is NULL
  511. // ippStsSizeErr srcOffsetBits less than 0 or more than 7
  512. // ippStsNoErr No errors
  513. //
  514. */
  515. IPPAPI(IppStatus, ippsDecodeHuffOne_8u, ( const Ipp8u* pSrc, int srcOffsetBits,
  516. Ipp8u* pDst, IppHuffState_8u* pHuffState ))
  517. /* /////////////////////////////////////////////////////////////////////////////
  518. // Name: ippsDecodeHuff_8u
  519. // Purpose: Performs Huffman decoding
  520. //
  521. // Parameters:
  522. // pSrc Pointer to the source vector
  523. // srcLen Length of source vector
  524. // pDst Pointer to the destination vector
  525. // pDstLen Pointer to the expected size of destination vector on input,
  526. // pointer to the resulting length of the destination vector
  527. // on output.
  528. // pHuffState Pointer to the structure containing parameters for
  529. // Huffman coding
  530. // Return:
  531. // ippStsNullPtrErr One or several pointer(s) is NULL
  532. // ippStsSizeErr Length of the source vector is less or equal zero
  533. // ippStsNoErr No errors
  534. //
  535. */
  536. IPPAPI(IppStatus, ippsDecodeHuff_8u, ( const Ipp8u* pSrc, int srcLen,
  537. Ipp8u* pDst, int* pDstLen,
  538. IppHuffState_8u* pHuffState ))
  539. /* /////////////////////////////////////////////////////////////////////////////
  540. // Name: ippsHuffGetDstBuffSize_8u
  541. // Purpose: Computes the size of necessary memory (in bytes) for
  542. // the destination buffer (for Huffman encoding/decoding)
  543. //
  544. // Parameters:
  545. // codeLenTable Table with lengths of Huffman codes
  546. // srcLen Length of source vector
  547. // pEncDstBuffSize Pointer to the computed size of the destination buffer
  548. // for Huffman encoding (value returns if pointer isn't NULL)
  549. // pDecDstBuffSize Pointer to the computed size of the destination buffer
  550. // for Huffman decoding (value returns if pointer isn't NULL)
  551. //
  552. // Return:
  553. // ippStsNullPtrErr Pointer to codeLenTable is NULL
  554. // ippStsCodeLenTableErr Invalid codeLenTable
  555. // ippStsNoErr No errors
  556. //
  557. */
  558. IPPAPI(IppStatus, ippsHuffGetDstBuffSize_8u, ( const int codeLenTable[256], int srcLen,
  559. int* pEncDstBuffSize, int* pDecDstBuffSize ))
  560. /* /////////////////////////////////////////////////////////////////////////////
  561. // Name: ippsHuffLenCodeTablePack_8u
  562. // Purpose: Packs the table with lengths of Huffman codes
  563. //
  564. // Parameters:
  565. // codeLenTable Table with lengths of Huffman codes
  566. // pDst Pointer to the destination vector
  567. // pDstLen Pointer to the size of destination buffer on input,
  568. // pointer to the resulting length of the destination vector
  569. // on output.
  570. //
  571. // Return:
  572. // ippStsNullPtrErr One or several pointer(s) is NULL
  573. // ippStsSizeErr Length of the destination vector is less, equal zero or
  574. // less expected
  575. // ippStsCodeLenTableErr Invalid codeLenTable
  576. // ippStsNoErr No errors
  577. //
  578. */
  579. IPPAPI(IppStatus, ippsHuffLenCodeTablePack_8u, ( const int codeLenTable[256],
  580. Ipp8u* pDst, int* pDstLen ))
  581. /* /////////////////////////////////////////////////////////////////////////////
  582. // Name: ippsHuffLenCodeTableUnpack_8u
  583. // Purpose: Unpacks the table with lengths of Huffman codes
  584. //
  585. // Parameters:
  586. // pSrc Pointer to the source vector
  587. // pSrcLen Pointer to the length of source vector on input,
  588. // pointer to the resulting length of the source vector
  589. // codeLenTable Table with lengths of Huffman codes
  590. //
  591. // Return:
  592. // ippStsNullPtrErr One or several pointer(s) is NULL
  593. // ippStsSizeErr Length of the source vector is less, equal zero or
  594. // less expected
  595. // ippStsNoErr No errors
  596. //
  597. */
  598. IPPAPI(IppStatus, ippsHuffLenCodeTableUnpack_8u, ( const Ipp8u* pSrc, int* pSrcLen,
  599. int codeLenTable[256] ))
  600. /* Generalized Interval Transform (GIT) functions */
  601. #if !defined ( _OWN_BLDPCS )
  602. struct GITState_8u;
  603. typedef struct GITState_8u IppGITState_8u;
  604. typedef enum {
  605. ippGITNoStrategy,
  606. ippGITLeftReorder,
  607. ippGITRightReorder,
  608. ippGITFixedOrder
  609. } IppGITStrategyHint;
  610. #endif
  611. /* /////////////////////////////////////////////////////////////////////////////
  612. // Name: ippsEncodeGITGetSize_8u
  613. // Purpose: Finds out size of GIT internal encoding state structure
  614. // in bytes
  615. //
  616. // Parameters:
  617. // maxSrcLen Max length of source vector
  618. // maxDstLen Max length of destination vector
  619. // pGITStateSize Pointer to the size of GIT internal encoding state
  620. // Return:
  621. // ippStsNullPtrErr Pointer to GITStateSize is NULL
  622. // ippStsSizeErr Bad length arguments
  623. // ippStsNoErr No errors
  624. //
  625. */
  626. IPPAPI(IppStatus, ippsEncodeGITGetSize_8u, ( int maxSrcLen, int maxDstLen,
  627. int* pGITStateSize))
  628. /* /////////////////////////////////////////////////////////////////////////////
  629. // Name: ippsEncodeGITInit_8u
  630. // Purpose: Initializes the GIT internal encoding state
  631. //
  632. // Parameters:
  633. // maxSrcLen Max length of source vector
  634. // maxDstLen Max length of destination vector
  635. // pGITState Pointer to memory allocated for GIT internal encoding
  636. // state
  637. // Return:
  638. // ippStsNullPtrErr One or several pointer(s) is NULL
  639. // ippStsSizeErr Bad size arguments
  640. // ippStsNoErr No errors
  641. //
  642. */
  643. IPPAPI(IppStatus, ippsEncodeGITInit_8u, (int maxSrcLen, int maxDstLen,
  644. IppGITState_8u* ppGITState))
  645. /* /////////////////////////////////////////////////////////////////////////////
  646. // Name: ippsEncodeGITInitAlloc_8u
  647. // Purpose: Allocates and Initializes the GIT internal encoding state
  648. //
  649. // Parameters:
  650. // maxSrcLen Max length of source vector
  651. // maxDstLen Max length of destination vector
  652. // ppGITState Pointer to pointer to GIT internal encoding state
  653. // Return:
  654. // ippStsSizeErr Bad length arguments
  655. // ippStsNoErr No errors
  656. //
  657. */
  658. IPPAPI(IppStatus, ippsEncodeGITInitAlloc_8u, (int maxSrcLen, int maxDstLen,
  659. IppGITState_8u** ppGITState))
  660. /* /////////////////////////////////////////////////////////////////////////////
  661. // Name: ippsEncodeGIT_8u
  662. // Purpose: Performs GIT encoding
  663. //
  664. // Parameters:
  665. // pSrc Pointer to the source vector
  666. // srcLen Length of source vector
  667. // pDst Pointer to the destination vector
  668. // pDstLen Pointer to the length of destination vector
  669. // strategyHint Strategy hint for lexicorgaphical reordering
  670. // pGITState Pointer to GIT internal encoding state
  671. // Return:
  672. // ippStsNullPtrErr One or several pointer(s) is NULL
  673. // ippStsSizeErr Source vector is too long, more than the value of
  674. // maxSrcLen parameter passed to ippsGITEncodeGetSize_8u
  675. // or ippsGITEncodeInitAlloc_8u
  676. // ippStsNoErr No errors
  677. //
  678. */
  679. IPPAPI(IppStatus, ippsEncodeGIT_8u, (const Ipp8u* pSrc, int srcLen, Ipp8u* pDst,
  680. int* pDstLen,
  681. IppGITStrategyHint strategyHint,
  682. IppGITState_8u* pGITState))
  683. /* /////////////////////////////////////////////////////////////////////////////
  684. // Name: ippsDecodeGITGetSize_8u
  685. // Purpose: Finds out size of GIT internal decoding state structure
  686. // in bytes
  687. //
  688. // Parameters:
  689. // maxSrcLen Max length of source vector
  690. // pGITStateSize Pointer to the size of GIT internal decoding state
  691. // Return:
  692. // ippStsNullPtrErr Pointer to GITStateSize is NULL
  693. // ippStsSizeErr Bad length arguments
  694. // ippStsNoErr No errors
  695. //
  696. */
  697. IPPAPI(IppStatus, ippsDecodeGITGetSize_8u, (int maxSrcLen, int* pGITStateSize))
  698. /* /////////////////////////////////////////////////////////////////////////////
  699. // Name: ippsDecodeGITInit_8u
  700. // Purpose: Initializes the GIT internal decoding state
  701. //
  702. // Parameters:
  703. // maxSrcLen Max length of source vector
  704. // maxDstLen Max length of destination vector
  705. // pGITState Pointer to memory allocated for GIT internal decoding
  706. // state
  707. // Return:
  708. // ippStsNullPtrErr One or several pointer(s) is NULL
  709. // ippStsSizeErr Bad size arguments
  710. // ippStsNoErr No errors
  711. //
  712. */
  713. IPPAPI(IppStatus, ippsDecodeGITInit_8u, (int maxDstLen, IppGITState_8u* pGITState))
  714. /* /////////////////////////////////////////////////////////////////////////////
  715. // Name: ippsDecodeGITInitAlloc_8u
  716. // Purpose: Allocates and Initializes the GIT internal decoding state
  717. //
  718. // Parameters:
  719. // maxSrcLen Max length of source vector
  720. // maxDstLen Max length of destination vector
  721. // ppGITState Pointer to pointer to GIT internal decoding state
  722. // Return:
  723. // ippStsNullPtrErr One or several pointer(s) is NULL
  724. // ippStsSizeErr Bad length arguments
  725. // ippStsNoErr No errors
  726. //
  727. */
  728. IPPAPI(IppStatus, ippsDecodeGITInitAlloc_8u, (int maxSrcLen, int maxDstLen,
  729. IppGITState_8u** ppGITState))
  730. /* /////////////////////////////////////////////////////////////////////////////
  731. // Name: ippsDecodeGIT_8u
  732. // Purpose: Performs GIT decoding
  733. //
  734. // Parameters:
  735. // pSrc Pointer to the source vector
  736. // srcLen Length of source vector
  737. // pDst Pointer to the destination vector
  738. // pDstLen Pointer to the length of destination vector
  739. // strategyHint Strategy hint for lexicorgaphical reordering
  740. // pGITState Pointer to GIT internal decoding state
  741. // Return:
  742. // ippStsNullPtrErr One or several pointer(s) is NULL
  743. // ippStsSizeErr Not enough memory allocated for destination buffer
  744. // ippStsNoErr No errors
  745. //
  746. */
  747. IPPAPI(IppStatus, ippsDecodeGIT_8u, (const Ipp8u* pSrc, int srcLen, Ipp8u* pDst, int* pDstLen,
  748. IppGITStrategyHint strategyHint,
  749. IppGITState_8u* pGITState))
  750. /* /////////////////////////////////////////////////////////////////////////////
  751. // Name: ippsGITFree_8u
  752. // Purpose: Frees the GIT internal decoding state
  753. //
  754. // Parameters:
  755. // pGITState Pointer to the GIT internal state
  756. //
  757. */
  758. IPPAPI(void, ippsGITFree_8u, (IppGITState_8u* pGITState))
  759. /* Ziv Lempel Storer Szymanski (LZSS) functions */
  760. #if !defined ( _OWN_BLDPCS )
  761. struct LZSSState_8u;
  762. typedef struct LZSSState_8u IppLZSSState_8u;
  763. #endif
  764. /* /////////////////////////////////////////////////////////////////////////////
  765. // Name: ippsLZSSGetSize_8u
  766. // Purpose: Finds out size of LZSS internal state structure in bytes
  767. //
  768. // Parameters:
  769. // pLZSSStateSize Pointer to the size of LZSS internal encoding state
  770. // Return:
  771. // ippStsNullPtrErr Pointer to LZSSStateSize is NULL
  772. // ippStsNoErr No errors
  773. //
  774. */
  775. IPPAPI(IppStatus, ippsLZSSGetSize_8u, ( int* pLZSSStateSize ))
  776. /* /////////////////////////////////////////////////////////////////////////////
  777. // Name: ippsEncodeLZSSInit_8u
  778. // Purpose: Initializes the LZSS internal state for encoding
  779. //
  780. // Parameters:
  781. // pLZSSState Pointer to memory allocated for LZSS internal state
  782. // Return:
  783. // ippStsNullPtrErr Pointer to internal LZSS state structure is NULL
  784. // ippStsNoErr No errors
  785. //
  786. */
  787. IPPAPI(IppStatus, ippsEncodeLZSSInit_8u, ( IppLZSSState_8u* pLZSSState ))
  788. /* /////////////////////////////////////////////////////////////////////////////
  789. // Name: ippsEncodeLZSSInitAlloc_8u
  790. // Purpose: Allocates and Initializes the LZSS internal state for encoding
  791. //
  792. // Parameters:
  793. // ppLZSSState Double pointer to LZSS internal state
  794. // Return:
  795. // ippStsNullPtrErr Double pointer to internal LZSS state structure is NULL
  796. // ippStsMemAllocErr Error occurred during memory allocation
  797. // ippStsNoErr No errors
  798. //
  799. */
  800. IPPAPI(IppStatus, ippsEncodeLZSSInitAlloc_8u, ( IppLZSSState_8u** ppLZSSState ))
  801. /* /////////////////////////////////////////////////////////////////////////////
  802. // Name: ippsEncodeLZSS_8u
  803. // Purpose: Performs LZSS encoding
  804. //
  805. // Parameters:
  806. // ppSrc Double pointer to the source vector
  807. // pSrcLen Pointer to the length of source vector
  808. // ppDst Double pointer to the destination vector
  809. // pDstLen Pointer to the length of destination vector
  810. // pLZSSState Pointer to LZSS internal state for encoding
  811. // Return:
  812. // ippStsNullPtrErr One or several pointer(s) is NULL
  813. // ippStsSizeErr Bad length arguments
  814. // ippStsDstSizeLessExpected Destination buffer is full
  815. // ippStsNoErr No errors
  816. //
  817. */
  818. IPPAPI(IppStatus, ippsEncodeLZSS_8u, ( Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst, int* pDstLen,
  819. IppLZSSState_8u* pLZSSState ))
  820. /* /////////////////////////////////////////////////////////////////////////////
  821. // Name: ippsEncodeLZSSFlush_8u
  822. // Purpose: Flushes the last few bits from the bit stream and alignes
  823. // output data on the byte boundary
  824. //
  825. // Parameters:
  826. // ppDst Double pointer to the destination vector
  827. // pDstLen Pointer to the length of destination vector
  828. // pLZSSState Pointer to the LZSS internal state for encoding
  829. // Return:
  830. // ippStsNullPtrErr One or several pointer(s) is NULL
  831. // ippStsSizeErr Bad length arguments
  832. // ippStsDstSizeLessExpected Destination buffer is full
  833. // ippStsNoErr No errors
  834. */
  835. IPPAPI(IppStatus, ippsEncodeLZSSFlush_8u, (Ipp8u** ppDst, int* pDstLen, IppLZSSState_8u* pLZSSState))
  836. /* /////////////////////////////////////////////////////////////////////////////
  837. // Name: ippsDecodeLZSSInit_8u
  838. // Purpose: Initializes the LZSS internal state for decoding
  839. //
  840. // Parameters:
  841. // pLZSSState Pointer to memory allocated for LZSS internal state
  842. // Return:
  843. // ippStsNullPtrErr Pointer to internal LZSS state structure is NULL
  844. // ippStsNoErr No errors
  845. //
  846. */
  847. IPPAPI(IppStatus, ippsDecodeLZSSInit_8u, ( IppLZSSState_8u* pLZSSState ))
  848. /* /////////////////////////////////////////////////////////////////////////////
  849. // Name: ippsDecodeLZSSInitAlloc_8u
  850. // Purpose: Allocates and Initializes the LZSS internal state for decoding
  851. //
  852. // Parameters:
  853. // ppLZSSState Double pointer to LZSS internal state for decoding
  854. // Return:
  855. // ippStsNullPtrErr Double pointer to internal LZSS state structure is NULL
  856. // ippStsMemAllocErr Error occurred during memory allocation
  857. // ippStsNoErr No errors
  858. //
  859. */
  860. IPPAPI(IppStatus, ippsDecodeLZSSInitAlloc_8u, ( IppLZSSState_8u** ppLZSSState))
  861. /* /////////////////////////////////////////////////////////////////////////////
  862. // Name: ippsDecodeLZSS_8u
  863. // Purpose: Performs LZSS decoding
  864. //
  865. // Parameters:
  866. // ppSrc Double pointer to the source vector
  867. // pSrcLen Pointer to the length of source vector
  868. // ppDst Double pointer to the destination vector
  869. // pDstLen Pointer to the length of destination vector
  870. // pLZSSState Pointer to LZSS internal state
  871. // Return:
  872. // ippStsNullPtrErr One or several pointer(s) is NULL
  873. // ippStsSizeErr Bad length arguments
  874. // ippStsDstSizeLessExpected Destination buffer is full
  875. // ippStsNoErr No errors
  876. //
  877. */
  878. IPPAPI(IppStatus, ippsDecodeLZSS_8u, ( Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  879. int* pDstLen, IppLZSSState_8u* pLZSSState ))
  880. /* /////////////////////////////////////////////////////////////////////////////
  881. // Name: ippsLZSSFree_8u
  882. // Purpose: Frees the LZSS internal state
  883. //
  884. // Parameters:
  885. // pLZSSState Pointer to the LZSS internal state for decoding
  886. //
  887. */
  888. IPPAPI(void, ippsLZSSFree_8u, ( IppLZSSState_8u* pLZSSState ))
  889. /* rfc1950, 1951, 1952 - compatible functions */
  890. #if !defined ( _OWN_BLDPCS )
  891. struct LZ77State_8u;
  892. typedef struct LZ77State_8u IppLZ77State_8u;
  893. typedef enum{
  894. IppLZ77FastCompr,
  895. IppLZ77AverageCompr,
  896. IppLZ77BestCompr
  897. } IppLZ77ComprLevel;
  898. typedef enum{
  899. IppLZ77NoChcksm,
  900. IppLZ77Adler32,
  901. IppLZ77CRC32
  902. } IppLZ77Chcksm;
  903. typedef enum {
  904. IppLZ77NoFlush,
  905. IppLZ77SyncFlush,
  906. IppLZ77FullFlush,
  907. IppLZ77FinishFlush
  908. } IppLZ77Flush;
  909. typedef struct IppLZ77Pairs_16u {
  910. Ipp16u length;
  911. Ipp16u offset;
  912. } IppLZ77Pair;
  913. typedef enum {
  914. IppLZ77StatusInit,
  915. IppLZ77StatusLZ77Process,
  916. IppLZ77StatusHuffProcess,
  917. IppLZ77StatusFinal
  918. } IppLZ77DeflateStatus;
  919. typedef enum {
  920. IppLZ77UseFixed,
  921. IppLZ77UseDynamic,
  922. IppLZ77UseStored
  923. } IppLZ77HuffMode;
  924. typedef enum {
  925. IppLZ77InflateStatusInit,
  926. IppLZ77InflateStatusHuffProcess,
  927. IppLZ77InflateStatusLZ77Process,
  928. IppLZ77InflateStatusFinal
  929. } IppLZ77InflateStatus;
  930. #endif
  931. /* /////////////////////////////////////////////////////////////////////////////
  932. // Name: ippsEncodeLZ77GetSize
  933. // Purpose: Computes the size of the internal encoding structure.
  934. //
  935. // Parameters:
  936. // pLZ77VLCStateSize Pointer to the size of the internal encoding structure.
  937. // Return:
  938. // ippStsNoErr Indicates no error.
  939. // ippStsNullPtrErr Indicates an error when the pointer pLZ77VLCStateSize is NULL.
  940. //
  941. */
  942. IPPAPI( IppStatus, ippsEncodeLZ77GetSize_8u, (int* pLZ77StateSize) )
  943. /* /////////////////////////////////////////////////////////////////////////////
  944. // Name: ippsEncodeLZ77Init
  945. // Purpose: Initializes the internal encoding structure.
  946. //
  947. // Parameters:
  948. // comprLevel Compression level.
  949. // checksum Algorithm to compute the checksum for input data.
  950. // pLZ77State Pointer to memory allocated for the internal encoding structure.
  951. // Return:
  952. // ippStsNoErr Indicates no error.
  953. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  954. // ippStsBadArgErr Indicates an error when the checksum or comprLevel parameter
  955. // has an illegal value.
  956. //
  957. */
  958. IPPAPI( IppStatus, ippsEncodeLZ77Init_8u, (IppLZ77ComprLevel comprLevel,
  959. IppLZ77Chcksm checksum, IppLZ77State_8u* pLZ77State) )
  960. /* /////////////////////////////////////////////////////////////////////////////
  961. // Name: ippsEncodeLZ77InitAlloc
  962. // Purpose: Allocates memory and initializes the internal encoding structure.
  963. //
  964. // Parameters:
  965. // comprLevel Compression level.
  966. // checksum Algorithm to compute the checksum for input data.
  967. // ppLZ77State Double pointer to the internal encoding structure.
  968. // Return:
  969. // ippStsNoErr Indicates no error.
  970. // ippStsNullPtrErr Indicates an error when the ppLZ77State pointer is NULL.
  971. // ippStsBadArgErr Indicates an error when the checksum or comprLevel parameter
  972. // has an illegal value.
  973. // ippStsMemAlloc Indicates an error when memory allocation fails.
  974. //
  975. */
  976. IPPAPI( IppStatus, ippsEncodeLZ77InitAlloc_8u, (IppLZ77ComprLevel comprLevel,
  977. IppLZ77Chcksm checksum, IppLZ77State_8u** ppLZ77State) )
  978. /* /////////////////////////////////////////////////////////////////////////////
  979. // Name: ippsEncodeLZ77
  980. // Purpose: Performs LZ77 encoding.
  981. //
  982. // Parameters:
  983. // ppSrc Double pointer to the source vector.
  984. // pSrcLen Pointer to the length of the source vector.
  985. // ppDst Double pointer to the destination vector.
  986. // pDstLen Pointer to the length of the destination vector.
  987. // flush Data-block encoding mode.
  988. // pLZ77State Pointer to the internal encoding structure.
  989. // Return:
  990. // ippStsNoErr Indicates no error.
  991. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  992. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  993. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  994. //
  995. // Note: This function searches for substring matches using the LZ77 algorithm.
  996. // The technique of sliding window support is compatible with rfc1951.
  997. //
  998. */
  999. IPPAPI( IppStatus, ippsEncodeLZ77_8u, (Ipp8u** ppSrc, int* pSrcLen, IppLZ77Pair** ppDst,
  1000. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1001. /* /////////////////////////////////////////////////////////////////////////////
  1002. // Name: ippsEncodeLZ77SelectHuffMode
  1003. // Purpose: Takes the best decision about the optimal coding strategy
  1004. // (use fixed Huffman coding or dynamic Huffman coding).
  1005. //
  1006. // Parameters:
  1007. // pSrc Pointer to the source vector.
  1008. // srcLen Length of the source vector.
  1009. // pHuffMode Pointer to the value of coding strategy.
  1010. // pLZ77State Pointer to memory allocated for the internal encoding structure.
  1011. // Return:
  1012. // ippStsNoErr Indicates no error.
  1013. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1014. //
  1015. */
  1016. IPPAPI( IppStatus, ippsEncodeLZ77SelectHuffMode_8u, (IppLZ77Pair* pSrc, int srcLen,
  1017. IppLZ77HuffMode* pHuffMode,
  1018. IppLZ77State_8u* pLZ77State) )
  1019. /* /////////////////////////////////////////////////////////////////////////////
  1020. // Name: ippsEncodeLZ77FixedHuff
  1021. // Purpose: Performs fixed Huffman coding of the LZ77 output.
  1022. //
  1023. // Parameters:
  1024. // ppSrc Double pointer to the source vector.
  1025. // pSrcLen Pointer to the length of the source vector.
  1026. // ppDst Double pointer to the destination vector.
  1027. // pDstLen Pointer to the length of the destination vector.
  1028. // flush Data-block encoding mode.
  1029. // pLZ77State Pointer to the internal encoding structure.
  1030. // Return:
  1031. // ippStsNoErr Indicates no error.
  1032. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1033. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1034. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1035. // ippStsStreamEnd Indicates a warning when the stream ends. This warning can
  1036. // be returned only when the flush value is FINISH.
  1037. //
  1038. // Note: This function produces the rfc1951 compatible code for the LZ77 output.
  1039. //
  1040. */
  1041. IPPAPI( IppStatus, ippsEncodeLZ77FixedHuff_8u, (IppLZ77Pair** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  1042. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1043. /* /////////////////////////////////////////////////////////////////////////////
  1044. // Name: ippsEncodeLZ77DynamicHuff
  1045. // Purpose: Performs dynamic Huffman coding of the LZ77 output.
  1046. //
  1047. // Parameters:
  1048. // ppSrc Double pointer to the source vector.
  1049. // pSrcLen Pointer to the length of the source vector.
  1050. // ppDst Double pointer to the destination vector.
  1051. // pDstLen Pointer to the length of the destination vector.
  1052. // flush Data-block encoding mode.
  1053. // pLZ77State Pointer to the internal encoding structure.
  1054. // Return:
  1055. // ippStsNoErr Indicates no error.
  1056. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1057. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1058. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1059. // ippStsStreamEnd Indicates a warning when the stream ends. This warning can
  1060. // be returned only when the flush value is FINISH.
  1061. //
  1062. // Note: This function produces the rfc1951 compatible code for the LZ77 output.
  1063. //
  1064. */
  1065. IPPAPI( IppStatus, ippsEncodeLZ77DynamicHuff_8u, (IppLZ77Pair** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  1066. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1067. /* /////////////////////////////////////////////////////////////////////////////
  1068. // Name: ippsEncodeLZ77StoredBlock
  1069. // Purpose: Transmits the block without compression.
  1070. //
  1071. // Parameters:
  1072. // ppSrc Double pointer to the source vector.
  1073. // pSrcLen Pointer to the length of the source vector.
  1074. // ppDst Double pointer to the destination vector.
  1075. // pDstLen Pointer to the length of the destination vector.
  1076. // flush Data-block encoding mode.
  1077. // pLZ77State Pointer to the internal decoding structure.
  1078. // Return:
  1079. // ippStsNoErr Indicates no error.
  1080. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1081. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1082. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1083. //
  1084. */
  1085. IPPAPI( IppStatus, ippsEncodeLZ77StoredBlock_8u, (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  1086. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1087. /* /////////////////////////////////////////////////////////////////////////////
  1088. // Name: ippsEncodeLZ77Flush
  1089. // Purpose: Performs writing the service information (accumulated
  1090. // checksum and total length of input data stream) in order
  1091. // to achieve the ZLIB/GZIP data format compatibility.
  1092. //
  1093. // Parameters:
  1094. // ppDst Double pointer to the destination vector.
  1095. // pDstLen Pointer to the length of the destination vector.
  1096. // pLZ77State Pointer to the internal encoding structure.
  1097. // Return:
  1098. // ippStsNoErr Indicates no error.
  1099. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1100. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1101. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1102. //
  1103. // Note: This is a service function which is necessary for achieving compatibility with
  1104. // the rfc1950, rfc1951, rfc1952 describing ZLIB/GZIP data format.
  1105. //
  1106. */
  1107. IPPAPI( IppStatus, ippsEncodeLZ77Flush_8u, (Ipp8u** ppDst, int* pDstLen,
  1108. IppLZ77State_8u* pLZ77State) )
  1109. /* /////////////////////////////////////////////////////////////////////////////
  1110. // Name: ippsEncodeLZ77GetPairs
  1111. // Purpose: Reads the pointer to the pair buffer, it's length and current index
  1112. // from the internal state structure for encoding.
  1113. //
  1114. // Parameters:
  1115. // ppPairs Double pointer to a variable of ippLZ77Pair type.
  1116. // pPairsInd Pointer to the current index in the pair buffer
  1117. // pPairsLen Pointer to the length of pair buffer
  1118. // pLZ77State Pointer to the internal encoding structure.
  1119. // Return:
  1120. // ippStsNoErr Indicates no error.
  1121. // ippStsNullPtrErr Indicates an error when the pLZ77State or ppPairs pointer is NULL.
  1122. //
  1123. */
  1124. IPPAPI( IppStatus, ippsEncodeLZ77GetPairs_8u, (IppLZ77Pair** ppPairs, int* pPairsInd,
  1125. int* pPairsLen, IppLZ77State_8u* pLZ77State) )
  1126. /* /////////////////////////////////////////////////////////////////////////////
  1127. // Name: ippsEncodeLZ77SetPairs
  1128. // Purpose: Writes the pointer to the pair buffer, it's length and current index
  1129. // to the internal state structure for encoding.
  1130. //
  1131. // Parameters:
  1132. // pPairs Pointer to a variable of ippLZ77Pair type.
  1133. // pairsInd Current index in the pair buffer
  1134. // pairsLen Length of pair buffer
  1135. // pLZ77State Pointer to the internal encoding structure.
  1136. // Return:
  1137. // ippStsNoErr Indicates no error.
  1138. // ippStsNullPtrErr Indicates an error when the pLZ77State or pPairs pointer is NULL.
  1139. //
  1140. */
  1141. IPPAPI( IppStatus, ippsEncodeLZ77SetPairs_8u, (IppLZ77Pair* pPairs, int pairsInd,
  1142. int pairsLen, IppLZ77State_8u* pLZ77State) )
  1143. /* /////////////////////////////////////////////////////////////////////////////
  1144. // Name: ippsEncodeLZ77GetStatus
  1145. // Purpose: Reads the encoding status value from the internal state
  1146. // structure for encoding.
  1147. //
  1148. // Parameters:
  1149. // pDeflateStatus Pointer to a variable of ippLZ77DeflateStatus type.
  1150. // pLZ77State Pointer to the internal encoding structure.
  1151. // Return:
  1152. // ippStsNoErr Indicates no error.
  1153. // ippStsNullPtrErr Indicates an error when the pLZ77State or pDeflateStatus pointer is NULL.
  1154. //
  1155. */
  1156. IPPAPI( IppStatus, ippsEncodeLZ77GetStatus_8u, (IppLZ77DeflateStatus* pDeflateStatus,
  1157. IppLZ77State_8u* pLZ77State) )
  1158. /* /////////////////////////////////////////////////////////////////////////////
  1159. // Name: ippsEncodeLZ77SetStatus
  1160. // Purpose: Writes the encoding status value to the internal state
  1161. // structure for encoding.
  1162. //
  1163. // Parameters:
  1164. // deflateStatus Variable of ippLZ77DeflateStatus type.
  1165. // pLZ77State Pointer to the internal encoding structure.
  1166. // Return:
  1167. // ippStsNoErr Indicates no error.
  1168. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1169. // ippStsBadArgErr Indicates an error when the deflateStatus parameter has an illegal value.
  1170. //
  1171. */
  1172. IPPAPI( IppStatus, ippsEncodeLZ77SetStatus_8u, (IppLZ77DeflateStatus deflateStatus,
  1173. IppLZ77State_8u* pLZ77State) )
  1174. /* /////////////////////////////////////////////////////////////////////////////
  1175. // Name: ippsEncodeLZ77Reset
  1176. // Purpose: Resets the internal state structure for encoding.
  1177. //
  1178. // Parameters:
  1179. // pLZ77State Pointer to the internal encoding structure.
  1180. // Return:
  1181. // ippStsNoErr Indicates no error.
  1182. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1183. //
  1184. */
  1185. IPPAPI( IppStatus, ippsEncodeLZ77Reset_8u, (IppLZ77State_8u* pLZ77State) )
  1186. /* /////////////////////////////////////////////////////////////////////////////
  1187. // Name: ippsDecodeLZ77GetSize
  1188. // Purpose: Computes the size of the internal decoding structure.
  1189. //
  1190. // Parameters:
  1191. // pLZ77StateSize Pointer to the size of the internal decoding structure.
  1192. // Return:
  1193. // ippStsNoErr Indicates no error.
  1194. // ippStsNullPtrErr Indicates an error when the pointer pLZ77StateSize is NULL.
  1195. //
  1196. */
  1197. IPPAPI( IppStatus, ippsDecodeLZ77GetSize_8u, (int* pLZ77StateSize) )
  1198. /* /////////////////////////////////////////////////////////////////////////////
  1199. // Name: ippsDecodeLZ77Init
  1200. // Purpose: Initializes the internal decoding structure.
  1201. //
  1202. // Parameters:
  1203. // checksum Algorithm to compute the checksum for output data.
  1204. // pLZ77State Pointer to memory allocated for the internal decoding structure.
  1205. // Return:
  1206. // ippStsNoErr Indicates no error.
  1207. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1208. // ippStsBadArgErr Indicates an error when the checksum parameter
  1209. // has an illegal value.
  1210. //
  1211. */
  1212. IPPAPI( IppStatus, ippsDecodeLZ77Init_8u, (IppLZ77Chcksm checksum, IppLZ77State_8u* pLZ77State) )
  1213. /* /////////////////////////////////////////////////////////////////////////////
  1214. // Name: ippsDecodeLZ77InitAlloc
  1215. // Purpose: Allocates memory and initializes the internal encoding structure.
  1216. //
  1217. // Parameters:
  1218. // checksum Algorithm to compute the checksum for output data.
  1219. // ppLZ77State Double pointer to the internal decoding structure.
  1220. // Return:
  1221. // ippStsNoErr Indicates no error.
  1222. // ippStsNullPtrErr Indicates an error when the ppLZ77State pointer is NULL.
  1223. // ippStsBadArgErr Indicates an error when the checksum parameter has an illegal value.
  1224. // ippStsMemAlloc Indicates an error when memory allocation fails.
  1225. //
  1226. */
  1227. IPPAPI( IppStatus, ippsDecodeLZ77InitAlloc_8u, (IppLZ77Chcksm checksum, IppLZ77State_8u** ppLZ77State) )
  1228. /* /////////////////////////////////////////////////////////////////////////////
  1229. // Name: ippsDecodeLZ77
  1230. // Purpose: Performs LZ77 decoding.
  1231. //
  1232. // Parameters:
  1233. // ppSrc Double pointer to the source vector.
  1234. // pSrcLen Pointer to the length of the source vector.
  1235. // ppDst Double pointer to the destination vector.
  1236. // pDstLen Pointer to the length of the destination vector.
  1237. // flush Data-block encoding mode.
  1238. // pLZ77State Pointer to the internal decoding structure.
  1239. // Return:
  1240. // ippStsNoErr Indicates no error.
  1241. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1242. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1243. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1244. // ippStsStreamEnd Indicates a warning when the stream ends.
  1245. //
  1246. // Note: The technique of LZ77 sliding window support is compatible with rfc1951.
  1247. //
  1248. */
  1249. IPPAPI( IppStatus, ippsDecodeLZ77_8u, (IppLZ77Pair** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  1250. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1251. /* /////////////////////////////////////////////////////////////////////////////
  1252. // Name: ippsDecodeLZ77GetBlockType
  1253. // Purpose: Decodes the type of the block from the DEFLATE format.
  1254. //
  1255. // Parameters:
  1256. // ppSrc Double pointer to the source vector.
  1257. // pSrcLen Pointer to the length of the source vector.
  1258. // pHuffMode Pointer to the value of coding mode.
  1259. // pLZ77State Pointer to the internal decoding structure.
  1260. // Return:
  1261. // ippStsNoErr Indicates no error.
  1262. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1263. // ippStsSizeErr Indicates an error when SrcLen is less than zero.
  1264. // ippStsSrcSizeLessExpected Indicates a warning when the source buffer is less than expected.
  1265. // (Internal bit stream and source vector do not contain enough bits to decode
  1266. // the type of the block)
  1267. //
  1268. */
  1269. IPPAPI( IppStatus, ippsDecodeLZ77GetBlockType_8u, (Ipp8u** ppSrc, int* pSrcLen,
  1270. IppLZ77HuffMode* pHuffMode,
  1271. IppLZ77State_8u* pLZ77State) )
  1272. /* /////////////////////////////////////////////////////////////////////////////
  1273. // Name: ippsDecodeLZ77FixedHuff
  1274. // Purpose: Performs fixed Huffman decoding of the rfc1951 compatible code.
  1275. //
  1276. // Parameters:
  1277. // ppSrc Double pointer to the source vector.
  1278. // pSrcLen Pointer to the length of the source vector.
  1279. // ppDst Double pointer to the destination vector.
  1280. // pDstLen Pointer to the length of the destination vector.
  1281. // flush Data-block encoding mode.
  1282. // pLZ77State Pointer to the internal decoding structure.
  1283. // Return:
  1284. // ippStsNoErr Indicates no error.
  1285. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1286. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1287. // ippStsSrcSizeLessExpected Indicates a warning when the source buffer is less than expected
  1288. // (end of block marker is not decoded).
  1289. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1290. // ippStsStreamEnd Indicates a warning when the stream ends.
  1291. //
  1292. // Note: This function decodes the rfc1951 compatible code.
  1293. //
  1294. */
  1295. IPPAPI( IppStatus, ippsDecodeLZ77FixedHuff_8u, (Ipp8u** ppSrc, int* pSrcLen, IppLZ77Pair** ppDst,
  1296. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1297. /* /////////////////////////////////////////////////////////////////////////////
  1298. // Name: ippsDecodeLZ77DynamicHuff
  1299. // Purpose: Performs dynamic Huffman decoding of the rfc1951 compatible code.
  1300. //
  1301. // Parameters:
  1302. // ppSrc Double pointer to the source vector.
  1303. // pSrcLen Pointer to the length of the source vector.
  1304. // ppDst Double pointer to the destination vector.
  1305. // pDstLen Pointer to the length of the destination vector.
  1306. // flush Data-block encoding mode.
  1307. // pLZ77State Pointer to the internal decoding structure.
  1308. // Return:
  1309. // ippStsNoErr Indicates no error.
  1310. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1311. // ippStsWrongBlockType Indicates a warning when the type of the block is not dynamic Huffman type.
  1312. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1313. // ippStsSrcSizeLessExpected Indicates a warning when the source buffer is less than expected
  1314. // (end of block marker is not decoded).
  1315. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1316. // ippStsStreamEnd Indicates a warning when the stream ends.
  1317. //
  1318. // Note: This function decodes the rfc1951 compatible code.
  1319. //
  1320. */
  1321. IPPAPI( IppStatus, ippsDecodeLZ77DynamicHuff_8u, (Ipp8u** ppSrc, int* pSrcLen, IppLZ77Pair** ppDst,
  1322. int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State) )
  1323. /* /////////////////////////////////////////////////////////////////////////////
  1324. // Name: ippsDecodeLZ77StoredBlock
  1325. // Purpose: Performs decoding of the block transmitted without compression.
  1326. //
  1327. // Parameters:
  1328. // ppSrc Double pointer to the source vector.
  1329. // pSrcLen Pointer to the length of the source vector.
  1330. // ppDst Double pointer to the destination vector.
  1331. // pDstLen Pointer to the length of the destination vector.
  1332. // pLZ77State Pointer to the internal decoding structure.
  1333. // Return:
  1334. // ippStsNoErr Indicates no error.
  1335. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL.
  1336. // ippStsWrongBlockType Indicates a warning when the type of the block is not of
  1337. // the "stored without compression type" type.
  1338. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero.
  1339. // ippStsSrcSizeLessExpected Indicates a warning when the source buffer is less than expected
  1340. // (end of block marker is not decoded).
  1341. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full.
  1342. //
  1343. //
  1344. */
  1345. IPPAPI( IppStatus, ippsDecodeLZ77StoredBlock_8u, (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst,
  1346. int* pDstLen, IppLZ77State_8u* pLZ77State) )
  1347. /* /////////////////////////////////////////////////////////////////////////////
  1348. // Name: ippsDecodeLZ77StoredHuff_8u
  1349. // Purpose: Performs copying the data to the output buffer of pairs
  1350. //
  1351. // Parameters:
  1352. // ppSrc Double pointer to the source vector
  1353. // pSrcLen Pointer to the length of source vector
  1354. // ppDst Double pointer to the destination vector of pairs
  1355. // pDstLen Pointer to the length of destination vector of pairs
  1356. // pLZ77State Pointer to the internal state
  1357. //
  1358. // Return:
  1359. // ippStsNoErr Indicates no error
  1360. // ippStsNullPtrErr Indicates an error when one of the specified pointers is NULL
  1361. // ippStsWrongBlockType Indicates a warning when the type of the block is not of
  1362. // the "stored without compression type" type
  1363. // ippStsSizeErr Indicates an error when DstLen is less than or equal to zero
  1364. // ippStsSrcSizeLessExpected Indicates a warning when the source buffer is less than expected
  1365. // ippStsDstSizeLessExpected Indicates a warning when the destination buffer is full
  1366. //
  1367. */
  1368. IPPAPI( IppStatus, ippsDecodeLZ77StoredHuff_8u, (Ipp8u** ppSrc, int* pSrcLen, IppLZ77Pair** ppDst,
  1369. int* pDstLen, IppLZ77State_8u* pLZ77State) )
  1370. /* /////////////////////////////////////////////////////////////////////////////
  1371. // Name: ippsDecodeLZ77GetPairs
  1372. // Purpose: Reads the pointer to the pair buffer, it's length and current index
  1373. // from the internal state structure for decoding.
  1374. //
  1375. // Parameters:
  1376. // ppPairs Double pointer to a variable of ippLZ77Pair type.
  1377. // pPairsInd Pointer to the current index in the pair buffer
  1378. // pPairsLen Pointer to the length of pair buffer
  1379. // pLZ77State Pointer to the internal decoding structure.
  1380. // Return:
  1381. // ippStsNoErr Indicates no error.
  1382. // ippStsNullPtrErr Indicates an error when the pLZ77State or ppPairs pointer is NULL.
  1383. //
  1384. */
  1385. IPPAPI( IppStatus, ippsDecodeLZ77GetPairs_8u, (IppLZ77Pair** ppPairs, int* pPairsInd,
  1386. int* pPairsLen, IppLZ77State_8u* pLZ77State) )
  1387. /* /////////////////////////////////////////////////////////////////////////////
  1388. // Name: ippsDecodeLZ77SetPairs
  1389. // Purpose: Writes the pointer to the pair buffer, it's length and current index
  1390. // to the internal state structure for decoding.
  1391. //
  1392. // Parameters:
  1393. // pPairs Pointer to a variable of ippLZ77Pair type.
  1394. // pairsInd Current index in the pair buffer
  1395. // pairsLen Length of pair buffer
  1396. // pLZ77State Pointer to the internal decoding structure.
  1397. // Return:
  1398. // ippStsNoErr Indicates no error.
  1399. // ippStsNullPtrErr Indicates an error when the pLZ77State or pPairs pointer is NULL.
  1400. //
  1401. */
  1402. IPPAPI( IppStatus, ippsDecodeLZ77SetPairs_8u, (IppLZ77Pair* pPairs, int pairsInd,
  1403. int pairsLen, IppLZ77State_8u* pLZ77State) )
  1404. /* /////////////////////////////////////////////////////////////////////////////
  1405. // Name: ippsDecodeLZ77GetStatus
  1406. // Purpose: Reads the decoding status value from the internal state
  1407. // structure for decoding.
  1408. //
  1409. // Parameters:
  1410. // pInflateStatus Pointer to a variable of ippLZ77InflateStatus type.
  1411. // pLZ77State Pointer to the internal structure.
  1412. // Return:
  1413. // ippStsNoErr Indicates no error.
  1414. // ippStsNullPtrErr Indicates an error when the pLZ77State or pInflateStatus pointer is NULL.
  1415. //
  1416. */
  1417. IPPAPI( IppStatus, ippsDecodeLZ77GetStatus_8u, ( IppLZ77InflateStatus* pInflateStatus,
  1418. IppLZ77State_8u* pLZ77State ) )
  1419. /* /////////////////////////////////////////////////////////////////////////////
  1420. // Name: ippsDecodeLZ77SetStatus
  1421. // Purpose: Writes the decoding status value to the internal state
  1422. // structure for decoding.
  1423. //
  1424. // Parameters:
  1425. // inflateStatus Variable of ippLZ77InflateStatus type.
  1426. // pLZ77State Pointer to the internal structure.
  1427. // Return:
  1428. // ippStsNoErr Indicates no error.
  1429. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1430. // ippStsBadArgErr Indicates an error when the inflateStatus parameter has an illegal value.
  1431. //
  1432. */
  1433. IPPAPI( IppStatus, ippsDecodeLZ77SetStatus_8u, ( IppLZ77InflateStatus inflateStatus,
  1434. IppLZ77State_8u* pLZ77State ) )
  1435. /* /////////////////////////////////////////////////////////////////////////////
  1436. // Name: ippsEncodeLZ77SetDictionary_8u, ippsDecodeLZ77SetDictionary_8u
  1437. // Purpose: Presets the dictionary for encoding/decoding.
  1438. //
  1439. // Parameters:
  1440. // pDictionary Pointer to the dictionary vector
  1441. // dictLen Length of dictionary vector
  1442. // pLZ77State Pointer to the internal state
  1443. //
  1444. // Return:
  1445. // ippStsNullPtrErr One or several pointer(s) is NULL
  1446. // ippStsSizeErr Lengths of the source/destination vector are less
  1447. // or equal zero
  1448. // ippStsNoErr No errors
  1449. //
  1450. */
  1451. IPPAPI(IppStatus, ippsEncodeLZ77SetDictionary_8u, ( Ipp8u* pDictionary, int dictLen, IppLZ77State_8u* pLZ77State ))
  1452. IPPAPI(IppStatus, ippsDecodeLZ77SetDictionary_8u, ( Ipp8u* pDictionary, int dictLen, IppLZ77State_8u* pLZ77State ))
  1453. /* /////////////////////////////////////////////////////////////////////////////
  1454. // Name: ippsDecodeLZ77Reset
  1455. // Purpose: Resets the internal state structure for decoding.
  1456. //
  1457. // Parameters:
  1458. // pLZ77State Pointer to the internal decoding structure.
  1459. // Return:
  1460. // ippStsNoErr Indicates no error.
  1461. // ippStsNullPtrErr Indicates an error when the pLZ77State pointer is NULL.
  1462. //
  1463. */
  1464. IPPAPI( IppStatus, ippsDecodeLZ77Reset_8u, (IppLZ77State_8u* pLZ77State) )
  1465. /* /////////////////////////////////////////////////////////////////////////////
  1466. // Name: ippsDecodeLZ77FixedHuffFull_8u
  1467. // Purpose: Performs the decoding of fixed huffman rfc1951 compatible format
  1468. //
  1469. // Parameters:
  1470. // ppSrc Double pointer to the source vector
  1471. // pSrcLen Pointer to the length of source vector
  1472. // ppDst Double pointer to the destination vector
  1473. // pDstLen Pointer to the size of destination buffer on input,
  1474. // pointer to the resulting length of the destination vector
  1475. // on output
  1476. // flush Flush mode
  1477. // pLZ77State Pointer to internal decoding state
  1478. //
  1479. // Return:
  1480. // ippStsNullPtrErr One or several pointer(s) is NULL
  1481. // ippStsSizeErr Lengths of the source/destination vector are less
  1482. // or equal zero
  1483. // ippStsSrcSizeLessExpected The end of block symbol not decoded, so size of source vector less expected
  1484. // ippStsDstSizeLessExpected The size of destination vector less expected
  1485. // ippStsStreamEnd The end of stream symbol decoded
  1486. // ippStsNoErr No errors
  1487. //
  1488. */
  1489. IPPAPI(IppStatus, ippsDecodeLZ77FixedHuffFull_8u, (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst, int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State))
  1490. /* /////////////////////////////////////////////////////////////////////////////
  1491. // Name: ippsDecodeLZ77DynamicHuffFull_8u
  1492. // Purpose: Performs the decoding of dynamic huffman rfc1951 compatible format
  1493. //
  1494. // Parameters:
  1495. // ppSrc Double pointer to the source vector
  1496. // pSrcLen Pointer to the length of source vector
  1497. // ppDst Double pointer to the destination vector
  1498. // pDstLen Pointer to the size of destination buffer on input,
  1499. // pointer to the resulting length of the destination vector
  1500. // on output
  1501. // flush Flush mode
  1502. // pLZ77State Pointer to internal decoding state
  1503. //
  1504. // Return:
  1505. // ippStsNullPtrErr One or several pointer(s) is NULL
  1506. // ippStsSizeErr Lengths of the source/destination vector are less
  1507. // or equal zero
  1508. // ippStsSrcSizeLessExpected The end of block symbol not decoded, so size of source vector less expected
  1509. // ippStsDstSizeLessExpected The size of destination vector less expected
  1510. // ippStsStreamEnd The end of stream symbol decoded
  1511. // ippStsNoErr No errors
  1512. //
  1513. */
  1514. IPPAPI(IppStatus, ippsDecodeLZ77DynamicHuffFull_8u, (Ipp8u** ppSrc, int* pSrcLen, Ipp8u** ppDst, int* pDstLen, IppLZ77Flush flush, IppLZ77State_8u* pLZ77State))
  1515. /* /////////////////////////////////////////////////////////////////////////////
  1516. // Name: ippsDecodeLZ77CopyState_8u
  1517. // Purpose: Performs copying the fields of internal state structure
  1518. //
  1519. // Parameters:
  1520. // pLZ77StateSrc Pointer to the internal state for copying from
  1521. // pLZ77StateDst Pointer to the internal state for copying to
  1522. //
  1523. // Return:
  1524. // ippStsNullPtrErr One or several pointer(s) is NULL
  1525. // ippStsNoErr No errors
  1526. //
  1527. */
  1528. IPPAPI(IppStatus, ippsDecodeLZ77CopyState_8u, ( IppLZ77State_8u* pLZ77StateSrc, IppLZ77State_8u* pLZ77StateDst ))
  1529. /* /////////////////////////////////////////////////////////////////////////////
  1530. // Name: ippsLZ77Free
  1531. // Purpose: Frees the internal state structure for encoding or decoding.
  1532. //
  1533. // Parameters:
  1534. // pLZ77State Pointer to the internal decoding structure.
  1535. //
  1536. */
  1537. IPPAPI( void, ippsLZ77Free_8u, (IppLZ77State_8u* pLZ77State) )
  1538. /* /////////////////////////////////////////////////////////////////////////////
  1539. // Name: ippsAdler32
  1540. // Purpose: Computes the adler32(ITUT V.42) checksum for the source vector.
  1541. //
  1542. // Parameters:
  1543. // pSrc Pointer to the source vector.
  1544. // srcLen Length of the source vector.
  1545. // pAdler32 Pointer to the checksum value.
  1546. // Return:
  1547. // ippStsNoErr Indicates no error.
  1548. // ippStsNullPtrErr Indicates an error when the pSrc pointer is NULL.
  1549. // ippStsSizeErr Indicates an error when the length of the source vector is less
  1550. // than or equal to zero.
  1551. //
  1552. */
  1553. IPPAPI( IppStatus, ippsAdler32_8u, (const Ipp8u* pSrc, int srcLen, Ipp32u* pAdler32) )
  1554. /* /////////////////////////////////////////////////////////////////////////////
  1555. // Name: ippsCRC32
  1556. // Purpose: Computes the CRC32(ITUT V.42) checksum for the source vector.
  1557. //
  1558. // Parameters:
  1559. // pSrc Pointer to the source vector.
  1560. // srcLen Length of the source vector.
  1561. // pCRC32 Pointer to the checksum value.
  1562. // Return:
  1563. // ippStsNoErr Indicates no error.
  1564. // ippStsNullPtrErr Indicates an error when the pSrc pointer is NULL.
  1565. // ippStsSizeErr Indicates an error when the length of the source vector is less
  1566. // than or equal to zero.
  1567. //
  1568. */
  1569. IPPAPI( IppStatus, ippsCRC32_8u, (const Ipp8u* pSrc, int srcLen, Ipp32u* pCRC32) )
  1570. /* /////////////////////////////////////////////////////////////////////////////
  1571. // Name: ippsCRC32C
  1572. // Purpose: Computes the CRC32C (the polinomial 0x11EDC6F41) value
  1573. // for the source vector.
  1574. // Reference: "Optimization of cyclic redundancy-check
  1575. // codes with 24 and 32 parity bits". Castagnoli, G.;
  1576. // Brauer, S.; Herrmann, M.; Communications,
  1577. // IEEE Transactions on Volume 41, Issue 6,
  1578. // June 1993 Page(s):883 - 892.
  1579. //
  1580. // Parameters:
  1581. // pSrc Pointer to the source vector
  1582. // srcLen Length of the source vector
  1583. // pCRC32C Pointer to the CRC32C value
  1584. // Return:
  1585. // ippStsNoErr No errors
  1586. // ippStsNullPtrErr One or several pointer(s) is NULL
  1587. // ippStsSizeErr Length of the source vector is equal zero
  1588. //
  1589. */
  1590. IPPAPI( IppStatus, ippsCRC32C_8u, (const Ipp8u* pSrc, Ipp32u srcLen, Ipp32u* pCRC32C) )
  1591. #if !defined ( _OWN_BLDPCS )
  1592. typedef struct IppInflateState {
  1593. const Ipp8u* pWindow; /* pointer to the sliding window */
  1594. /* (the dictionary for the LZ77 algorithm) */
  1595. unsigned int winSize; /* size of the sliding window */
  1596. unsigned int tableType; /* type of Huffman code tables */
  1597. /* (for example, 0 - tables for Fixed Huffman codes) */
  1598. unsigned int tableBufferSize; /* (ENOUGH = 2048) * (sizeof(code) = 4) - */
  1599. /* sizeof(IppInflateState) */
  1600. } IppInflateState;
  1601. typedef enum { /* this type is used as a translator of the inflate_mode type from zlib */
  1602. ippTYPE,
  1603. ippLEN,
  1604. ippLENEXT
  1605. } IppInflateMode;
  1606. #endif
  1607. /* /////////////////////////////////////////////////////////////////////////////
  1608. // Name: ippsInflateBuildHuffTable
  1609. // Purpose: Builds literal/length and distance Huffman code table for
  1610. // decoding a block that was compressed with usage dynamic Huffman codes
  1611. // according to the "deflate" format (rfc1951)
  1612. //
  1613. // Parameters:
  1614. // pCodeLens Pointer to the common array with literal/length and distance
  1615. // Huffman code lengths
  1616. // nLitCodeLens Number of literal/length Huffman code lengths
  1617. // nDistCodeLens Number of distance Huffman code lengths
  1618. // Return:
  1619. // ippStsNullPtrErr One or several pointer(s) is NULL
  1620. // ippStsSizeErr nLitCodeLens is greater than 286, or nLitCodeLens is greater than 30
  1621. // (according to rfc1951)
  1622. // ippStsSrcDataErr Invalid literal/length and distance set has been met
  1623. // in the common lengths array
  1624. // ippStsNoErr No errors
  1625. //
  1626. */
  1627. IPPAPI(IppStatus, ippsInflateBuildHuffTable, ( const Ipp16u* pCodeLens,
  1628. unsigned int nLitCodeLens,
  1629. unsigned int nDistCodeLens,
  1630. IppInflateState *pIppInflateState ))
  1631. /* /////////////////////////////////////////////////////////////////////////////
  1632. // Name: ippsInflate_8u
  1633. // Purpose: Decodes of the "deflate" format (rfc1951)
  1634. // according to the type of Huffman code tables
  1635. //
  1636. // Parameters:
  1637. // ppSrc Double pointer to the source vector
  1638. // pSrcLen Pointer to the length of the source vector
  1639. // pCode Pointer to the bit buffer
  1640. // pCodeLenBits Number of valid bits in the bit buffer
  1641. // winIdx Index of the sliding window start position
  1642. // ppDst Double pointer to the destination vector
  1643. // pDstLen Pointer to the length of the destination vector
  1644. // dstIdx Index of the current position in the destination vector
  1645. // pMode Pointer to the current decode mode
  1646. // pIppInflateState Pointer to the structure that contains decode parameters
  1647. // Return:
  1648. // ippStsNullPtrErr One or several pointer(s) is NULL
  1649. // ippStsSizeErr codeLenBits is greater than 32, or
  1650. // winIdx is greater than pIppInflateState->winSize, or
  1651. // dstIdx is greater than dstLen
  1652. // ippStsSrcDataErr Invalid literal/length and distance set has been met
  1653. // during decoding
  1654. // ippStsNoErr No errors
  1655. //
  1656. */
  1657. IPPAPI(IppStatus, ippsInflate_8u, ( Ipp8u** ppSrc, unsigned int* pSrcLen,
  1658. Ipp32u* pCode, unsigned int* pCodeLenBits,
  1659. unsigned int winIdx,
  1660. Ipp8u** ppDst, unsigned int* pDstLen, unsigned int dstIdx,
  1661. IppInflateMode* pMode, IppInflateState *pIppInflateState ))
  1662. #if !defined( _OWN_BLDPCS )
  1663. typedef struct {
  1664. Ipp16u freq;
  1665. Ipp16u code;
  1666. } IppDeflateFreqTable;
  1667. #endif /* _OWN_BLDPCS */
  1668. /* /////////////////////////////////////////////////////////////////////////////
  1669. // Name: ippsDeflateLZ77_8u
  1670. // Purpose: Perform LZ77 encoding according to
  1671. // the compression level
  1672. //
  1673. // Parameters:
  1674. // ppSrc Double pointer to the source vector
  1675. // pSrcLen Pointer to the length of the source vector
  1676. // pSrcIdx Pointer to the index of the current position in
  1677. // the source vector. This parameter is used by
  1678. // the function for correlation current possition of
  1679. // the source vector and indexes in the hash tables.
  1680. // The normalization of this index and the hash tables
  1681. // must only be done every 2GB of the source data
  1682. // instead of 64K (the zlib approach)
  1683. // pWindow Pointer to the sliding window, which is used as
  1684. // the dictionary for LZ77 encoding
  1685. // winSize Size of the window and the hash prev table
  1686. // pHashHead Pointer to heads of the hash chains. This table is
  1687. // initialized with (-winSize) value for correct processing
  1688. // of the first bytes of the source vector
  1689. // pHashPrev Pointer to links to older strings with the same
  1690. // hash index
  1691. // hashSize Size of the hash head table
  1692. // pLitFreqTable Pointer to the literals/lengths frequency table
  1693. // pDistFreqTable Pointer to the distances frequency table
  1694. // pLitDst Pointer to the literals/lengths destination vector
  1695. // pDistDst Pointer to the distances destination vector
  1696. // pDstLen Pointer to the length of the destination vectors
  1697. // comprLevel Compression level. It is like the zlib compression level
  1698. // flush Flush value
  1699. // Return:
  1700. // ippStsNullPtrErr One or several pointer(s) is NULL
  1701. // ippStsNoErr No errors
  1702. //
  1703. */
  1704. IPPAPI( IppStatus, ippsDeflateLZ77_8u, (
  1705. const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u* pSrcIdx,
  1706. const Ipp8u* pWindow, Ipp32u winSize,
  1707. Ipp32s* pHashHead, Ipp32s* pHashPrev, Ipp32u hashSize,
  1708. IppDeflateFreqTable pLitFreqTable[286],
  1709. IppDeflateFreqTable pDistFreqTable[30],
  1710. Ipp8u* pLitDst, Ipp16u* pDistDst, Ipp32u* pDstLen,
  1711. int comprLevel, IppLZ77Flush flush ) )
  1712. #if !defined( _OWN_BLDPCS )
  1713. typedef struct {
  1714. Ipp16u code;
  1715. Ipp16u len;
  1716. } IppDeflateHuffCode;
  1717. #endif /* _OWN_BLDPCS */
  1718. /* /////////////////////////////////////////////////////////////////////////////
  1719. // Name: ippsDeflateHuff_8u
  1720. // Purpose: Performs Huffman encoding
  1721. //
  1722. // Parameters:
  1723. // pLitSrc Pointer to the literals/lengths source vector
  1724. // pDistSrc Pointer to the distances source vector
  1725. // pSrcLen Pointer to the length of the source vectors
  1726. // pCode Pointer to the bit buffer
  1727. // pCodeLenBits Pointer to the number of valid bits in the bit buffer
  1728. // pLitHuffCodes Pointer to the literals/lengths Huffman codes
  1729. // pDistHuffCodes Pointer to the distances Huffman codes
  1730. // pDst Pointer to the destination vector
  1731. // pDstIdx Pointer to the index in the destination vector, the zlib
  1732. // uses the knowingly sufficient intermediate buffer for
  1733. // the Huffman encoding, so we need to know indexes of
  1734. // the first (input parameter) and the last (output parameter)
  1735. // symbols, which are written by the function
  1736. // Return:
  1737. // ippStsNullPtrErr One or several pointer(s) is NULL
  1738. // ippStsNoErr No errors
  1739. //
  1740. */
  1741. IPPAPI( IppStatus, ippsDeflateHuff_8u, (
  1742. const Ipp8u* pLitSrc, const Ipp16u* pDistSrc, Ipp32u srcLen,
  1743. Ipp16u* pCode, Ipp32u* pCodeLenBits,
  1744. IppDeflateHuffCode pLitHuffCodes[286],
  1745. IppDeflateHuffCode pDistHuffCodes[30],
  1746. Ipp8u* pDst, Ipp32u* pDstIdx ) )
  1747. /* /////////////////////////////////////////////////////////////////////////////
  1748. // Name: ippsDeflateDictionarySet_8u
  1749. // Purpose: Presets the user's dictionary for LZ77 encoding
  1750. //
  1751. // Parameters:
  1752. // pDictSrc Pointer to the user's dictionary
  1753. // dictLen Length of the user's dictionary
  1754. // pHashHeadDst Pointer to heads of the hash chains
  1755. // hashSize Size of the hash head table
  1756. // pHashPrevDst Pointer to links to older strings with the same
  1757. // hash index
  1758. // pWindowDst Pointer to the sliding window, which is used as
  1759. // the dictionary for LZ77 encoding
  1760. // winSize Size of the window and the hash prev table in elements
  1761. // comprLevel Compression level. It is like the zlib compression level
  1762. // Return:
  1763. // ippStsNullPtrErr One or several pointer(s) is NULL
  1764. // ippStsNoErr No errors
  1765. //
  1766. */
  1767. IPPAPI( IppStatus, ippsDeflateDictionarySet_8u, (
  1768. const Ipp8u* pDictSrc, Ipp32u dictLen,
  1769. Ipp32s* pHashHeadDst, Ipp32u hashSize, Ipp32s* pHashPrevDst,
  1770. Ipp8u* pWindowDst, Ipp32u winSize, int comprLevel ) )
  1771. /* bzip2 - compatible functions */
  1772. #if !defined ( _OWN_BLDPCS )
  1773. struct RLEState_BZ2;
  1774. typedef struct RLEState_BZ2 IppRLEState_BZ2;
  1775. #endif
  1776. /* /////////////////////////////////////////////////////////////////////////////
  1777. // Name: ippsRLEGetSize_BZ2_8u
  1778. // Purpose: Calculates the size of internal state for bzip2-specific RLE.
  1779. // Specific function for bzip2 compatibility.
  1780. //
  1781. // Parameters:
  1782. // pRLEStateSize Pointer to the size of internal state for bzip2-specific RLE
  1783. //
  1784. // Return:
  1785. // ippStsNullPtrErr One or several pointer(s) is NULL
  1786. // ippStsNoErr No errors
  1787. //
  1788. */
  1789. IPPAPI(IppStatus, ippsRLEGetSize_BZ2_8u, ( int* pRLEStateSize ))
  1790. /* /////////////////////////////////////////////////////////////////////////////
  1791. // Name: ippsEncodeRLEInit_BZ2_8u
  1792. // Purpose: Initializes the elements of the bzip2-specific internal state for RLE.
  1793. // Specific function for bzip2 compatibility.
  1794. //
  1795. // Parameters:
  1796. // pRLEState Pointer to internal state structure for bzip2 specific RLE
  1797. //
  1798. // Return:
  1799. // ippStsNullPtrErr One or several pointer(s) is NULL
  1800. // ippStsNoErr No errors
  1801. //
  1802. */
  1803. IPPAPI(IppStatus, ippsEncodeRLEInit_BZ2_8u, ( IppRLEState_BZ2* pRLEState ))
  1804. /* /////////////////////////////////////////////////////////////////////////////
  1805. // Name: ippsEncodeRLEInitAlloc_BZ2_8u
  1806. // Purpose: Allocates the memory and initializes the elements of the bzip2-specific internal state for RLE.
  1807. // Specific function for bzip2 compatibility.
  1808. //
  1809. // Parameters:
  1810. // ppRLEState Double pointer to internal state structure for bzip2 specific RLE
  1811. //
  1812. // Return:
  1813. // ippStsNullPtrErr One or several pointer(s) is NULL
  1814. // ippStsNoErr No errors
  1815. //
  1816. */
  1817. IPPAPI(IppStatus, ippsEncodeRLEInitAlloc_BZ2_8u, ( IppRLEState_BZ2** ppRLEState ))
  1818. /* /////////////////////////////////////////////////////////////////////////////
  1819. // Name: ippsEncodeRLE_BZ2_8u
  1820. // Purpose: Performs the RLE encoding with thresholding = 4.
  1821. // Specific function for bzip2 compatibility.
  1822. //
  1823. // Parameters:
  1824. // ppSrc Double pointer to the source vector
  1825. // pSrcLen Pointer to the length of source vector
  1826. // pDst Pointer to the destination vector
  1827. // pDstLen Pointer to the size of destination buffer on input,
  1828. // pointer to the resulting length of the destination vector
  1829. // on output
  1830. // pRLEState Pointer to internal state structure for bzip2 specific RLE
  1831. //
  1832. // Return:
  1833. // ippStsNullPtrErr One or several pointer(s) is NULL
  1834. // ippStsSizeErr Lengths of the source/destination vector are less
  1835. // or equal zero
  1836. // ippStsDstSizeLessExpected The size of destination vector less expected
  1837. // ippStsNoErr No errors
  1838. //
  1839. */
  1840. IPPAPI(IppStatus, ippsEncodeRLE_BZ2_8u, ( Ipp8u** ppSrc, int* pSrcLen, Ipp8u* pDst, int* pDstLen, IppRLEState_BZ2* pRLEState ))
  1841. /* /////////////////////////////////////////////////////////////////////////////
  1842. // Name: ippsEncodeRLEFlush_BZ2_8u
  1843. // Purpose: Performs flushing the rest of data after RLE encoding with thresholding = 4.
  1844. // Specific function for bzip2 compatibility.
  1845. //
  1846. // Parameters:
  1847. // pDst Pointer to the destination vector
  1848. // pDstLen Pointer to the size of destination buffer on input,
  1849. // pointer to the resulting length of the destination vector
  1850. // on output
  1851. // pRLEState Pointer to internal state structure for bzip2 specific RLE
  1852. //
  1853. // Return:
  1854. // ippStsNullPtrErr One or several pointer(s) is NULL
  1855. // ippStsSizeErr Lengths of the source/destination vector are less
  1856. // or equal zero
  1857. // ippStsNoErr No errors
  1858. //
  1859. */
  1860. IPPAPI(IppStatus, ippsEncodeRLEFlush_BZ2_8u, ( Ipp8u* pDst, int* pDstLen, IppRLEState_BZ2* pRLEState ))
  1861. /* /////////////////////////////////////////////////////////////////////////////
  1862. // Name: ippsRLEGetInUseTable_8u
  1863. // Purpose: Service function: gets the pointer to the inUse vector from internal state
  1864. // of type IppRLEState_BZ2. Specific function for bzip2 compatibility.
  1865. //
  1866. // Parameters:
  1867. // inUse Pointer to the inUse vector
  1868. // pRLEState Pointer to internal state structure for bzip2 specific RLE
  1869. //
  1870. // Return:
  1871. // ippStsNullPtrErr One or several pointer(s) is NULL
  1872. // ippStsNoErr No errors
  1873. //
  1874. */
  1875. IPPAPI(IppStatus, ippsRLEGetInUseTable_8u, ( Ipp8u inUse[256], IppRLEState_BZ2* pRLEState ))
  1876. /* /////////////////////////////////////////////////////////////////////////////
  1877. // Name: ippsRLEFree_BZ2_8u
  1878. // Purpose: Frees the bzip2-specific internal state for RLE.
  1879. // Specific function for bzip2 compatibility.
  1880. //
  1881. // Parameters:
  1882. // pRLEState Pointer to internal state structure for bzip2 specific RLE.
  1883. //
  1884. */
  1885. IPPAPI(void, ippsRLEFree_BZ2_8u, ( IppRLEState_BZ2* pRLEState ))
  1886. /* /////////////////////////////////////////////////////////////////////////////
  1887. // Name: ippsDecodeRLE_BZ2_8u
  1888. // Purpose: Performs the RLE decoding with thresholding = 4.
  1889. // Specific function for bzip2 compatibility.
  1890. //
  1891. // Parameters:
  1892. // ppSrc Double pointer to the source vector
  1893. // pSrcLen Pointer to the length of source vector on input,
  1894. // pointer to the size of remainder on output
  1895. // pDst Pointer to the destination vector
  1896. // pDstLen Pointer to the size of destination buffer on input,
  1897. // pointer to the resulting length of the destination vector
  1898. // on output.
  1899. // Return:
  1900. // ippStsNullPtrErr One or several pointer(s) is NULL
  1901. // ippStsSizeErr Lengths of the source/destination vector are less
  1902. // or equal zero
  1903. // ippStsDstSizeLessExpected The size of destination vector less expected
  1904. // ippStsNoErr No errors
  1905. //
  1906. */
  1907. IPPAPI(IppStatus, ippsDecodeRLE_BZ2_8u, (Ipp8u** ppSrc, int* pSrcLen, Ipp8u* pDst, int* pDstLen ))
  1908. /* /////////////////////////////////////////////////////////////////////////////
  1909. // Name: ippsEncodeZ1Z2_BZ2_8u16u
  1910. // Purpose: Performs the Z1Z2 encoding.
  1911. // Specific function for bzip2 compatibility.
  1912. //
  1913. // Parameters:
  1914. // ppSrc Double pointer to the source vector
  1915. // pSrcLen Pointer to the length of source vector on input,
  1916. // pointer to the size of remainder on output
  1917. // pDst Pointer to the destination vector
  1918. // pDstLen Pointer to the size of destination buffer on input,
  1919. // pointer to the resulting length of the destination vector
  1920. // on output.
  1921. // freqTable[258] Table of frequencies collected for alphabet symbols.
  1922. //
  1923. // Return:
  1924. // ippStsNullPtrErr One or several pointer(s) is NULL
  1925. // ippStsSizeErr Lengths of the source/destination vector are less
  1926. // or equal zero
  1927. // ippStsDstSizeLessExpected The size of destination vector less expected
  1928. // ippStsNoErr No errors
  1929. //
  1930. */
  1931. IPPAPI(IppStatus, ippsEncodeZ1Z2_BZ2_8u16u, ( Ipp8u** ppSrc, int* pSrcLen, Ipp16u* pDst, int* pDstLen, int freqTable[258] ))
  1932. /* /////////////////////////////////////////////////////////////////////////////
  1933. // Name: ippsDecodeZ1Z2_BZ2_16u8u
  1934. // Purpose: Performs the Z1Z2 decoding.
  1935. // Specific function for bzip2 compatibility.
  1936. //
  1937. // Parameters:
  1938. // ppSrc Double pointer to the source vector
  1939. // pSrcLen Pointer to the length of source vector on input,
  1940. // pointer to the size of remainder on output
  1941. // pDst Pointer to the destination vector
  1942. // pDstLen Pointer to the size of destination buffer on input,
  1943. // pointer to the resulting length of the destination vector
  1944. // on output.
  1945. //
  1946. // Return:
  1947. // ippStsNullPtrErr One or several pointer(s) is NULL
  1948. // ippStsSizeErr Lengths of the source/destination vector are less
  1949. // or equal zero
  1950. // ippStsDstSizeLessExpected The size of destination vector less expected
  1951. // ippStsNoErr No errors
  1952. //
  1953. */
  1954. IPPAPI(IppStatus, ippsDecodeZ1Z2_BZ2_16u8u, ( Ipp16u** ppSrc, int* pSrcLen, Ipp8u* pDst, int* pDstLen ))
  1955. /* /////////////////////////////////////////////////////////////////////////////
  1956. // Name: ippsReduceDictionary_8u_I
  1957. // Purpose: Performs the dictionary reducing.
  1958. //
  1959. // Parameters:
  1960. // inUse[256] Table of 256 values of Ipp8u type.
  1961. // pSrcDst Pointer to the source/destination vector
  1962. // srcDstLen Length of source/destination vector.
  1963. // pSizeDictionary Pointer to the size of dictionary on input and to the size
  1964. // of reduced dictionary on output.
  1965. //
  1966. // Return:
  1967. // ippStsNullPtrErr One or several pointer(s) is NULL
  1968. // ippStsSizeErr Lengths of the source/destination vector are less
  1969. // or equal zero
  1970. // ippStsNoErr No errors
  1971. //
  1972. */
  1973. IPPAPI(IppStatus, ippsReduceDictionary_8u_I, ( const Ipp8u inUse[256], Ipp8u* pSrcDst, int srcDstLen, int* pSizeDictionary ))
  1974. /* /////////////////////////////////////////////////////////////////////////////
  1975. // Name: ippsExpandDictionary_8u_I
  1976. // Purpose: Performs the dictionary expanding.
  1977. //
  1978. // Parameters:
  1979. // inUse[256] Table of 256 values of Ipp8u type.
  1980. // pSrcDst Pointer to the source/destination vector
  1981. // srcDstLen Length of source/destination vector.
  1982. // sizeDictionary The size of reduced dictionary on input.
  1983. //
  1984. // Return:
  1985. // ippStsNullPtrErr One or several pointer(s) is NULL
  1986. // ippStsSizeErr Lengths of the source/destination vector are less
  1987. // or equal zero
  1988. // ippStsNoErr No errors
  1989. //
  1990. */
  1991. IPPAPI(IppStatus, ippsExpandDictionary_8u_I, ( const Ipp8u inUse[256], Ipp8u* pSrcDst, int srcDstLen, int sizeDictionary ))
  1992. /* /////////////////////////////////////////////////////////////////////////////
  1993. // Name: ippsCRC32_BZ2_8u
  1994. // Purpose: Performs the CRC32 checksum calculation according to the direct algorithm, which is used in bzip2.
  1995. //
  1996. // Parameters:
  1997. // pSrc Pointer to the source data vector
  1998. // srcLen The length of source vector
  1999. // pCRC32 Pointer to the value of accumulated CRC32
  2000. //
  2001. // Return:
  2002. // ippStsNullPtrErr One or several pointer(s) is NULL
  2003. // ippStsSizeErr Length of the source vector is less or equal zero
  2004. // ippStsNoErr No errors
  2005. //
  2006. */
  2007. IPPAPI(IppStatus, ippsCRC32_BZ2_8u, ( const Ipp8u* pSrc, int srcLen, Ipp32u* pCRC32 ))
  2008. #if !defined ( _OWN_BLDPCS )
  2009. struct EncodeHuffState_BZ2;
  2010. typedef struct EncodeHuffState_BZ2 IppEncodeHuffState_BZ2;
  2011. struct DecodeHuffState_BZ2;
  2012. typedef struct DecodeHuffState_BZ2 IppDecodeHuffState_BZ2;
  2013. #endif
  2014. /* /////////////////////////////////////////////////////////////////////////////
  2015. // Name: ippsEncodeHuffGetSize_BZ2_16u8u
  2016. // Purpose: Calculates the size of internal state for bzip2-specific Huffman coding.
  2017. // Specific function for bzip2 compatibility.
  2018. //
  2019. // Parameters:
  2020. // wndSize Size of the block to be processed
  2021. // pEncodeHuffStateSize Pointer to the size of internal state for bzip2-specific Huffman coding
  2022. //
  2023. // Return:
  2024. // ippStsNullPtrErr One or several pointer(s) is NULL
  2025. // ippStsSizeErr Lengths of the source/destination vector are less
  2026. // or equal zero
  2027. // ippStsNoErr No errors
  2028. //
  2029. */
  2030. IPPAPI(IppStatus, ippsEncodeHuffGetSize_BZ2_16u8u, ( int wndSize, int* pEncodeHuffStateSize ))
  2031. /* /////////////////////////////////////////////////////////////////////////////
  2032. // Name: ippsEncodeHuffInit_BZ2_16u8u
  2033. // Purpose: Initializes the elements of the bzip2-specific internal state for Huffman coding.
  2034. // Specific function for bzip2 compatibility.
  2035. //
  2036. // Parameters:
  2037. // sizeDictionary The size of the dictionary
  2038. // freqTable Table of frequencies of symbols
  2039. // pSrc Pointer to the source vector
  2040. // srcLen Length of the source vector
  2041. // pEncodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding
  2042. //
  2043. // Return:
  2044. // ippStsNullPtrErr One or several pointer(s) is NULL
  2045. // ippStsSizeErr Lengths of the source/destination vector are less
  2046. // or equal zero
  2047. // ippStsNoErr No errors
  2048. //
  2049. */
  2050. IPPAPI(IppStatus, ippsEncodeHuffInit_BZ2_16u8u, ( int sizeDictionary, const int freqTable[258], const Ipp16u* pSrc, int srcLen,
  2051. IppEncodeHuffState_BZ2* pEncodeHuffState ))
  2052. /* /////////////////////////////////////////////////////////////////////////////
  2053. // Name: ippsEncodeHuffInitAlloc_BZ2_16u8u
  2054. // Purpose: Allocates the memory and initializes the elements of the bzip2-specific internal state for Huffman coding.
  2055. // Specific function for bzip2 compatibility.
  2056. //
  2057. // Parameters:
  2058. // wndSize The size of the input block in bytes
  2059. // sizeDictionary The size of the dictionary
  2060. // freqTable Table of frequencies of symbols
  2061. // pSrc Pointer to the source vector
  2062. // srcLen Length of the source vector
  2063. // pEncodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding
  2064. //
  2065. // Return:
  2066. // ippStsNullPtrErr One or several pointer(s) is NULL
  2067. // ippStsSizeErr Lengths of the source/destination vector are less
  2068. // or equal zero
  2069. // ippStsNoErr No errors
  2070. //
  2071. */
  2072. IPPAPI(IppStatus, ippsEncodeHuffInitAlloc_BZ2_16u8u, ( int wndSize, int sizeDictionary, const int freqTable[258],
  2073. const Ipp16u* pSrc, int srcLen, IppEncodeHuffState_BZ2** ppEncodeHuffState ))
  2074. /* /////////////////////////////////////////////////////////////////////////////
  2075. // Name: ippsPackHuffContext_BZ2_16u8u
  2076. // Purpose: Performs the bzip2-specific encoding of Huffman context.
  2077. // Specific function for bzip2 compatibility.
  2078. //
  2079. // Parameters:
  2080. // pCode Pointer to the bit buffer
  2081. // pCodeLenBits Number of valid bits in the bit buffer
  2082. // pDst Pointer to the destination vector
  2083. // pDstLen Pointer to the size of destination buffer on input,
  2084. // pointer to the resulting length of the destination vector
  2085. // on output
  2086. // pEncodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding
  2087. //
  2088. // Return:
  2089. // ippStsNullPtrErr One or several pointer(s) is NULL
  2090. // ippStsSizeErr Lengths of the source/destination vector are less
  2091. // or equal zero
  2092. // ippStsDstSizeLessExpected The size of destination vector less expected
  2093. // ippStsNoErr No errors
  2094. //
  2095. */
  2096. IPPAPI(IppStatus, ippsPackHuffContext_BZ2_16u8u, ( Ipp32u* pCode, int* pCodeLenBits, Ipp8u* pDst, int* pDstLen,
  2097. IppEncodeHuffState_BZ2* pEncodeHuffState ))
  2098. /* /////////////////////////////////////////////////////////////////////////////
  2099. // Name: ippsEncodeHuff_BZ2_16u8u
  2100. // Purpose: Performs the bzip2-specific Huffman encoding.
  2101. // Specific function for bzip2 compatibility.
  2102. //
  2103. // Parameters:
  2104. // pCode Pointer to the bit buffer
  2105. // pCodeLenBits Number of valid bits in the bit buffer
  2106. // ppSrc Double pointer to the source vector
  2107. // pSrcLen Pointer to the length of source vector
  2108. // pDst Pointer to the destination vector
  2109. // pDstLen Pointer to the size of destination buffer on input,
  2110. // pointer to the resulting length of the destination vector
  2111. // on output
  2112. // pEncodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding
  2113. //
  2114. // Return:
  2115. // ippStsNullPtrErr One or several pointer(s) is NULL
  2116. // ippStsSizeErr Lengths of the source/destination vector are less
  2117. // or equal zero
  2118. // ippStsDstSizeLessExpected The size of destination vector less expected
  2119. // ippStsNoErr No errors
  2120. //
  2121. */
  2122. IPPAPI(IppStatus, ippsEncodeHuff_BZ2_16u8u, ( Ipp32u* pCode, int* pCodeLenBits, Ipp16u** ppSrc, int* pSrcLen,
  2123. Ipp8u* pDst, int* pDstLen, IppEncodeHuffState_BZ2* pEncodeHuffState ))
  2124. /* /////////////////////////////////////////////////////////////////////////////
  2125. // Name: ippsEncodeHuffFree_BZ2_16u8u
  2126. // Purpose: Frees the bzip2-specific internal state for Huffman coding.
  2127. // Specific function for bzip2 compatibility.
  2128. //
  2129. // Parameters:
  2130. // pEncodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding.
  2131. //
  2132. */
  2133. IPPAPI(void, ippsEncodeHuffFree_BZ2_16u8u, ( IppEncodeHuffState_BZ2* pEncodeHuffState ))
  2134. /* /////////////////////////////////////////////////////////////////////////////
  2135. // Name: ippsDecodeHuffGetSize_BZ2_8u16u
  2136. // Purpose: Calculates the size of internal state for bzip2-specific Huffman decoding.
  2137. // Specific function for bzip2 compatibility.
  2138. //
  2139. // Parameters:
  2140. // wndSize Size of the block to be processed
  2141. // pDecodeHuffStateSize Pointer to the size of internal state for bzip2-specific Huffman decoding
  2142. //
  2143. // Return:
  2144. // ippStsNullPtrErr One or several pointer(s) is NULL
  2145. // ippStsSizeErr Lengths of the source/destination vector are less
  2146. // or equal zero
  2147. // ippStsNoErr No errors
  2148. //
  2149. */
  2150. IPPAPI(IppStatus, ippsDecodeHuffGetSize_BZ2_8u16u, ( int wndSize, int* pDecodeHuffStateSize ))
  2151. /* /////////////////////////////////////////////////////////////////////////////
  2152. // Name: ippsDecodeHuffInit_BZ2_8u16u
  2153. // Purpose: Initializes the elements of the bzip2-specific internal state for Huffman decoding.
  2154. // Specific function for bzip2 compatibility.
  2155. //
  2156. // Parameters:
  2157. // sizeDictionary The size of the dictionary
  2158. // pDecodeHuffState Pointer to internal state structure for bzip2 specific Huffman decoding
  2159. //
  2160. // Return:
  2161. // ippStsNullPtrErr One or several pointer(s) is NULL
  2162. // ippStsSizeErr Lengths of the source/destination vector are less
  2163. // or equal zero
  2164. // ippStsNoErr No errors
  2165. //
  2166. */
  2167. IPPAPI(IppStatus, ippsDecodeHuffInit_BZ2_8u16u, ( int sizeDictionary, IppDecodeHuffState_BZ2* pDecodeHuffState ))
  2168. /* /////////////////////////////////////////////////////////////////////////////
  2169. // Name: ippsDecodeHuffInitAlloc_BZ2_8u16u
  2170. // Purpose: Allocates the memory and initializes the elements of the bzip2-specific internal state for Huffman decoding.
  2171. // Specific function for bzip2 compatibility.
  2172. //
  2173. // Parameters:
  2174. // wndSize The size of the input block in bytes
  2175. // sizeDictionary The size of the dictionary
  2176. // pDecodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding
  2177. //
  2178. // Return:
  2179. // ippStsNullPtrErr One or several pointer(s) is NULL
  2180. // ippStsSizeErr Lengths of the source/destination vector are less
  2181. // or equal zero
  2182. // ippStsNoErr No errors
  2183. //
  2184. */
  2185. IPPAPI(IppStatus, ippsDecodeHuffInitAlloc_BZ2_8u16u, ( int wndSize, int sizeDictionary, IppDecodeHuffState_BZ2** ppDecodeHuffState ))
  2186. /* /////////////////////////////////////////////////////////////////////////////
  2187. // Name: ippsUnpackHuffContext_BZ2_8u16u
  2188. // Purpose: Performs the bzip2-specific decoding of Huffman context.
  2189. // Specific function for bzip2 compatibility.
  2190. //
  2191. // Parameters:
  2192. // pCode Pointer to the bit buffer
  2193. // pCodeLenBits Number of valid bits in the bit buffer
  2194. // pSrc Pointer to the destination vector
  2195. // pSrcLen Pointer to the size of destination buffer on input,
  2196. // pointer to the resulting length of the destination vector
  2197. // on output
  2198. // pDecodeHuffState Pointer to internal state structure for bzip2 specific Huffman decoding.
  2199. //
  2200. // Return:
  2201. // ippStsNullPtrErr One or several pointer(s) is NULL
  2202. // ippStsSizeErr Lengths of the source/destination vector are less
  2203. // or equal zero
  2204. // ippStsDstSizeLessExpected The size of destination vector less expected
  2205. // ippStsNoErr No errors
  2206. //
  2207. */
  2208. IPPAPI(IppStatus, ippsUnpackHuffContext_BZ2_8u16u, ( Ipp32u* pCode, int* pCodeLenBits, Ipp8u** ppSrc, int* pSrcLen,
  2209. IppDecodeHuffState_BZ2* pDecodeHuffState ))
  2210. /* /////////////////////////////////////////////////////////////////////////////
  2211. // Name: ippsDecodeHuff_BZ2_8u16u
  2212. // Purpose: Performs the bzip2-specific Huffman decoding.
  2213. // Specific function for bzip2 compatibility.
  2214. //
  2215. // Parameters:
  2216. // pCode Pointer to the bit buffer
  2217. // pCodeLenBits Number of valid bits in the bit buffer
  2218. // ppSrc Double pointer to the source vector
  2219. // pSrcLen Pointer to the length of source vector
  2220. // pDst Pointer to the destination vector
  2221. // pDstLen Pointer to the size of destination buffer on input,
  2222. // pointer to the resulting length of the destination vector
  2223. // on output
  2224. // pDecodeHuffState Pointer to internal state structure for bzip2 specific Huffman decoding.
  2225. //
  2226. // Return:
  2227. // ippStsNullPtrErr One or several pointer(s) is NULL
  2228. // ippStsSizeErr Lengths of the source/destination vector are less
  2229. // or equal zero
  2230. // ippStsDstSizeLessExpected The size of destination vector less expected
  2231. // ippStsNoErr No errors
  2232. //
  2233. */
  2234. IPPAPI(IppStatus, ippsDecodeHuff_BZ2_8u16u, ( Ipp32u* pCode, int* pCodeLenBits, Ipp8u** ppSrc, int* pSrcLen,
  2235. Ipp16u* pDst, int* pDstLen, IppDecodeHuffState_BZ2* pDecodeHuffState ))
  2236. /* /////////////////////////////////////////////////////////////////////////////
  2237. // Name: ippsDecodeHuffFree_BZ2_8u16u
  2238. // Purpose: Frees the bzip2-specific internal state for Huffman decoding.
  2239. // Specific function for bzip2 compatibility.
  2240. //
  2241. // Parameters:
  2242. // pDecodeHuffState Pointer to internal state structure for bzip2 specific Huffman coding.
  2243. //
  2244. */
  2245. IPPAPI(void, ippsDecodeHuffFree_BZ2_8u16u, ( IppDecodeHuffState_BZ2* pDecodeHuffState ))
  2246. /* /////////////////////////////////////////////////////////////////////////////
  2247. // Name: ippsVLCEncodeFree_32s
  2248. // Purpose: Frees memory allocated for internal VLCDecode structure.
  2249. //
  2250. // Arguments:
  2251. // pVLCSpec Pointer to pointer to VLCEncoder specification structure.
  2252. //
  2253. // Return:
  2254. //
  2255. */
  2256. IPPAPI(void, ippsVLCEncodeFree_32s, (IppsVLCEncodeSpec_32s* pVLCSpec))
  2257. /* /////////////////////////////////////////////////////////////////////////////
  2258. // Name: ippsVLCEncodeInitAlloc_32s
  2259. // Purpose: ippsVLCEncodeInitAlloc_32s allocates and initializes the size
  2260. // for internal VLCEncode structure on the base of Variable Length Code table.
  2261. //
  2262. // Arguments:
  2263. // pInputTable pointer to input table.
  2264. // inputTableSize size of this table.
  2265. // ppVLCSpec pointer to pointer to VLCEncoder specification structure.
  2266. //
  2267. // Return:
  2268. // ippStsNoErr Indicates no error.
  2269. // ippStsNullPtrErr Indicates an error when one or more pointers
  2270. // passed to the function is NULL.
  2271. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2272. // ippStsMemAllocErr Indicates an error when memory for VLCEncoder
  2273. // specification structure was not allocated.
  2274. //
  2275. */
  2276. IPPAPI(IppStatus, ippsVLCEncodeInitAlloc_32s, (const IppsVLCTable_32s* pInputTable, int inputTableSize, IppsVLCEncodeSpec_32s** ppVLCSpec))
  2277. /* /////////////////////////////////////////////////////////////////////////////
  2278. // Name: ippsVLCEncodeInit_32s
  2279. // Purpose: ippsVLCEncodeInit_32s initializes the size for internal VLCEncode
  2280. // structure on the base of Variable Length Code table.
  2281. //
  2282. // Arguments:
  2283. // pInputTable pointer to input table.
  2284. // inputTableSize size of this table.
  2285. // pVLCSpec pointer to VLCEncoder specification structure.
  2286. //
  2287. // Return:
  2288. // ippStsNoErr Indicates no error.
  2289. // ippStsNullPtrErr Indicates an error when one or more pointers
  2290. // passed to the function is NULL.
  2291. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2292. //
  2293. */
  2294. IPPAPI(IppStatus, ippsVLCEncodeInit_32s, (const IppsVLCTable_32s* pInputTable, int inputTableSize, IppsVLCEncodeSpec_32s* pVLCSpec))
  2295. /* /////////////////////////////////////////////////////////////////////////////
  2296. // Name: ippsVLCEncodeGetSize_32s
  2297. // Purpose: ippsVLCEncodeGetSize_32s calculates the size for internal VLCEncode
  2298. // structure on the base of Variable Length Code table.
  2299. //
  2300. // Arguments:
  2301. // pInputTable pointer to input table.
  2302. // inputTableSize size of this table.
  2303. // pSize pointer to size of VLCEncoder specification structure.
  2304. //
  2305. // Return:
  2306. // ippStsNoErr Indicates no error.
  2307. // ippStsNullPtrErr Indicates an error when one or more pointers
  2308. // passed to the function is NULL.
  2309. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2310. //
  2311. */
  2312. IPPAPI(IppStatus, ippsVLCEncodeGetSize_32s, (const IppsVLCTable_32s* pInputTable, int inputTableSize, Ipp32s* pSize))
  2313. /* /////////////////////////////////////////////////////////////////////////////
  2314. //
  2315. // Name: ippsVLCEncodeBlock_16s1u
  2316. // Purpose: ippsVLCEncodeBlock_16s1u encodes dstLen elements from the source
  2317. // data pSrc and stores the result in the destination buffer *ppDst.
  2318. // In addition, the function advances pointer *ppDst on the number
  2319. // successfully written bytes and stores the actual it in ppDst.
  2320. // The functions updates *pSrcBitsOffset to the value of the actual
  2321. // bit offset in the source buffer *ppDst.
  2322. //
  2323. // Arguments:
  2324. // pSrc pointer to source values array.
  2325. // srcLen size of value is array pSrc.
  2326. // ppDst pointer to pointer to destination bitstream.
  2327. // pDstBitsOffset pointer to in/out bit offset in pDst.
  2328. // pVLCSpec pointer to VLCEncoder specification structure.
  2329. //
  2330. // Return:
  2331. // ippStsNoErr Indicates no error.
  2332. // ippStsNullPtrErr Indicates an error when one or more pointers
  2333. // passed to the function is NULL.
  2334. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2335. //
  2336. */
  2337. IPPAPI(IppStatus, ippsVLCEncodeBlock_16s1u, (const Ipp16s* pSrc, int srcLen, Ipp8u** ppDst, int* pDstBitsOffset, const IppsVLCEncodeSpec_32s* pVLCSpec))
  2338. /* /////////////////////////////////////////////////////////////////////////////
  2339. //
  2340. // Name: ippsVLCEncodeOne_16s1u
  2341. // Purpose: ippsVLCEncodeOne_16s1u uses VLC table specified for
  2342. // ippsVLCEncodeInitAlloc_32s function or for ippsVLCEncodeInit_32s function.
  2343. //
  2344. // Arguments:
  2345. // src source value.
  2346. // ppDst pointer to pointer to destination bitstream.
  2347. // pDstBitsOffset pointer to in/out bit offset in pDst.
  2348. // pVLCSpec pointer to VLCEncoder specification structure.
  2349. //
  2350. // Return:
  2351. // ippStsNoErr Indicates no error.
  2352. // ippStsNullPtrErr Indicates an error when one or more pointers
  2353. // passed to the function is NULL.
  2354. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2355. //
  2356. */
  2357. IPPAPI(IppStatus, ippsVLCEncodeOne_16s1u, (Ipp16s src, Ipp8u** pDst, int* pDstBitsOffset, const IppsVLCEncodeSpec_32s* pVLCSpec))
  2358. /* /////////////////////////////////////////////////////////////////////////////
  2359. // Name: ippsVLCCountBits_16s32s
  2360. // Purpose: ippsVLCCountBits_16s32s calculates number of bits necessary for encoding
  2361. // source data in pSrc using variable Length Codes specified by pInputTable
  2362. // in the function ippsVLCEncodeInitAlloc_32s or in ippsVLCEncodeInit_32s.
  2363. //
  2364. // Arguments:
  2365. // pVLCSpec pointer to pointer to VLCEncoder specification structure.
  2366. //
  2367. // Return:
  2368. // ippStsNoErr Indicates no error.
  2369. // ippStsNullPtrErr Indicates an error when one or more pointers
  2370. // passed to the function is NULL.
  2371. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2372. //
  2373. */
  2374. IPPAPI(IppStatus, ippsVLCCountBits_16s32s, (const Ipp16s* pSrc, int srcLen, Ipp32s* pCountBits, const IppsVLCEncodeSpec_32s* pVLCSpec))
  2375. /* /////////////////////////////////////////////////////////////////////////////
  2376. // Name: ippsVLCDecodeGetSize_32s
  2377. // Purpose: calculates the size for internal VLCDecode structure on
  2378. // the base of input parameters
  2379. //
  2380. // Arguments:
  2381. // pInputTable pointer to input table.
  2382. // inputTableSize size of this table
  2383. // pSubTablesSizes sizes of subTables
  2384. // numSubTables num of Subtabtes.
  2385. // pSize pointer to size of VLCDecoder specification
  2386. // structure
  2387. //
  2388. // Return:
  2389. // ippStsNoErr Indicates no error.
  2390. // ippStsNullPtrErr Indicates an error when one or more pointers
  2391. // passed to the function is NULL.
  2392. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2393. // of codec in the input table exceeds 32;
  2394. // 2) when any size in of subtables in
  2395. // pSubTablesSizes is less than one;
  2396. // 3)when sum of this values is less than the
  2397. // maximal length of codes in the input table.
  2398. //
  2399. */
  2400. IPPAPI(IppStatus, ippsVLCDecodeGetSize_32s,(const IppsVLCTable_32s *pInputTable,
  2401. int inputTableSize,
  2402. Ipp32s *pSubTablesSizes,
  2403. int numSubTables,
  2404. Ipp32s *pSize))
  2405. /* /////////////////////////////////////////////////////////////////////////////
  2406. // Name: ippsVLCDecodeInit_32s
  2407. // Purpose: initializes internal VLCDecode structure
  2408. // based on the input parameters
  2409. //
  2410. // Arguments:
  2411. // pInputTable pointer to input table.
  2412. // inputTableSize size of this table
  2413. // pSubTablesSizes sizes of subTables
  2414. // numSubTables num of Subtabtes.
  2415. // pVLCSpec pointer to VLCDecoder specification structure
  2416. //
  2417. // Return:
  2418. // ippStsNoErr Indicates no error.
  2419. // ippStsNullPtrErr Indicates an error when one or more pointers
  2420. // passed to the function is NULL.
  2421. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2422. // of codec in the input table exceeds 32;
  2423. // 2) when any size in of subtables in
  2424. // pSubTablesSizes is less than one;
  2425. // 3)when sum of this values is less than the
  2426. // maximal length of codes in the input table.
  2427. //
  2428. */
  2429. IPPAPI(IppStatus, ippsVLCDecodeInit_32s,(const IppsVLCTable_32s *pInputTable,
  2430. int inputTableSize,
  2431. Ipp32s *pSubTablesSizes,
  2432. int numSubTables,
  2433. IppsVLCDecodeSpec_32s *pVLCSpec))
  2434. /* /////////////////////////////////////////////////////////////////////////////
  2435. // Name: ippsVLCDecodeInitAlloc_32s
  2436. // Purpose: allocates and initializes internal VLCDecode structure
  2437. // based on the input parameters
  2438. //
  2439. // Arguments:
  2440. // pInputTable pointer to input table.
  2441. // inputTableSize size of this table
  2442. // pSubTablesSizes sizes of subTables
  2443. // numSubTables num of Subtabtes.
  2444. // ppVLCSpec pointer to pointer VLCDecoder specification structure
  2445. //
  2446. // Return:
  2447. // ippStsNoErr Indicates no error.
  2448. // ippStsNullPtrErr Indicates an error when one or more pointers
  2449. // passed to the function is NULL.
  2450. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2451. // of codec in the input table exceeds 32;
  2452. // 2) when any size in of subtables in
  2453. // pSubTablesSizes is less than one;
  2454. // 3)when sum of this values is less than the
  2455. // maximal length of codes in the input table.
  2456. // ippStsMemAllocErr Indicates an error when memory for VLCDecoder
  2457. // specification structure was not allocated.
  2458. //
  2459. */
  2460. IPPAPI(IppStatus, ippsVLCDecodeInitAlloc_32s,(const IppsVLCTable_32s *pInputTable,
  2461. int inputTableSize,
  2462. Ipp32s *pSubTablesSizes,
  2463. int numSubTables,
  2464. IppsVLCDecodeSpec_32s **ppVLCSpec))
  2465. /* /////////////////////////////////////////////////////////////////////////////
  2466. // Name: ippsVLCDecodeFree_32s
  2467. // Purpose: frees memory allocated for internal VLCDecode structure
  2468. //
  2469. // Arguments:
  2470. // pVLCSpec pointer to VLCDecoder specification structure
  2471. //
  2472. // Return:
  2473. //
  2474. */
  2475. IPPAPI(void, ippsVLCDecodeFree_32s, (IppsVLCDecodeSpec_32s *pVLCSpec))
  2476. /* /////////////////////////////////////////////////////////////////////////////
  2477. // Name: ippsVLCDecodeBlock_1u16s
  2478. // Purpose: decodes a dstLen element encoded by VLC code from the source data
  2479. // *ppSrc with *pSrcBitsOffset bits offset and stores the result in
  2480. // the destination *pDst
  2481. //
  2482. // Arguments:
  2483. // ppSrc pointer to pointer to source input bitstream
  2484. // pSrcBitsOffset pointer to in/out source stream bit offset position
  2485. // pDst decoded values array
  2486. // dstLen number of values to decode into array pDst
  2487. // pVLCSpec pointer to VLCDecoder specification structure
  2488. //
  2489. // Return:
  2490. // ippStsNoErr Indicates no error.
  2491. // ippStsNullPtrErr Indicates an error when one or more pointers passed to
  2492. // the function is NULL.
  2493. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2494. // It can indicate that bitstream contain code that is not
  2495. // specified inside the used table.
  2496. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more than 7.
  2497. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  2498. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  2499. //
  2500. */
  2501. IPPAPI(IppStatus, ippsVLCDecodeBlock_1u16s,(Ipp8u **ppSrc,
  2502. int *pSrcBitsOffset,
  2503. Ipp16s *pDst,
  2504. int dstLen,
  2505. const IppsVLCDecodeSpec_32s *pVLCSpec))
  2506. /* /////////////////////////////////////////////////////////////////////////////
  2507. // Name: ippsVLCDecodeOne_1u16s
  2508. // Purpose: decodes a single element encoded by VLC code from the source data
  2509. // *ppSrc with *pSrcBitsOffset bits offset and stores the result in
  2510. // the destination *pDst
  2511. //
  2512. // Arguments:
  2513. // ppSrc pointer to pointer to source input bitstream
  2514. // pSrcBitsOffset pointer to in/out source stream bit offset position
  2515. // pDst decoded value
  2516. // pVLCSpec pointer to VLCDecoder specification structure
  2517. //
  2518. // Return:
  2519. // ippStsNoErr Indicates no error.
  2520. // ippStsNullPtrErr Indicates an error when one or more pointers passed to
  2521. // the function is NULL.
  2522. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2523. // It can indicate that bitstream contain code that is not
  2524. // specified inside the used table.
  2525. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more than 7.
  2526. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  2527. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  2528. //
  2529. */
  2530. IPPAPI(IppStatus, ippsVLCDecodeOne_1u16s,(Ipp8u **ppSrc,
  2531. int *pSrcBitsOffset,
  2532. Ipp16s *pDst,
  2533. const IppsVLCDecodeSpec_32s *pVLCSpec))
  2534. /* /////////////////////////////////////////////////////////////////////////////
  2535. // Name: ippsVLCDecodeUTupleGetSize_32s
  2536. // Purpose: calculates the size for internal VLCDecode structure on
  2537. // the base of input parameters
  2538. //
  2539. // Arguments:
  2540. // pInputTable pointer to input table.
  2541. // inputTableSize size of this table
  2542. // pSubTablesSizes sizes of subTables
  2543. // numSubTables num of Subtabtes.
  2544. // numElements number of elements in tuple
  2545. // numValueBit size of one element value, bit.
  2546. // pSize pointer to size of VLCDecoder specification
  2547. // structure
  2548. //
  2549. // Return:
  2550. // ippStsNoErr Indicates no error.
  2551. // ippStsNullPtrErr Indicates an error when one or more pointers
  2552. // passed to the function is NULL.
  2553. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2554. // of codec in the input table exceeds 32;
  2555. // 2) when any size in of subtables in
  2556. // pSubTablesSizes is less than one;
  2557. // 3)when sum of this values is less than the
  2558. // maximal length of codes in the input table.
  2559. //
  2560. */
  2561. IPPAPI(IppStatus, ippsVLCDecodeUTupleGetSize_32s,(const IppsVLCTable_32s *pInputTable,
  2562. int inputTableSize,
  2563. Ipp32s *pSubTablesSizes,
  2564. int numSubTables,
  2565. int numElements,
  2566. int numValueBit,
  2567. Ipp32s *pSize))
  2568. /*******************************************************************/
  2569. /* /////////////////////////////////////////////////////////////////////////////
  2570. // Name: ippsVLCDecodeUTupleInit_32s
  2571. // Purpose: initializes internal VLCDecode structure
  2572. // based on the input parameters
  2573. //
  2574. // Arguments:
  2575. // pInputTable pointer to input table.
  2576. // inputTableSize size of this table
  2577. // pSubTablesSizes sizes of subTables
  2578. // numSubTables num of Subtabtes.
  2579. // numElements number of elements in tuple
  2580. // numValueBit size of one element value, bit.
  2581. // pVLCSpec pointer to VLCDecoder specification structure
  2582. //
  2583. // Return:
  2584. // ippStsNoErr Indicates no error.
  2585. // ippStsNullPtrErr Indicates an error when one or more pointers
  2586. // passed to the function is NULL.
  2587. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2588. // of codec in the input table exceeds 32;
  2589. // 2) when any size in of subtables in
  2590. // pSubTablesSizes is less than one;
  2591. // 3)when sum of this values is less than the
  2592. // maximal length of codes in the input table.
  2593. //
  2594. */
  2595. IPPAPI(IppStatus, ippsVLCDecodeUTupleInit_32s,(const IppsVLCTable_32s *pInputTable,
  2596. int inputTableSize,
  2597. Ipp32s *pSubTablesSizes,
  2598. int numSubTables,
  2599. int numElements,
  2600. int numValueBit,
  2601. IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  2602. /*******************************************************************/
  2603. /* /////////////////////////////////////////////////////////////////////////////
  2604. // Name: ippsVLCDecodeUTupleInitAlloc_32s
  2605. // Purpose: allocates and initializes internal VLCDecode structure
  2606. // based on the input parameters
  2607. //
  2608. // Arguments:
  2609. // pInputTable pointer to input table.
  2610. // inputTableSize size of this table
  2611. // pSubTablesSizes sizes of subTables
  2612. // numSubTables num of Subtabtes.
  2613. // numElements number of elements in tuple
  2614. // numValueBit size of one element value, bit.
  2615. // ppVLCSpec pointer to pointer VLCDecoder specification structure
  2616. //
  2617. // Return:
  2618. // ippStsNoErr Indicates no error.
  2619. // ippStsNullPtrErr Indicates an error when one or more pointers
  2620. // passed to the function is NULL.
  2621. // ippStsVLCUsrTblCodeLengthErr Indicates an error when 1) the maximal length
  2622. // of codec in the input table exceeds 32;
  2623. // 2) when any size in of subtables in
  2624. // pSubTablesSizes is less than one;
  2625. // 3)when sum of this values is less than the
  2626. // maximal length of codes in the input table.
  2627. // ippStsMemAllocErr Indicates an error when memory for VLCDecoder
  2628. // specification structure was not allocated.
  2629. //
  2630. */
  2631. IPPAPI(IppStatus, ippsVLCDecodeUTupleInitAlloc_32s,(const IppsVLCTable_32s *pInputTable,
  2632. int inputTableSize,
  2633. Ipp32s *pSubTablesSizes,
  2634. int numSubTables,
  2635. int numElements,
  2636. int numValueBit,
  2637. IppsVLCDecodeUTupleSpec_32s **ppVLCSpec))
  2638. /*******************************************************************/
  2639. /* /////////////////////////////////////////////////////////////////////////////
  2640. // Name: ippsVLCDecodeUTupleFree_32s
  2641. // Purpose: frees memory allocated for internal VLCDecode structure
  2642. //
  2643. // Arguments:
  2644. // pVLCSpec pointer to VLCDecoder specification structure
  2645. //
  2646. // Return:
  2647. //
  2648. */
  2649. IPPAPI(void, ippsVLCDecodeUTupleFree_32s,(IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  2650. /* /////////////////////////////////////////////////////////////////////////////
  2651. // Name: ippsVLCDecodeUTupleBlock_1u16s
  2652. // Purpose: decodes a dstLen element encoded by VLC code from the source data
  2653. // *ppSrc with *pSrcBitsOffset bits offset and stores the result in
  2654. // the destination *pDst
  2655. //
  2656. // Arguments:
  2657. // ppSrc pointer to pointer to source input bitstream
  2658. // pSrcBitsOffset pointer to in/out source stream bit offset position
  2659. // pDst decoded values array
  2660. // dstLen number of values to decode into array pDst
  2661. // pVLCSpec pointer to VLCDecoder specification structure
  2662. //
  2663. // Return:
  2664. // ippStsNoErr Indicates no error.
  2665. // ippStsNullPtrErr Indicates an error when one or more pointers passed to
  2666. // the function is NULL.
  2667. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2668. // It can indicate that bitstream contain code that is not
  2669. // specified inside the used table.
  2670. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more than 7.
  2671. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  2672. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  2673. //
  2674. */
  2675. IPPAPI(IppStatus, ippsVLCDecodeUTupleBlock_1u16s,(Ipp8u **ppSrc,
  2676. int *pSrcBitsOffset,
  2677. Ipp16s *pDst,
  2678. int dstLen,
  2679. const IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  2680. /*******************************************************************/
  2681. /* /////////////////////////////////////////////////////////////////////////////
  2682. // Name: ippsVLCDecodeUTupleOne_1u16s
  2683. // Purpose: decodes a single element encoded by VLC code from the source data
  2684. // *ppSrc with *pSrcBitsOffset bits offset and stores the result in
  2685. // the destination *pDst
  2686. //
  2687. // Arguments:
  2688. // ppSrc pointer to pointer to source input bitstream
  2689. // pSrcBitsOffset pointer to in/out source stream bit offset position
  2690. // pDst decoded value
  2691. // pVLCSpec pointer to VLCDecoder specification structure
  2692. //
  2693. // Return:
  2694. // ippStsNoErr Indicates no error.
  2695. // ippStsNullPtrErr Indicates an error when one or more pointers passed to
  2696. // the function is NULL.
  2697. // ippStsVLCInputDataErr Indicates an error when incorrect input is used.
  2698. // It can indicate that bitstream contain code that is not
  2699. // specified inside the used table.
  2700. // ippStsBitOffsetErr Indicate an error when offset less than 0 or more than 7.
  2701. // ippStsContextMatchErr Indicate an error when pVLCSpec struct was not created by
  2702. // ippsVLCDecodeInit_32s or ippsVLCDecodeInitAlloc_32s functions.
  2703. //
  2704. */
  2705. IPPAPI(IppStatus, ippsVLCDecodeUTupleOne_1u16s,(Ipp8u **ppSrc,
  2706. int *pSrcBitsOffset,
  2707. Ipp16s *pDst,
  2708. const IppsVLCDecodeUTupleSpec_32s *pVLCSpec))
  2709. /**************************************************
  2710. IPP LZO Definitions
  2711. ***************************************************/
  2712. #if !defined ( _OWN_BLDPCS )
  2713. typedef enum {
  2714. IppLZO1XST, /* Single-threaded, generic LZO-compatible*/
  2715. IppLZO1XMT /* Multi-threaded */
  2716. } IppLZOMethod ;
  2717. struct LZOState_8u;
  2718. typedef struct LZOState_8u IppLZOState_8u;
  2719. #endif
  2720. /*******************************************************************/
  2721. /* /////////////////////////////////////////////////////////////////////////////
  2722. // Name: ippsEncodeLZOGetSize
  2723. // Purpose: returns structure size necessary for compression
  2724. //
  2725. // Arguments:
  2726. // method LZO method to be used during compression
  2727. // maxInputLen maximum length of input buffer, which will be processed by Encode
  2728. // pSize pointer to size variable
  2729. //
  2730. // Return:
  2731. // ippStsBadArgErr illegal method
  2732. // ippStsNullPtrErr NULL pointer detected
  2733. // ippStsNoErr no error
  2734. //
  2735. */
  2736. IPPAPI(IppStatus, ippsEncodeLZOGetSize, (IppLZOMethod method, Ipp32u maxInputLen, Ipp32u *pSize))
  2737. /* /////////////////////////////////////////////////////////////////////////////
  2738. // Name: ippsEncodeLZO_8u
  2739. // Purpose: compresses specified input buffer
  2740. //
  2741. // Arguments:
  2742. // pSrc input data address
  2743. // srcLen input data length
  2744. // pDst output buffer address
  2745. // pDstLen pointer to resulting length variable, must contain output buffer length upon start
  2746. // pLZOState pointer to IppLZOState structure variable
  2747. //
  2748. // Return:
  2749. // ippStsNullPtrErr one of the pointers is NULL
  2750. // ippStsDstSizeLessExpected output buffer is too short for compressed data
  2751. // ippStsNoErr no error detected
  2752. //
  2753. */
  2754. IPPAPI(IppStatus, ippsEncodeLZO_8u, (const Ipp8u *pSrc, Ipp32u srcLen, Ipp8u *pDst, Ipp32u *pDstLen, IppLZOState_8u *pLZOState ))
  2755. /* /////////////////////////////////////////////////////////////////////////////
  2756. // Name: ippsEncodeLZOInit
  2757. // Purpose: initializes IppLZOSate_8u structure
  2758. //
  2759. // Arguments:
  2760. // method LZO compression method desired
  2761. // maxInputLen maximum length of input buffer, which will be processed by Encode
  2762. // pLZOState pointer to IppLZOState structure variable
  2763. //
  2764. // Return:
  2765. // ippStsNullPtrErr one of the pointers is NULL
  2766. // ippStsBadArgErr illegal method
  2767. // ippStsNoErr no error detected
  2768. //
  2769. */
  2770. IPPAPI(IppStatus, ippsEncodeLZOInit_8u, (IppLZOMethod method, Ipp32u maxInputLen, IppLZOState_8u *pLZOState))
  2771. /* /////////////////////////////////////////////////////////////////////////////
  2772. // Name: ippsDecodeLZO_8u
  2773. // Purpose: decompresses specified input buffer to output buffer, returns decompressed data length
  2774. // Name: ippsDecodeLZOSafe_8u
  2775. // Purpose: decompresses specified input buffer to output buffer with checking output buffer boundaries, returns decompressed data length
  2776. //
  2777. // Arguments:
  2778. // pSrc pointer to input buffer
  2779. // srcLen input data length
  2780. // pDst pointer to output buffer
  2781. // pDstLen pointer to output data length variable. Initially contains output buffer length
  2782. //
  2783. // Return:
  2784. // ippStsNullPtrErr one of the pointers is NULL
  2785. // ippStsDstSizeLessExpected output buffer is too short for compressed data
  2786. // ippStsSrcSizeLessExpected input buffer data is not complete, i.e. no EOF found
  2787. // ippStsBrokenLzoStream ippsDecodeLZOSafe_8u detected output buffer boundary violation
  2788. // ippStsNoErr no error detected
  2789. //
  2790. */
  2791. IPPAPI(IppStatus, ippsDecodeLZO_8u, (const Ipp8u *pSrc, Ipp32u srcLen, Ipp8u *pDst, Ipp32u *pDstLen))
  2792. IPPAPI(IppStatus, ippsDecodeLZOSafe_8u, (const Ipp8u *pSrc, Ipp32u srcLen, Ipp8u *pDst, Ipp32u *pDstLen))
  2793. #ifdef __cplusplus
  2794. }
  2795. #endif
  2796. #if defined (_IPP_STDCALL_CDECL)
  2797. #undef _IPP_STDCALL_CDECL
  2798. #define __stdcall __cdecl
  2799. #endif
  2800. #endif /* __IPPDC_H__ */
  2801. /* ////////////////////////////// End of file /////////////////////////////// */