ippcc.h 169 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024
  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) 2005-2009 Intel Corporation. All Rights Reserved.
  8. //
  9. //
  10. // Intel(R) Performance Primitives
  11. // Color Conversion Library (ippCC)
  12. //
  13. */
  14. #if !defined( __IPPCC_H__ ) || defined( _OWN_BLDPCS )
  15. #define __IPPCC_H__
  16. #if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall)
  17. #define _IPP_STDCALL_CDECL
  18. #undef __stdcall
  19. #endif
  20. #ifndef __IPPDEFS_H__
  21. #include "ippdefs.h"
  22. #endif
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #if !defined( _OWN_BLDPCS )
  27. typedef enum {
  28. ippDitherNone,
  29. ippDitherFS,
  30. ippDitherJJN,
  31. ippDitherStucki,
  32. ippDitherBayer
  33. } IppiDitherType;
  34. #endif /* _OWN_BLDPCS */
  35. /* /////////////////////////////////////////////////////////////////////////////
  36. ////////////////////////////////////////////////////////////////////////////////
  37. // Functions declarations
  38. ////////////////////////////////////////////////////////////////////////////////
  39. ///////////////////////////////////////////////////////////////////////////// */
  40. /* /////////////////////////////////////////////////////////////////////////////
  41. // Name: ippccGetLibVersion
  42. // Purpose: getting of the library version
  43. // Returns: the structure of information about version
  44. // of ippCC library
  45. // Parameters:
  46. //
  47. // Notes: not necessary to release the returned structure
  48. */
  49. IPPAPI( const IppLibraryVersion*, ippccGetLibVersion, (void) )
  50. /* /////////////////////////////////////////////////////////////////////////////
  51. // Color Space Conversion Functions
  52. ///////////////////////////////////////////////////////////////////////////// */
  53. /* /////////////////////////////////////////////////////////////////////////////
  54. // Name: ippiCbYCr422ToBGR_709HDTV_8u_C2C3R
  55. // Purpose: Converts a UYVY image to the BGR24 image
  56. // Name: ippiCbYCr422ToBGR_709HDTV_8u_C2C4R
  57. // Purpose: Converts a UYVY image to the BGRA image
  58. // Name: ippiBGRToCbYCr422_709HDTV_8u_C3C2R
  59. // Purpose: Converts a BGR24 image to the UYVY image
  60. // Name: ippiBGRToCbYCr422_709HDTV_8u_AC4C2R
  61. // Purpose: Converts a BGRA image to the UYVY image
  62. // Name: ippiYCbCr420ToBGR_709HDTV_8u_P3C4R
  63. // Purpose: Converts a I420(IYUV) image to the BGRA image
  64. // Name: ippiBGRToYCbCr420_709HDTV_8u_AC4P3R
  65. // Purpose: Converts a BGRA image to the I420(IYUV) image
  66. // Parameters:
  67. // pSrc Pointer to the source image (for pixel-order data).An array of
  68. // pointers to separate source color planes (for plane-order data)
  69. // pDst Pointer to the destination image (for pixel-order data).An array
  70. // of pointers to separate destination color planes (for plane-order data)
  71. // roiSize Size of source and destination ROI in pixels
  72. // srcStep Step in bytes through the source image to jump on the next line
  73. // dstStep Step in bytes through the destination image to jump on the next line
  74. // Returns:
  75. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  76. // ippStsSizeErr roiSize has field with zero or negative value
  77. // ippStsNoErr No errors
  78. // Reference:
  79. // Jack Keith
  80. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  81. // 1996.pp.(42-43)
  82. // YCbCr <> RGB ITU_R BT.709 (HDTV) where R'G'B' has a range of 16-235
  83. // Y has a range of 16 - 235. Cb,Cr have a range of 16 - 240
  84. // Y = 0.2126*R' + 0.7152*G' + 0.0722*B'
  85. // Cb = -0.117*R' - 0.394*G' + 0.511 * B' + 128
  86. // Cr = 0.511*R' - 0.464*G' - 0.047 * B' + 128
  87. // Cb = 0.5389 (B' - Y )
  88. // Cr = 0.6350 (R' - Y )
  89. // Digital representation.
  90. // Quantization level assignment:
  91. // - Video data: 1 through 254
  92. // - Timing reference: 0 and 255
  93. // R' = Y + 1.540*(Cr - 128 )
  94. // G' = Y - 0.459*(Cr - 128 ) - 0.183*( Cb - 128 )
  95. // B' = Y + 1.816*(Cb - 128)
  96. */
  97. IPPAPI(IppStatus, ippiCbYCr422ToBGR_709HDTV_8u_C2C3R,(const Ipp8u* pSrc,int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  98. IPPAPI(IppStatus, ippiCbYCr422ToBGR_709HDTV_8u_C2C4R,(const Ipp8u* pSrc,int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval ))
  99. IPPAPI(IppStatus, ippiBGRToCbYCr422_709HDTV_8u_C3C2R,(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  100. IPPAPI(IppStatus, ippiBGRToCbYCr422_709HDTV_8u_AC4C2R,(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  101. IPPAPI(IppStatus, ippiYCbCr420ToBGR_709HDTV_8u_P3C4R, (const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst , int dstStep , IppiSize roiSize, Ipp8u aval))
  102. IPPAPI(IppStatus, ippiBGRToYCbCr420_709HDTV_8u_AC4P3R,(const Ipp8u* pSrc , int srcStep , Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  103. /* /////////////////////////////////////////////////////////////////////////////
  104. // Parameters:
  105. // pSrc Pointer to the source image (for pixel-order data).An array of
  106. // pointers to separate source color planes (for plane-order data)
  107. // pDst Pointer to the destination image (for pixel-order data).An array
  108. // of pointers to separate destination color planes (for plane-order data)
  109. // roiSize Size of source and destination ROI in pixels
  110. // srcStep Step in bytes through the source image to jump on the next line
  111. // dstStep Step in bytes through the destination image to jump on the next line
  112. // Returns:
  113. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  114. // ippStsSizeErr roiSize has field with zero or negative value
  115. // ippStsNoErr No errors
  116. // Reference:
  117. // Jack Keith
  118. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  119. // 1996.pp.(42-43)
  120. // YCbCr <> RGB ITU_R BT.709 (Computer System Considerations) where R'G'B' has a range of 0-255
  121. // Y = 0.183*R' + 0.614*G' + 0.062*B' + 16
  122. // Cb = -0.101*R' - 0.338*G' + 0.439*B' + 128
  123. // Cr = 0.439*R' - 0.399*G' - 0.040*B' + 128
  124. // R' = 1.164*(Y - 16) + 1.793*(Cr - 128 )
  125. // G' = 1.164*(Y - 16) - 0.534*(Cr - 128 )- 0.213*( Cb - 128 )
  126. // B' = 1.164*(Y - 16) + 2.115*(Cb - 128 )
  127. */
  128. IPPAPI(IppStatus, ippiBGRToYCbCr420_709CSC_8u_AC4P3R,(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  129. IPPAPI(IppStatus, ippiBGRToYCrCb420_709CSC_8u_AC4P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  130. IPPAPI(IppStatus, ippiBGRToYCbCr420_709CSC_8u_C3P3R,(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  131. IPPAPI(IppStatus, ippiBGRToYCrCb420_709CSC_8u_C3P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  132. IPPAPI(IppStatus, ippiYCbCr420ToBGR_709CSC_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize))
  133. IPPAPI(IppStatus, ippiYCbCrToBGR_709CSC_8u_P3C3R,( const Ipp8u* pSrc[3],int srcStep,Ipp8u* pDst,int dstStep,IppiSize roiSize ))
  134. IPPAPI(IppStatus, ippiYCbCrToBGR_709CSC_8u_P3C4R,( const Ipp8u* pSrc[3],int srcStep,Ipp8u* pDst,int dstStep,IppiSize roiSize, Ipp8u aval))
  135. /* /////////////////////////////////////////////////////////////////////////////
  136. // Names:
  137. // ippiBGRToCbYCr422_8u_AC4C2R, ippiCbYCr422ToBGR_8u_C2C4R,
  138. // ippiYCbCr411ToBGR_8u_P3C3R
  139. // ippiYCbCr411ToBGR_8u_P3C4R
  140. //
  141. // ippiRGBToCbYCr422_8u_C3C2R, ippiCbYCr422ToRGB_8u_C2C3R,
  142. // ippiRGBToCbYCr422Gamma_8u_C3C2R,
  143. // ippiYCbCr422ToRGB_8u_P3C3R
  144. //
  145. // ippiRGBToYCbCr422_8u_C3C2R, ippiYCbCr422ToRGB_8u_C2C3R,
  146. // ippiRGBToYCbCr422_8u_P3C2R, ippiYCbCr422ToRGB_8u_C2P3R,
  147. //
  148. // ippiRGBToYCbCr420_8u_C3P3R, ippiYCbCr420ToRGB_8u_P3C3R,
  149. // ippiYCbCr420ToBGR_8u_P3C3R,
  150. //
  151. // ippiYCbCr422ToRGB565_8u16u_C2C3R, ippiYCbCr422ToBGR565_8u16u_C2C3R,
  152. // ippiYCbCr422ToRGB555_8u16u_C2C3R, ippiYCbCr422ToBGR555_8u16u_C2C3R,
  153. // ippiYCbCr422ToRGB444_8u16u_C2C3R, ippiYCbCr422ToBGR444_8u16u_C2C3R,
  154. //
  155. // ippiYCbCrToRGB565_8u16u_P3C3R, ippiYCbCrToBGR565_8u16u_P3C3R,
  156. // ippiYCbCrToRGB444_8u16u_P3C3R, ippiYCbCrToBGR444_8u16u_P3C3R,
  157. // ippiYCbCrToRGB555_8u16u_P3C3R, ippiYCbCrToBGR555_8u16u_P3C3R,
  158. //
  159. // ippiYCbCr420ToRGB565_8u16u_P3C3R, ippiYCbCr420ToBGR565_8u16u_P3C3R
  160. // ippiYCbCr420ToRGB555_8u16u_P3C3R, ippiYCbCr420ToBGR555_8u16u_P3C3R,
  161. // ippiYCbCr420ToRGB444_8u16u_P3C3R, ippiYCbCr420ToBGR444_8u16u_P3C3R,
  162. //
  163. // ippiYCbCr422ToRGB565_8u16u_P3C3R, ippiYCbCr422ToBGR565_8u16u_P3C3R,
  164. // ippiYCbCr422ToRGB555_8u16u_P3C3R, ippiYCbCr422ToBGR555_8u16u_P3C3R,
  165. // ippiYCbCr422ToRGB444_8u16u_P3C3R, ippiYCbCr422ToBGR444_8u16u_P3C3R,
  166. //
  167. // ippiRGBToYCrCb422_8u_C3C2R, ippiYCrCb422ToRGB_8u_C2C3R,
  168. // ippiRGBToYCrCb422_8u_P3C2R, ippiYCrCb422ToRGB_8u_C2P3R,
  169. //
  170. //
  171. // Purpose: Converts an RGB(BGR) image to the YCbCr (CbYCr, YCrCb) image and vice versa.
  172. // Parameters:
  173. // pSrc Pointer to the source image (for pixel-order data).An array of
  174. // pointers to separate source color planes (for plane-order data)
  175. // pDst Pointer to the destination image (for pixel-order data).An array
  176. of pointers to separate destination color planes (for plane-order data)
  177. // roiSize Size of source and destination ROI in pixels
  178. // srcStep Step in bytes through the source image to jump on the next line
  179. // dstStep Step in bytes through the destination image to jump on the next line
  180. // Returns:
  181. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  182. // ippStsSizeErr roiSize has field with zero or negative value
  183. // ippStsNoErr No errors
  184. // Reference:
  185. // Jack Keith
  186. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  187. // 1996.pp.(42-43)
  188. //
  189. // The YCbCr color space was developed as part of Recommendation ITU-R BT.601
  190. // (formerly CCI 601). Y is defined to have a nominal range of 16 to 235;
  191. // Cb and Cr are defined to have a range of 16 to 240, with 128 equal to zero.
  192. // The function ippiRGBToYCbCr422_8u_P3C2R uses 4:2:2 sampling format. For every
  193. // two horizontal Y samples, there is one Cb and Cr sample.
  194. // Each pixel in the input RGB image is of 24 bit depth. Each pixel in the
  195. // output YCbCr image is of 16 bit depth.
  196. // Sequence of samples in the YCbCr422 image is
  197. // Y0Cb0Y1Cr0,Y2Cb1Y3Cr1,...
  198. // Sequence of samples in the CbYCr422 image is:
  199. // Cb0Y0CrY1,Cb1Y2Cr1Y3,...
  200. // All functions operate on the gamma-corrected RGB (R'G'B') images
  201. // (except ippiRGBToCbYCrGamma_8u_C3C2R, see below) with pixel values
  202. // in the range 0 .. 255, as is commonly found in computer system.
  203. // Conversion is performed according to the following equations:
  204. //
  205. // Y = 0.257*R' + 0.504*G' + 0.098*B' + 16
  206. // Cb = -0.148*R' - 0.291*G' + 0.439*B' + 128
  207. // Cr = 0.439*R' - 0.368*G' - 0.071*B' + 128
  208. //
  209. // R' = 1.164*(Y - 16) + 1.596*(Cr - 128 )
  210. // G' = 1.164*(Y - 16) - 0.813*(Cr - 128 )- 0.392*( Cb - 128 )
  211. // B' = 1.164*(Y - 16) + 2.017*(Cb - 128 )
  212. //
  213. // Note that for the YCbCr-to-RGB equations, the RGB values must be saturated
  214. // at the 0 and 255 levels due to occasional excursions outside the nominal
  215. // YCbCr ranges.
  216. // ippiRGBToCbYCr422Gamma_8u_C3C2R function additionally performs gamma-correction, there is
  217. // sample down filter(1/4,1/2,1/4).
  218. */
  219. IPPAPI(IppStatus, ippiCbYCr422ToBGR_8u_C2C4R,(const Ipp8u* pSrc, int srcStep,
  220. Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval))
  221. IPPAPI(IppStatus, ippiBGRToCbYCr422_8u_AC4C2R,(const Ipp8u* pSrc, int srcStep ,
  222. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  223. IPPAPI(IppStatus, ippiYCbCr411ToBGR_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst,
  224. int dstStep, IppiSize roiSize))
  225. IPPAPI(IppStatus,ippiYCbCr411ToBGR_8u_P3C4R,(const Ipp8u* pSrc[3],int srcStep[3],
  226. Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval))
  227. IPPAPI(IppStatus, ippiCbYCr422ToRGB_8u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  228. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  229. IPPAPI(IppStatus, ippiRGBToCbYCr422Gamma_8u_C3C2R,(const Ipp8u* pSrc, int srcStep ,
  230. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  231. IPPAPI(IppStatus, ippiRGBToCbYCr422_8u_C3C2R,(const Ipp8u* pSrc, int srcStep ,
  232. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  233. IPPAPI(IppStatus, ippiYCbCr422ToRGB_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],
  234. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  235. IPPAPI(IppStatus, ippiRGBToYCbCr422_8u_C3C2R,(const Ipp8u* pSrc, int srcStep ,
  236. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  237. IPPAPI(IppStatus, ippiYCbCr422ToRGB_8u_C2C3R,(const Ipp8u* pSrc, int srcStep ,
  238. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  239. IPPAPI(IppStatus, ippiRGBToYCbCr422_8u_P3C2R,(const Ipp8u* pSrc[3], int srcStep ,
  240. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  241. IPPAPI(IppStatus, ippiYCbCr422ToRGB_8u_C2P3R,(const Ipp8u* pSrc, int srcStep,
  242. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  243. IPPAPI(IppStatus, ippiYCbCr420ToBGR_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],
  244. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  245. IPPAPI(IppStatus, ippiYCbCr420ToRGB_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],
  246. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  247. IPPAPI(IppStatus, ippiRGBToYCbCr420_8u_C3P3R,(const Ipp8u* pSrc, int srcStep ,
  248. Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize))
  249. IPPAPI(IppStatus, ippiYCbCr422ToRGB565_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  250. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  251. IPPAPI(IppStatus, ippiYCbCr422ToBGR565_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  252. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  253. IPPAPI(IppStatus, ippiYCbCr422ToRGB555_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  254. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  255. IPPAPI(IppStatus, ippiYCbCr422ToBGR555_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  256. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  257. IPPAPI(IppStatus, ippiYCbCr422ToRGB444_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  258. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  259. IPPAPI(IppStatus, ippiYCbCr422ToBGR444_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,
  260. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  261. IPPAPI(IppStatus, ippiYCbCrToBGR565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  262. IPPAPI(IppStatus, ippiYCbCrToRGB565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  263. IPPAPI(IppStatus, ippiYCbCrToBGR444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  264. IPPAPI(IppStatus, ippiYCbCrToRGB444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  265. IPPAPI(IppStatus, ippiYCbCrToBGR555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  266. IPPAPI(IppStatus, ippiYCbCrToRGB555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  267. IPPAPI(IppStatus, ippiYCbCr420ToBGR565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  268. IPPAPI(IppStatus, ippiYCbCr420ToRGB565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  269. IPPAPI(IppStatus, ippiYCbCr420ToBGR555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  270. IPPAPI(IppStatus, ippiYCbCr420ToRGB555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  271. IPPAPI(IppStatus, ippiYCbCr420ToBGR444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  272. IPPAPI(IppStatus, ippiYCbCr420ToRGB444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  273. IPPAPI(IppStatus, ippiYCbCr422ToBGR565_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  274. IPPAPI(IppStatus, ippiYCbCr422ToRGB565_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  275. IPPAPI(IppStatus, ippiYCbCr422ToBGR555_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  276. IPPAPI(IppStatus, ippiYCbCr422ToRGB555_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  277. IPPAPI(IppStatus, ippiYCbCr422ToBGR444_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  278. IPPAPI(IppStatus, ippiYCbCr422ToRGB444_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  279. IPPAPI(IppStatus, ippiRGBToYCrCb422_8u_C3C2R,(const Ipp8u* pSrc, int srcStep ,
  280. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  281. IPPAPI(IppStatus, ippiYCrCb422ToRGB_8u_C2C3R,(const Ipp8u* pSrc, int srcStep ,
  282. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  283. IPPAPI(IppStatus, ippiRGBToYCrCb422_8u_P3C2R,(const Ipp8u* pSrc[3], int srcStep ,
  284. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  285. IPPAPI(IppStatus, ippiYCrCb422ToRGB_8u_C2P3R,(const Ipp8u* pSrc, int srcStep,
  286. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  287. /* /////////////////////////////////////////////////////////////////////////////
  288. // Name: ippiYCbCrToBGR(RGB)565(555,444)Dither_8u16u_C3R
  289. // ippiYCbCrToBGR(RGB)565(555,444)Dither_8u16u_P3C3R
  290. // ippiYCbCr422ToBGR(RGB)565(555,444)Dither_8u16u_P3C3R
  291. // ippiYCbCr420ToBGR(RGB)565(555,444)Dither_8u16u_P3C3R
  292. // ippiYUV420ToBGR(RGB)565(555,444)Dither_8u16u_P3C3R
  293. // Purpose:
  294. // Converts a YCbCr(YUV) image to the 16-bit per pixel BGR(RGB) image with dithering.
  295. // Parameters:
  296. // pSrc Pointer to the source image (for pixel-order data).An array of pointers
  297. // to separate source color planes (for plane-order data)
  298. // pDst Pointer to the destination image (for pixel-order data).An array of pointers
  299. // to separate destination color planes (for plane-order data)
  300. // roiSize Size of the source and destination ROI in pixels.
  301. // srcStep Step in bytes through the source image to jump on the next line
  302. // dstStep Step in bytes through the destination image to jump on the next line
  303. // Returns:
  304. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  305. // ippStsSizeErr roiSize has a field with zero or negative value
  306. // ippStsNoErr No errors
  307. // After color conversion bit reduction is performed using Bayer's dithering algorithm
  308. */
  309. IPPAPI(IppStatus, ippiYCbCrToBGR565Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  310. IPPAPI(IppStatus, ippiYCbCrToRGB565Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  311. IPPAPI(IppStatus, ippiYCbCrToBGR555Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  312. IPPAPI(IppStatus, ippiYCbCrToRGB555Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  313. IPPAPI(IppStatus, ippiYCbCrToBGR444Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  314. IPPAPI(IppStatus, ippiYCbCrToRGB444Dither_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  315. IPPAPI(IppStatus, ippiYCbCrToBGR565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  316. IPPAPI(IppStatus, ippiYCbCrToRGB565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  317. IPPAPI(IppStatus, ippiYCbCrToBGR555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  318. IPPAPI(IppStatus, ippiYCbCrToRGB555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  319. IPPAPI(IppStatus, ippiYCbCrToBGR444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  320. IPPAPI(IppStatus, ippiYCbCrToRGB444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  321. IPPAPI(IppStatus, ippiYCbCr420ToBGR565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  322. IPPAPI(IppStatus, ippiYCbCr420ToRGB565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  323. IPPAPI(IppStatus, ippiYCbCr420ToBGR555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  324. IPPAPI(IppStatus, ippiYCbCr420ToRGB555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  325. IPPAPI(IppStatus, ippiYCbCr420ToBGR444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  326. IPPAPI(IppStatus, ippiYCbCr420ToRGB444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  327. IPPAPI(IppStatus, ippiYCbCr422ToBGR565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  328. IPPAPI(IppStatus, ippiYCbCr422ToRGB565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  329. IPPAPI(IppStatus, ippiYCbCr422ToBGR555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  330. IPPAPI(IppStatus, ippiYCbCr422ToRGB555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  331. IPPAPI(IppStatus, ippiYCbCr422ToBGR444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  332. IPPAPI(IppStatus, ippiYCbCr422ToRGB444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst, int dstStep, IppiSize roiSize))
  333. IPPAPI(IppStatus, ippiYCbCr422ToRGB555Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  334. IPPAPI(IppStatus, ippiYCbCr422ToBGR555Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  335. IPPAPI(IppStatus, ippiYCbCr422ToRGB565Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  336. IPPAPI(IppStatus, ippiYCbCr422ToBGR565Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  337. IPPAPI(IppStatus, ippiYCbCr422ToRGB444Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  338. IPPAPI(IppStatus, ippiYCbCr422ToBGR444Dither_8u16u_C2C3R,(const Ipp8u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  339. IPPAPI(IppStatus, ippiYUV420ToBGR444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  340. IPPAPI(IppStatus, ippiYUV420ToRGB444Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  341. IPPAPI(IppStatus, ippiYUV420ToBGR555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  342. IPPAPI(IppStatus, ippiYUV420ToRGB555Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  343. IPPAPI(IppStatus, ippiYUV420ToBGR565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  344. IPPAPI(IppStatus, ippiYUV420ToRGB565Dither_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  345. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  346. // Name: ippiBGR565ToYUV420_16u8u_C3P3R/ippiBGR555ToYUV420_16u8u_C3P3R
  347. // Return:
  348. // ippStsNoErr Ok
  349. // ippStsNullPtrErr one or more pointers are NULL
  350. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 0
  351. // Arguments:
  352. // pSrc Pointer to the source image
  353. // srcStep Step through the source image
  354. // pDst An array of pointers to separate destination color planes.
  355. // dstStep An array of step in bytes through the destination planes
  356. // roiSize region of interest to be processed, in pixels
  357. */
  358. IPPAPI(IppStatus, ippiBGR565ToYUV420_16u8u_C3P3R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  359. IPPAPI(IppStatus, ippiBGR555ToYUV420_16u8u_C3P3R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  360. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  361. // Name: ippiYCbCr422ToBGR_8u_C2C4R / ippiYCbCr422ToBGR_8u_C2C3R
  362. // Purpose: Converts a YUY2 image to the BGRA / RGB24 image
  363. // Return:
  364. // ippStsNoErr Ok
  365. // ippStsNullPtrErr One or more pointers are NULL
  366. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 1
  367. //
  368. // Arguments:
  369. // pSrc pointer to the source image
  370. // srcStep step for the source image
  371. // pDst pointer to the destination image
  372. // dstStep step for the destination image
  373. // roiSize region of interest to be processed, in pixels
  374. */
  375. IPPAPI(IppStatus, ippiYCbCr422ToBGR_8u_C2C4R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,int dstStep, IppiSize roiSize, Ipp8u aval ))
  376. IPPAPI(IppStatus, ippiYCbCr422ToBGR_8u_C2C3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,int dstStep, IppiSize roiSize ))
  377. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  378. // Name: ippiYCbCrToBGR_8u_P3C4R / ippiYCbCrToBGR_8u_P3C3R
  379. // Purpose: Converts a P444 image to the BGRA / RGB24 image
  380. // Return:
  381. // ippStsNoErr Ok
  382. // ippStsNullPtrErr One or more pointers are NULL
  383. // ippStsSizeErr if roiSize.width < 4 or if roiSize.height < 1
  384. // Arguments:
  385. // pSrc array of pointers to the components of the source image
  386. // srcStep array of step values for every component
  387. // pDst pointer to the destination image
  388. // dstStep step for the destination image
  389. // roiSize region of interest to be processed, in pixels
  390. */
  391. IPPAPI(IppStatus, ippiYCbCrToBGR_8u_P3C4R,( const Ipp8u* pSrc[3],int srcStep,Ipp8u* pDst,int dstStep,IppiSize roiSize, Ipp8u aval ))
  392. IPPAPI(IppStatus, ippiYCbCrToBGR_8u_P3C3R,( const Ipp8u* pSrc[3],int srcStep,Ipp8u* pDst,int dstStep,IppiSize roiSize ))
  393. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  394. // Name: ippiYCbCr411ToBGR565_8u16u_P3C3R / ippiYCbCr411ToBGR555_8u16u_P3C3R
  395. // Purpose: Converts a P411 image to the RGB565 / RGB555 image
  396. // Return:
  397. // ippStsNoErr Ok
  398. // ippStsNullPtrErr One or more pointers are NULL
  399. // ippStsSizeErr if roiSize.width < 4 or if roiSize.height < 1
  400. // Arguments:
  401. // pSrc array of pointers to the components of the source image
  402. // srcStep array of step values for every component
  403. // pDst pointer to the destination image
  404. // dstStep step for the destination image
  405. // roiSize region of interest to be processed, in pixels
  406. */
  407. IPPAPI(IppStatus, ippiYCbCr411ToBGR565_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst,int dstStep,IppiSize roiSize ))
  408. IPPAPI(IppStatus, ippiYCbCr411ToBGR555_8u16u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp16u* pDst,int dstStep,IppiSize roiSize ))
  409. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  410. // Name: ippiBGRToYCbCr411_8u_C3P3R/ippiBGRToYCbCr411_8u_AC4P3R/ippiBGR565ToYCbCr411_16u8u_C3P3R/ippiBGR555ToYCbCr411_16u8u_C3P3R
  411. // Purpose: Converts a RGB24/RGBA/RGB565/RGB565 image to the P411 image
  412. // Return:
  413. // ippStsNoErr Ok
  414. // ippStsNullPtrErr one or more pointers are NULL
  415. // ippStsSizeErr if roiSize.width < 4 or if roiSize.height < 1
  416. // Arguments:
  417. // pSrc Pointer to the source image
  418. // srcStep Step through the source image
  419. // pDst An array of pointers to separate destination color planes.
  420. // dstStep An array of step in bytes through the destination planes
  421. // roiSize region of interest to be processed, in pixels
  422. */
  423. IPPAPI(IppStatus, ippiBGRToYCbCr411_8u_C3P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  424. IPPAPI(IppStatus, ippiBGRToYCbCr411_8u_AC4P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  425. IPPAPI(IppStatus, ippiBGR565ToYCbCr411_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  426. IPPAPI(IppStatus, ippiBGR555ToYCbCr411_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  427. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  428. // Name: ippiBGRToYCbCr422_8u_C3P3R/ippiBGRToYCbCr422_8u_AC4P3R/ippiBGR565ToYCbCr422_16u8u_C3P3R/ippiBGR555ToYCbCr422_16u8u_C3P3R
  429. // Purpose: Converts a RGB24/RGBA/RGB565/RGB565 image to the P422 image
  430. // Return:
  431. // ippStsNoErr Ok
  432. // ippStsNullPtrErr one or more pointers are NULL
  433. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 1
  434. // Arguments:
  435. // pSrc Pointer to the source image
  436. // srcStep Step through the source image
  437. // pDst An array of pointers to separate destination color planes.
  438. // dstStep An array of step in bytes through the destination planes
  439. // roiSize region of interest to be processed, in pixels
  440. */
  441. IPPAPI(IppStatus, ippiBGRToYCbCr422_8u_C3P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  442. IPPAPI(IppStatus, ippiBGRToYCbCr422_8u_AC4P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  443. IPPAPI(IppStatus, ippiBGR565ToYCbCr422_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  444. IPPAPI(IppStatus, ippiBGR555ToYCbCr422_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  445. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  446. // Name: ippiBGRToYCbCr420_8u_C3P3R/ippiBGRToYCbCr420_8u_AC4P3R/ippiBGR565ToYCbCr420_16u8u_C3P3R/ippiBGR555ToYCbCr420_16u8u_C3P3R
  447. // Purpose: Converts a RGB24/RGBA/RGB565/RGB565 image to the IYUV image
  448. // Return:
  449. // ippStsNoErr Ok
  450. // ippStsNullPtrErr one or more pointers are NULL
  451. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 0
  452. // Arguments:
  453. // pSrc Pointer to the source image
  454. // srcStep Step through the source image
  455. // pDst An array of pointers to separate destination color planes.
  456. // dstStep An array of step in bytes through the destination planes
  457. // roiSize region of interest to be processed, in pixels
  458. */
  459. IPPAPI(IppStatus, ippiBGRToYCbCr420_8u_C3P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  460. IPPAPI(IppStatus, ippiBGRToYCbCr420_8u_AC4P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  461. IPPAPI(IppStatus, ippiBGR565ToYCbCr420_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  462. IPPAPI(IppStatus, ippiBGR555ToYCbCr420_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  463. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  464. // Name: ippiBGRToYCbCr422_8u_C3C2R/ippiBGRToYCbCr422_8u_AC4C2R/ippiBGR555ToYCbCr422_16u8u_C3C2R/ippiBGR565ToYCbCr422_16u8u_C3C2R
  465. // Purpose: Converts a RGB24/RGBA/RGB565/RGB565 image to the YUY2 image
  466. // Return:
  467. // ippStsNoErr Ok
  468. // ippStsNullPtrErr one or more pointers are NULL
  469. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 1
  470. // Arguments:
  471. // pSrc Pointer to the source image
  472. // srcStep Step through the source image
  473. // pDst An array of pointers to separate destination color planes.
  474. // dstStep An array of step in bytes through the destination planes
  475. // roiSize region of interest to be processed, in pixels
  476. */
  477. IPPAPI(IppStatus, ippiBGRToYCbCr422_8u_C3C2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  478. IPPAPI(IppStatus, ippiBGRToYCbCr422_8u_AC4C2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  479. IPPAPI(IppStatus, ippiBGR555ToYCbCr422_16u8u_C3C2R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  480. IPPAPI(IppStatus, ippiBGR565ToYCbCr422_16u8u_C3C2R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  481. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  482. // Name: ippiBGRToYCrCb420_8u_C3P3R/ippiBGRToYCrCb420_8u_AC4P3R/ippiBGR555ToYCrCb420_16u8u_C3P3R/ippiBGR565ToYCrCb420_16u8u_C3P3R
  483. // Purpose: Converts a RGB24/RGBA/RGB565/RGB565 image to the YV12 image
  484. // Return:
  485. // ippStsNoErr Ok
  486. // ippStsNullPtrErr one or more pointers are NULL
  487. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 2
  488. // Arguments:
  489. // pSrc Pointer to the source image
  490. // srcStep Step through the source image
  491. // pDst An array of pointers to separate destination color planes.
  492. // dstStep An array of step in bytes through the destination planes
  493. // roiSize region of interest to be processed, in pixels
  494. */
  495. IPPAPI(IppStatus, ippiBGRToYCrCb420_8u_C3P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  496. IPPAPI(IppStatus, ippiBGRToYCrCb420_8u_AC4P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  497. IPPAPI(IppStatus, ippiBGR555ToYCrCb420_16u8u_C3P3R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  498. IPPAPI(IppStatus, ippiBGR565ToYCrCb420_16u8u_C3P3R,( const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  499. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  500. // Name: ippiRGBToYCrCb420_8u_AC4P3R
  501. // Purpose: Converts a RGBA image to the YV12 image
  502. // Return:
  503. // ippStsNoErr Ok
  504. // ippStsNullPtrErr one or more pointers are NULL
  505. // ippStsDoubleSize Indicates a warning if roiSize is not a multiple of 2.
  506. // Arguments:
  507. // pSrc Pointer to the source image ROI.
  508. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  509. // pDst An array of pointers to ROI in the separate planes of the destination image.
  510. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  511. // roiSize Size of the source and destination ROI in pixels.
  512. */
  513. IPPAPI(IppStatus, ippiRGBToYCrCb420_8u_AC4P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  514. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  515. // Name: ippiYCrCb420ToRGB_8u_P3C4R and ippiYCbCr420ToBGR_8u_P3C4R
  516. // Purpose: Converts a YV12 image to the a RGBA image and converts a IYUV image to the a BGRA
  517. // Return:
  518. // ippStsNoErr Ok
  519. // ippStsNullPtrErr one or more pointers are NULL
  520. // ippStsDoubleSize Indicates a warning if roiSize is not a multiple of 2.
  521. // Arguments:
  522. // pSrc An array of pointers to ROI in separate planes of the source image.
  523. // srcStep An array of distances in bytes between starts of consecutive lines in the source image planes.
  524. // pDst Pointer to the destination image ROI.
  525. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  526. // roiSize Size of the source and destination ROI in pixels.
  527. // aval Constant value to create the fourth channel.
  528. */
  529. IPPAPI(IppStatus, ippiYCbCr420ToBGR_8u_P3C4R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval))
  530. IPPAPI(IppStatus, ippiYCrCb420ToRGB_8u_P3C4R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval ))
  531. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  532. // Name: ippiRGBToYCbCr_8u_AC4P3R and ippiRGBToYCbCr_8u_C3P3R
  533. // Purpose: Converts a RGBA and RGB image to the YUV 4:4:4 image
  534. // Return:
  535. // ippStsNoErr Ok
  536. // ippStsNullPtrErr one or more pointers are NULL
  537. // Arguments:
  538. // pSrc Pointer to the source image ROI for pixel-order image. An array of pointers to ROI in each separate source color planes for planar images.
  539. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  540. // pDst Pointer to the destination image ROI. An array of pointers to ROI in the separate destination color planes for planar images.
  541. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  542. // roiSize Size of the source and destination ROI in pixels.
  543. */
  544. IPPAPI(IppStatus, ippiRGBToYCbCr_8u_AC4P3R,( const Ipp8u* pSrc , int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  545. IPPAPI(IppStatus, ippiRGBToYCbCr_8u_C3P3R,( const Ipp8u* pSrc , int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  546. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  547. // Name: ippiYCbCrToRGB_8u_P3C4R
  548. // Purpose: Converts a YUV 4:4:4 image to the a RGBA image
  549. // Return:
  550. // ippStsNoErr Ok
  551. // ippStsNullPtrErr one or more pointers are NULL
  552. // Arguments:
  553. // pSrc An array of pointers to ROI in each separate source color planes.
  554. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  555. // pDst Pointer to the destination image ROI.
  556. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  557. // roiSize Size of the source and destination ROI in pixels.
  558. // aval Constant value to create the fourth channel.
  559. */
  560. IPPAPI(IppStatus, ippiYCbCrToRGB_8u_P3C4R,( const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst , int dstStep, IppiSize roiSize, Ipp8u aval ))
  561. /* ////////////////////////////////////////////////////////////////////////////
  562. // Name: ippiYCbCr422_8u_P3C2R, ippiYCbCr422_8u_C2P3R
  563. //
  564. // Purpose: Converts 422 planar image to 2-channel pixel-order
  565. // image and vice versa.
  566. //
  567. // Returns:
  568. // ippStsNoErr OK
  569. // ippStsNullPtrErr One or more pointers are NULL
  570. // ippStsSizeErr Width of first plain 422-image less than 2(4)
  571. // or height equal zero
  572. //
  573. // Parameters:
  574. // pSrc[3] Array of pointers to the source image planes
  575. // srcStep[3] Array of steps through the source image planes
  576. // pDst[3] Array of pointers to the destination image planes
  577. // dstStep[3] Array of steps through the destination image planes
  578. // pSrc Pointer to the source pixel-order image
  579. // srcStep Step through the source pixel-order image
  580. // pDst Pointer to the destination pixel-order image
  581. // dstStep Step through the destination pixel-order image
  582. // roiSize Size of the ROI
  583. */
  584. IPPAPI (IppStatus, ippiYCbCr422_8u_P3C2R, ( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize))
  585. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  586. // Name: ippiYCrCb420ToBGR_Filter_8u_P3C4R
  587. // Purpose: Converts a YV12 image to the RGB32 image
  588. // Return:
  589. // ippStsNoErr Ok
  590. // ippStsNullPtrErr one or more pointers are NULL
  591. // ippStsSizeErr if roiSize.width < 2 or if roiSize.height < 2
  592. // ippStsDoubleSize sizes of image is not multiples of 2
  593. // Arguments:
  594. // pDst Pointer to the destination image
  595. // dstStep Step through the destination image
  596. // pSrc An array of pointers to separate source color planes.
  597. // srcStep An array of step in bytes through the source planes
  598. // roiSize Region of interest to be processed, in pixels
  599. // aval Constant value to create the fourth channel.
  600. */
  601. IPPAPI(IppStatus, ippiYCrCb420ToBGR_Filter_8u_P3C4R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize, Ipp8u aval ))
  602. /* ////////////////////////////////////////////////////////////////////////////
  603. // Name: ippiJoin420_8u_P2C2R, ippiJoin420_Filter_8u_P2C2R
  604. //
  605. // Purpose: Converts 420 two-plane image to 2-channel pixel-order image,
  606. // ippiJoin420_Filter additionally performs deinterlace filtering NV12 to YUY2
  607. //
  608. // Returns:
  609. // ippStsNoErr OK
  610. // ippStsNullPtrErr One of the pointers is NULL
  611. // ippStsSizeErr roiSize has a field with zero or negative value
  612. //
  613. // Parameters:
  614. // pSrcY Pointer to the source image Y plane.
  615. // srcYStep Step through the source image Y plane.
  616. // pSrcCbCr Pointer to the source image interleaved chrominance plane.
  617. // srcCbCrStep Step through the source image CbCr plane.
  618. // pDst Pointer to the destination image
  619. // dstStep Step through the destination image
  620. // roiSize Size of the ROI, height and width should be multiple of 2.
  621. // layout Slice layout (for deinterlace filter).
  622. // Possible values:
  623. // IPP_UPPER - the first slice.
  624. // IPP_CENTER - the middle slices.
  625. // IPP_LOWER - the last slice.
  626. // IPP_LOWER && IPP_UPPER && IPP_CENTER - image is not sliced.
  627. // Notes:
  628. // Source 4:2:0 two-plane image format ( NV12 ):
  629. // all Y (pSrcY) samples are found first in memory as an array of
  630. // unsigned char with an even number of lines memory alignment),
  631. // followed immediately by an array(pSrcCbCr) of unsigned char
  632. // containing interleaved U and V samples (such that if addressed as a little-endian
  633. // WORD type, U would be in the LSBs and V would be in the MSBs).
  634. //
  635. // Sequence of samples in the destination 4:2:2 pixel-order two-channel image (YUY2):
  636. // Y0U0Y1V0,Y2U1Y3V1,...
  637. //
  638. // The function ippiJoin420_Filter_8u_P2C2R usually operates on the sliced images
  639. // ( the height of slices should be a multiple of 16).
  640. //
  641. */
  642. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_8u_P2C2R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcCbCr,
  643. int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  644. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_Filter_8u_P2C2R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcCbCr,
  645. int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize,int layout))
  646. /* ////////////////////////////////////////////////////////////////////////////
  647. // Name: ippiSplit420_8u_P2P3R, ippiSplit420_Filter_8u_P2P3R
  648. //
  649. // Purpose: Converts NV12 two-plane image to YV12 three-plane image.
  650. //
  651. // Returns:
  652. // ippStsNoErr OK
  653. // ippStsNullPtrErr One of the pointers is NULL
  654. // ippStsSizeErr roiSize has a field with zero or negative value
  655. //
  656. // Parameters:
  657. // pSrcY Pointer to the source image Y plane.
  658. // srcYStepY Step through the source image Y plane.
  659. // pSrcCbCr Pointer to the source image CbCr plane.
  660. // srcCbCrStep Step through the source image CbCr plane.
  661. // pDst[3] Array of pointers to the destination image planes
  662. // dstStep[3] Array of steps through the destination image planes
  663. // roiSize Size of the ROI, should be multiple of 2.
  664. // layout Slice layout (for deinterlace filter).
  665. // Possible values:
  666. // IPP_UPPER - the first slice.
  667. // IPP_CENTER - the middle slices.
  668. // IPP_LOWER - the last slice.
  669. // IPP_LOWER && IPP_UPPER && IPP_CENTER - image is not sliced.
  670. // Notes:
  671. // Source 4:2:0 two-plane image format (NV12):
  672. // all Y (pSrcY) samples are found first in memory as an array of
  673. // unsigned char with an even number of lines memory alignment),
  674. // followed immediately by an array(pSrcCbCr) of unsigned char
  675. // containing interleaved U and V samples (such that if addressed as a little-endian
  676. // WORD type, U would be in the LSBs and V would be in the MSBs).
  677. //
  678. // Destination 4:2:0 three-plane image format(YV12 ):
  679. // the order of the pointers to destination images - Y V U.
  680. //
  681. // The function ippiSplit420_Filter_8u_P2P3R usually operates on the sliced images
  682. // ( the height of slices should be a multiple of 16).
  683. */
  684. IPPAPI(IppStatus, ippiYCbCr420ToYCrCb420_Filter_8u_P2P3R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcCbCr,
  685. int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize,int layout))
  686. IPPAPI(IppStatus, ippiYCbCr420ToYCrCb420_8u_P2P3R,(const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcCbCr,
  687. int srcCbCrStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  688. /* ////////////////////////////////////////////////////////////////////////////
  689. // Name: ippiYUToYU422_8u_C2P2R, ippiUYToYU422_8u_C2P2R
  690. // Purpose: Converts 2-channel YUY2,UYVY images to the 2-plane NV12 image
  691. //
  692. // Return:
  693. // ippStsNoErr Ok
  694. // ippStsNullPtrErr One of the pointers is NULL
  695. // ippStsSizeErr roiSize has a field value less than 2
  696. //
  697. // Parameters:
  698. // pDstY Pointer to the destination image Y plane.
  699. // dstYStep The step through the destination image Y plane.
  700. // pDstCbCr Pointer to the destination image CbCr plane.
  701. // dstCbCrStep The step through the destination image CbCr plane.
  702. // pSrc Pointer to the source image
  703. // srcStep Step through the source image
  704. // roiSize Size of the ROI, should be multiple of 2.
  705. // Notes:
  706. // for ippiYUToYU422_8u_C2P2R sequence of bytes in the source image is( YUY2 ):
  707. // Y0U0Y1V0,Y2U1Y3V1,...
  708. // for ippiUYToYU422_8u_C2P2R sequence of bytes in the destination image is( UYVY ):
  709. // U0Y0V0Y1,U1Y2V1Y3,...
  710. // Sequence of bytes in the destination image is( NV12 ):
  711. // Y plane Y0Y1Y2Y3
  712. // UV plane U0V0U1V1
  713. */
  714. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr420_8u_C2P2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY, int dstYStep,Ipp8u* pDstCbCr,int dstCbCrStep, IppiSize roiSize ))
  715. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr420_8u_C2P2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY, int dstYStep,Ipp8u* pDstCbCr,int dstCbCrStep, IppiSize roiSize ))
  716. /* ////////////////////////////////////////////////////////////////////////////
  717. // Name: ippiYCbCr422ToYCrCb420_8u_C2P3R, ippiCbYCr422ToYCrCb420_8u_C2P3R
  718. // Purpose: Converts 2-channel YUY2,UYVY images to the 3-plane YV12 image
  719. //
  720. // Return:
  721. // ippStsNoErr Ok
  722. // ippStsNullPtrErr One of the pointers is NULL
  723. // ippStsSizeErr roiSize has a field value less than 2
  724. //
  725. // Parameters:
  726. // pSrc Pointer to the source image
  727. // srcStep Step through the source image
  728. // roiSize Size of the ROI, should be multiple of 2.
  729. // pDst An array of pointers to separate destination color planes.
  730. // dstStep An array of step in bytes through the destination planes
  731. // Notes:
  732. // for ippiYUToYV422_8u_C2P3R sequence of bytes in the source image is( YUY2 ):
  733. // Y0U0Y1V0,Y2U1Y3V1,...
  734. // for ippiUYToYV422_8u_C2P3R sequence of bytes in the destination image is( UYVY ):
  735. // U0Y0V0Y1,U1Y2V1Y3,...
  736. // Sequence of planes in the destination image is( YV12 ): Y V U
  737. */
  738. IPPAPI(IppStatus, ippiYCbCr422ToYCrCb420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize ))
  739. IPPAPI(IppStatus, ippiCbYCr422ToYCrCb420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize ))
  740. /* ////////////////////////////////////////////////////////////////////////////
  741. // Name: ippiYUToUY422_8u_C2R, ippiUYToYU422_8u_C2R
  742. // Purpose: Converts a 2-channel YUY2 image to the UYVY image and vice versa
  743. //
  744. // Return:
  745. // ippStsNoErr Ok
  746. // ippStsNullPtrErr One of the pointers is NULL
  747. // ippStsSizeErr roiSize has a field value less than 2
  748. //
  749. // Parameters:
  750. // pSrc Pointer to the source image
  751. // srcStep Step through the source i mage
  752. // roiSize Size of the ROI, roiSize.width should be multiple of 2
  753. // pDst Pointer to the destination image
  754. // dstStep Step through the destination image
  755. // Notes:
  756. // sequence of bytes in the source image for ippiYUToUY422_8u_C2R and in the destination image for ippiUYToYU422_8u_C2P2R is( YUY2 ):
  757. // Y0U0Y1V0,Y2U1Y3V1,...
  758. // sequence of bytes in the destination image for ippiUYToYU422_8u_C2R and in the source image for ippiUYToYU422_8u_C2P2R is( UYVY ):
  759. // U0Y0V0Y1,U1Y2V1Y3,...
  760. */
  761. IPPAPI(IppStatus, ippiYCbCr422ToCbYCr422_8u_C2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  762. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr422_8u_C2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  763. /* ////////////////////////////////////////////////////////////////////////////
  764. // Name: ippiYVToUY420_8u_P3C2R, ippiYVToYU420_8u_P3C2R
  765. // Purpose: Converts a 3-plane YV12 image to 2-channel YUY2,UYVY images
  766. //
  767. // Return:
  768. // ippStsNoErr Ok
  769. // ippStsNullPtrErr One of the pointers is NULL
  770. // ippStsSizeErr roiSize has a field value less than 2
  771. //
  772. // Parameters:
  773. // pSrc An array of three pointers to source image planes
  774. // srcStep An array of steps through the source image planes
  775. // roiSize Size of the ROI, should be multiple 2.
  776. // pDst Pointer to the destination image
  777. // dstStep Step through the destination image
  778. // Notes:
  779. // Sequence of planes in the source image is( YV12 ): Y V U
  780. // for ippiYVToUY420_8u_P3C2R sequence of bytes in the destination image is( YUY2 ):
  781. // Y0U0Y1V0,Y2U1Y3V1,...
  782. // for ippiUYToYU422_8u_C2P2R sequence of bytes in the destination image is( UYVY ):
  783. // U0Y0V0Y1,U1Y2V1Y3,...
  784. */
  785. IPPAPI(IppStatus, ippiYCrCb420ToCbYCr422_8u_P3C2R,( const Ipp8u* pSrc[3],int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  786. IPPAPI(IppStatus, ippiYCrCb420ToYCbCr422_8u_P3C2R,( const Ipp8u* pSrc[3],int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  787. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  788. // Name: ippiRGBToYCbCr422_8u_C3P3R/ippiYCbCr422ToBGR_8u_P3C3R
  789. // PVCS ID 9600
  790. // Purpose: Converts a RGB24/YUY2 image to the YUY2/RGB24 image
  791. // Return:
  792. // ippStsNoErr Ok
  793. // ippStsNullPtrErr one or more pointers are NULL
  794. // ippStsDoubleSize Indicates a warning if roiSize is not a multiple of 2.
  795. // Arguments:
  796. // pSrc Pointer to the source image ROI for pixel-order image. An array of pointers to ROI in each separate source color planes for planar images.
  797. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  798. // pDst Pointer to the destination image ROI. An array of pointers to ROI in the separate destination color and alpha planes for planar images.
  799. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  800. // roiSize Size of the source and destination ROI in pixels.
  801. */
  802. IPPAPI(IppStatus, ippiRGBToYCbCr422_8u_C3P3R,(const Ipp8u* pSrc , int srcStep , Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  803. IPPAPI(IppStatus, ippiYCbCr422ToBGR_8u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst , int dstStep , IppiSize roiSize))
  804. /* ////////////////////////////////////////////////////////////////////////////
  805. // Name: ippiYCrCb420ToYCbCr420_8u_P3P2R
  806. // Purpose: Converts a 3-plane YV12 image to the 2-plane NV12 image
  807. //
  808. // Return:
  809. // ippStsNoErr Ok
  810. // ippStsNullPtrErr One of the pointers is NULL
  811. // ippStsSizeErr roiSize has a field value less than 2
  812. //
  813. // Parameters:
  814. // pSrc An array of three pointers to source image planes
  815. // srcStep An array of steps through the source image planes
  816. // roiSize Size of the ROI, should be multiple 2.
  817. // pDstY Pointer to the destination image Y plane.
  818. // dstYStep Step through the destination image Y plane.
  819. // pDstCbCr Pointer to the destination image CbCr plane.
  820. // dstCbCrStep Step through the destination image CbCr plane.
  821. // Notes:
  822. // Sequence of planes in the source image is( YV12 ): Y V U
  823. // Sequence of bytes in the destination image is( NV12 ):
  824. // Y plane Y0Y1Y2Y3
  825. // UV plane U0V0U1V1
  826. */
  827. IPPAPI(IppStatus, ippiYCrCb420ToYCbCr420_8u_P3P2R,( const Ipp8u* pSrc[3],int srcStep[3], Ipp8u* pDstY, int dstYStep,Ipp8u* pDstCbCr,int dstCbCrStep, IppiSize roiSize ))
  828. /* ////////////////////////////////////////////////////////////////////////////
  829. // Name: ippiYUToUY420_8u_P2C2R
  830. // Purpose: Converts a 2-plane NV12 image to the 2-channel UYVY image
  831. //
  832. // Return:
  833. // ippStsNoErr Ok
  834. // ippStsNullPtrErr One of the pointers is NULL
  835. // ippStsSizeErr roiSize has a field value less than 2
  836. //
  837. // Parameters:
  838. // pSrcY Pointer to the source image Y plane.
  839. // srcYStep Step through the source image Y plane.
  840. // pSrcCbCr Pointer to the source image CbCr plane.
  841. // srcCbCrStep Step through the source image CbCr plane.
  842. // pDst Pointer to the destination image
  843. // dstStep Step through the destination image
  844. // roiSize Size of the ROI, should be multiple of 2.
  845. // Notes:
  846. // Sequence of bytes in the source image is( NV12 ):
  847. // Y plane Y0Y1Y2Y3
  848. // UV plane U0V0U1V1
  849. // for ippiUYToYU422_8u_C2P2R sequence of bytes in the destination image is( UYVY ):
  850. // U0Y0V0Y1,U1Y2V1Y3,...
  851. */
  852. IPPAPI(IppStatus, ippiYCbCr420ToCbYCr422_8u_P2C2R,( const Ipp8u* pSrcY, int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  853. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  854. // Name: ippiYCbCr422ToYCbCr422_8u_C2P3R
  855. // Purpose: Converts a YUY2 image to the P422 image
  856. // Name: ippiYCrCb422ToYCbCr422_8u_C2P3R
  857. // Purpose: Converts a YVYU image to the P422 image
  858. // Name: ippiCbYCr422ToYCbCr422_8u_C2P3R
  859. // Purpose: Converts a UYVY image to the P422 image
  860. // Return:
  861. // ippStsNoErr Ok
  862. // ippStsNullPtrErr One or more pointers are NULL
  863. // ippStsSizeErr if roiSize.width < 2
  864. //
  865. // Arguments:
  866. // pSrc pointer to the source image
  867. // srcStep step for the source image
  868. // pDst array of pointers to the components of the destination image
  869. // dstStep array of steps values for every component
  870. // roiSize region of interest to be processed, in pixels
  871. // Notes:
  872. // roiSize.width should be multiple 2.
  873. */
  874. IPPAPI(IppStatus, ippiYCbCr422_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  875. int dstStep[3], IppiSize roiSize ))
  876. IPPAPI(IppStatus, ippiYCrCb422ToYCbCr422_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  877. int dstStep[3], IppiSize roiSize ))
  878. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr422_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  879. int dstStep[3], IppiSize roiSize ))
  880. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  881. // Name: ippiYCbCr422ToYCbCr420_8u_C2P3R
  882. // Purpose: Converts a 2-channel YUY2 image to the I420(IYUV) image
  883. // Name: ippiCbYCr422ToYCbCr420_8u_C2P3R
  884. // Purpose: Converts a 2-channel YUY2 image to the I420(IYUV) image
  885. // Name: ippiYCrCb422ToYCbCr420_8u_C2P3R
  886. // Purpose: Converts a 2-channel YVYU image to the I420(IYUV) image
  887. // Return:
  888. // ippStsNoErr Ok
  889. // ippStsNullPtrErr One or more pointers are NULL
  890. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
  891. //
  892. // Arguments:
  893. // pSrc pointer to the source image
  894. // srcStep step for the source image
  895. // pDst array of pointers to the components of the destination image
  896. // dstStep array of steps values for every component
  897. // roiSize region of interest to be processed, in pixels
  898. // Notes:
  899. // roiSize.width and roiSize.height should be multiple 2.
  900. */
  901. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  902. int dstStep[3], IppiSize roiSize ))
  903. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  904. int dstStep[3], IppiSize roiSize ))
  905. IPPAPI(IppStatus, ippiYCrCb422ToYCbCr420_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  906. int dstStep[3], IppiSize roiSize ))
  907. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  908. // Name: ippiYCbCr422ToYCbCr411_8u_C2P3R
  909. // Purpose: Converts a YUY2 image to the P411 image
  910. // Name: ippiCbYCr422ToYCbCr411_8u_C2P3R
  911. // Purpose: Converts a YUY2 image to the P411 image
  912. // Name: ippiYCrCb422ToYCbCr411_8u_C2P3R
  913. // Purpose: Converts a YVYU image to the P411 image
  914. // Return:
  915. // ippStsNoErr Ok
  916. // ippStsNullPtrErr One or more pointers are NULL
  917. // ippStsSizeErr if roiSize.width < 4
  918. //
  919. // Arguments:
  920. // pSrc pointer to the source image
  921. // srcStep step for the source image
  922. // pDst array of pointers to the components of the destination image
  923. // dstStep array of steps values for every component
  924. // roiSize region of interest to be processed, in pixels
  925. // Notes:
  926. // roiSize.width should be multiple 4.
  927. */
  928. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr411_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  929. int dstStep[3], IppiSize roiSize ))
  930. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr411_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  931. int dstStep[3], IppiSize roiSize ))
  932. IPPAPI(IppStatus, ippiYCrCb422ToYCbCr411_8u_C2P3R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3],
  933. int dstStep[3], IppiSize roiSize ))
  934. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  935. // Name: ippiYCbCr422ToYCbCr420_8u_P3P2R
  936. // Purpose: Converts a P422 image to the NV12 image
  937. // Name: ippiYCbCr420_8u_P3P2R
  938. // Purpose: Converts a IYUV image to the NV12 image
  939. // Name: ippiYCbCr420ToYCbCr411_8u_P3P2R
  940. // Purpose: Converts a IYUV image to the NV11 image
  941. // Return:
  942. // ippStsNoErr Ok
  943. // ippStsNullPtrErr One or more pointers are NULL
  944. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
  945. //
  946. // Arguments:
  947. // pSrc array of pointers to the components of the source image
  948. // srcStep array of step values for every component
  949. // pDstY pointer to the source Y plane
  950. // dstYStep step for the destination Y plane
  951. // pDstCbCr pointer to the destination CbCr plane
  952. // dstCbCrStep step for the destination CbCr plane
  953. // roiSize region of interest to be processed, in pixels
  954. // Notes:
  955. // roiSize.width and roiSize.height should be multiple 2.
  956. */
  957. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr420_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  958. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  959. IPPAPI(IppStatus, ippiYCbCr420_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  960. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  961. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr411_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  962. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  963. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  964. // Name: ippiYCbCr422ToYCbCr411_8u_P3P2R
  965. // Purpose: Converts a P422 image to the NV11 image
  966. // Name: ippiYCrCb420ToYCbCr411_8u_P3P2R
  967. // Purpose: Converts a YV12 image to the NV11 image
  968. // Return:
  969. // ippStsNoErr Ok
  970. // ippStsNullPtrErr One or more pointers are NULL
  971. // ippStsSizeErr if roiSize.width < 4 || roiSize.height < 2
  972. //
  973. // Arguments:
  974. // pSrc array of pointers to the components of the source image
  975. // srcStep array of step values for every component
  976. // pDstY pointer to the source Y plane
  977. // dstYStep step for the destination Y plane
  978. // pDstCbCr pointer to the destination CbCr plane
  979. // dstCbCrStep step for the destination CbCr plane
  980. // roiSize region of interest to be processed, in pixels
  981. // Notes:
  982. // roiSize.width should be multiple 4.
  983. // roiSize.height should be multiple 2.
  984. */
  985. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr411_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  986. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  987. IPPAPI(IppStatus, ippiYCrCb420ToYCbCr411_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  988. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  989. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  990. // Name: ippiYCbCr422ToYCbCr420_8u_P3R
  991. // Purpose: Converts a P422 image to the I420(IYUV)image
  992. // Name: ippiYCbCr420ToYCbCr422_8u_P3R
  993. // Purpose: Converts a IYUV image to the P422 image
  994. // Name: ippiYCrCb420ToYCbCr422_8u_P3R
  995. // Purpose: Converts a YV12 image to the P422 image
  996. // Return:
  997. // ippStsNoErr Ok
  998. // ippStsNullPtrErr One or more pointers are NULL
  999. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
  1000. //
  1001. // Arguments:
  1002. // pSrc array of pointers to the components of the source image
  1003. // srcStep array of step values for every component
  1004. // pDst array of pointers to the components of the destination image
  1005. // dstStep array of steps values for every component
  1006. // roiSize region of interest to be processed, in pixels
  1007. // Notes:
  1008. // roiSize.width and roiSize.height should be multiple 2.
  1009. */
  1010. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr420_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1011. int dstStep[3], IppiSize roiSize ))
  1012. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1013. int dstStep[3], IppiSize roiSize ))
  1014. IPPAPI(IppStatus, ippiYCrCb420ToYCbCr422_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1015. int dstStep[3], IppiSize roiSize ))
  1016. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1017. // Name: ippiYCbCr420ToYCbCr422_Filter_8u_P3R
  1018. // Purpose: Converts a IYUV image to the P422 image.
  1019. // Name: ippiYCrCb420ToYCbCr422_Filter_8u_P3R
  1020. // Purpose: Converts a YV12 image to the P422 image
  1021. // Return:
  1022. // ippStsNoErr Ok
  1023. // ippStsNullPtrErr One or more pointers are NULL
  1024. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 8
  1025. //
  1026. // Arguments:
  1027. // pSrc array of pointers to the components of the source image
  1028. // srcStep array of step values for every component
  1029. // pDst array of pointers to the components of the destination image
  1030. // dstStep array of steps values for every component
  1031. // roiSize region of interest to be processed, in pixels
  1032. // Notes:
  1033. // roiSize.width should be multiple 2.
  1034. // roiSize.height should be multiple 8.
  1035. // We use here Catmull-Rom interpolation.
  1036. */
  1037. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_Filter_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1038. int dstStep[3], IppiSize roiSize ))
  1039. IPPAPI(IppStatus, ippiYCrCb420ToYCbCr422_Filter_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1040. int dstStep[3], IppiSize roiSize ))
  1041. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1042. // Name: ippiYCbCr420ToYCbCr422_Filter_8u_P2P3R
  1043. // Purpose: Converts a NV12 image to the P422 image.
  1044. // Return:
  1045. // ippStsNoErr Ok
  1046. // ippStsNullPtrErr One or more pointers are NULL
  1047. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 8
  1048. //
  1049. // Arguments:
  1050. // pSrcY pointer to the source Y plane
  1051. // srcYStep step for the source Y plane
  1052. // pSrcCbCr pointer to the source CbCr plane
  1053. // srcCbCrStep step for the source CbCr plane
  1054. // pDst array of pointers to the components of the destination image
  1055. // dstStep array of steps values for every component
  1056. // roiSize region of interest to be processed, in pixels
  1057. // Notes:
  1058. // roiSize.width should be multiple 2.
  1059. // roiSize.height should be multiple 8.
  1060. // We use here Catmull-Rom interpolation.
  1061. */
  1062. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_Filter_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1063. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1064. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1065. // Name: ippiYCbCr420ToYCbCr422_8u_P2P3R
  1066. // Purpose: Converts a NV12 image to the P422 image.
  1067. // Name: ippiYCbCr420_8u_P2P3R
  1068. // Purpose: Converts a NV12 image to the I420(IYUV) image.
  1069. // Return:
  1070. // ippStsNoErr Ok
  1071. // ippStsNullPtrErr One or more pointers are NULL
  1072. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
  1073. //
  1074. // Arguments:
  1075. // pSrcY pointer to the source Y plane
  1076. // srcYStep step for the source Y plane
  1077. // pSrcCbCr pointer to the source CbCr plane
  1078. // srcCbCrStep step for the source CbCr plane
  1079. // pDst array of pointers to the components of the destination image
  1080. // dstStep array of steps values for every component
  1081. // roiSize region of interest to be processed, in pixels
  1082. // Notes:
  1083. // roiSize.width should be multiple 2.
  1084. // roiSize.height should be multiple 2.
  1085. */
  1086. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr422_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1087. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1088. IPPAPI(IppStatus, ippiYCbCr420_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1089. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1090. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1091. // Name: ippiYCbCr420ToYCbCr411_8u_P2P3R
  1092. // Purpose: Converts a NV12 image to the P411 image.
  1093. // Return:
  1094. // ippStsNoErr Ok
  1095. // ippStsNullPtrErr One or more pointers are NULL
  1096. // ippStsSizeErr if roiSize.width < 4 || roiSize.height < 2
  1097. //
  1098. // Arguments:
  1099. // pSrcY pointer to the source Y plane
  1100. // srcYStep step for the source Y plane
  1101. // pSrcCbCr pointer to the source CbCr plane
  1102. // srcCbCrStep step for the source CbCr plane
  1103. // pDst array of pointers to the components of the destination image
  1104. // dstStep array of steps values for every component
  1105. // roiSize region of interest to be processed, in pixels
  1106. // Notes:
  1107. // roiSize.width should be multiple 4.
  1108. // roiSize.height should be multiple 2.
  1109. */
  1110. IPPAPI(IppStatus, ippiYCbCr420ToYCbCr411_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1111. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1112. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1113. // Name: ippiYCbCr411ToYCbCr422_8u_P3C2R
  1114. // Purpose: Converts a P411 image to the YUY2 image.
  1115. // Name: ippiYCbCr411ToYCrCb422_8u_P3C2R
  1116. // Purpose: Converts a P411 image to the YVYU image.
  1117. // Return:
  1118. // ippStsNoErr Ok
  1119. // ippStsNullPtrErr One or more pointers are NULL
  1120. // ippStsSizeErr if roiSize.width < 4
  1121. //
  1122. // Arguments:
  1123. // pSrc array of pointers to the components of the source image
  1124. // srcStep array of step values for every component
  1125. // pSrc pointer to the destination image
  1126. // srcStep step for the destination image
  1127. // roiSize region of interest to be processed, in pixels
  1128. // Notes:
  1129. // roiSize.width should be multiple 4.
  1130. */
  1131. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr422_8u_P3C2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
  1132. int dstStep, IppiSize roiSize ))
  1133. IPPAPI(IppStatus, ippiYCbCr411ToYCrCb422_8u_P3C2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
  1134. int dstStep, IppiSize roiSize ))
  1135. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1136. // Name: ippiYCbCr411ToYCbCr422_8u_P3R
  1137. // Purpose: Converts a P411 image to the P422 image
  1138. // Name: ippiYCbCr411ToYCrCb422_8u_P3R
  1139. // Purpose: Converts a P411 image to the YVYU image
  1140. // Return:
  1141. // ippStsNoErr Ok
  1142. // ippStsNullPtrErr One or more pointers are NULL
  1143. // ippStsSizeErr if roiSize.width < 4
  1144. //
  1145. // Arguments:
  1146. // pSrc array of pointers to the components of the source image
  1147. // srcStep array of step values for every component
  1148. // pDst array of pointers to the components of the destination image
  1149. // dstStep array of steps values for every component
  1150. // roiSize region of interest to be processed, in pixels
  1151. // Notes:
  1152. // roiSize.width should be multiple 4.
  1153. */
  1154. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr422_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1155. int dstStep[3], IppiSize roiSize ))
  1156. IPPAPI(IppStatus, ippiYCbCr411ToYCrCb422_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1157. int dstStep[3], IppiSize roiSize ))
  1158. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1159. // Name: ippiYCbCr411ToYCbCr420_8u_P3R
  1160. // Purpose: Converts a P411 image to the I420(IYUV) image
  1161. // Return:
  1162. // ippStsNoErr Ok
  1163. // ippStsNullPtrErr One or more pointers are NULL
  1164. // ippStsSizeErr if roiSize.width < 4 || roiSize.height < 2
  1165. //
  1166. // Arguments:
  1167. // pSrc array of pointers to the components of the source image
  1168. // srcStep array of step values for every component
  1169. // pDst array of pointers to the components of the destination image
  1170. // dstStep array of steps values for every component
  1171. // roiSize region of interest to be processed, in pixels
  1172. // Notes:
  1173. // roiSize.width should be multiple 4.
  1174. // roiSize.height should be multiple 2.
  1175. */
  1176. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr420_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1177. int dstStep[3], IppiSize roiSize ))
  1178. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1179. // Name: ippiYCbCr411ToYCbCr420_8u_P3P2R
  1180. // Purpose: Converts a P411 image to the NV12 image
  1181. // Return:
  1182. // ippStsNoErr Ok
  1183. // ippStsNullPtrErr One or more pointers are NULL
  1184. // ippStsSizeErr if roiSize.width < 4 || roiSize.height < 2
  1185. //
  1186. // Arguments:
  1187. // pSrc array of pointers to the components of the source image
  1188. // srcStep array of step values for every component
  1189. // pDstY pointer to the source Y plane
  1190. // dstYStep step for the destination Y plane
  1191. // pDstCbCr pointer to the destination CbCr plane
  1192. // dstCbCrStep step for the destination CbCr plane
  1193. // roiSize region of interest to be processed, in pixels
  1194. // Notes:
  1195. // roiSize.width should be multiple 4.
  1196. // roiSize.height should be multiple 2.
  1197. */
  1198. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr420_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  1199. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  1200. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1201. // Name: ippiYCbCr411ToYCbCr411_8u_P3P2R
  1202. // Purpose: Converts a P411 image to the NV11 image
  1203. // Return:
  1204. // ippStsNoErr Ok
  1205. // ippStsNullPtrErr One or more pointers are NULL
  1206. // ippStsSizeErr if roiSize.width < 4
  1207. //
  1208. // Arguments:
  1209. // pSrc array of pointers to the components of the source image
  1210. // srcStep array of step values for every component
  1211. // pDstY pointer to the source Y plane
  1212. // dstYStep step for the destination Y plane
  1213. // pDstCbCr pointer to the destination CbCr plane
  1214. // dstCbCrStep step for the destination CbCr plane
  1215. // roiSize region of interest to be processed, in pixels
  1216. // Notes:
  1217. // roiSize.width should be multiple 4.
  1218. */
  1219. IPPAPI(IppStatus, ippiYCbCr411_8u_P3P2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDstY,
  1220. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  1221. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1222. // Name: ippiYCbCr411ToYCbCr422_8u_P2C2R
  1223. // Purpose: Converts a NV11 image to the YUY2 image.
  1224. // Return:
  1225. // ippStsNoErr Ok
  1226. // ippStsNullPtrErr One or more pointers are NULL
  1227. // ippStsSizeErr if roiSize.width < 4
  1228. //
  1229. // Arguments:
  1230. // pSrcY pointer to the source Y plane
  1231. // srcYStep step for the source Y plane
  1232. // pSrcCbCr pointer to the source CbCr plane
  1233. // srcCbCrStep step for the source CbCr plane
  1234. // pSrc pointer to the destination image
  1235. // srcStep step for the destination image
  1236. // roiSize region of interest to be processed, in pixels
  1237. // Notes:
  1238. // roiSize.width should be multiple 4.
  1239. */
  1240. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr422_8u_P2C2R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1241. Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  1242. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1243. // Name: ippiYCbCr411ToYCbCr422_8u_P2P3R
  1244. // Purpose: Converts a NV11 image to the P422 image.
  1245. // Return:
  1246. // ippStsNoErr Ok
  1247. // ippStsNullPtrErr One or more pointers are NULL
  1248. // ippStsSizeErr if roiSize.width < 4
  1249. //
  1250. // Arguments:
  1251. // pSrcY pointer to the source Y plane
  1252. // srcYStep step for the source Y plane
  1253. // pSrcCbCr pointer to the source CbCr plane
  1254. // srcCbCrStep step for the source CbCr plane
  1255. // pDst array of pointers to the components of the destination image
  1256. // dstStep array of steps values for every component
  1257. // roiSize region of interest to be processed, in pixels
  1258. // Notes:
  1259. // roiSize.width should be multiple 4.
  1260. */
  1261. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr422_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1262. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1263. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1264. // Name: ippiYCbCr411ToYCrCb420_8u_P2P3R
  1265. // Purpose: Converts a NV11 image to the YV12 image.
  1266. // Name: ippiYCbCr411ToYCbCr420_8u_P2P3R
  1267. // Purpose: Converts a NV11 image to the I420(IYUV) image.
  1268. // Return:
  1269. // ippStsNoErr Ok
  1270. // ippStsNullPtrErr One or more pointers are NULL
  1271. // ippStsSizeErr if roiSize.width < 4 || roiSize.height < 2
  1272. //
  1273. // Arguments:
  1274. // pSrcY pointer to the source Y plane
  1275. // srcYStep step for the source Y plane
  1276. // pSrcCbCr pointer to the source CbCr plane
  1277. // srcCbCrStep step for the source CbCr plane
  1278. // pDst array of pointers to the components of the destination image
  1279. // dstStep array of steps values for every component
  1280. // roiSize region of interest to be processed, in pixels
  1281. // Notes:
  1282. // roiSize.width should be multiple 4.
  1283. // roiSize.height should be multiple 2.
  1284. */
  1285. IPPAPI(IppStatus, ippiYCbCr411ToYCrCb420_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1286. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1287. IPPAPI(IppStatus, ippiYCbCr411ToYCbCr420_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1288. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1289. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1290. // Name: ippiYCbCr411_8u_P2P3R
  1291. // Purpose: Converts a NV11 image to the P411 image.
  1292. // Return:
  1293. // ippStsNoErr Ok
  1294. // ippStsNullPtrErr One or more pointers are NULL
  1295. // ippStsSizeErr if roiSize.width < 4
  1296. //
  1297. // Arguments:
  1298. // pSrcY pointer to the source Y plane
  1299. // srcYStep step for the source Y plane
  1300. // pSrcCbCr pointer to the source CbCr plane
  1301. // srcCbCrStep step for the source CbCr plane
  1302. // pDst array of pointers to the components of the destination image
  1303. // dstStep array of steps values for every component
  1304. // roiSize region of interest to be processed, in pixels
  1305. // Notes:
  1306. // roiSize.width should be multiple 4.
  1307. */
  1308. IPPAPI(IppStatus, ippiYCbCr411_8u_P2P3R,(const Ipp8u* pSrcY,int srcYStep,const Ipp8u* pSrcCbCr, int srcCbCrStep,
  1309. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1310. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1311. // Name: ippiYCbCr422ToYCbCr411_8u_C2P2R
  1312. // Purpose: Converts a YUY2 image to the NV11 image YUY2ToNV11
  1313. // Return:
  1314. // ippStsNoErr Ok
  1315. // ippStsNullPtrErr One or more pointers are NULL
  1316. // ippStsSizeErr if roiSize.width < 4
  1317. //
  1318. // Arguments:
  1319. // pSrc pointer to the source image
  1320. // srcStep step for the source image
  1321. // pDstY pointer to the source Y plane
  1322. // dstYStep step for the destination Y plane
  1323. // pDstCbCr pointer to the destination CbCr plane
  1324. // dstCbCrStep step for the destination CbCr plane
  1325. // roiSize region of interest to be processed, in pixels
  1326. // Notes:
  1327. // roiSize.width should be multiple 4.
  1328. */
  1329. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr411_8u_C2P2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDstY,
  1330. int dstYStep,Ipp8u* pDstCbCr, int dstCbCrStep, IppiSize roiSize ))
  1331. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1332. // Name: ippiYCbCr422ToYCbCr411_8u_P3R
  1333. // Purpose: Converts a P422 image to the P411 image
  1334. // Return:
  1335. // ippStsNoErr Ok
  1336. // ippStsNullPtrErr One or more pointers are NULL
  1337. // ippStsSizeErr if roiSize.width < 2 || roiSize.height < 2
  1338. //
  1339. // Arguments:
  1340. // pSrc array of pointers to the components of the source image
  1341. // srcStep array of step values for every component
  1342. // pDst array of pointers to the components of the destination image
  1343. // dstStep array of steps values for every component
  1344. // roiSize region of interest to be processed, in pixels
  1345. // Notes:
  1346. // roiSize.width and roiSize.height should be multiple 2.
  1347. */
  1348. IPPAPI(IppStatus, ippiYCbCr422ToYCbCr411_8u_P3R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3],
  1349. int dstStep[3], IppiSize roiSize ))
  1350. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1351. // Name: ippiYCbCr422ToYCrCb422_8u_P3C2R
  1352. // Purpose: Converts a P422 image to the YVYU image
  1353. // Return:
  1354. // ippStsNoErr Ok
  1355. // ippStsNullPtrErr One or more pointers are NULL
  1356. // ippStsSizeErr if roiSize.width < 2
  1357. //
  1358. // Arguments:
  1359. // pSrc array of pointers to the components of the source image
  1360. // srcStep array of step values for every component
  1361. // pSrc pointer to the destination image
  1362. // srcStep step for the destination image
  1363. // roiSize region of interest to be processed, in pixels
  1364. // Notes:
  1365. // roiSize.width and should be multiple 2.
  1366. */
  1367. IPPAPI(IppStatus, ippiYCbCr422ToYCrCb422_8u_P3C2R,( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst,
  1368. int dstStep, IppiSize roiSize ))
  1369. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1370. // Name: ippiYCbCr422ToYCrCb422_8u_C2R
  1371. // Purpose: Converts a YUY2 image to the YVYU image
  1372. // Return:
  1373. // ippStsNoErr Ok
  1374. // ippStsNullPtrErr One or more pointers are NULL
  1375. // ippStsSizeErr if roiSize.width < 2
  1376. //
  1377. // Arguments:
  1378. // pSrc pointer to the source image
  1379. // srcStep step for the source image
  1380. // pSrc pointer to the destination image
  1381. // srcStep step for the destination image
  1382. // roiSize region of interest to be processed, in pixels
  1383. // Notes:
  1384. // roiSize.width should be multiple 2.
  1385. */
  1386. IPPAPI(IppStatus, ippiYCbCr422ToYCrCb422_8u_C2R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst,
  1387. int dstStep, IppiSize roiSize ))
  1388. /* /////////////////////////////////////////////////////////////////////////////
  1389. // Name: ippiRGBToYCbCr_8u_C3R, ippiYCbCrToRGB_8u_C3R.
  1390. // ippiRGBToYCbCr_8u_AC4R, ippiYCbCrToRGB_8u_AC4R.
  1391. // ippiRGBToYCbCr_8u_P3R, ippiYCbCrToRGB_8u_P3R.
  1392. // ippiYCbCrToRGB_8u_P3C3R
  1393. // ippiYCbCrToBGR444_8u16u_C3R, ippiYCbCrToRGB444_8u16u_C3R,
  1394. // ippiYCbCrToBGR555_8u16u_C3R, ippiYCbCrToRGB555_8u16u_C3R,
  1395. // ippiYCbCrToBGR565_8u16u_C3R, ippiYCbCrToRGB565_8u16u_C3R,
  1396. // Purpose: Convert an RGB(BGR) image to and from YCbCr color model
  1397. // Parameters:
  1398. // pSrc Pointer to the source image (for pixel-order data).An array of pointers
  1399. // to separate source color planes (in case of plane-order data)
  1400. // pDst Pointer to the resultant image (for pixel-order data).An array of pointers
  1401. // to separate source color planes (in case of plane-order data)
  1402. // roiSize Size of the ROI in pixels.
  1403. // srcStep Step in bytes through the source image to jump on the next line
  1404. // dstStep Step in bytes through the destination image to jump on the next line
  1405. // Returns:
  1406. // ippStsNullPtrErr src == NULL or dst == NULL
  1407. // ippStsStepErr, srcStep or dstStep is less than or equal to zero
  1408. // ippStsSizeErr roiSize has a field with zero or negative value
  1409. // ippStsNoErr No errors
  1410. // Reference:
  1411. // Jack Keith
  1412. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  1413. // 1996.pp.(42-43)
  1414. //
  1415. // The YCbCr color space was developed as part of Recommendation ITU-R BT.601
  1416. // (formerly CCI 601). Y is defined to have a nominal range of 16 to 235;
  1417. // Cb and Cr are defined to have a range of 16 to 240, with 128 equal to zero.
  1418. // If the gamma-corrected RGB(R'G'B') image has a range 0 .. 255, as is commonly
  1419. // found in computer system (and in our library), the following equations may be
  1420. // used:
  1421. //
  1422. // Y = 0.257*R' + 0.504*G' + 0.098*B' + 16
  1423. // Cb = -0.148*R' - 0.291*G' + 0.439*B' + 128
  1424. // Cr = 0.439*R' - 0.368*G' - 0.071*B' + 128
  1425. //
  1426. // R' = 1.164*(Y - 16) + 1.596*(Cr - 128 )
  1427. // G' = 1.164*(Y - 16) - 0.813*(Cr - 128 )- 0.392*( Cb - 128 )
  1428. // B' = 1.164*(Y - 16) + 2.017*(Cb - 128 )
  1429. //
  1430. // Note that for the YCbCr-to-RGB equations, the RGB values must be saturated
  1431. // at the 0 and 255 levels due to occasional excursions outside the nominal
  1432. // YCbCr ranges.
  1433. //
  1434. */
  1435. IPPAPI(IppStatus, ippiRGBToYCbCr_8u_C3R,(const Ipp8u* pSrc, int srcStep,
  1436. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1437. IPPAPI(IppStatus, ippiRGBToYCbCr_8u_AC4R,(const Ipp8u* pSrc, int srcStep,
  1438. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1439. IPPAPI(IppStatus, ippiRGBToYCbCr_8u_P3R,(const Ipp8u* pSrc[3], int srcStep,
  1440. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1441. IPPAPI(IppStatus, ippiYCbCrToRGB_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep,
  1442. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1443. IPPAPI(IppStatus, ippiYCbCrToRGB_8u_C3R,(const Ipp8u* pSrc, int srcStep,
  1444. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1445. IPPAPI(IppStatus, ippiYCbCrToRGB_8u_AC4R,(const Ipp8u* pSrc, int srcStep,
  1446. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1447. IPPAPI(IppStatus, ippiYCbCrToRGB_8u_P3R,(const Ipp8u* pSrc[3],int srcStep,
  1448. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1449. IPPAPI(IppStatus, ippiYCbCrToBGR444_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1450. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1451. IPPAPI(IppStatus, ippiYCbCrToRGB444_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1452. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1453. IPPAPI(IppStatus, ippiYCbCrToBGR555_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1454. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1455. IPPAPI(IppStatus, ippiYCbCrToRGB555_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1456. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1457. IPPAPI(IppStatus, ippiYCbCrToBGR565_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1458. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1459. IPPAPI(IppStatus, ippiYCbCrToRGB565_8u16u_C3R,(const Ipp8u* pSrc, int srcStep,
  1460. Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1461. /* /////////////////////////////////////////////////////////////////////////////
  1462. // Name: ippiRGBToYUV_8u_C3R, ippiYUVToRGB_8u_C3R.
  1463. // ippiRGBToYUV_8u_AC4R, ippiYUVToRGB_8u_AC4R.
  1464. // ippiRGBToYUV_8u_P3R, ippiYUVToRGB_8u_P3R.
  1465. // ippiRGBToYUV_8u_C3P3R,ippiYUVToRGB_8u_P3C3R.
  1466. // Purpose: Converts an RGB image to the YUV color model and vice versa.
  1467. // Parameters:
  1468. // pSrc Pointer to the source image (for pixel-order data).An array of pointers
  1469. // to separate source color planes (for plane-order data)
  1470. // pDst Pointer to the destination image (for pixel-order data).An array of
  1471. // pointers to separate destination color planes (for of plane-order data)
  1472. // roiSize Size of ROI in pixels.
  1473. // srcStep Step in bytes through the source image to jump on the next line
  1474. // dstStep Step in bytes through the destination image to jump on the next line
  1475. // Returns:
  1476. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1477. // ippStsStepErr, srcStep or dstStep is less than or equal to zero
  1478. // ippStsSizeErr roiSize has a field with zero or negative value
  1479. // ippStsNoErr No errors
  1480. // Reference:
  1481. // Jack Keith
  1482. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  1483. // 1996.pp.(40-41)
  1484. //
  1485. // The YUV color space is the basic color space used by the PAL, NTSC, and
  1486. // SECAM composite color video standards.
  1487. //
  1488. // These functions operate with gamma-corrected images.
  1489. // The basic equations for conversion between gamma-corrected RGB(R'G'B')and YUV are:
  1490. //
  1491. // Y' = 0.299*R' + 0.587*G' + 0.114*B'
  1492. // U = -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B' - Y' )
  1493. // V = 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R' - Y' )
  1494. //
  1495. // R' = Y' + 1.140 * V
  1496. // G' = Y' - 0.394 * U - 0.581 * V
  1497. // B' = Y' + 2.032 * U
  1498. //
  1499. // For digital RGB values in the range [0 .. 255], Y has a range [0..255],
  1500. // U a range [-112 .. +112], and V a range [-157..+157].
  1501. //
  1502. // These equations are usually scaled to simplify the implementation in an actual
  1503. // NTSC or PAL digital encoder or decoder.
  1504. //
  1505. */
  1506. /* Pixel to Pixel */
  1507. IPPAPI(IppStatus, ippiRGBToYUV_8u_C3R,(const Ipp8u* pSrc, int srcStep ,
  1508. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1509. IPPAPI(IppStatus, ippiYUVToRGB_8u_C3R,(const Ipp8u* pSrc, int srcStep ,
  1510. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1511. /* Pixel to Pixel */
  1512. IPPAPI(IppStatus, ippiRGBToYUV_8u_AC4R,(const Ipp8u* pSrc, int srcStep ,
  1513. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1514. IPPAPI(IppStatus, ippiYUVToRGB_8u_AC4R,(const Ipp8u* pSrc, int srcStep ,
  1515. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1516. /* Plane to Plane */
  1517. IPPAPI(IppStatus, ippiRGBToYUV_8u_P3R,(const Ipp8u* pSrc[3], int srcStep ,
  1518. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1519. IPPAPI(IppStatus, ippiYUVToRGB_8u_P3R,(const Ipp8u* pSrc[3], int srcStep,
  1520. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1521. /* Pixel to Plane */
  1522. IPPAPI(IppStatus, ippiRGBToYUV_8u_C3P3R,( const Ipp8u* pSrc, int srcStep ,
  1523. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1524. /* Plane to Pixel */
  1525. IPPAPI(IppStatus, ippiYUVToRGB_8u_P3C3R,(const Ipp8u* pSrc[3], int srcStep,
  1526. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1527. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1528. // Name: ippiBGRToYUV420_8u_AC4P3R
  1529. // PVCS ID 7635
  1530. // Return:
  1531. // ippStsNoErr Ok
  1532. // ippStsNullPtrErr one or more pointers are NULL
  1533. // ippStsDoubleSize Indicates a warning if roiSize is not a multiple of 2.
  1534. // Arguments:
  1535. // pSrc Pointer to the source image ROI.
  1536. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  1537. // pDst An array of pointers to ROI in the separate planes of the destination image.
  1538. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  1539. // roiSize Size of the source and destination ROI in pixels.
  1540. */
  1541. IPPAPI(IppStatus, ippiBGRToYUV420_8u_AC4P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize ))
  1542. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1543. // Name: ippiRGBToYUV_8u_AC4P4R
  1544. // PVCS ID 8868
  1545. // Return:
  1546. // ippStsNoErr Ok
  1547. // ippStsNullPtrErr one or more pointers are NULL
  1548. // Arguments:
  1549. // pSrc Pointer to the source image ROI for pixel-order image.
  1550. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  1551. // pDst Pointer to the destination image ROI. An array of pointers to ROI in the separate destination color and alpha planes for planar images.
  1552. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  1553. // roiSize Size of the source and destination ROI in pixels.
  1554. */
  1555. IPPAPI(IppStatus, ippiRGBToYUV_8u_AC4P4R,( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int dstStep, IppiSize roiSize))
  1556. /* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1557. // Name: ippiRGB565ToYUV420_16u8u_C3P3R/ippiRGB565ToYUV422_16u8u_C3P3R
  1558. // PVCS ID 8910
  1559. // Return:
  1560. // ippStsNoErr Ok
  1561. // ippStsNullPtrErr one or more pointers are NULL
  1562. // ippStsDoubleSize Indicates a warning if roiSize is not a multiple of 2.
  1563. // Arguments:
  1564. // pSrc Pointer to the source image ROI for pixel-order image.
  1565. // srcStep Distance in bytes between starts of consecutive lines in the source image.
  1566. // pDst An array of pointers to ROI in the separate destination color and alpha planes for planar images.
  1567. // dstStep Distance in bytes between starts of consecutive lines in the destination image.
  1568. // roiSize Size of the source and destination ROI in pixels.
  1569. */
  1570. IPPAPI(IppStatus, ippiRGB565ToYUV420_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  1571. IPPAPI(IppStatus, ippiRGB565ToYUV422_16u8u_C3P3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  1572. /* /////////////////////////////////////////////////////////////////////////////
  1573. // Name: ippiRGBToYUV422_8u_C3P3R, ippiYUV422ToRGB_8u_P3C3R.
  1574. // ippiRGBToYUV422_8u_P3R, ippiYUV422ToRGB_8u_P3R.
  1575. // ippiRGBToYUV420_8u_C3P3R, ippiYUV420ToRGB_8u_P3C3R.
  1576. // ippiRGBToYUV422_8u_C3C2R, ippiYUV422ToRGB_8u_C2C3R.
  1577. // ippiYUV420ToBGR565_8u16u_P3C3R,
  1578. // ippiYUV420ToBGR555_8u16u_P3C3R,
  1579. // ippiYUV420ToBGR444_8u16u_P3C3R,
  1580. // ippiYUV420ToRGB565_8u16u_P3C3R,
  1581. // ippiYUV420ToRGB555_8u16u_P3C3R,
  1582. // ippiYUV420ToRGB444_8u16u_P3C3R.
  1583. // Purpose: Converts an RGB (BGR) image to the YUV color model with 4:2:2 or
  1584. // 4:2:0 sampling and vice versa.
  1585. // Parameters:
  1586. // pSrc Pointer to the source image (for pixel-order data).An array of pointers
  1587. // to separate source color planes (for plane-order data)
  1588. // pDst Pointer to the destination image (for pixel-order data).An array of pointers
  1589. // to separate destination color planes (for plane-order data)
  1590. // roiSize Size of the ROI in pixels.
  1591. // srcStep Step in bytes through the source image to jump on the next line(for pixel-order data).
  1592. // An array of step values for the separate source color planes (for plane-order data).
  1593. // dstStep Step in bytes through destination image to jump on the next line(for pixel-order data).
  1594. // An array of step values for the separate destination color planes (for plane-order data).
  1595. // Returns:
  1596. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1597. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  1598. // ippStsSizeErr roiSize has a field with zero or negative value
  1599. // ippStsNoErr No errors
  1600. // Reference:
  1601. // Jack Keith
  1602. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  1603. // 1996.pp.(40-41)
  1604. //
  1605. // The YUV color space is the basic color space used by the PAL , NTSC , and
  1606. // SECAM composite color video standards.
  1607. //
  1608. // The functions operate with 4:2:2 and 4:2:0 sampling formats.
  1609. // 4:2:2 uses the horizontal-only 2:1 reduction of U and V,
  1610. // 4:2:0 uses 2:1 reduction of U and V in both the vertical and
  1611. // horizontal directions.
  1612. //
  1613. // These functions operate with gamma-corrected images.
  1614. // The basic equations for conversion between gamma-corrected RGB(R'G'B')and YUV are:
  1615. //
  1616. // Y' = 0.299*R' + 0.587*G' + 0.114*B'
  1617. // U = -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B' - Y' )
  1618. // V = 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R' - Y' )
  1619. //
  1620. // R' = Y' + 1.140 * V
  1621. // G' = Y' - 0.394 * U - 0.581 * V
  1622. // B' = Y' + 2.032 * U
  1623. //
  1624. // For digital RGB values with the range [0 .. 255], Y has a range [0..255],
  1625. // U a range [-112 .. +112], and V a range [-157..+157].
  1626. //
  1627. // These equations are usually scaled to simplify the implementation in an actual
  1628. // NTSC or PAL digital encoder or decoder.
  1629. //
  1630. */
  1631. IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3AC4R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1632. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3AC4R,(const Ipp8u* pSrc[3],int srcStep[3],Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1633. IPPAPI(IppStatus, ippiRGBToYUV422_8u_C3P3R,(const Ipp8u* pSrc, int srcStep,
  1634. Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize))
  1635. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3C3R,(const Ipp8u* pSrc[3],int srcStep[3],
  1636. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1637. IPPAPI(IppStatus, ippiRGBToYUV422_8u_P3R,(const Ipp8u* pSrc[3], int srcStep ,
  1638. Ipp8u* pDst[3], int dstStep[3],IppiSize roiSize))
  1639. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3R,(const Ipp8u* pSrc[3],
  1640. int srcStep[3],Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1641. IPPAPI(IppStatus, ippiRGBToYUV420_8u_C3P3R,(const Ipp8u* pSrc, int srcStep ,
  1642. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  1643. IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1644. IPPAPI(IppStatus, ippiYUV420ToBGR_8u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1645. IPPAPI(IppStatus, ippiRGBToYUV420_8u_P3R,(const Ipp8u* pSrc[3], int srcStep ,
  1646. Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  1647. IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3R,(const Ipp8u* pSrc[3],int srcStep[3],
  1648. Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1649. IPPAPI(IppStatus, ippiRGBToYUV422_8u_C3C2R,(const Ipp8u* pSrc, int srcStep ,
  1650. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1651. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_C2C3R,(const Ipp8u* pSrc,int srcStep,
  1652. Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1653. IPPAPI(IppStatus, ippiYUV420ToBGR565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1654. IPPAPI(IppStatus, ippiYUV420ToBGR555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1655. IPPAPI(IppStatus, ippiYUV420ToBGR444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1656. IPPAPI(IppStatus, ippiYUV420ToRGB565_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1657. IPPAPI(IppStatus, ippiYUV420ToRGB555_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1658. IPPAPI(IppStatus, ippiYUV420ToRGB444_8u16u_P3C3R,(const Ipp8u* pSrc[3], int srcStep[3], Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1659. /* /////////////////////////////////////////////////////////////////////////////
  1660. // Name: ippiRGBToYUV422_8u_P3, ippiYUV422ToRGB_8u_P3.
  1661. // ippiRGBToYUV422_8u_C3P3, ippiYUV422ToRGB_8u_P3C3.
  1662. // ippiRGBToYUV420_8u_C3P3, ippiYUV420ToRGB_8u_P3C3.
  1663. // ippiRGBToYUV420_8u_P3, ippiYUV420ToRGB_8u_P3.
  1664. // Purpose: Converts an RGB image to YUV color model with 4:2:2 and
  1665. // 4:2:0 sampling and vice versa.
  1666. // Parameters:
  1667. // pSrc Pointer to the source image (for pixel-order data).An array of pointers
  1668. // to the separate source color planes (for plane-order data)
  1669. // pDst Pointer to the destination image (for pixel-order data).An array of pointers
  1670. // to the separate destination color planes (for plane-order data)
  1671. // imgSize Size of the source and destination images in pixels
  1672. // Returns:
  1673. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1674. // ippStsStepErr, srcStep or dstStep is less than or equal to zero
  1675. // ippStsSizeErr imgSize has a field with zero or negative value
  1676. // ippStsNoErr No errors
  1677. // Reference:
  1678. // Jack Keith
  1679. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  1680. // 1996.pp.(40-41)
  1681. //
  1682. // The YUV color space is the basic color space used by the PAL , NTSC , and
  1683. // SECAM composite color video standards.
  1684. //
  1685. // The functions operate with 4:2:2 and 4:2:0 sampling formats.
  1686. // 4:2:2 uses the horizontal-only 2:1 reduction of U and V,
  1687. // 4:2:0 uses 2:1 reduction of U and V in both the vertical and
  1688. // horizontal directions.
  1689. //
  1690. // These functions operate with gamma-corrected images.
  1691. // The basic equations to convert between gamma-corrected RGB(R'G'B')and YUV are:
  1692. //
  1693. // Y' = 0.299*R' + 0.587*G' + 0.114*B'
  1694. // U = -0.147*R' - 0.289*G' + 0.436*B' = 0.492*(B' - Y' )
  1695. // V = 0.615*R' - 0.515*G' - 0.100*B' = 0.877*(R' - Y' )
  1696. //
  1697. // R' = Y' + 1.140 * V
  1698. // G' = Y' - 0.394 * U - 0.581 * V
  1699. // B' = Y' + 2.032 * U
  1700. //
  1701. // For digital RGB values with the range [0 .. 255], Y has the range [0..255],
  1702. // U the range [-112 .. +112],V the range [-157..+157].
  1703. //
  1704. // These equations are usually scaled to simplify the implementation in an actual
  1705. // NTSC or PAL digital encoder or decoder.
  1706. //
  1707. */
  1708. /* Plane to Plane */
  1709. IPPAPI(IppStatus, ippiRGBToYUV422_8u_P3,(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize imgSize))
  1710. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3,(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize imgSize))
  1711. /* Pixel to Plane */
  1712. IPPAPI(IppStatus, ippiRGBToYUV422_8u_C3P3,(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize imgSize))
  1713. /* Plane to Pixel */
  1714. IPPAPI(IppStatus, ippiYUV422ToRGB_8u_P3C3,(const Ipp8u* pSrc[3],Ipp8u* pDst, IppiSize imgSize ))
  1715. /* Pixel to Plane */
  1716. IPPAPI(IppStatus, ippiRGBToYUV420_8u_C3P3,(const Ipp8u* pSrc, Ipp8u* pDst[3], IppiSize imgSize))
  1717. /* Plane to Pixel */
  1718. IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3C3,(const Ipp8u* pSrc[3], Ipp8u* pDst, IppiSize imgSize))
  1719. /* Plane to Plane */
  1720. IPPAPI(IppStatus, ippiRGBToYUV420_8u_P3,(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize imgSize))
  1721. IPPAPI(IppStatus, ippiYUV420ToRGB_8u_P3,(const Ipp8u* pSrc[3], Ipp8u* pDst[3], IppiSize imgSize))
  1722. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1723. // Name: ippiYCoCgToBGR_16s8u_P3C3R ippiYCoCgToBGR_16s8u_P3C4R
  1724. // Purpose: Converts a YCoCg image to the RGB24/RGB32 image.
  1725. // Name: ippiYCoCgToBGR_16s8u_P3C3R ippiBGRToYCoCg_8u16s_C4P3R
  1726. // Purpose: Converts a RGB24/RGB32 image to the YCoCg image.
  1727. // Name: ippiYCoCgToSBGR_16s_P3C3R ippiSBGRToYCoCg_16s_C3P3R
  1728. // Purpose: Converts a YCoCg image to the scRGB48/scRGB64 image.
  1729. // Name: ippi_SC_BGRToYCoCg_16s_C3P3R ippi_SC_BGRToYCoCg_16s_C4P3R
  1730. // Purpose: Converts a scRGB48/scRGB64 image to the YCoCg image.
  1731. // Return:
  1732. // ippStsNoErr Ok
  1733. // ippStsNullPtrErr One or more pointers are NULL
  1734. //
  1735. // Arguments:
  1736. // pYCC array of pointers to the components of the YCoCg image
  1737. // yccStep step for every Y,Co,Cg component
  1738. // pBGR Pointer to the BGR image (for pixel-order data).
  1739. // bgrStep step for the BGR image.
  1740. // roiSize region of interest to be processed, in pixels
  1741. // Notes:
  1742. // Y = (( R + G*2 + B) + 2 ) / 4
  1743. // Co = (( R - B) + 1 ) / 2
  1744. // Cg = ((-R + G*2 - B) + 2 ) / 4
  1745. //
  1746. // R = Y + Co - Cg
  1747. // G = Y + Cg
  1748. // B = Y - Co - Cg
  1749. // scRGB allows negative values and values above 1.0
  1750. */
  1751. IPPAPI(IppStatus,ippiYCoCgToBGR_16s8u_P3C3R,(const Ipp16s* pYCC[3],int yccStep,Ipp8u* pBGR,int bgrStep,IppiSize roiSize))
  1752. IPPAPI(IppStatus,ippiBGRToYCoCg_8u16s_C3P3R,(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC [3], int yccStep, IppiSize roiSize ))
  1753. IPPAPI(IppStatus,ippiYCoCgToBGR_16s8u_P3C4R,(const Ipp16s* pYCC[3],int yccStep,Ipp8u* pBGR,int bgrStep,IppiSize roiSize, Ipp8u aval))
  1754. IPPAPI(IppStatus,ippiBGRToYCoCg_8u16s_C4P3R,(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC [3], int yccStep, IppiSize roiSize ))
  1755. IPPAPI(IppStatus,ippiYCoCgToSBGR_16s_P3C3R ,(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR, int bgrStep, IppiSize roiSize ))
  1756. IPPAPI(IppStatus,ippiSBGRToYCoCg_16s_C3P3R ,(const Ipp16s* pBGR, int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1757. IPPAPI(IppStatus,ippiYCoCgToSBGR_16s_P3C4R ,(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR , int bgrStep, IppiSize roiSize, Ipp16s aval ))
  1758. IPPAPI(IppStatus,ippiSBGRToYCoCg_16s_C4P3R ,(const Ipp16s* pBGR , int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1759. IPPAPI(IppStatus,ippiYCoCgToSBGR_32s16s_P3C3R,(const Ipp32s* pYCC[3], int yccStep, Ipp16s* pBGR , int bgrStep, IppiSize roiSize ))
  1760. IPPAPI(IppStatus,ippiSBGRToYCoCg_16s32s_C3P3R,(const Ipp16s* pBGR , int bgrStep, Ipp32s* pYCC[3], int yccStep, IppiSize roiSize ))
  1761. IPPAPI(IppStatus,ippiYCoCgToSBGR_32s16s_P3C4R,(const Ipp32s* pYCC[3], int yccStep, Ipp16s* pBGR , int bgrStep, IppiSize roiSize, Ipp16s aval ))
  1762. IPPAPI(IppStatus,ippiSBGRToYCoCg_16s32s_C4P3R,(const Ipp16s* pBGR , int bgrStep, Ipp32s* pYCC[3], int yccStep, IppiSize roiSize ))
  1763. /* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1764. // Name: ippiYCoCgToBGR_Rev_16s8u_P3C3R ippiYCoCgToBGR_Rev_16s8u_P3C4R
  1765. // Purpose: Converts a YCoCg-R image to the scRGB48/scRGB64 image.
  1766. // Name: ippiBGRToYCoCg_Rev_8u16s_C3P3R ippiBGRToYCoCg_Rev_8u16s_C4P3R
  1767. // Purpose: Converts a scRGB48/scRGB64 image to the YCoCg-R image.
  1768. // Name: ippiYCoCgToSBGR_Rev_16s_P3C3R ippiYCoCgToSBGR_Rev_16s_P3C4R
  1769. // Purpose: Converts a YCoCg-R image to the scRGB48/scRGB64 image.
  1770. // Name: ippiSBGRToYCoCg_Rev_16s_C3P3R ippiSBGRToYCoCg_Rev_16s_C4P3R
  1771. // Purpose: Converts a scRGB48/scRGB64 image to the YCoCg-R image.
  1772. // Where: YCoCg-R - Reversible transform.
  1773. // Return:
  1774. // ippStsNoErr Ok
  1775. // ippStsNullPtrErr One or more pointers are NULL
  1776. //
  1777. // Arguments:
  1778. // pYCC array of pointers to the components of the YCoCg image
  1779. // yccStep step for every Y,Co,Cg component
  1780. // pBGR Pointer to the BGR image (for pixel-order data).
  1781. // bgrStep step for the BGR image.
  1782. // roiSize region of interest to be processed, in pixels
  1783. // Notes:
  1784. // Co = R - B
  1785. // t = B + (Co >> 1)
  1786. // Cg = G - t
  1787. // Y = t + (Cg >> 1)
  1788. //
  1789. // t = Y - (Cg >> 1)
  1790. // G = Cg + t
  1791. // B = t - (Co >> 1)
  1792. // R = B + Co
  1793. // If each of the RGB channels are integer values with
  1794. // an N-bit range, then the luma channel Y requires N bits,
  1795. // and the chroma channels require N+1 bits.
  1796. */
  1797. IPPAPI(IppStatus, ippiYCoCgToBGR_Rev_16s8u_P3C3R,(const Ipp16s* pYCC[3], int yccStep, Ipp8u* pBGR, int bgrStep, IppiSize roiSize ))
  1798. IPPAPI(IppStatus, ippiBGRToYCoCg_Rev_8u16s_C3P3R,(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1799. IPPAPI(IppStatus, ippiYCoCgToBGR_Rev_16s8u_P3C4R,(const Ipp16s* pYCC[3], int yccStep, Ipp8u* pBGR, int bgrStep, IppiSize roiSize,Ipp8u aval ))
  1800. IPPAPI(IppStatus, ippiBGRToYCoCg_Rev_8u16s_C4P3R,(const Ipp8u* pBGR, int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1801. IPPAPI(IppStatus, ippiYCoCgToSBGR_Rev_16s_P3C3R ,(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR, int bgrStep, IppiSize roiSize ))
  1802. IPPAPI(IppStatus, ippiSBGRToYCoCg_Rev_16s_C3P3R ,(const Ipp16s* pBGR, int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1803. IPPAPI(IppStatus, ippiYCoCgToSBGR_Rev_16s_P3C4R ,(const Ipp16s* pYCC[3], int yccStep, Ipp16s* pBGR, int bgrStep, IppiSize roiSize,Ipp16s aval ))
  1804. IPPAPI(IppStatus, ippiSBGRToYCoCg_Rev_16s_C4P3R ,(const Ipp16s* pBGR, int bgrStep, Ipp16s* pYCC[3], int yccStep, IppiSize roiSize ))
  1805. IPPAPI(IppStatus, ippiSBGRToYCoCg_Rev_16s32s_C3P3R,(const Ipp16s* pBGR, int bgrStep, Ipp32s* pYCC[3], int yccStep, IppiSize roiSize ))
  1806. IPPAPI(IppStatus, ippiYCoCgToSBGR_Rev_32s16s_P3C4R,(const Ipp32s* pYCC[3], int yccStep, Ipp16s* pBGR, int bgrStep, IppiSize roiSize, Ipp16s aval ))
  1807. IPPAPI(IppStatus, ippiYCoCgToSBGR_Rev_32s16s_P3C3R,(const Ipp32s* pYCC[3], int yccStep, Ipp16s* pBGR, int bgrStep, IppiSize roiSize ))
  1808. IPPAPI(IppStatus, ippiSBGRToYCoCg_Rev_16s32s_C4P3R,(const Ipp16s* pBGR, int bgrStep, Ipp32s* pYCC[3], int yccStep, IppiSize roiSize ))
  1809. /* /////////////////////////////////////////////////////////////////////////////
  1810. // Name: ippiRGBToGray
  1811. // Purpose: Converts an RGB image to gray scale (fixed coefficients)
  1812. // Parameters:
  1813. // pSrc Pointer to the source image , points to point(0,0)
  1814. // pDst Pointer to the destination image , points to point(0,0)
  1815. // roiSize Size of the ROI in pixels. Since the function performs point
  1816. // operations (without a border), the ROI may be the whole image.
  1817. // srcStep Step in bytes through the source image to jump on the next line
  1818. // dstStep Step in bytes through the destination image to jump on the next line
  1819. // Returns:
  1820. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1821. // ippStsSizeErr roiSize has a field with zero or negative value
  1822. // ippStsNoErr No errors
  1823. // Reference:
  1824. // Jack Keith
  1825. // Video Demystified: A Handbook for the Digital Engineer, 2nd ed.
  1826. // 1996.p.(82)
  1827. //
  1828. // The transform coefficients of equation below correspond to the standard for
  1829. // NTSC red, green and blue CRT phosphors (1953) that are standardized in the
  1830. // ITU-R Recommendation BT. 601-2 (formerly CCIR Rec. 601-2).
  1831. //
  1832. // The basic equation to compute non-linear video luma (monochrome) from non-linear
  1833. // (gamma-corrected) RGB(R'G'B') is:
  1834. //
  1835. // Y' = 0.299 * R' + 0.587 * G' + 0.114 * B';
  1836. //
  1837. //
  1838. */
  1839. IPPAPI(IppStatus,ippiRGBToGray_8u_C3C1R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize))
  1840. IPPAPI(IppStatus,ippiRGBToGray_16u_C3C1R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize))
  1841. IPPAPI(IppStatus,ippiRGBToGray_16s_C3C1R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize))
  1842. IPPAPI(IppStatus,ippiRGBToGray_32f_C3C1R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep,IppiSize roiSize))
  1843. IPPAPI(IppStatus,ippiRGBToGray_8u_AC4C1R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize))
  1844. IPPAPI(IppStatus,ippiRGBToGray_16u_AC4C1R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize))
  1845. IPPAPI(IppStatus,ippiRGBToGray_16s_AC4C1R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize))
  1846. IPPAPI(IppStatus,ippiRGBToGray_32f_AC4C1R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep,IppiSize roiSize))
  1847. /* /////////////////////////////////////////////////////////////////////////////
  1848. // Name: ippiColorToGray
  1849. // Purpose: Converts an RGB image to gray scale (custom coefficients)
  1850. // Parameters:
  1851. // pSrc Pointer to the source image , points to point(0,0)
  1852. // pDst Pointer to the destination image , points to point(0,0)
  1853. // roiSize Size of the ROI in pixels. Since the function performs point
  1854. // operations (without a border), the ROI may be the whole image.
  1855. // srcStep Step in bytes through the source image to jump on the next line
  1856. // dstStep Step in bytes through the destination image to jump on the next line
  1857. // coeffs[3] User-defined vector of coefficients.
  1858. // The sum of the coefficients should be less than or equal to 1
  1859. // Returns:
  1860. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1861. // ippStsSizeErr roiSize has a field with zero or negative value
  1862. // ippStsNoErr No errors
  1863. //
  1864. // The following equation is used to convert an RGB image to gray scale:
  1865. //
  1866. // Y = coeffs[0] * R + coeffs[1] * G + coeffs[2] * B;
  1867. //
  1868. //
  1869. */
  1870. IPPAPI(IppStatus,ippiColorToGray_8u_C3C1R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1871. IPPAPI(IppStatus,ippiColorToGray_16u_C3C1R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1872. IPPAPI(IppStatus,ippiColorToGray_16s_C3C1R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1873. IPPAPI(IppStatus,ippiColorToGray_32f_C3C1R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1874. IPPAPI(IppStatus,ippiColorToGray_8u_AC4C1R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1875. IPPAPI(IppStatus,ippiColorToGray_16u_AC4C1R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1876. IPPAPI(IppStatus,ippiColorToGray_16s_AC4C1R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1877. IPPAPI(IppStatus,ippiColorToGray_32f_AC4C1R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep,IppiSize roiSize,const Ipp32f coeffs[3]))
  1878. /* ////////////////////////////////////////////////////////////////////////////
  1879. // Name: ippiRGBToHLS, ippiHLSToRGB
  1880. // ippiBGRToHLS, ippiHLSToBGR
  1881. // Purpose: Converts an RGB(BGR) image to the HLS color model and vice versa
  1882. // Parameters:
  1883. // pSrc Pointer to the source image , points to point(0,0)
  1884. // pDst Pointer to the destination image , points to point(0,0)
  1885. // roiSize Size of the ROI in pixels. Since the function performs point
  1886. // operations (without a border), the ROI may be the whole image.
  1887. // srcStep Step in bytes through the source image to jump on the next line
  1888. // dstStep Step in bytes through the destination image to jump on the next line
  1889. // Returns:
  1890. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  1891. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  1892. // ippStsSizeErr roiSize has a field with zero or negative value
  1893. // ippStsNoErr No errors
  1894. // RGB and HLS values for the 32f data type should be in the range [0..1]
  1895. // Reference:
  1896. // David F.Rogers
  1897. // Procedural Elements for Computer Graphics
  1898. // 1985.pp.(403-406)
  1899. //
  1900. // H is the hue red at 0 degrees, which has range [0 .. 360 degrees],
  1901. // L is the lightness,
  1902. // S is the saturation,
  1903. //
  1904. // The RGB to HLS conversion algorithm in pseudo code:
  1905. // Lightness:
  1906. // M1 = max(R,G,B); M2 = max(R,G,B); L = (M1+M2)/2
  1907. // Saturation:
  1908. // if M1 = M2 then // achromatic case
  1909. // S = 0
  1910. // H = 0
  1911. // else // chromatics case
  1912. // if L <= 0.5 then
  1913. // S = (M1-M2) / (M1+M2)
  1914. // else
  1915. // S = (M1-M2) / (2-M1-M2)
  1916. // Hue:
  1917. // Cr = (M1-R) / (M1-M2)
  1918. // Cg = (M1-G) / (M1-M2)
  1919. // Cb = (M1-B) / (M1-M2)
  1920. // if R = M2 then H = Cb - Cg
  1921. // if G = M2 then H = 2 + Cr - Cb
  1922. // if B = M2 then H = 4 + Cg - Cr
  1923. // H = 60*H
  1924. // if H < 0 then H = H + 360
  1925. //
  1926. // The HSL to RGB conversion algorithm in pseudo code:
  1927. // if L <= 0.5 then
  1928. // M2 = L *(1 + S)
  1929. // else
  1930. // M2 = L + S - L * S
  1931. // M1 = 2 * L - M2
  1932. // if S = 0 then
  1933. // R = G = B = L
  1934. // else
  1935. // h = H + 120
  1936. // if h > 360 then
  1937. // h = h - 360
  1938. // if h < 60 then
  1939. // R = ( M1 + ( M2 - M1 ) * h / 60)
  1940. // else if h < 180 then
  1941. // R = M2
  1942. // else if h < 240 then
  1943. // R = M1 + ( M2 - M1 ) * ( 240 - h ) / 60
  1944. // else
  1945. // R = M1
  1946. // h = H
  1947. // if h < 60 then
  1948. // G = ( M1 + ( M2 - M1 ) * h / 60
  1949. // else if h < 180 then
  1950. // G = M2
  1951. // else if h < 240 then
  1952. // G = M1 + ( M2 - M1 ) * ( 240 - h ) / 60
  1953. // else
  1954. // G = M1
  1955. // h = H - 120
  1956. // if h < 0 then
  1957. // h += 360
  1958. // if h < 60 then
  1959. // B = ( M1 + ( M2 - M1 ) * h / 60
  1960. // else if h < 180 then
  1961. // B = M2
  1962. // else if h < 240 then
  1963. // B = M1 + ( M2 - M1 ) * ( 240 - h ) / 60
  1964. // else
  1965. // B = M1
  1966. //
  1967. // H,L,S,R,G,B are scaled to the range:
  1968. // [0..1] for the 32f depth,
  1969. // [0..IPP_MAX_8u] for the 8u depth,
  1970. // [0..IPP_MAX_16u] for the 16u depth,
  1971. // [IPP_MIN_16S..IPP_MAX_16s] for the 16s depth.
  1972. //
  1973. */
  1974. IPPAPI(IppStatus, ippiBGRToHLS_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1975. IPPAPI(IppStatus, ippiRGBToHLS_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1976. IPPAPI(IppStatus, ippiHLSToRGB_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1977. IPPAPI(IppStatus, ippiRGBToHLS_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1978. IPPAPI(IppStatus, ippiHLSToRGB_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1979. IPPAPI(IppStatus, ippiRGBToHLS_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  1980. IPPAPI(IppStatus, ippiHLSToRGB_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  1981. IPPAPI(IppStatus, ippiRGBToHLS_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  1982. IPPAPI(IppStatus, ippiHLSToRGB_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  1983. IPPAPI(IppStatus, ippiRGBToHLS_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1984. IPPAPI(IppStatus, ippiHLSToRGB_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1985. IPPAPI(IppStatus, ippiRGBToHLS_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1986. IPPAPI(IppStatus, ippiHLSToRGB_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  1987. IPPAPI(IppStatus, ippiRGBToHLS_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  1988. IPPAPI(IppStatus, ippiHLSToRGB_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  1989. IPPAPI(IppStatus, ippiRGBToHLS_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  1990. IPPAPI(IppStatus, ippiHLSToRGB_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  1991. IPPAPI(IppStatus, ippiBGRToHLS_8u_AP4R, (const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst[4], int dstStep, IppiSize roiSize))
  1992. IPPAPI(IppStatus, ippiBGRToHLS_8u_AP4C4R, (const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1993. IPPAPI(IppStatus, ippiBGRToHLS_8u_AC4P4R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int dstStep, IppiSize roiSize))
  1994. IPPAPI(IppStatus, ippiBGRToHLS_8u_P3R, (const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1995. IPPAPI(IppStatus, ippiBGRToHLS_8u_P3C3R, (const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1996. IPPAPI(IppStatus, ippiBGRToHLS_8u_C3P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  1997. IPPAPI(IppStatus, ippiHLSToBGR_8u_AP4R, (const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst[4], int dstStep, IppiSize roiSize))
  1998. IPPAPI(IppStatus, ippiHLSToBGR_8u_AP4C4R, (const Ipp8u* pSrc[4], int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  1999. IPPAPI(IppStatus, ippiHLSToBGR_8u_AC4P4R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[4], int dstStep, IppiSize roiSize))
  2000. IPPAPI(IppStatus, ippiHLSToBGR_8u_P3R, (const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  2001. IPPAPI(IppStatus, ippiHLSToBGR_8u_P3C3R, (const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2002. IPPAPI(IppStatus, ippiHLSToBGR_8u_C3P3R, (const Ipp8u* pSrc, int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize))
  2003. /* ////////////////////////////////////////////////////////////////////////////
  2004. // Name: ippiRGBToHSV, ippiHSVToRGB
  2005. // Purpose: Converts an RGB image to the HSV color model and vice versa
  2006. // Parameters:
  2007. // pSrc Pointer to the source image , points to point(0,0)
  2008. // pDst Pointer to the destination image , points to point(0,0)
  2009. // roiSize Size of the ROI in pixels.
  2010. // srcStep Step in bytes through the source image to jump on the next line
  2011. // dstStep Step in bytes through the destination image to jump on the next line
  2012. // Returns:
  2013. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  2014. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  2015. // ippStsSizeErr roiSize has a field with zero or negative value
  2016. // ippStsNoErr No errors
  2017. // Reference:
  2018. // David F.Rogers
  2019. // Procedural Elements for Computer Graphics
  2020. // 1985.pp.(401-403)
  2021. //
  2022. // H is the hue red at 0 degrees, which has range [0 .. 360 degrees],
  2023. // S is the saturation,
  2024. // V is the value
  2025. // The RGB to HSV conversion algorithm in pseudo code:
  2026. // Value:
  2027. // V = max(R,G,B);
  2028. // Saturation:
  2029. // temp = min(R,G,B);
  2030. // if V = 0 then // achromatic case
  2031. // S = 0
  2032. // H = 0
  2033. // else // chromatics case
  2034. // S = (V - temp)/V
  2035. // Hue:
  2036. // Cr = (V - R) / (V - temp)
  2037. // Cg = (V - G) / (V - temp)
  2038. // Cb = (V - B) / (V - temp)
  2039. // if R = V then H = Cb - Cg
  2040. // if G = V then H = 2 + Cr - Cb
  2041. // if B = V then H = 4 + Cg - Cr
  2042. // H = 60*H
  2043. // if H < 0 then H = H + 360
  2044. //
  2045. // The HSV to RGB conversion algorithm in pseudo code:
  2046. // if S = 0 then
  2047. // R = G = B = V
  2048. // else
  2049. // if H = 360 then
  2050. // H = 0
  2051. // else
  2052. // H = H/60
  2053. // I = floor(H)
  2054. // F = H - I;
  2055. // M = V * ( 1 - S);
  2056. // N = V * ( 1 - S * F);
  2057. // K = V * ( 1 - S * (1 - F));
  2058. // if(I == 0)then{ R = V;G = K;B = M;}
  2059. // if(I == 1)then{ R = N;G = V;B = M;}
  2060. // if(I == 2)then{ R = M;G = V;B = K;}
  2061. // if(I == 3)then{ R = M;G = N;B = V;}
  2062. // if(I == 4)then{ R = K;G = M;B = V;}
  2063. // if(I == 5)then{ R = V;G = M;B = N;}
  2064. //
  2065. // in the range [0..IPP_MAX_8u ] for the 8u depth,
  2066. // in the range [0..IPP_MAX_16u] for the 16u depth,
  2067. //
  2068. */
  2069. IPPAPI(IppStatus, ippiRGBToHSV_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2070. IPPAPI(IppStatus, ippiHSVToRGB_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2071. IPPAPI(IppStatus, ippiRGBToHSV_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2072. IPPAPI(IppStatus, ippiHSVToRGB_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2073. IPPAPI(IppStatus, ippiRGBToHSV_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2074. IPPAPI(IppStatus, ippiHSVToRGB_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2075. IPPAPI(IppStatus, ippiRGBToHSV_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2076. IPPAPI(IppStatus, ippiHSVToRGB_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2077. /* /////////////////////////////////////////////////////////////////////////////
  2078. // Name: ippiRGBToYCC, ippiYCCToRGB
  2079. // Purpose: Converts an RGB image to the YCC color model and vice versa.
  2080. // Parameters:
  2081. // pSrc Pointer to the source image ROI
  2082. // srcStep Step through the source image (bytes)
  2083. // pDst Pointer to the destination image ROI
  2084. // dstStep Step through the destination image (bytes)
  2085. // dstRoiSize size of the ROI
  2086. // Returns:
  2087. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  2088. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  2089. // ippStsSizeErr roiSize has a field with zero or negative value
  2090. // ippStsNoErr No errors
  2091. // Reference:
  2092. // Jack Keith
  2093. // Video Demystified: a Handbook for the Digital Engineer, 2nd ed.
  2094. // 1996.pp.(46-47)
  2095. //
  2096. // The basic equations to convert gamma-corrected R'G'B' image to YCC are:
  2097. //
  2098. // RGB data is transformed into PhotoYCC data:
  2099. // Y = 0.299*R' + 0.587*G' + 0.114*B'
  2100. // C1 = -0.299*R' - 0.587*G' + 0.886*B' = B'- Y
  2101. // C2 = 0.701*R' - 0.587*G' - 0.114*B' = R'- Y
  2102. // Y,C1,C2 are quantized and limited to the range [0..1]
  2103. // Y = 1. / 1.402 * Y
  2104. // C1 = 111.4 / 255. * C1 + 156. / 255.
  2105. // C2 = 135.64 /255. * C2 + 137. / 255.
  2106. //
  2107. // Conversion of PhotoYCC data to RGB data for CRT computer display:
  2108. //
  2109. // normal luminance and chrominance data are recovered
  2110. // Y = 1.3584 * Y
  2111. // C1 = 2.2179 * (C1 - 156./255.)
  2112. // C2 = 1.8215 * (C2 - 137./255.)
  2113. // PhotoYCC data is transformed into RGB data
  2114. // R' = L + C2
  2115. // G' = L - 0.194*C1 - 0.509*C2
  2116. // B' = L + C1
  2117. // Where: Y - luminance; and C1, C2 - two chrominance values.
  2118. //
  2119. // Equations are given above in assumption that the Y, C1, C2, R, G, and B
  2120. // values are in the range [0..1].
  2121. // Y, C1, C2, R, G, B - are scaled to the range:
  2122. // [0..1] for the 32f depth,
  2123. // [0..IPP_MAX_8u] for the 8u depth,
  2124. // [0..IPP_MAX_16u] for the 16u depth,
  2125. // [IPP_MIN_16s..IPP_MAX_16s] for the 16s depth.
  2126. */
  2127. IPPAPI(IppStatus, ippiRGBToYCC_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2128. IPPAPI(IppStatus, ippiYCCToRGB_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2129. IPPAPI(IppStatus, ippiRGBToYCC_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2130. IPPAPI(IppStatus, ippiYCCToRGB_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2131. IPPAPI(IppStatus, ippiRGBToYCC_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2132. IPPAPI(IppStatus, ippiYCCToRGB_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2133. IPPAPI(IppStatus, ippiRGBToYCC_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2134. IPPAPI(IppStatus, ippiYCCToRGB_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2135. IPPAPI(IppStatus, ippiRGBToYCC_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2136. IPPAPI(IppStatus, ippiYCCToRGB_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2137. IPPAPI(IppStatus, ippiRGBToYCC_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2138. IPPAPI(IppStatus, ippiYCCToRGB_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2139. IPPAPI(IppStatus, ippiRGBToYCC_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2140. IPPAPI(IppStatus, ippiYCCToRGB_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2141. IPPAPI(IppStatus, ippiRGBToYCC_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2142. IPPAPI(IppStatus, ippiYCCToRGB_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2143. /* /////////////////////////////////////////////////////////////////////////////
  2144. // Name: ippiRGBToXYZ, ippiXYZToRGB
  2145. // Purpose: Converts an RGB image to the XYZ color model and vice versa.
  2146. // Parameters:
  2147. // pSrc Pointer to the source image ROI
  2148. // srcStep Step through the source image (bytes)
  2149. // pDst Pointer to the destination image ROI
  2150. // dstStep Step through the destination image (bytes)
  2151. // dstRoiSize size of the ROI
  2152. // Returns:
  2153. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  2154. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  2155. // ippStsSizeErr roiSize has a field with zero or negative value
  2156. // ippStsNoErr No errors
  2157. // Reference:
  2158. // David F. Rogers
  2159. // Procedural Elements for Computer Graphics.
  2160. // 1985.
  2161. //
  2162. // The basic equations to convert between Rec. 709 RGB (with its D65 white point) and CIE XYZ are:
  2163. //
  2164. // X = 0.412453 * R + 0.35758 * G + 0.180423 * B
  2165. // Y = 0.212671 * R + 0.71516 * G + 0.072169 * B
  2166. // Z = 0.019334 * R + 0.119193* G + 0.950227 * B
  2167. //
  2168. // R = 3.240479 * X - 1.53715 * Y - 0.498535 * Z
  2169. // G =-0.969256 * X + 1.875991 * Y + 0.041556 * Z
  2170. // B = 0.055648 * X - 0.204043 * Y + 1.057311 * Z
  2171. // Equations are given above in assumption that the X,Y,Z,R,G, and B
  2172. // values are in the range [0..1].
  2173. // Y, C1, C2, R, G, B - are scaled to the range:
  2174. // [0..1] for the 32f depth,
  2175. // [0..IPP_MAX_8u] for the 8u depth,
  2176. // [0..IPP_MAX_16u] for the 16u depth,
  2177. // [IPP_MIN_16s..IPP_MAX_16s] for the 16s depth.
  2178. //
  2179. */
  2180. IPPAPI(IppStatus, ippiRGBToXYZ_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2181. IPPAPI(IppStatus, ippiXYZToRGB_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2182. IPPAPI(IppStatus, ippiRGBToXYZ_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2183. IPPAPI(IppStatus, ippiXYZToRGB_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2184. IPPAPI(IppStatus, ippiRGBToXYZ_16u_C3R,(const Ipp16u* pSrc, int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2185. IPPAPI(IppStatus, ippiXYZToRGB_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2186. IPPAPI(IppStatus, ippiRGBToXYZ_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2187. IPPAPI(IppStatus, ippiXYZToRGB_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2188. IPPAPI(IppStatus, ippiRGBToXYZ_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2189. IPPAPI(IppStatus, ippiXYZToRGB_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2190. IPPAPI(IppStatus, ippiRGBToXYZ_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2191. IPPAPI(IppStatus, ippiXYZToRGB_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2192. IPPAPI(IppStatus, ippiRGBToXYZ_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2193. IPPAPI(IppStatus, ippiXYZToRGB_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2194. IPPAPI(IppStatus, ippiRGBToXYZ_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2195. IPPAPI(IppStatus, ippiXYZToRGB_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2196. /* /////////////////////////////////////////////////////////////////////////////
  2197. // Name: ippiRGBToLUV, ippiLUVToRGB
  2198. // Purpose: Converts an RGB image to the LUV color model and vice versa.
  2199. // Parameters:
  2200. // pSrc Pointer to the source image ROI
  2201. // srcStep Step through the source image (bytes)
  2202. // pDst Pointer to the destination image ROI
  2203. // dstStep Step through the destination image (bytes)
  2204. // dstRoiSize size of the ROI
  2205. // Returns:
  2206. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  2207. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  2208. // ippStsSizeErr roiSize has a field with zero or negative value
  2209. // ippStsNoErr No errors
  2210. // Reference:
  2211. // Computer Graphics: Principles and Practices. James D. Foley... [et al]. 2nd edition.
  2212. // Addison-Wesley, 1990.p.(584)
  2213. //
  2214. // At first an RGB image is converted to the XYZ format image (see the functions
  2215. // ippiRGBToXYZ), then to the CIELUV with the white point D65 and CIE chromaticity
  2216. // coordinates of white point (xn,yn) = (0.312713, 0.329016), and Yn = 1.0 - the luminance of white point.
  2217. //
  2218. // L = 116. * (Y/Yn)**1/3. - 16.
  2219. // U = 13. * L * ( u - un )
  2220. // V = 13. * L * ( v - vn )
  2221. // These are quantized and limited to the 8-bit range of 0 to 255.
  2222. // L = L * 255. / 100.
  2223. // U = ( U + 134. ) * 255. / 354.
  2224. // V = ( V + 140. ) * 255. / 256.
  2225. // where:
  2226. // u' = 4.*X / (X + 15.*Y + 3.*Z)
  2227. // v' = 9.*Y / (X + 15.*Y + 3.*Z)
  2228. // un = 4.*xn / ( -2.*xn + 12.*yn + 3. )
  2229. // vn = 9.*yn / ( -2.*xn + 12.*yn + 3. ).
  2230. // xn, yn is the CIE chromaticity coordinates of white point.
  2231. // Yn = 255. is the luminance of white point.
  2232. //
  2233. // The L component values are in the range [0..100], the U component values are
  2234. // in the range [-134..220], and the V component values are in the range [-140..122].
  2235. //
  2236. // The CIELUV to RGB conversion is performed as following. At first
  2237. // a LUV image is converted to the XYZ image
  2238. // L = L * 100./ 255.
  2239. // U = ( U * 354./ 255.) - 134.
  2240. // V = ( V * 256./ 255.) - 140.
  2241. // u = U / ( 13.* L ) + un
  2242. // v = V / ( 13.* L ) + vn
  2243. // Y = (( L + 16. ) / 116. )**3.
  2244. // Y *= Yn
  2245. // X = -9.* Y * u / (( u - 4.)* v - u * v )
  2246. // Z = ( 9.*Y - 15*v*Y - v*X ) / 3. * v
  2247. // where:
  2248. // un = 4.*xn / ( -2.*xn + 12.*yn + 3. )
  2249. // vn = 9.*yn / ( -2.*xn + 12.*yn + 3. ).
  2250. // xn, yn is the CIE chromaticity coordinates of white point.
  2251. // Yn = 255. is the luminance of white point.
  2252. //
  2253. // Then the XYZ image is converted to the RGB image (see the functions
  2254. // ippiXYZToRGB).
  2255. //
  2256. */
  2257. IPPAPI(IppStatus, ippiRGBToLUV_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2258. IPPAPI(IppStatus, ippiLUVToRGB_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2259. IPPAPI(IppStatus, ippiRGBToLUV_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2260. IPPAPI(IppStatus, ippiLUVToRGB_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2261. IPPAPI(IppStatus, ippiRGBToLUV_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2262. IPPAPI(IppStatus, ippiLUVToRGB_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2263. IPPAPI(IppStatus, ippiRGBToLUV_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2264. IPPAPI(IppStatus, ippiLUVToRGB_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep, IppiSize roiSize))
  2265. IPPAPI(IppStatus, ippiRGBToLUV_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2266. IPPAPI(IppStatus, ippiLUVToRGB_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2267. IPPAPI(IppStatus, ippiRGBToLUV_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2268. IPPAPI(IppStatus, ippiLUVToRGB_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep, IppiSize roiSize))
  2269. IPPAPI(IppStatus, ippiRGBToLUV_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2270. IPPAPI(IppStatus, ippiLUVToRGB_32f_C3R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2271. IPPAPI(IppStatus, ippiRGBToLUV_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2272. IPPAPI(IppStatus, ippiLUVToRGB_32f_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp32f* pDst, int dstStep, IppiSize roiSize))
  2273. /* /////////////////////////////////////////////////////////////////////////////
  2274. // Name: ippiBGRToLab_8u_C3R and ippiLabToBGR_8u_C3R
  2275. // ippiBGRToLab_8u16u_C3R and ippiLabToBGR_16u8u_C3R
  2276. // Purpose: Converts an RGB image to CIE Lab color model and vice-versa
  2277. // Parameters:
  2278. // pSrc Pointer to the source image ROI
  2279. // srcStep Step through the source image (bytes)
  2280. // pDst Pointer to the destination image ROI
  2281. // dstStep Step through the destination image (bytes)
  2282. // roiSize Size of the ROI
  2283. // Returns:
  2284. // ippStsNullPtrErr if src == NULL or dst == NULL
  2285. // ippStsSizeErr if imgSize.width <= 0 || imgSize.height <= 0
  2286. // ippStsNoErr otherwise
  2287. // Reference:
  2288. // Computer graphics: principles and practices. James D. Foley... [et al.]. 2nd ed.
  2289. // Addison-Wesley, c1990.p.(584)
  2290. //
  2291. // At first an RGB image is converted to the XYZ color model (see the function
  2292. // ippRGBToXYZ_8u_C3R), then to the CIELab with the white point D65 and CIE chromaticity
  2293. // coordinates of white point (xn,yn) = (0.312713, 0.329016)
  2294. // L = 116. *((Y/Yn)^(1/3)) - 16 for Y/Yn > 0.008856
  2295. // L = 903.3*(Y/Yn) for Y/Yn <= 0.008856
  2296. // a = 500. * (f(X/Xn) - f(Y/Yn))
  2297. // b = 200. * (f(Y/Yn) - f(Z/Zn))
  2298. // where f(t)=t^(1/3) for t > 0.008856
  2299. // f(t)=7.787*t+16/116 for t <= 0.008856
  2300. // These values are quantized and scaled to the 8-bit range of 0 to 255 for ippiBGRToLab_8u_C3R.
  2301. // L = L * 255. / 100.
  2302. // a = (a + 128.)
  2303. // b = (a + 128.)
  2304. // and they are quantized and scaled to the 16-bit range of 0 to 65535 for ippiBGRToLab_8u16u_C3R
  2305. // L = L * 65535. / 100.
  2306. // a = (a + 128.)* 255
  2307. // b = (a + 128.)* 255
  2308. // where:
  2309. // normalizing multipliers
  2310. // Yn = 1.0 * 255
  2311. // Xn = 0.950455 * 255
  2312. // Zn = 1.088753 * 255
  2313. //
  2314. // L component values are in the range [0..100], a and b component values are
  2315. // in the range [-128..127].
  2316. //
  2317. // The CIELab to RGB conversion is performed as follows. At first
  2318. // a Lab image is converted to the XYZ image
  2319. // for ippiLabToBGR_8u_C3R
  2320. // L = L * 100./ 255.
  2321. // a = (a - 128.)
  2322. // b = (a - 128.)
  2323. // or for ippiLabToBGR_16u8u_C3R
  2324. // L = L * 100./ 65535.
  2325. // a = (a / 255 - 128.)
  2326. // b = (b / 255 - 128.)
  2327. // X = Xn * ( P + a / 500 )^3
  2328. // Y = Yn * P^3
  2329. // Z = Zn * ( P - b / 200 )^3
  2330. // where P = (L + 16) / 116
  2331. // Then the XYZ image is converted to the RGB color model (see the function
  2332. // ippXYZToRGB_8u_C3R).
  2333. //
  2334. */
  2335. IPPAPI(IppStatus, ippiBGRToLab_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst,int dstStep, IppiSize roiSize))
  2336. IPPAPI(IppStatus, ippiLabToBGR_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst,int dstStep, IppiSize roiSize))
  2337. IPPAPI(IppStatus, ippiBGRToLab_8u16u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp16u* pDst,int dstStep, IppiSize roiSize))
  2338. IPPAPI(IppStatus, ippiLabToBGR_16u8u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp8u* pDst,int dstStep, IppiSize roiSize))
  2339. /* ////////////////////////////////////////////////////////////////////////////
  2340. // Name: ippReduceBits
  2341. // Purpose: Reduces the bit resolution of an image.
  2342. // Parameters:
  2343. // pSrc Pointer to the source image .
  2344. // pDst Pointer to the destination image .
  2345. // roiSize Size of ROI in pixels.
  2346. // srcStep Step in bytes through the source image to jump on the next line
  2347. // dstStep Step in bytes through the destination image to jump on the next line
  2348. // noise The number specifying the amount of noise added (as a percentage of a range [0..100])
  2349. // levels The number of output levels for halftoning (dithering)[2.. MAX_LEVELS],
  2350. // where MAX_LEVELS is 0x01 << depth, and depth is depth of the destination image
  2351. // dtype The type of dithering to be used. The following types are supported:
  2352. // ippDitherNone no dithering is done
  2353. // ippDitherStucki Stucki's dithering algorithm
  2354. // ippDitherFS Floid-Steinberg's dithering algorithm
  2355. // ippDitherJJN Jarvice-Judice-Ninke's dithering algorithm
  2356. // ippDitherBayer Bayer's dithering algorithm
  2357. // RGB values for the 32f data type should be in the range [0..1]
  2358. // Returns:
  2359. // ippStsNullPtrErr pSrc == NULL, or pDst == NULL
  2360. // ippStsStepErr srcStep or dstStep is less than or equal to zero
  2361. // ippStsSizeErr roiSize has a field with zero or negative value
  2362. // ippStsNoiseValErr noise has illegal value
  2363. // ippStsDitherLevelsErr levels value is out of admissible range
  2364. // ippStsNoErr No errors
  2365. */
  2366. IPPAPI(IppStatus, ippiReduceBits_8u_C1R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2367. int noise, IppiDitherType dtype, int levels))
  2368. IPPAPI(IppStatus, ippiReduceBits_8u_C3R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2369. int noise, IppiDitherType dtype, int levels))
  2370. IPPAPI(IppStatus, ippiReduceBits_8u_AC4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2371. int noise, IppiDitherType dtype, int levels))
  2372. IPPAPI(IppStatus, ippiReduceBits_8u_C4R,(const Ipp8u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2373. int noise, IppiDitherType dtype, int levels))
  2374. IPPAPI(IppStatus, ippiReduceBits_16u_C1R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2375. int noise, IppiDitherType dtype, int levels))
  2376. IPPAPI(IppStatus, ippiReduceBits_16u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2377. int noise, IppiDitherType dtype, int levels))
  2378. IPPAPI(IppStatus, ippiReduceBits_16u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2379. int noise, IppiDitherType dtype, int levels))
  2380. IPPAPI(IppStatus, ippiReduceBits_16u_C4R,(const Ipp16u* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2381. int noise, IppiDitherType dtype, int levels))
  2382. IPPAPI(IppStatus, ippiReduceBits_16u8u_C1R,(const Ipp16u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2383. int noise, IppiDitherType dtype, int levels))
  2384. IPPAPI(IppStatus, ippiReduceBits_16u8u_C3R,(const Ipp16u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2385. int noise, IppiDitherType dtype, int levels))
  2386. IPPAPI(IppStatus, ippiReduceBits_16u8u_AC4R,(const Ipp16u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2387. int noise, IppiDitherType dtype, int levels))
  2388. IPPAPI(IppStatus, ippiReduceBits_16u8u_C4R,(const Ipp16u* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2389. int noise, IppiDitherType dtype, int levels))
  2390. IPPAPI(IppStatus, ippiReduceBits_16s_C1R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2391. int noise, IppiDitherType dtype, int levels))
  2392. IPPAPI(IppStatus, ippiReduceBits_16s_C3R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2393. int noise, IppiDitherType dtype, int levels))
  2394. IPPAPI(IppStatus, ippiReduceBits_16s_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2395. int noise, IppiDitherType dtype, int levels))
  2396. IPPAPI(IppStatus, ippiReduceBits_16s_C4R,(const Ipp16s* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2397. int noise, IppiDitherType dtype, int levels))
  2398. IPPAPI(IppStatus, ippiReduceBits_16s8u_C1R,(const Ipp16s* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2399. int noise, IppiDitherType dtype, int levels))
  2400. IPPAPI(IppStatus, ippiReduceBits_16s8u_C3R,(const Ipp16s* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2401. int noise, IppiDitherType dtype, int levels))
  2402. IPPAPI(IppStatus, ippiReduceBits_16s8u_AC4R,(const Ipp16s* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2403. int noise, IppiDitherType dtype, int levels))
  2404. IPPAPI(IppStatus, ippiReduceBits_16s8u_C4R,(const Ipp16s* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2405. int noise, IppiDitherType dtype, int levels))
  2406. IPPAPI(IppStatus, ippiReduceBits_32f8u_C1R,(const Ipp32f* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2407. int noise, IppiDitherType dtype, int levels))
  2408. IPPAPI(IppStatus, ippiReduceBits_32f8u_C3R,(const Ipp32f* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2409. int noise, IppiDitherType dtype, int levels))
  2410. IPPAPI(IppStatus, ippiReduceBits_32f8u_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2411. int noise, IppiDitherType dtype, int levels))
  2412. IPPAPI(IppStatus, ippiReduceBits_32f8u_C4R,(const Ipp32f* pSrc,int srcStep,Ipp8u* pDst, int dstStep,IppiSize roiSize,
  2413. int noise, IppiDitherType dtype, int levels))
  2414. IPPAPI(IppStatus, ippiReduceBits_32f16u_C1R,(const Ipp32f* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2415. int noise, IppiDitherType dtype, int levels))
  2416. IPPAPI(IppStatus, ippiReduceBits_32f16u_C3R,(const Ipp32f* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2417. int noise, IppiDitherType dtype, int levels))
  2418. IPPAPI(IppStatus, ippiReduceBits_32f16u_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2419. int noise, IppiDitherType dtype, int levels))
  2420. IPPAPI(IppStatus, ippiReduceBits_32f16u_C4R,(const Ipp32f* pSrc,int srcStep,Ipp16u* pDst, int dstStep,IppiSize roiSize,
  2421. int noise, IppiDitherType dtype, int levels))
  2422. IPPAPI(IppStatus, ippiReduceBits_32f16s_C1R,(const Ipp32f* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2423. int noise, IppiDitherType dtype, int levels))
  2424. IPPAPI(IppStatus, ippiReduceBits_32f16s_C3R,(const Ipp32f* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2425. int noise, IppiDitherType dtype, int levels))
  2426. IPPAPI(IppStatus, ippiReduceBits_32f16s_AC4R,(const Ipp32f* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2427. int noise, IppiDitherType dtype, int levels))
  2428. IPPAPI(IppStatus, ippiReduceBits_32f16s_C4R,(const Ipp32f* pSrc,int srcStep,Ipp16s* pDst, int dstStep,IppiSize roiSize,
  2429. int noise, IppiDitherType dtype, int levels))
  2430. /* ////////////////////////////////////////////////////////////////////////////
  2431. // Name: ippiColorTwist
  2432. //
  2433. // Purpose: Applies a color-twist matrix to an image.
  2434. // |R| | t11 t12 t13 t14 | |r|
  2435. // |G| = | t21 t22 t23 t24 | * |g|
  2436. // |B| | t31 t32 t33 t34 | |b|
  2437. //
  2438. // R = t11*r + t12*g + t13*b + t14
  2439. // G = t21*r + t22*g + t23*b + t24
  2440. // B = t31*r + t32*g + t33*b + t34
  2441. //
  2442. // Returns:
  2443. // ippStsNullPtrErr One of the pointers is NULL
  2444. // ippStsSizeErr roiSize has a field with zero or negative value
  2445. // ippStsStepErr One of the step values is zero or negative
  2446. // ippStsNoErr OK
  2447. //
  2448. // Parameters:
  2449. // pSrc Pointer to the source image
  2450. // srcStep Step through the source image
  2451. // pDst Pointer to the destination image
  2452. // dstStep Step through the destination image
  2453. // pSrcDst Pointer to the source/destination image (in-place flavors)
  2454. // srcDstStep Step through the source/destination image (in-place flavors)
  2455. // roiSize Size of the ROI
  2456. // twist An array of color-twist matrix elements
  2457. */
  2458. IPPAPI ( IppStatus, ippiColorTwist32f_8s_C3R, ( const Ipp8s* pSrc, int srcStep, Ipp8s* pDst, int dstStep,
  2459. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2460. IPPAPI ( IppStatus, ippiColorTwist32f_8s_C3IR, ( Ipp8s* pSrcDst, int srcDstStep, IppiSize roiSize,
  2461. const Ipp32f twist[3][4] ))
  2462. IPPAPI ( IppStatus, ippiColorTwist32f_8s_AC4R, ( const Ipp8s* pSrc, int srcStep, Ipp8s* pDst, int dstStep,
  2463. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2464. IPPAPI ( IppStatus, ippiColorTwist32f_8s_AC4IR, ( Ipp8s* pSrcDst, int srcDstStep, IppiSize roiSize,
  2465. const Ipp32f twist[3][4] ))
  2466. IPPAPI ( IppStatus, ippiColorTwist32f_8s_P3R, ( const Ipp8s* pSrc[3], int srcStep,
  2467. Ipp8s* pDst[3], int dstStep,
  2468. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2469. IPPAPI ( IppStatus, ippiColorTwist32f_8s_IP3R, ( Ipp8s* pSrcDst[3], int srcDstStep,
  2470. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2471. IPPAPI ( IppStatus, ippiColorTwist32f_8u_C3R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
  2472. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2473. IPPAPI ( IppStatus, ippiColorTwist32f_8u_C3IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize,
  2474. const Ipp32f twist[3][4] ))
  2475. IPPAPI ( IppStatus, ippiColorTwist32f_8u_AC4R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
  2476. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2477. IPPAPI ( IppStatus, ippiColorTwist32f_8u_AC4IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize,
  2478. const Ipp32f twist[3][4] ))
  2479. IPPAPI ( IppStatus, ippiColorTwist32f_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep,
  2480. Ipp8u* pDst[3], int dstStep,
  2481. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2482. IPPAPI ( IppStatus, ippiColorTwist32f_8u_IP3R, ( Ipp8u* pSrcDst[3], int srcDstStep,
  2483. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2484. IPPAPI ( IppStatus, ippiColorTwist32f_16u_C3R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep,
  2485. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2486. IPPAPI ( IppStatus, ippiColorTwist32f_16u_C3IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize,
  2487. const Ipp32f twist[3][4] ))
  2488. IPPAPI ( IppStatus, ippiColorTwist32f_16u_AC4R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep,
  2489. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2490. IPPAPI ( IppStatus, ippiColorTwist32f_16u_AC4IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize,
  2491. const Ipp32f twist[3][4] ))
  2492. IPPAPI ( IppStatus, ippiColorTwist32f_16u_P3R, ( const Ipp16u* pSrc[3], int srcStep,
  2493. Ipp16u* pDst[3], int dstStep,
  2494. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2495. IPPAPI ( IppStatus, ippiColorTwist32f_16u_IP3R, ( Ipp16u* pSrcDst[3], int srcDstStep,
  2496. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2497. IPPAPI ( IppStatus, ippiColorTwist32f_16s_C3R, ( const Ipp16s* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
  2498. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2499. IPPAPI ( IppStatus, ippiColorTwist32f_16s_C3IR, ( Ipp16s* pSrcDst, int srcDstStep, IppiSize roiSize,
  2500. const Ipp32f twist[3][4] ))
  2501. IPPAPI ( IppStatus, ippiColorTwist32f_16s_AC4R, ( const Ipp16s* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
  2502. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2503. IPPAPI ( IppStatus, ippiColorTwist32f_16s_AC4IR, ( Ipp16s* pSrcDst, int srcDstStep, IppiSize roiSize,
  2504. const Ipp32f twist[3][4] ))
  2505. IPPAPI ( IppStatus, ippiColorTwist32f_16s_P3R, ( const Ipp16s* pSrc[3], int srcStep,
  2506. Ipp16s* pDst[3], int dstStep,
  2507. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2508. IPPAPI ( IppStatus, ippiColorTwist32f_16s_IP3R, ( Ipp16s* pSrcDst[3], int srcDstStep,
  2509. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2510. IPPAPI ( IppStatus, ippiColorTwist_32f_C3R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
  2511. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2512. IPPAPI ( IppStatus, ippiColorTwist_32f_C3IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize,
  2513. const Ipp32f twist[3][4] ))
  2514. IPPAPI ( IppStatus, ippiColorTwist_32f_AC4R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep,
  2515. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2516. IPPAPI ( IppStatus, ippiColorTwist_32f_AC4IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize,
  2517. const Ipp32f twist[3][4] ))
  2518. IPPAPI ( IppStatus, ippiColorTwist_32f_P3R, ( const Ipp32f* pSrc[3], int srcStep,
  2519. Ipp32f* pDst[3], int dstStep,
  2520. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2521. IPPAPI ( IppStatus, ippiColorTwist_32f_IP3R, ( Ipp32f* pSrcDst[3], int srcDstStep,
  2522. IppiSize roiSize, const Ipp32f twist[3][4] ))
  2523. /* ////////////////////////////////////////////////////////////////////////////
  2524. // Name: ippiColorTwist_32f_C4R
  2525. //
  2526. // Purpose: Applies a color-twist matrix to an image.
  2527. // |R| | t11 t12 t13 t14 | |r|
  2528. // |G| = | t21 t22 t23 t24 | * |g|
  2529. // |B| | t31 t32 t33 t34 | |b|
  2530. // |W| | t41 t42 t43 t44 | |w|
  2531. // R = t11*r + t12*g + t13*b + t14*w
  2532. // G = t21*r + t22*g + t23*b + t24*w
  2533. // B = t31*r + t32*g + t33*b + t34*w
  2534. // W = t41*r + t42*g + t43*b + t44*w
  2535. //
  2536. // Returns:
  2537. // ippStsNullPtrErr One of the pointers is NULL
  2538. // ippStsSizeErr roiSize has a field with zero or negative value
  2539. // ippStsStepErr One of the step values is zero or negative
  2540. // ippStsNoErr OK
  2541. //
  2542. // Parameters:
  2543. // pSrc Pointer to the source image
  2544. // srcStep Step through the source image
  2545. // pDst Pointer to the destination image
  2546. // dstStep Step through the destination image
  2547. // roiSize Size of the ROI
  2548. // twist An array of color-twist matrix elements
  2549. */
  2550. IPPAPI ( IppStatus, ippiColorTwist_32f_C4R,( const Ipp32f* pSrc, int srcStep,Ipp32f* pDst, int dstStep,
  2551. IppiSize roiSize, const Ipp32f twist[4][4]))
  2552. /* ////////////////////////////////////////////////////////////////////////////
  2553. // Name: ippiGammaFwd, ippiGammaInv
  2554. //
  2555. // Purpose: Performs gamma-correction of an RGB image (ippiGammaFwd);
  2556. // converts a gamma-corrected RGB image back to the original (ippiGammaInv).
  2557. // 1). Gamma-correction:
  2558. // for R,G,B < 0.018
  2559. // R' = 4.5 * R
  2560. // G' = 4.5 * G
  2561. // B' = 4.5 * B
  2562. // for R,G,B >= 0.018
  2563. // R' = 1.099 * (R**0.45) - 0.099
  2564. // G' = 1.099 * (G**0.45) - 0.099
  2565. // B' = 1.099 * (B**0.45) - 0.099
  2566. //
  2567. // 2). Conversion to the original:
  2568. // for R',G',B' < 0.0812
  2569. // R = R' / 4.5
  2570. // G = G' / 4.5
  2571. // B = B' / 4.5
  2572. // for R',G',B' >= 0.0812
  2573. // R = (( R' + 0.099 ) / 1.099 )** 1 / 0.45
  2574. // G = (( G' + 0.099 ) / 1.099 )** 1 / 0.45
  2575. // B = (( B' + 0.099 ) / 1.099 )** 1 / 0.45
  2576. //
  2577. // Note: example for range[0,1].
  2578. //
  2579. // Returns:
  2580. // ippStsNullPtrErr One of the pointers is NULL
  2581. // ippStsSizeErr roiSize has a field with zero or negative value
  2582. // ippStsStepErr One of the step values is less than or equal to zero
  2583. // ippStsGammaRangeErr vMax - vMin <= 0 (for 32f)
  2584. // ippStsNoErr OK
  2585. //
  2586. // Parameters:
  2587. // pSrc Pointer to the source image (pixel-order data). An array
  2588. // of pointers to separate source color planes (planar data)
  2589. // srcStep Step through the source image
  2590. // pDst Pointer to the destination image (pixel-order data). An array
  2591. // of pointers to separate destination color planes (planar data)
  2592. // dstStep Step through the destination image
  2593. // pSrcDst Pointer to the source/destination image (in-place flavors)
  2594. // srcDstStep Step through the source/destination image (in-place flavors)
  2595. // roiSize Size of the ROI
  2596. // vMin, vMax Minimum and maximum values of the input 32f data.
  2597. */
  2598. IPPAPI(IppStatus,ippiGammaFwd_8u_C3R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2599. IPPAPI(IppStatus,ippiGammaFwd_8u_C3IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2600. IPPAPI(IppStatus,ippiGammaInv_8u_C3R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2601. IPPAPI(IppStatus,ippiGammaInv_8u_C3IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2602. IPPAPI(IppStatus,ippiGammaFwd_8u_AC4R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2603. IPPAPI(IppStatus,ippiGammaFwd_8u_AC4IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2604. IPPAPI(IppStatus,ippiGammaInv_8u_AC4R, ( const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2605. IPPAPI(IppStatus,ippiGammaInv_8u_AC4IR, ( Ipp8u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2606. IPPAPI(IppStatus,ippiGammaFwd_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize ))
  2607. IPPAPI(IppStatus,ippiGammaFwd_8u_IP3R, ( Ipp8u* pSrcDst[3], int srcDstStep, IppiSize roiSize ))
  2608. IPPAPI(IppStatus,ippiGammaInv_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep, Ipp8u* pDst[3], int dstStep, IppiSize roiSize ))
  2609. IPPAPI(IppStatus,ippiGammaInv_8u_IP3R, ( Ipp8u* pSrcDst[3], int srcDstStep, IppiSize roiSize ))
  2610. IPPAPI(IppStatus,ippiGammaFwd_16u_C3R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2611. IPPAPI(IppStatus,ippiGammaFwd_16u_C3IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2612. IPPAPI(IppStatus,ippiGammaInv_16u_C3R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2613. IPPAPI(IppStatus,ippiGammaInv_16u_C3IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2614. IPPAPI(IppStatus,ippiGammaFwd_16u_AC4R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2615. IPPAPI(IppStatus,ippiGammaFwd_16u_AC4IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2616. IPPAPI(IppStatus,ippiGammaInv_16u_AC4R, ( const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2617. IPPAPI(IppStatus,ippiGammaInv_16u_AC4IR, ( Ipp16u* pSrcDst, int srcDstStep, IppiSize roiSize ))
  2618. IPPAPI(IppStatus,ippiGammaFwd_16u_P3R, ( const Ipp16u* pSrc[3], int srcStep, Ipp16u* pDst[3], int dstStep, IppiSize roiSize ))
  2619. IPPAPI(IppStatus,ippiGammaFwd_16u_IP3R, ( Ipp16u* pSrcDst[3], int srcDstStep, IppiSize roiSize ))
  2620. IPPAPI(IppStatus,ippiGammaInv_16u_P3R, ( const Ipp16u* pSrc[3], int srcStep, Ipp16u* pDst[3], int dstStep, IppiSize roiSize ))
  2621. IPPAPI(IppStatus,ippiGammaInv_16u_IP3R, ( Ipp16u* pSrcDst[3], int srcDstStep, IppiSize roiSize ))
  2622. IPPAPI(IppStatus,ippiGammaFwd_32f_C3R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2623. IPPAPI(IppStatus,ippiGammaFwd_32f_C3IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2624. IPPAPI(IppStatus,ippiGammaInv_32f_C3R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2625. IPPAPI(IppStatus,ippiGammaInv_32f_C3IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2626. IPPAPI(IppStatus,ippiGammaFwd_32f_AC4R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2627. IPPAPI(IppStatus,ippiGammaFwd_32f_AC4IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2628. IPPAPI(IppStatus,ippiGammaInv_32f_AC4R, ( const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2629. IPPAPI(IppStatus,ippiGammaInv_32f_AC4IR, ( Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2630. IPPAPI(IppStatus,ippiGammaFwd_32f_P3R, ( const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3], int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2631. IPPAPI(IppStatus,ippiGammaFwd_32f_IP3R, ( Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2632. IPPAPI(IppStatus,ippiGammaInv_32f_P3R, ( const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3], int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2633. IPPAPI(IppStatus,ippiGammaInv_32f_IP3R, ( Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax ))
  2634. /* /////////////////////////////////////////////////////////////////////////////
  2635. // Names: ippiToneMapLinear_32f8u_C1R ippiToneMapMean_32f8u_C1R
  2636. // Purpose: Convert HDRI into the LDRI. In the other words they map a dst Image into the range [0..255]
  2637. //
  2638. // Input Arguments:
  2639. // pSrc - pointer to the HDRI.
  2640. // srcStep - step through the source image
  2641. // Output Arguments:
  2642. // pDst - pointer to the LDRI.
  2643. // dstStep - step through the source image
  2644. // Returns:
  2645. // ippStsNoErr OK
  2646. // ippStsNullPtrErr One of the pointers is NULL
  2647. // ippStsSizeErr roiSize has a field with zero or negative value
  2648. // Notes:
  2649. // ippiToneMapLinear_32f_C1RI - applies Linear Scale-Factor method to src image.
  2650. // ippiToneMapMean_32f_C1RI - applies Mean Value method to src image.
  2651. //
  2652. */
  2653. IPPAPI(IppStatus,ippiToneMapLinear_32f8u_C1R,(const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2654. IPPAPI(IppStatus,ippiToneMapMean_32f8u_C1R, (const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2655. /* /////////////////////////////////////////////////////////////////////////////
  2656. // Names: ippiYCbCr420To411_8u_P3R ippiYCbCr420To411_8u_P3R ippiYCbCr1620To420_8u_P3R
  2657. // Purpose: Converts an YCbCr420 to YCbCr411 image,
  2658. // YCbCr411 to YCbCr420 image,
  2659. // YCbCr420 to YCbCr1620 image,
  2660. // YCbCr1620 to YCbCr420 image.
  2661. //
  2662. // Input Arguments:
  2663. // pSrc - pointer to the source image.
  2664. // srcStep - step through the source image
  2665. // roiSize - Size of the ROI
  2666. // Output Arguments:
  2667. // pDst - pointer to the destination image.
  2668. // dstStep - step through the destination image
  2669. // Returns:
  2670. // ippStsNoErr OK
  2671. // ippStsNullPtrErr One of the pointers is NULL
  2672. // ippStsSizeErr roiSize has a field with zero or negative value
  2673. //
  2674. */
  2675. IPPAPI(IppStatus, ippiYCbCr420To411_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize) )
  2676. IPPAPI(IppStatus, ippiYCbCr411To420_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize) )
  2677. IPPAPI(IppStatus, ippiYCbCr420To1620_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize) )
  2678. IPPAPI(IppStatus, ippiYCbCr1620To420_8u_P3R, ( const Ipp8u* pSrc[3], int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize) )
  2679. /* /////////////////////////////////////////////////////////////////////////////
  2680. //
  2681. // Names: ippiRGBToRGB565_8u16u_C3R
  2682. // ippiBGRToBGR565_8u16u_C3R
  2683. //
  2684. // Purpose: Converts RGB(BGR) image to RGB565(BGR565) image and vice versa
  2685. //
  2686. // Returns:
  2687. // ippStsNoErr No errors
  2688. // ippStsNullPtrErr One of the pointers is NULL
  2689. // ippStsSizeErr The roiSize has a field with negative or zero value
  2690. // ippStsStepErr One of steps is less than or equal to zero
  2691. //
  2692. // Parameters:
  2693. // pSrc Pointers to the source images
  2694. // srcStep Steps through the source image
  2695. // pDst Pointer to the destination image
  2696. // dstStep Step through the destination image
  2697. // roiSize Size of the image ROI
  2698. //
  2699. */
  2700. IPPAPI(IppStatus, ippiRGBToRGB565_8u16u_C3R,(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2701. IPPAPI(IppStatus, ippiBGRToBGR565_8u16u_C3R,(const Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize ))
  2702. IPPAPI(IppStatus, ippiRGB565ToRGB_16u8u_C3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2703. IPPAPI(IppStatus, ippiBGR565ToBGR_16u8u_C3R,(const Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize ))
  2704. /* /////////////////////////////////////////////////////////////////////////////
  2705. // Names: ippiCFAToRGB_8u_C1C3R
  2706. // ippiCFAToRGB_16u_C1C3R
  2707. //
  2708. // Purpose: Bayer transform. Converts color filter array image to RGB image
  2709. // Returns:
  2710. // ippStsNoErr No errors
  2711. // ippStsNullPtrErr One of the pointers is NULL
  2712. // ippStsBadArgErr Wrong value of grid
  2713. // ippStsSizeErr The srcSize.width<2 or the srcSize.height<2 or
  2714. // the roiSize has a field with negative or zero value
  2715. // Parameters:
  2716. // pSrc Pointers to the source image
  2717. // srcRoi ROI in source image(top left corner and size)
  2718. // srcSize Size of source image
  2719. // srcStep Steps through the source image
  2720. // pDst Pointer to the destination image
  2721. // dstStep Step through the destination image
  2722. // grid Type of baeyers grid
  2723. // interpolation Reserved, must be 0
  2724. //
  2725. */
  2726. #if !defined( _OWN_BLDPCS )
  2727. typedef enum {
  2728. ippiBayerBGGR,
  2729. ippiBayerRGGB,
  2730. ippiBayerGBRG,
  2731. ippiBayerGRBG
  2732. } IppiBayerGrid;
  2733. #endif /* _OWN_BLDPCS */
  2734. IPPAPI(IppStatus, ippiCFAToRGB_8u_C1C3R,(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep,
  2735. Ipp8u* pDst, int dstStep, IppiBayerGrid grid, int interpolation))
  2736. IPPAPI(IppStatus, ippiCFAToRGB_16u_C1C3R,(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep,
  2737. Ipp16u* pDst, int dstStep, IppiBayerGrid grid, int interpolation))
  2738. /* ////////////////////////////////////////////////////////////////////////////
  2739. // Name: ippiCbYCr422ToYCbCr420_Interlace_8u_C2P3R,
  2740. // ippiYCbCr420ToCbYCr422_Interlace_8u_P3C2R
  2741. // ippiYCbCr422To420_Interlace_8u_P3R
  2742. // ippiYCbCr420To422_Interlace_8u_P3R
  2743. // Purpose: Converts 2-channel interlaced UYVY, YUYV C2 and P3 images
  2744. // to the P3 YUV420 image and vice versa
  2745. //
  2746. // Return:
  2747. // ippStsNoErr Ok
  2748. // ippStsNullPtrErr One of the pointers is NULL
  2749. // ippStsSizeErr roiSize.width less than 2 or roiSize.height less than 4
  2750. // ippStsDoubleSize roiSize.width is not multiples of 2 or
  2751. // roiSize.height is not multiples of 4
  2752. //
  2753. // Parameters:
  2754. // pSrc Pointer(an array of pointers) to the source image
  2755. // srcStep Step(an array of steps) through the source image
  2756. // roiSize Size of the ROI, should be multiple of 2(width) and 4(height)
  2757. // pDst Pointer(an array of pointers) to destination image.
  2758. // dstStep Step(an array of steps) through the destination image
  2759. // Notes:
  2760. // UYVU422 to YUV420 uses following formulas,
  2761. // Yd = Ys
  2762. // U(V)d0 = (3*U(V)s0 + U(V)s2 + 2) / 4
  2763. // U(V)d1 = ( U(V)s1 + 3 * U(V)s3 + 2) / 4,
  2764. // where Us0(1), Us2(3) are interleaved adjacent lines
  2765. //
  2766. // YUV420 to UYVU422 uses following formulas,
  2767. // U(V)d0 = (5*U(V)s0 + 3*U(V)s2 + 4) / 8;
  2768. // U(V)d1 = (7*U(V)s1 + U(V)s3 + 4) / 8;
  2769. // U(V)d2 = ( U(V)s0 + 7*U(V)s2 + 4) / 8;
  2770. // U(V)d3 = (3*U(V)s1 + 5*U(V)s3 + 4) / 8;
  2771. //
  2772. //
  2773. //
  2774. */
  2775. IPPAPI(IppStatus, ippiCbYCr422ToYCbCr420_Interlace_8u_C2P3R,(const Ipp8u* pSrc,
  2776. int srcStep,Ipp8u* pDst[3],int dstStep[3], IppiSize roiSize))
  2777. IPPAPI(IppStatus, ippiYCbCr422To420_Interlace_8u_P3R,(const Ipp8u* pSrc[3],
  2778. int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  2779. IPPAPI(IppStatus, ippiYCbCr420ToCbYCr422_Interlace_8u_P3C2R,(const Ipp8u* pSrc[3],
  2780. int srcStep[3], Ipp8u* pDst, int dstStep, IppiSize roiSize))
  2781. IPPAPI(IppStatus, ippiYCbCr420To422_Interlace_8u_P3R,(const Ipp8u* pSrc[3],
  2782. int srcStep[3], Ipp8u* pDst[3], int dstStep[3], IppiSize roiSize))
  2783. /* /////////////////////////////////////////////////////////////////////////////
  2784. // Names: ippiDemosaicAHD_8u_C1C3R
  2785. // ippiDemosaicAHD_16u_C1C3R
  2786. //
  2787. // Purpose: Converts color filter array image to RGB image wih AHD algorithm.
  2788. // Reference: K. Hirakawa, T.W. Parks, "Adaptive Homogeneity-Directed Demosaicing Algorithm,"
  2789. // IEEE Trans. Image Processing, March 2005,
  2790. // Link: h__p://www.accidentalmark.com/research/papers/Hirakawa05MNdemosaicTIP.pdf
  2791. //
  2792. // Returns:
  2793. // ippStsNoErr No errors
  2794. // ippStsNullPtrErr One of the pointers is NULL
  2795. // ippStsBadArgErr Wrong value of grid
  2796. // ippStsSizeErr The srcSize.width<5 or the srcSize.height<5 or
  2797. // the roiSize has a field with negative or zero value
  2798. // Parameters:
  2799. // pSrc Pointers to the source image
  2800. // srcRoi ROI in source image(top left corner and size)
  2801. // srcSize Size of source image
  2802. // srcStep Steps through the source image
  2803. // pDst Pointer to the destination image
  2804. // dstStep Step through the destination image
  2805. // grid Type of baeyers grid
  2806. // pTmp Pointer to the temporary image of (srcRoi.width + 6, 30) size
  2807. // tmpStep Steps through the temporary image
  2808. //
  2809. */
  2810. IPPAPI(IppStatus, ippiDemosaicAHD_8u_C1C3R,(const Ipp8u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep,
  2811. Ipp8u* pDst, int dstStep, IppiBayerGrid grid, Ipp8u* pTmp, int tmpStep))
  2812. IPPAPI(IppStatus, ippiDemosaicAHD_16u_C1C3R,(const Ipp16u* pSrc, IppiRect srcRoi, IppiSize srcSize, int srcStep,
  2813. Ipp16u* pDst, int dstStep, IppiBayerGrid grid, Ipp16u* pTmp, int tmpStep))
  2814. /* ///////////////////////////////////////////////////////////////////////////
  2815. // Name:
  2816. // ippiRGBToYCoCg_8u_C3P3R
  2817. //
  2818. // Purpose:
  2819. // RGB to YCoCg color conversion
  2820. //
  2821. // Parameter:
  2822. // pSrc pointer to the input RGB data
  2823. // srcStep line offset in input data
  2824. // pDst pointer to pointers to the output YCoCg data.
  2825. // dstStep line offset in output data
  2826. // roiSize ROI size
  2827. //
  2828. // Returns:
  2829. // IppStatus
  2830. //
  2831. */
  2832. IPPAPI(IppStatus, ippiRGBToYCoCg_8u_C3P3R,(
  2833. const Ipp8u* pSrc,
  2834. int srcStep,
  2835. Ipp8u* pDst[3],
  2836. int dstStep,
  2837. IppiSize roi))
  2838. /* ///////////////////////////////////////////////////////////////////////////
  2839. // Name:
  2840. // ippiYCoCgToRGB_8u_P3C3R
  2841. //
  2842. // Purpose:
  2843. // YCoCg to RGB color conversion
  2844. //
  2845. // Parameter:
  2846. // pSrc pointer to pointers to the input YCoCg data.
  2847. // srcStep line offset in input data
  2848. // pDst pointer to the output RGB data.
  2849. // dstStep line offset in output data
  2850. // roiSize ROI size
  2851. //
  2852. // Returns:
  2853. // IppStatus
  2854. //
  2855. */
  2856. IPPAPI(IppStatus, ippiYCoCgToRGB_8u_P3C3R,(
  2857. const Ipp8u* pSrc[3],
  2858. int srcStep,
  2859. Ipp8u* pDst,
  2860. int dstStep,
  2861. IppiSize roi))
  2862. #ifdef __cplusplus
  2863. }
  2864. #endif
  2865. #if defined (_IPP_STDCALL_CDECL)
  2866. #undef _IPP_STDCALL_CDECL
  2867. #define __stdcall __cdecl
  2868. #endif
  2869. #endif /* __IPPCC_H__ */
  2870. /* ////////////////////////////// End of file /////////////////////////////// */