row.h 141 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308
  1. /*
  2. * Copyright 2011 The LibYuv Project Authors. All rights reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef INCLUDE_LIBYUV_ROW_H_
  11. #define INCLUDE_LIBYUV_ROW_H_
  12. #include <stdlib.h> // For malloc.
  13. #include "libyuv/basic_types.h"
  14. #ifdef __cplusplus
  15. namespace libyuv {
  16. extern "C" {
  17. #endif
  18. #define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  19. #define align_buffer_64(var, size) \
  20. uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \
  21. uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */
  22. #define free_aligned_buffer_64(var) \
  23. free(var##_mem); \
  24. var = 0
  25. #if defined(__pnacl__) || defined(__CLR_VER) || \
  26. (defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
  27. #define LIBYUV_DISABLE_X86
  28. #endif
  29. // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
  30. #if defined(__has_feature)
  31. #if __has_feature(memory_sanitizer)
  32. #define LIBYUV_DISABLE_X86
  33. #endif
  34. #endif
  35. // True if compiling for SSSE3 as a requirement.
  36. #if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3))
  37. #define LIBYUV_SSSE3_ONLY
  38. #endif
  39. #if defined(__native_client__)
  40. #define LIBYUV_DISABLE_NEON
  41. #endif
  42. // clang >= 3.5.0 required for Arm64.
  43. #if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON)
  44. #if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5))
  45. #define LIBYUV_DISABLE_NEON
  46. #endif // clang >= 3.5
  47. #endif // __clang__
  48. // GCC >= 4.7.0 required for AVX2.
  49. #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
  50. #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
  51. #define GCC_HAS_AVX2 1
  52. #endif // GNUC >= 4.7
  53. #endif // __GNUC__
  54. // clang >= 3.4.0 required for AVX2.
  55. #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
  56. #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
  57. #define CLANG_HAS_AVX2 1
  58. #endif // clang >= 3.4
  59. #endif // __clang__
  60. // Visual C 2012 required for AVX2.
  61. #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
  62. _MSC_VER >= 1700
  63. #define VISUALC_HAS_AVX2 1
  64. #endif // VisualStudio >= 2012
  65. // The following are available on all x86 platforms:
  66. #if !defined(LIBYUV_DISABLE_X86) && \
  67. (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
  68. // Conversions:
  69. #define HAS_ABGRTOUVROW_SSSE3
  70. #define HAS_ABGRTOYROW_SSSE3
  71. #define HAS_ARGB1555TOARGBROW_SSE2
  72. #define HAS_ARGB4444TOARGBROW_SSE2
  73. #define HAS_ARGBEXTRACTALPHAROW_SSE2
  74. #define HAS_ARGBSETROW_X86
  75. #define HAS_ARGBSHUFFLEROW_SSE2
  76. #define HAS_ARGBSHUFFLEROW_SSSE3
  77. #define HAS_ARGBTOARGB1555ROW_SSE2
  78. #define HAS_ARGBTOARGB4444ROW_SSE2
  79. #define HAS_ARGBTORAWROW_SSSE3
  80. #define HAS_ARGBTORGB24ROW_SSSE3
  81. #define HAS_ARGBTORGB565DITHERROW_SSE2
  82. #define HAS_ARGBTORGB565ROW_SSE2
  83. #define HAS_ARGBTOUV444ROW_SSSE3
  84. #define HAS_ARGBTOUVJROW_SSSE3
  85. #define HAS_ARGBTOUVROW_SSSE3
  86. #define HAS_ARGBTOYJROW_SSSE3
  87. #define HAS_ARGBTOYROW_SSSE3
  88. #define HAS_BGRATOUVROW_SSSE3
  89. #define HAS_BGRATOYROW_SSSE3
  90. #define HAS_COPYROW_ERMS
  91. #define HAS_COPYROW_SSE2
  92. #define HAS_H422TOARGBROW_SSSE3
  93. #define HAS_HALFFLOATROW_SSE2
  94. #define HAS_I400TOARGBROW_SSE2
  95. #define HAS_I422TOARGB1555ROW_SSSE3
  96. #define HAS_I422TOARGB4444ROW_SSSE3
  97. #define HAS_I422TOARGBROW_SSSE3
  98. #define HAS_I422TORGB24ROW_SSSE3
  99. #define HAS_I422TORGB565ROW_SSSE3
  100. #define HAS_I422TORGBAROW_SSSE3
  101. #define HAS_I422TOUYVYROW_SSE2
  102. #define HAS_I422TOYUY2ROW_SSE2
  103. #define HAS_I444TOARGBROW_SSSE3
  104. #define HAS_J400TOARGBROW_SSE2
  105. #define HAS_J422TOARGBROW_SSSE3
  106. #define HAS_MERGEUVROW_SSE2
  107. #define HAS_MIRRORROW_SSSE3
  108. #define HAS_MIRRORUVROW_SSSE3
  109. #define HAS_NV12TOARGBROW_SSSE3
  110. #define HAS_NV12TORGB565ROW_SSSE3
  111. #define HAS_NV21TOARGBROW_SSSE3
  112. #define HAS_RAWTOARGBROW_SSSE3
  113. #define HAS_RAWTORGB24ROW_SSSE3
  114. #define HAS_RAWTOYROW_SSSE3
  115. #define HAS_RGB24TOARGBROW_SSSE3
  116. #define HAS_RGB24TOYROW_SSSE3
  117. #define HAS_RGB565TOARGBROW_SSE2
  118. #define HAS_RGBATOUVROW_SSSE3
  119. #define HAS_RGBATOYROW_SSSE3
  120. #define HAS_SETROW_ERMS
  121. #define HAS_SETROW_X86
  122. #define HAS_SPLITUVROW_SSE2
  123. #define HAS_UYVYTOARGBROW_SSSE3
  124. #define HAS_UYVYTOUV422ROW_SSE2
  125. #define HAS_UYVYTOUVROW_SSE2
  126. #define HAS_UYVYTOYROW_SSE2
  127. #define HAS_YUY2TOARGBROW_SSSE3
  128. #define HAS_YUY2TOUV422ROW_SSE2
  129. #define HAS_YUY2TOUVROW_SSE2
  130. #define HAS_YUY2TOYROW_SSE2
  131. // Effects:
  132. #define HAS_ARGBADDROW_SSE2
  133. #define HAS_ARGBAFFINEROW_SSE2
  134. #define HAS_ARGBATTENUATEROW_SSSE3
  135. #define HAS_ARGBBLENDROW_SSSE3
  136. #define HAS_ARGBCOLORMATRIXROW_SSSE3
  137. #define HAS_ARGBCOLORTABLEROW_X86
  138. #define HAS_ARGBCOPYALPHAROW_SSE2
  139. #define HAS_ARGBCOPYYTOALPHAROW_SSE2
  140. #define HAS_ARGBGRAYROW_SSSE3
  141. #define HAS_ARGBLUMACOLORTABLEROW_SSSE3
  142. #define HAS_ARGBMIRRORROW_SSE2
  143. #define HAS_ARGBMULTIPLYROW_SSE2
  144. #define HAS_ARGBPOLYNOMIALROW_SSE2
  145. #define HAS_ARGBQUANTIZEROW_SSE2
  146. #define HAS_ARGBSEPIAROW_SSSE3
  147. #define HAS_ARGBSHADEROW_SSE2
  148. #define HAS_ARGBSUBTRACTROW_SSE2
  149. #define HAS_ARGBUNATTENUATEROW_SSE2
  150. #define HAS_BLENDPLANEROW_SSSE3
  151. #define HAS_COMPUTECUMULATIVESUMROW_SSE2
  152. #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
  153. #define HAS_INTERPOLATEROW_SSSE3
  154. #define HAS_RGBCOLORTABLEROW_X86
  155. #define HAS_SOBELROW_SSE2
  156. #define HAS_SOBELTOPLANEROW_SSE2
  157. #define HAS_SOBELXROW_SSE2
  158. #define HAS_SOBELXYROW_SSE2
  159. #define HAS_SOBELYROW_SSE2
  160. // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
  161. // caveat: clangcl uses row_win.cc which works.
  162. #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
  163. defined(_MSC_VER)
  164. // TODO(fbarchard): fix build error on android_full_debug=1
  165. // https://code.google.com/p/libyuv/issues/detail?id=517
  166. #define HAS_I422ALPHATOARGBROW_SSSE3
  167. #endif
  168. #endif
  169. // The following are available on all x86 platforms, but
  170. // require VS2012, clang 3.4 or gcc 4.7.
  171. // The code supports NaCL but requires a new compiler and validator.
  172. #if !defined(LIBYUV_DISABLE_X86) && \
  173. (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
  174. defined(GCC_HAS_AVX2))
  175. #define HAS_ARGBCOPYALPHAROW_AVX2
  176. #define HAS_ARGBCOPYYTOALPHAROW_AVX2
  177. #define HAS_ARGBEXTRACTALPHAROW_AVX2
  178. #define HAS_ARGBMIRRORROW_AVX2
  179. #define HAS_ARGBPOLYNOMIALROW_AVX2
  180. #define HAS_ARGBSHUFFLEROW_AVX2
  181. #define HAS_ARGBTORGB565DITHERROW_AVX2
  182. #define HAS_ARGBTOUVJROW_AVX2
  183. #define HAS_ARGBTOUVROW_AVX2
  184. #define HAS_ARGBTOYJROW_AVX2
  185. #define HAS_ARGBTOYROW_AVX2
  186. #define HAS_COPYROW_AVX
  187. #define HAS_H422TOARGBROW_AVX2
  188. #define HAS_HALFFLOATROW_AVX2
  189. // #define HAS_HALFFLOATROW_F16C // Enable to test halffloat cast
  190. #define HAS_I400TOARGBROW_AVX2
  191. #define HAS_I422TOARGB1555ROW_AVX2
  192. #define HAS_I422TOARGB4444ROW_AVX2
  193. #define HAS_I422TOARGBROW_AVX2
  194. #define HAS_I422TORGB24ROW_AVX2
  195. #define HAS_I422TORGB565ROW_AVX2
  196. #define HAS_I422TORGBAROW_AVX2
  197. #define HAS_I444TOARGBROW_AVX2
  198. #define HAS_INTERPOLATEROW_AVX2
  199. #define HAS_J422TOARGBROW_AVX2
  200. #define HAS_MERGEUVROW_AVX2
  201. #define HAS_MIRRORROW_AVX2
  202. #define HAS_NV12TOARGBROW_AVX2
  203. #define HAS_NV12TORGB565ROW_AVX2
  204. #define HAS_NV21TOARGBROW_AVX2
  205. #define HAS_SPLITUVROW_AVX2
  206. #define HAS_UYVYTOARGBROW_AVX2
  207. #define HAS_UYVYTOUV422ROW_AVX2
  208. #define HAS_UYVYTOUVROW_AVX2
  209. #define HAS_UYVYTOYROW_AVX2
  210. #define HAS_YUY2TOARGBROW_AVX2
  211. #define HAS_YUY2TOUV422ROW_AVX2
  212. #define HAS_YUY2TOUVROW_AVX2
  213. #define HAS_YUY2TOYROW_AVX2
  214. // Effects:
  215. #define HAS_ARGBADDROW_AVX2
  216. #define HAS_ARGBATTENUATEROW_AVX2
  217. #define HAS_ARGBMULTIPLYROW_AVX2
  218. #define HAS_ARGBSUBTRACTROW_AVX2
  219. #define HAS_ARGBUNATTENUATEROW_AVX2
  220. #define HAS_BLENDPLANEROW_AVX2
  221. #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
  222. defined(_MSC_VER)
  223. // TODO(fbarchard): fix build error on android_full_debug=1
  224. // https://code.google.com/p/libyuv/issues/detail?id=517
  225. #define HAS_I422ALPHATOARGBROW_AVX2
  226. #endif
  227. #endif
  228. // The following are available for AVX2 Visual C and clangcl 32 bit:
  229. // TODO(fbarchard): Port to gcc.
  230. #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
  231. (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
  232. #define HAS_ARGB1555TOARGBROW_AVX2
  233. #define HAS_ARGB4444TOARGBROW_AVX2
  234. #define HAS_ARGBTOARGB1555ROW_AVX2
  235. #define HAS_ARGBTOARGB4444ROW_AVX2
  236. #define HAS_ARGBTORGB565ROW_AVX2
  237. #define HAS_J400TOARGBROW_AVX2
  238. #define HAS_RGB565TOARGBROW_AVX2
  239. #endif
  240. // The following are also available on x64 Visual C.
  241. #if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \
  242. (!defined(__clang__) || defined(__SSSE3__))
  243. #define HAS_I422ALPHATOARGBROW_SSSE3
  244. #define HAS_I422TOARGBROW_SSSE3
  245. #endif
  246. // The following are available for gcc/clang x86 platforms:
  247. // TODO(fbarchard): Port to Visual C
  248. #if !defined(LIBYUV_DISABLE_X86) && \
  249. (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
  250. #define HAS_MERGERGBROW_SSSE3
  251. #define HAS_SPLITRGBROW_SSSE3
  252. #endif
  253. // The following are available for AVX2 gcc/clang x86 platforms:
  254. // TODO(fbarchard): Port to Visual C
  255. #if !defined(LIBYUV_DISABLE_X86) && \
  256. (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER))) && \
  257. (defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
  258. #define HAS_MERGEUVROW_16_AVX2
  259. #define HAS_MULTIPLYROW_16_AVX2
  260. #endif
  261. // The following are available on Neon platforms:
  262. #if !defined(LIBYUV_DISABLE_NEON) && \
  263. (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
  264. #define HAS_ABGRTOUVROW_NEON
  265. #define HAS_ABGRTOYROW_NEON
  266. #define HAS_ARGB1555TOARGBROW_NEON
  267. #define HAS_ARGB1555TOUVROW_NEON
  268. #define HAS_ARGB1555TOYROW_NEON
  269. #define HAS_ARGB4444TOARGBROW_NEON
  270. #define HAS_ARGB4444TOUVROW_NEON
  271. #define HAS_ARGB4444TOYROW_NEON
  272. #define HAS_ARGBEXTRACTALPHAROW_NEON
  273. #define HAS_ARGBSETROW_NEON
  274. #define HAS_ARGBTOARGB1555ROW_NEON
  275. #define HAS_ARGBTOARGB4444ROW_NEON
  276. #define HAS_ARGBTORAWROW_NEON
  277. #define HAS_ARGBTORGB24ROW_NEON
  278. #define HAS_ARGBTORGB565DITHERROW_NEON
  279. #define HAS_ARGBTORGB565ROW_NEON
  280. #define HAS_ARGBTOUV444ROW_NEON
  281. #define HAS_ARGBTOUVJROW_NEON
  282. #define HAS_ARGBTOUVROW_NEON
  283. #define HAS_ARGBTOYJROW_NEON
  284. #define HAS_ARGBTOYROW_NEON
  285. #define HAS_BGRATOUVROW_NEON
  286. #define HAS_BGRATOYROW_NEON
  287. #define HAS_COPYROW_NEON
  288. #define HAS_HALFFLOATROW_NEON
  289. #define HAS_I400TOARGBROW_NEON
  290. #define HAS_I422ALPHATOARGBROW_NEON
  291. #define HAS_I422TOARGB1555ROW_NEON
  292. #define HAS_I422TOARGB4444ROW_NEON
  293. #define HAS_I422TOARGBROW_NEON
  294. #define HAS_I422TORGB24ROW_NEON
  295. #define HAS_I422TORGB565ROW_NEON
  296. #define HAS_I422TORGBAROW_NEON
  297. #define HAS_I422TOUYVYROW_NEON
  298. #define HAS_I422TOYUY2ROW_NEON
  299. #define HAS_I444TOARGBROW_NEON
  300. #define HAS_J400TOARGBROW_NEON
  301. #define HAS_MERGEUVROW_NEON
  302. #define HAS_MIRRORROW_NEON
  303. #define HAS_MIRRORUVROW_NEON
  304. #define HAS_NV12TOARGBROW_NEON
  305. #define HAS_NV12TORGB565ROW_NEON
  306. #define HAS_NV21TOARGBROW_NEON
  307. #define HAS_RAWTOARGBROW_NEON
  308. #define HAS_RAWTORGB24ROW_NEON
  309. #define HAS_RAWTOUVROW_NEON
  310. #define HAS_RAWTOYROW_NEON
  311. #define HAS_RGB24TOARGBROW_NEON
  312. #define HAS_RGB24TOUVROW_NEON
  313. #define HAS_RGB24TOYROW_NEON
  314. #define HAS_RGB565TOARGBROW_NEON
  315. #define HAS_RGB565TOUVROW_NEON
  316. #define HAS_RGB565TOYROW_NEON
  317. #define HAS_RGBATOUVROW_NEON
  318. #define HAS_RGBATOYROW_NEON
  319. #define HAS_SETROW_NEON
  320. #define HAS_SPLITRGBROW_NEON
  321. #define HAS_SPLITUVROW_NEON
  322. #define HAS_UYVYTOARGBROW_NEON
  323. #define HAS_UYVYTOUV422ROW_NEON
  324. #define HAS_UYVYTOUVROW_NEON
  325. #define HAS_UYVYTOYROW_NEON
  326. #define HAS_YUY2TOARGBROW_NEON
  327. #define HAS_YUY2TOUV422ROW_NEON
  328. #define HAS_YUY2TOUVROW_NEON
  329. #define HAS_YUY2TOYROW_NEON
  330. // Effects:
  331. #define HAS_ARGBADDROW_NEON
  332. #define HAS_ARGBATTENUATEROW_NEON
  333. #define HAS_ARGBBLENDROW_NEON
  334. #define HAS_ARGBCOLORMATRIXROW_NEON
  335. #define HAS_ARGBGRAYROW_NEON
  336. #define HAS_ARGBMIRRORROW_NEON
  337. #define HAS_ARGBMULTIPLYROW_NEON
  338. #define HAS_ARGBQUANTIZEROW_NEON
  339. #define HAS_ARGBSEPIAROW_NEON
  340. #define HAS_ARGBSHADEROW_NEON
  341. #define HAS_ARGBSHUFFLEROW_NEON
  342. #define HAS_ARGBSUBTRACTROW_NEON
  343. #define HAS_INTERPOLATEROW_NEON
  344. #define HAS_SOBELROW_NEON
  345. #define HAS_SOBELTOPLANEROW_NEON
  346. #define HAS_SOBELXROW_NEON
  347. #define HAS_SOBELXYROW_NEON
  348. #define HAS_SOBELYROW_NEON
  349. #endif
  350. // The following are available on AArch64 platforms:
  351. #if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__)
  352. #define HAS_SCALESUMSAMPLES_NEON
  353. #endif
  354. // The following are available on Mips platforms:
  355. #if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \
  356. (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6)
  357. #define HAS_COPYROW_MIPS
  358. #if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
  359. #define HAS_I422TOARGBROW_DSPR2
  360. #define HAS_INTERPOLATEROW_DSPR2
  361. #define HAS_MIRRORROW_DSPR2
  362. #define HAS_MIRRORUVROW_DSPR2
  363. #define HAS_SPLITUVROW_DSPR2
  364. #define HAS_RGB24TOARGBROW_DSPR2
  365. #define HAS_RAWTOARGBROW_DSPR2
  366. #define HAS_RGB565TOARGBROW_DSPR2
  367. #define HAS_ARGB1555TOARGBROW_DSPR2
  368. #define HAS_ARGB4444TOARGBROW_DSPR2
  369. #define HAS_I444TOARGBROW_DSPR2
  370. #define HAS_I422TOARGB4444ROW_DSPR2
  371. #define HAS_I422TOARGB1555ROW_DSPR2
  372. #define HAS_NV12TOARGBROW_DSPR2
  373. #define HAS_BGRATOUVROW_DSPR2
  374. #define HAS_BGRATOYROW_DSPR2
  375. #define HAS_ABGRTOUVROW_DSPR2
  376. #define HAS_ARGBTOYROW_DSPR2
  377. #define HAS_ABGRTOYROW_DSPR2
  378. #define HAS_RGBATOUVROW_DSPR2
  379. #define HAS_RGBATOYROW_DSPR2
  380. #define HAS_ARGBTOUVROW_DSPR2
  381. #endif
  382. #endif
  383. #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
  384. #define HAS_ABGRTOUVROW_MSA
  385. #define HAS_ABGRTOYROW_MSA
  386. #define HAS_ARGB1555TOARGBROW_MSA
  387. #define HAS_ARGB1555TOUVROW_MSA
  388. #define HAS_ARGB1555TOYROW_MSA
  389. #define HAS_ARGB4444TOARGBROW_MSA
  390. #define HAS_ARGBADDROW_MSA
  391. #define HAS_ARGBATTENUATEROW_MSA
  392. #define HAS_ARGBBLENDROW_MSA
  393. #define HAS_ARGBCOLORMATRIXROW_MSA
  394. #define HAS_ARGBEXTRACTALPHAROW_MSA
  395. #define HAS_ARGBGRAYROW_MSA
  396. #define HAS_ARGBMIRRORROW_MSA
  397. #define HAS_ARGBMULTIPLYROW_MSA
  398. #define HAS_ARGBQUANTIZEROW_MSA
  399. #define HAS_ARGBSEPIAROW_MSA
  400. #define HAS_ARGBSETROW_MSA
  401. #define HAS_ARGBSHADEROW_MSA
  402. #define HAS_ARGBSHUFFLEROW_MSA
  403. #define HAS_ARGBSUBTRACTROW_MSA
  404. #define HAS_ARGBTOARGB1555ROW_MSA
  405. #define HAS_ARGBTOARGB4444ROW_MSA
  406. #define HAS_ARGBTORAWROW_MSA
  407. #define HAS_ARGBTORGB24ROW_MSA
  408. #define HAS_ARGBTORGB565DITHERROW_MSA
  409. #define HAS_ARGBTORGB565ROW_MSA
  410. #define HAS_ARGBTOUV444ROW_MSA
  411. #define HAS_ARGBTOUVJROW_MSA
  412. #define HAS_ARGBTOUVROW_MSA
  413. #define HAS_ARGBTOYJROW_MSA
  414. #define HAS_ARGBTOYROW_MSA
  415. #define HAS_BGRATOUVROW_MSA
  416. #define HAS_BGRATOYROW_MSA
  417. #define HAS_HALFFLOATROW_MSA
  418. #define HAS_I400TOARGBROW_MSA
  419. #define HAS_I422ALPHATOARGBROW_MSA
  420. #define HAS_I422TOARGBROW_MSA
  421. #define HAS_I422TORGB24ROW_MSA
  422. #define HAS_I422TORGBAROW_MSA
  423. #define HAS_I422TOUYVYROW_MSA
  424. #define HAS_I422TOYUY2ROW_MSA
  425. #define HAS_I444TOARGBROW_MSA
  426. #define HAS_INTERPOLATEROW_MSA
  427. #define HAS_J400TOARGBROW_MSA
  428. #define HAS_MERGEUVROW_MSA
  429. #define HAS_MIRRORROW_MSA
  430. #define HAS_MIRRORUVROW_MSA
  431. #define HAS_NV12TOARGBROW_MSA
  432. #define HAS_NV12TORGB565ROW_MSA
  433. #define HAS_NV21TOARGBROW_MSA
  434. #define HAS_RAWTOARGBROW_MSA
  435. #define HAS_RAWTORGB24ROW_MSA
  436. #define HAS_RAWTOUVROW_MSA
  437. #define HAS_RAWTOYROW_MSA
  438. #define HAS_RGB24TOARGBROW_MSA
  439. #define HAS_RGB24TOUVROW_MSA
  440. #define HAS_RGB24TOYROW_MSA
  441. #define HAS_RGB565TOARGBROW_MSA
  442. #define HAS_RGB565TOUVROW_MSA
  443. #define HAS_RGB565TOYROW_MSA
  444. #define HAS_RGBATOUVROW_MSA
  445. #define HAS_RGBATOYROW_MSA
  446. #define HAS_SETROW_MSA
  447. #define HAS_SOBELROW_MSA
  448. #define HAS_SOBELTOPLANEROW_MSA
  449. #define HAS_SOBELXROW_MSA
  450. #define HAS_SOBELXYROW_MSA
  451. #define HAS_SOBELYROW_MSA
  452. #define HAS_SPLITUVROW_MSA
  453. #define HAS_UYVYTOARGBROW_MSA
  454. #define HAS_UYVYTOUVROW_MSA
  455. #define HAS_UYVYTOYROW_MSA
  456. #define HAS_YUY2TOARGBROW_MSA
  457. #define HAS_YUY2TOUV422ROW_MSA
  458. #define HAS_YUY2TOUVROW_MSA
  459. #define HAS_YUY2TOYROW_MSA
  460. #endif
  461. #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
  462. #if defined(VISUALC_HAS_AVX2)
  463. #define SIMD_ALIGNED(var) __declspec(align(32)) var
  464. #else
  465. #define SIMD_ALIGNED(var) __declspec(align(16)) var
  466. #endif
  467. typedef __declspec(align(16)) int16 vec16[8];
  468. typedef __declspec(align(16)) int32 vec32[4];
  469. typedef __declspec(align(16)) int8 vec8[16];
  470. typedef __declspec(align(16)) uint16 uvec16[8];
  471. typedef __declspec(align(16)) uint32 uvec32[4];
  472. typedef __declspec(align(16)) uint8 uvec8[16];
  473. typedef __declspec(align(32)) int16 lvec16[16];
  474. typedef __declspec(align(32)) int32 lvec32[8];
  475. typedef __declspec(align(32)) int8 lvec8[32];
  476. typedef __declspec(align(32)) uint16 ulvec16[16];
  477. typedef __declspec(align(32)) uint32 ulvec32[8];
  478. typedef __declspec(align(32)) uint8 ulvec8[32];
  479. #elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__))
  480. // Caveat GCC 4.2 to 4.7 have a known issue using vectors with const.
  481. #if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2)
  482. #define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  483. #else
  484. #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
  485. #endif
  486. typedef int16 __attribute__((vector_size(16))) vec16;
  487. typedef int32 __attribute__((vector_size(16))) vec32;
  488. typedef int8 __attribute__((vector_size(16))) vec8;
  489. typedef uint16 __attribute__((vector_size(16))) uvec16;
  490. typedef uint32 __attribute__((vector_size(16))) uvec32;
  491. typedef uint8 __attribute__((vector_size(16))) uvec8;
  492. typedef int16 __attribute__((vector_size(32))) lvec16;
  493. typedef int32 __attribute__((vector_size(32))) lvec32;
  494. typedef int8 __attribute__((vector_size(32))) lvec8;
  495. typedef uint16 __attribute__((vector_size(32))) ulvec16;
  496. typedef uint32 __attribute__((vector_size(32))) ulvec32;
  497. typedef uint8 __attribute__((vector_size(32))) ulvec8;
  498. #else
  499. #define SIMD_ALIGNED(var) var
  500. typedef int16 vec16[8];
  501. typedef int32 vec32[4];
  502. typedef int8 vec8[16];
  503. typedef uint16 uvec16[8];
  504. typedef uint32 uvec32[4];
  505. typedef uint8 uvec8[16];
  506. typedef int16 lvec16[16];
  507. typedef int32 lvec32[8];
  508. typedef int8 lvec8[32];
  509. typedef uint16 ulvec16[16];
  510. typedef uint32 ulvec32[8];
  511. typedef uint8 ulvec8[32];
  512. #endif
  513. #if defined(__aarch64__)
  514. // This struct is for Arm64 color conversion.
  515. struct YuvConstants {
  516. uvec16 kUVToRB;
  517. uvec16 kUVToRB2;
  518. uvec16 kUVToG;
  519. uvec16 kUVToG2;
  520. vec16 kUVBiasBGR;
  521. vec32 kYToRgb;
  522. };
  523. #elif defined(__arm__)
  524. // This struct is for ArmV7 color conversion.
  525. struct YuvConstants {
  526. uvec8 kUVToRB;
  527. uvec8 kUVToG;
  528. vec16 kUVBiasBGR;
  529. vec32 kYToRgb;
  530. };
  531. #else
  532. // This struct is for Intel color conversion.
  533. struct YuvConstants {
  534. int8 kUVToB[32];
  535. int8 kUVToG[32];
  536. int8 kUVToR[32];
  537. int16 kUVBiasB[16];
  538. int16 kUVBiasG[16];
  539. int16 kUVBiasR[16];
  540. int16 kYToRgb[16];
  541. };
  542. // Offsets into YuvConstants structure
  543. #define KUVTOB 0
  544. #define KUVTOG 32
  545. #define KUVTOR 64
  546. #define KUVBIASB 96
  547. #define KUVBIASG 128
  548. #define KUVBIASR 160
  549. #define KYTORGB 192
  550. #endif
  551. // Conversion matrix for YUV to RGB
  552. extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants); // BT.601
  553. extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants); // JPeg
  554. extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709
  555. // Conversion matrix for YVU to BGR
  556. extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601
  557. extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg
  558. extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709
  559. #if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__)
  560. #define OMITFP
  561. #else
  562. #define OMITFP __attribute__((optimize("omit-frame-pointer")))
  563. #endif
  564. // NaCL macros for GCC x86 and x64.
  565. #if defined(__native_client__)
  566. #define LABELALIGN ".p2align 5\n"
  567. #else
  568. #define LABELALIGN
  569. #endif
  570. #if defined(__native_client__) && defined(__x86_64__)
  571. // r14 is used for MEMOP macros.
  572. #define NACL_R14 "r14",
  573. #define BUNDLELOCK ".bundle_lock\n"
  574. #define BUNDLEUNLOCK ".bundle_unlock\n"
  575. #define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")"
  576. #define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")"
  577. #define MEMLEA(offset, base) #offset "(%q" #base ")"
  578. #define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")"
  579. #define MEMLEA4(offset, base, index, scale) \
  580. #offset "(%q" #base ",%q" #index "," #scale ")"
  581. #define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15"
  582. #define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15"
  583. #define MEMOPREG(opcode, offset, base, index, scale, reg) \
  584. BUNDLELOCK \
  585. "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \
  586. " (%%r15,%%r14),%%" #reg "\n" BUNDLEUNLOCK
  587. #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
  588. BUNDLELOCK \
  589. "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \
  590. " %%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK
  591. #define MEMOPARG(opcode, offset, base, index, scale, arg) \
  592. BUNDLELOCK \
  593. "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \
  594. " (%%r15,%%r14),%" #arg "\n" BUNDLEUNLOCK
  595. #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \
  596. BUNDLELOCK \
  597. "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \
  598. " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" BUNDLEUNLOCK
  599. #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \
  600. BUNDLELOCK \
  601. "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #op \
  602. " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK
  603. #else // defined(__native_client__) && defined(__x86_64__)
  604. #define NACL_R14
  605. #define BUNDLEALIGN
  606. #define MEMACCESS(base) "(%" #base ")"
  607. #define MEMACCESS2(offset, base) #offset "(%" #base ")"
  608. #define MEMLEA(offset, base) #offset "(%" #base ")"
  609. #define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")"
  610. #define MEMLEA4(offset, base, index, scale) \
  611. #offset "(%" #base ",%" #index "," #scale ")"
  612. #define MEMMOVESTRING(s, d)
  613. #define MEMSTORESTRING(reg, d)
  614. #define MEMOPREG(opcode, offset, base, index, scale, reg) \
  615. #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n"
  616. #define MEMOPMEM(opcode, reg, offset, base, index, scale) \
  617. #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n"
  618. #define MEMOPARG(opcode, offset, base, index, scale, arg) \
  619. #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
  620. #define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \
  621. #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 \
  622. ",%%" #reg2 "\n"
  623. #define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \
  624. #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n"
  625. #endif // defined(__native_client__) && defined(__x86_64__)
  626. // Intel Code Analizer markers. Insert IACA_START IACA_END around code to be
  627. // measured and then run with iaca -64 libyuv_unittest.
  628. // IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within
  629. // inline assembly blocks.
  630. // example of iaca:
  631. // ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest
  632. #if defined(__x86_64__) || defined(__i386__)
  633. #define IACA_ASM_START \
  634. ".byte 0x0F, 0x0B\n" \
  635. " movl $111, %%ebx\n" \
  636. ".byte 0x64, 0x67, 0x90\n"
  637. #define IACA_ASM_END \
  638. " movl $222, %%ebx\n" \
  639. ".byte 0x64, 0x67, 0x90\n" \
  640. ".byte 0x0F, 0x0B\n"
  641. #define IACA_SSC_MARK(MARK_ID) \
  642. __asm__ __volatile__("\n\t movl $" #MARK_ID \
  643. ", %%ebx" \
  644. "\n\t .byte 0x64, 0x67, 0x90" \
  645. : \
  646. : \
  647. : "memory");
  648. #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
  649. #else /* Visual C */
  650. #define IACA_UD_BYTES \
  651. { __asm _emit 0x0F __asm _emit 0x0B }
  652. #define IACA_SSC_MARK(x) \
  653. { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
  654. #define IACA_VC64_START __writegsbyte(111, 111);
  655. #define IACA_VC64_END __writegsbyte(222, 222);
  656. #endif
  657. #define IACA_START \
  658. { \
  659. IACA_UD_BYTES \
  660. IACA_SSC_MARK(111) \
  661. }
  662. #define IACA_END \
  663. { \
  664. IACA_SSC_MARK(222) \
  665. IACA_UD_BYTES \
  666. }
  667. void I444ToARGBRow_NEON(const uint8* src_y,
  668. const uint8* src_u,
  669. const uint8* src_v,
  670. uint8* dst_argb,
  671. const struct YuvConstants* yuvconstants,
  672. int width);
  673. void I422ToARGBRow_NEON(const uint8* src_y,
  674. const uint8* src_u,
  675. const uint8* src_v,
  676. uint8* dst_argb,
  677. const struct YuvConstants* yuvconstants,
  678. int width);
  679. void I422AlphaToARGBRow_NEON(const uint8* y_buf,
  680. const uint8* u_buf,
  681. const uint8* v_buf,
  682. const uint8* a_buf,
  683. uint8* dst_argb,
  684. const struct YuvConstants* yuvconstants,
  685. int width);
  686. void I422ToARGBRow_NEON(const uint8* src_y,
  687. const uint8* src_u,
  688. const uint8* src_v,
  689. uint8* dst_argb,
  690. const struct YuvConstants* yuvconstants,
  691. int width);
  692. void I422ToRGBARow_NEON(const uint8* src_y,
  693. const uint8* src_u,
  694. const uint8* src_v,
  695. uint8* dst_rgba,
  696. const struct YuvConstants* yuvconstants,
  697. int width);
  698. void I422ToRGB24Row_NEON(const uint8* src_y,
  699. const uint8* src_u,
  700. const uint8* src_v,
  701. uint8* dst_rgb24,
  702. const struct YuvConstants* yuvconstants,
  703. int width);
  704. void I422ToRGB565Row_NEON(const uint8* src_y,
  705. const uint8* src_u,
  706. const uint8* src_v,
  707. uint8* dst_rgb565,
  708. const struct YuvConstants* yuvconstants,
  709. int width);
  710. void I422ToARGB1555Row_NEON(const uint8* src_y,
  711. const uint8* src_u,
  712. const uint8* src_v,
  713. uint8* dst_argb1555,
  714. const struct YuvConstants* yuvconstants,
  715. int width);
  716. void I422ToARGB4444Row_NEON(const uint8* src_y,
  717. const uint8* src_u,
  718. const uint8* src_v,
  719. uint8* dst_argb4444,
  720. const struct YuvConstants* yuvconstants,
  721. int width);
  722. void NV12ToARGBRow_NEON(const uint8* src_y,
  723. const uint8* src_uv,
  724. uint8* dst_argb,
  725. const struct YuvConstants* yuvconstants,
  726. int width);
  727. void NV12ToRGB565Row_NEON(const uint8* src_y,
  728. const uint8* src_uv,
  729. uint8* dst_rgb565,
  730. const struct YuvConstants* yuvconstants,
  731. int width);
  732. void NV21ToARGBRow_NEON(const uint8* src_y,
  733. const uint8* src_vu,
  734. uint8* dst_argb,
  735. const struct YuvConstants* yuvconstants,
  736. int width);
  737. void YUY2ToARGBRow_NEON(const uint8* src_yuy2,
  738. uint8* dst_argb,
  739. const struct YuvConstants* yuvconstants,
  740. int width);
  741. void UYVYToARGBRow_NEON(const uint8* src_uyvy,
  742. uint8* dst_argb,
  743. const struct YuvConstants* yuvconstants,
  744. int width);
  745. void I444ToARGBRow_MSA(const uint8* src_y,
  746. const uint8* src_u,
  747. const uint8* src_v,
  748. uint8* dst_argb,
  749. const struct YuvConstants* yuvconstants,
  750. int width);
  751. void I444ToARGBRow_DSPR2(const uint8* src_y,
  752. const uint8* src_u,
  753. const uint8* src_v,
  754. uint8* dst_argb,
  755. const struct YuvConstants* yuvconstants,
  756. int width);
  757. void I422ToARGB4444Row_DSPR2(const uint8* src_y,
  758. const uint8* src_u,
  759. const uint8* src_v,
  760. uint8* dst_argb4444,
  761. const struct YuvConstants* yuvconstants,
  762. int width);
  763. void I422ToARGB1555Row_DSPR2(const uint8* src_y,
  764. const uint8* src_u,
  765. const uint8* src_v,
  766. uint8* dst_argb1555,
  767. const struct YuvConstants* yuvconstants,
  768. int width);
  769. void NV12ToARGBRow_DSPR2(const uint8* src_y,
  770. const uint8* src_uv,
  771. uint8* dst_argb,
  772. const struct YuvConstants* yuvconstants,
  773. int width);
  774. void I422ToARGBRow_MSA(const uint8* src_y,
  775. const uint8* src_u,
  776. const uint8* src_v,
  777. uint8* dst_argb,
  778. const struct YuvConstants* yuvconstants,
  779. int width);
  780. void I422ToRGBARow_MSA(const uint8* src_y,
  781. const uint8* src_u,
  782. const uint8* src_v,
  783. uint8* dst_rgba,
  784. const struct YuvConstants* yuvconstants,
  785. int width);
  786. void I422AlphaToARGBRow_MSA(const uint8* y_buf,
  787. const uint8* u_buf,
  788. const uint8* v_buf,
  789. const uint8* a_buf,
  790. uint8* dst_argb,
  791. const struct YuvConstants* yuvconstants,
  792. int width);
  793. void I422ToRGB24Row_MSA(const uint8* src_y,
  794. const uint8* src_u,
  795. const uint8* src_v,
  796. uint8* dst_rgb24,
  797. const struct YuvConstants* yuvconstants,
  798. int width);
  799. void I422ToRGB565Row_MSA(const uint8* src_y,
  800. const uint8* src_u,
  801. const uint8* src_v,
  802. uint8* dst_rgb565,
  803. const struct YuvConstants* yuvconstants,
  804. int width);
  805. void I422ToARGB4444Row_MSA(const uint8* src_y,
  806. const uint8* src_u,
  807. const uint8* src_v,
  808. uint8* dst_argb4444,
  809. const struct YuvConstants* yuvconstants,
  810. int width);
  811. void I422ToARGB1555Row_MSA(const uint8* src_y,
  812. const uint8* src_u,
  813. const uint8* src_v,
  814. uint8* dst_argb1555,
  815. const struct YuvConstants* yuvconstants,
  816. int width);
  817. void NV12ToARGBRow_MSA(const uint8* src_y,
  818. const uint8* src_uv,
  819. uint8* dst_argb,
  820. const struct YuvConstants* yuvconstants,
  821. int width);
  822. void NV12ToRGB565Row_MSA(const uint8* src_y,
  823. const uint8* src_uv,
  824. uint8* dst_rgb565,
  825. const struct YuvConstants* yuvconstants,
  826. int width);
  827. void NV21ToARGBRow_MSA(const uint8* src_y,
  828. const uint8* src_vu,
  829. uint8* dst_argb,
  830. const struct YuvConstants* yuvconstants,
  831. int width);
  832. void YUY2ToARGBRow_MSA(const uint8* src_yuy2,
  833. uint8* dst_argb,
  834. const struct YuvConstants* yuvconstants,
  835. int width);
  836. void UYVYToARGBRow_MSA(const uint8* src_uyvy,
  837. uint8* dst_argb,
  838. const struct YuvConstants* yuvconstants,
  839. int width);
  840. void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width);
  841. void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width);
  842. void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
  843. void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int width);
  844. void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width);
  845. void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
  846. void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width);
  847. void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width);
  848. void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width);
  849. void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width);
  850. void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width);
  851. void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
  852. void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
  853. void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
  854. void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
  855. void ARGBToUV444Row_NEON(const uint8* src_argb,
  856. uint8* dst_u,
  857. uint8* dst_v,
  858. int width);
  859. void ARGBToUVRow_NEON(const uint8* src_argb,
  860. int src_stride_argb,
  861. uint8* dst_u,
  862. uint8* dst_v,
  863. int width);
  864. void ARGBToUV444Row_MSA(const uint8* src_argb,
  865. uint8* dst_u,
  866. uint8* dst_v,
  867. int width);
  868. void ARGBToUVRow_MSA(const uint8* src_argb,
  869. int src_stride_argb,
  870. uint8* dst_u,
  871. uint8* dst_v,
  872. int width);
  873. void ARGBToUVJRow_NEON(const uint8* src_argb,
  874. int src_stride_argb,
  875. uint8* dst_u,
  876. uint8* dst_v,
  877. int width);
  878. void BGRAToUVRow_NEON(const uint8* src_bgra,
  879. int src_stride_bgra,
  880. uint8* dst_u,
  881. uint8* dst_v,
  882. int width);
  883. void ABGRToUVRow_NEON(const uint8* src_abgr,
  884. int src_stride_abgr,
  885. uint8* dst_u,
  886. uint8* dst_v,
  887. int width);
  888. void RGBAToUVRow_NEON(const uint8* src_rgba,
  889. int src_stride_rgba,
  890. uint8* dst_u,
  891. uint8* dst_v,
  892. int width);
  893. void RGB24ToUVRow_NEON(const uint8* src_rgb24,
  894. int src_stride_rgb24,
  895. uint8* dst_u,
  896. uint8* dst_v,
  897. int width);
  898. void RAWToUVRow_NEON(const uint8* src_raw,
  899. int src_stride_raw,
  900. uint8* dst_u,
  901. uint8* dst_v,
  902. int width);
  903. void RGB565ToUVRow_NEON(const uint8* src_rgb565,
  904. int src_stride_rgb565,
  905. uint8* dst_u,
  906. uint8* dst_v,
  907. int width);
  908. void ARGB1555ToUVRow_NEON(const uint8* src_argb1555,
  909. int src_stride_argb1555,
  910. uint8* dst_u,
  911. uint8* dst_v,
  912. int width);
  913. void ARGB4444ToUVRow_NEON(const uint8* src_argb4444,
  914. int src_stride_argb4444,
  915. uint8* dst_u,
  916. uint8* dst_v,
  917. int width);
  918. void ARGBToUVJRow_MSA(const uint8* src_argb,
  919. int src_stride_argb,
  920. uint8* dst_u,
  921. uint8* dst_v,
  922. int width);
  923. void BGRAToUVRow_MSA(const uint8* src_bgra,
  924. int src_stride_bgra,
  925. uint8* dst_u,
  926. uint8* dst_v,
  927. int width);
  928. void ABGRToUVRow_MSA(const uint8* src_abgr,
  929. int src_stride_abgr,
  930. uint8* dst_u,
  931. uint8* dst_v,
  932. int width);
  933. void RGBAToUVRow_MSA(const uint8* src_rgba,
  934. int src_stride_rgba,
  935. uint8* dst_u,
  936. uint8* dst_v,
  937. int width);
  938. void RGB24ToUVRow_MSA(const uint8* src_rgb24,
  939. int src_stride_rgb24,
  940. uint8* dst_u,
  941. uint8* dst_v,
  942. int width);
  943. void RAWToUVRow_MSA(const uint8* src_raw,
  944. int src_stride_raw,
  945. uint8* dst_u,
  946. uint8* dst_v,
  947. int width);
  948. void RGB565ToUVRow_MSA(const uint8* src_rgb565,
  949. int src_stride_rgb565,
  950. uint8* dst_u,
  951. uint8* dst_v,
  952. int width);
  953. void ARGB1555ToUVRow_MSA(const uint8* src_argb1555,
  954. int src_stride_argb1555,
  955. uint8* dst_u,
  956. uint8* dst_v,
  957. int width);
  958. void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width);
  959. void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width);
  960. void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width);
  961. void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
  962. void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width);
  963. void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
  964. void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width);
  965. void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width);
  966. void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width);
  967. void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width);
  968. void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width);
  969. void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
  970. void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width);
  971. void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
  972. void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
  973. void BGRAToUVRow_DSPR2(const uint8* src_bgra,
  974. int src_stride_bgra,
  975. uint8* dst_u,
  976. uint8* dst_v,
  977. int width);
  978. void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
  979. void ABGRToUVRow_DSPR2(const uint8* src_abgr,
  980. int src_stride_abgr,
  981. uint8* dst_u,
  982. uint8* dst_v,
  983. int width);
  984. void ARGBToYRow_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
  985. void ABGRToYRow_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
  986. void RGBAToUVRow_DSPR2(const uint8* src_rgba,
  987. int src_stride_rgba,
  988. uint8* dst_u,
  989. uint8* dst_v,
  990. int width);
  991. void RGBAToYRow_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
  992. void ARGBToUVRow_DSPR2(const uint8* src_argb,
  993. int src_stride_argb,
  994. uint8* dst_u,
  995. uint8* dst_v,
  996. int width);
  997. void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width);
  998. void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width);
  999. void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int width);
  1000. void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int width);
  1001. void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int width);
  1002. void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int width);
  1003. void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int width);
  1004. void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int width);
  1005. void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int width);
  1006. void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int width);
  1007. void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
  1008. void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
  1009. void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int width);
  1010. void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int width);
  1011. void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int width);
  1012. void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width);
  1013. void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int width);
  1014. void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width);
  1015. void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width);
  1016. void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int width);
  1017. void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int width);
  1018. void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int width);
  1019. void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
  1020. void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width);
  1021. void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
  1022. void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555,
  1023. uint8* dst_y,
  1024. int width);
  1025. void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
  1026. void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
  1027. void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
  1028. void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
  1029. void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444,
  1030. uint8* dst_y,
  1031. int width);
  1032. void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width);
  1033. void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width);
  1034. void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width);
  1035. void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
  1036. void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
  1037. void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
  1038. void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width);
  1039. void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
  1040. void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
  1041. void ARGBToUVRow_AVX2(const uint8* src_argb,
  1042. int src_stride_argb,
  1043. uint8* dst_u,
  1044. uint8* dst_v,
  1045. int width);
  1046. void ARGBToUVJRow_AVX2(const uint8* src_argb,
  1047. int src_stride_argb,
  1048. uint8* dst_u,
  1049. uint8* dst_v,
  1050. int width);
  1051. void ARGBToUVRow_SSSE3(const uint8* src_argb,
  1052. int src_stride_argb,
  1053. uint8* dst_u,
  1054. uint8* dst_v,
  1055. int width);
  1056. void ARGBToUVJRow_SSSE3(const uint8* src_argb,
  1057. int src_stride_argb,
  1058. uint8* dst_u,
  1059. uint8* dst_v,
  1060. int width);
  1061. void BGRAToUVRow_SSSE3(const uint8* src_bgra,
  1062. int src_stride_bgra,
  1063. uint8* dst_u,
  1064. uint8* dst_v,
  1065. int width);
  1066. void ABGRToUVRow_SSSE3(const uint8* src_abgr,
  1067. int src_stride_abgr,
  1068. uint8* dst_u,
  1069. uint8* dst_v,
  1070. int width);
  1071. void RGBAToUVRow_SSSE3(const uint8* src_rgba,
  1072. int src_stride_rgba,
  1073. uint8* dst_u,
  1074. uint8* dst_v,
  1075. int width);
  1076. void ARGBToUVRow_Any_AVX2(const uint8* src_argb,
  1077. int src_stride_argb,
  1078. uint8* dst_u,
  1079. uint8* dst_v,
  1080. int width);
  1081. void ARGBToUVJRow_Any_AVX2(const uint8* src_argb,
  1082. int src_stride_argb,
  1083. uint8* dst_u,
  1084. uint8* dst_v,
  1085. int width);
  1086. void ARGBToUVRow_Any_SSSE3(const uint8* src_argb,
  1087. int src_stride_argb,
  1088. uint8* dst_u,
  1089. uint8* dst_v,
  1090. int width);
  1091. void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb,
  1092. int src_stride_argb,
  1093. uint8* dst_u,
  1094. uint8* dst_v,
  1095. int width);
  1096. void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra,
  1097. int src_stride_bgra,
  1098. uint8* dst_u,
  1099. uint8* dst_v,
  1100. int width);
  1101. void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr,
  1102. int src_stride_abgr,
  1103. uint8* dst_u,
  1104. uint8* dst_v,
  1105. int width);
  1106. void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba,
  1107. int src_stride_rgba,
  1108. uint8* dst_u,
  1109. uint8* dst_v,
  1110. int width);
  1111. void ARGBToUV444Row_Any_NEON(const uint8* src_argb,
  1112. uint8* dst_u,
  1113. uint8* dst_v,
  1114. int width);
  1115. void ARGBToUVRow_Any_NEON(const uint8* src_argb,
  1116. int src_stride_argb,
  1117. uint8* dst_u,
  1118. uint8* dst_v,
  1119. int width);
  1120. void ARGBToUV444Row_Any_MSA(const uint8* src_argb,
  1121. uint8* dst_u,
  1122. uint8* dst_v,
  1123. int width);
  1124. void ARGBToUVRow_Any_MSA(const uint8* src_argb,
  1125. int src_stride_argb,
  1126. uint8* dst_u,
  1127. uint8* dst_v,
  1128. int width);
  1129. void ARGBToUVJRow_Any_NEON(const uint8* src_argb,
  1130. int src_stride_argb,
  1131. uint8* dst_u,
  1132. uint8* dst_v,
  1133. int width);
  1134. void BGRAToUVRow_Any_NEON(const uint8* src_bgra,
  1135. int src_stride_bgra,
  1136. uint8* dst_u,
  1137. uint8* dst_v,
  1138. int width);
  1139. void ABGRToUVRow_Any_NEON(const uint8* src_abgr,
  1140. int src_stride_abgr,
  1141. uint8* dst_u,
  1142. uint8* dst_v,
  1143. int width);
  1144. void RGBAToUVRow_Any_NEON(const uint8* src_rgba,
  1145. int src_stride_rgba,
  1146. uint8* dst_u,
  1147. uint8* dst_v,
  1148. int width);
  1149. void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24,
  1150. int src_stride_rgb24,
  1151. uint8* dst_u,
  1152. uint8* dst_v,
  1153. int width);
  1154. void RAWToUVRow_Any_NEON(const uint8* src_raw,
  1155. int src_stride_raw,
  1156. uint8* dst_u,
  1157. uint8* dst_v,
  1158. int width);
  1159. void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565,
  1160. int src_stride_rgb565,
  1161. uint8* dst_u,
  1162. uint8* dst_v,
  1163. int width);
  1164. void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
  1165. int src_stride_argb1555,
  1166. uint8* dst_u,
  1167. uint8* dst_v,
  1168. int width);
  1169. void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
  1170. int src_stride_argb4444,
  1171. uint8* dst_u,
  1172. uint8* dst_v,
  1173. int width);
  1174. void ARGBToUVJRow_Any_MSA(const uint8* src_argb,
  1175. int src_stride_argb,
  1176. uint8* dst_u,
  1177. uint8* dst_v,
  1178. int width);
  1179. void BGRAToUVRow_Any_MSA(const uint8* src_bgra,
  1180. int src_stride_bgra,
  1181. uint8* dst_u,
  1182. uint8* dst_v,
  1183. int width);
  1184. void ABGRToUVRow_Any_MSA(const uint8* src_abgr,
  1185. int src_stride_abgr,
  1186. uint8* dst_u,
  1187. uint8* dst_v,
  1188. int width);
  1189. void RGBAToUVRow_Any_MSA(const uint8* src_rgba,
  1190. int src_stride_rgba,
  1191. uint8* dst_u,
  1192. uint8* dst_v,
  1193. int width);
  1194. void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24,
  1195. int src_stride_rgb24,
  1196. uint8* dst_u,
  1197. uint8* dst_v,
  1198. int width);
  1199. void RAWToUVRow_Any_MSA(const uint8* src_raw,
  1200. int src_stride_raw,
  1201. uint8* dst_u,
  1202. uint8* dst_v,
  1203. int width);
  1204. void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565,
  1205. int src_stride_rgb565,
  1206. uint8* dst_u,
  1207. uint8* dst_v,
  1208. int width);
  1209. void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555,
  1210. int src_stride_argb1555,
  1211. uint8* dst_u,
  1212. uint8* dst_v,
  1213. int width);
  1214. void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra,
  1215. int src_stride_bgra,
  1216. uint8* dst_u,
  1217. uint8* dst_v,
  1218. int width);
  1219. void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr,
  1220. int src_stride_abgr,
  1221. uint8* dst_u,
  1222. uint8* dst_v,
  1223. int width);
  1224. void RGBAToUVRow_Any_DSPR2(const uint8* src_rgba,
  1225. int src_stride_rgba,
  1226. uint8* dst_u,
  1227. uint8* dst_v,
  1228. int width);
  1229. void ARGBToUVRow_Any_DSPR2(const uint8* src_argb,
  1230. int src_stride_argb,
  1231. uint8* dst_u,
  1232. uint8* dst_v,
  1233. int width);
  1234. void ARGBToUVRow_C(const uint8* src_argb,
  1235. int src_stride_argb,
  1236. uint8* dst_u,
  1237. uint8* dst_v,
  1238. int width);
  1239. void ARGBToUVJRow_C(const uint8* src_argb,
  1240. int src_stride_argb,
  1241. uint8* dst_u,
  1242. uint8* dst_v,
  1243. int width);
  1244. void ARGBToUVRow_C(const uint8* src_argb,
  1245. int src_stride_argb,
  1246. uint8* dst_u,
  1247. uint8* dst_v,
  1248. int width);
  1249. void ARGBToUVJRow_C(const uint8* src_argb,
  1250. int src_stride_argb,
  1251. uint8* dst_u,
  1252. uint8* dst_v,
  1253. int width);
  1254. void BGRAToUVRow_C(const uint8* src_bgra,
  1255. int src_stride_bgra,
  1256. uint8* dst_u,
  1257. uint8* dst_v,
  1258. int width);
  1259. void ABGRToUVRow_C(const uint8* src_abgr,
  1260. int src_stride_abgr,
  1261. uint8* dst_u,
  1262. uint8* dst_v,
  1263. int width);
  1264. void RGBAToUVRow_C(const uint8* src_rgba,
  1265. int src_stride_rgba,
  1266. uint8* dst_u,
  1267. uint8* dst_v,
  1268. int width);
  1269. void RGB24ToUVRow_C(const uint8* src_rgb24,
  1270. int src_stride_rgb24,
  1271. uint8* dst_u,
  1272. uint8* dst_v,
  1273. int width);
  1274. void RAWToUVRow_C(const uint8* src_raw,
  1275. int src_stride_raw,
  1276. uint8* dst_u,
  1277. uint8* dst_v,
  1278. int width);
  1279. void RGB565ToUVRow_C(const uint8* src_rgb565,
  1280. int src_stride_rgb565,
  1281. uint8* dst_u,
  1282. uint8* dst_v,
  1283. int width);
  1284. void ARGB1555ToUVRow_C(const uint8* src_argb1555,
  1285. int src_stride_argb1555,
  1286. uint8* dst_u,
  1287. uint8* dst_v,
  1288. int width);
  1289. void ARGB4444ToUVRow_C(const uint8* src_argb4444,
  1290. int src_stride_argb4444,
  1291. uint8* dst_u,
  1292. uint8* dst_v,
  1293. int width);
  1294. void ARGBToUV444Row_SSSE3(const uint8* src_argb,
  1295. uint8* dst_u,
  1296. uint8* dst_v,
  1297. int width);
  1298. void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb,
  1299. uint8* dst_u,
  1300. uint8* dst_v,
  1301. int width);
  1302. void ARGBToUV444Row_C(const uint8* src_argb,
  1303. uint8* dst_u,
  1304. uint8* dst_v,
  1305. int width);
  1306. void MirrorRow_AVX2(const uint8* src, uint8* dst, int width);
  1307. void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width);
  1308. void MirrorRow_NEON(const uint8* src, uint8* dst, int width);
  1309. void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width);
  1310. void MirrorRow_MSA(const uint8* src, uint8* dst, int width);
  1311. void MirrorRow_C(const uint8* src, uint8* dst, int width);
  1312. void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width);
  1313. void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width);
  1314. void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width);
  1315. void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width);
  1316. void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width);
  1317. void MirrorUVRow_SSSE3(const uint8* src_uv,
  1318. uint8* dst_u,
  1319. uint8* dst_v,
  1320. int width);
  1321. void MirrorUVRow_NEON(const uint8* src_uv,
  1322. uint8* dst_u,
  1323. uint8* dst_v,
  1324. int width);
  1325. void MirrorUVRow_DSPR2(const uint8* src_uv,
  1326. uint8* dst_u,
  1327. uint8* dst_v,
  1328. int width);
  1329. void MirrorUVRow_MSA(const uint8* src_uv,
  1330. uint8* dst_u,
  1331. uint8* dst_v,
  1332. int width);
  1333. void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width);
  1334. void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width);
  1335. void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width);
  1336. void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width);
  1337. void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width);
  1338. void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width);
  1339. void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width);
  1340. void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width);
  1341. void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width);
  1342. void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width);
  1343. void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width);
  1344. void SplitUVRow_SSE2(const uint8* src_uv,
  1345. uint8* dst_u,
  1346. uint8* dst_v,
  1347. int width);
  1348. void SplitUVRow_AVX2(const uint8* src_uv,
  1349. uint8* dst_u,
  1350. uint8* dst_v,
  1351. int width);
  1352. void SplitUVRow_NEON(const uint8* src_uv,
  1353. uint8* dst_u,
  1354. uint8* dst_v,
  1355. int width);
  1356. void SplitUVRow_DSPR2(const uint8* src_uv,
  1357. uint8* dst_u,
  1358. uint8* dst_v,
  1359. int width);
  1360. void SplitUVRow_MSA(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width);
  1361. void SplitUVRow_Any_SSE2(const uint8* src_uv,
  1362. uint8* dst_u,
  1363. uint8* dst_v,
  1364. int width);
  1365. void SplitUVRow_Any_AVX2(const uint8* src_uv,
  1366. uint8* dst_u,
  1367. uint8* dst_v,
  1368. int width);
  1369. void SplitUVRow_Any_NEON(const uint8* src_uv,
  1370. uint8* dst_u,
  1371. uint8* dst_v,
  1372. int width);
  1373. void SplitUVRow_Any_DSPR2(const uint8* src_uv,
  1374. uint8* dst_u,
  1375. uint8* dst_v,
  1376. int width);
  1377. void SplitUVRow_Any_MSA(const uint8* src_uv,
  1378. uint8* dst_u,
  1379. uint8* dst_v,
  1380. int width);
  1381. void MergeUVRow_C(const uint8* src_u,
  1382. const uint8* src_v,
  1383. uint8* dst_uv,
  1384. int width);
  1385. void MergeUVRow_SSE2(const uint8* src_u,
  1386. const uint8* src_v,
  1387. uint8* dst_uv,
  1388. int width);
  1389. void MergeUVRow_AVX2(const uint8* src_u,
  1390. const uint8* src_v,
  1391. uint8* dst_uv,
  1392. int width);
  1393. void MergeUVRow_NEON(const uint8* src_u,
  1394. const uint8* src_v,
  1395. uint8* dst_uv,
  1396. int width);
  1397. void MergeUVRow_MSA(const uint8* src_u,
  1398. const uint8* src_v,
  1399. uint8* dst_uv,
  1400. int width);
  1401. void MergeUVRow_Any_SSE2(const uint8* src_u,
  1402. const uint8* src_v,
  1403. uint8* dst_uv,
  1404. int width);
  1405. void MergeUVRow_Any_AVX2(const uint8* src_u,
  1406. const uint8* src_v,
  1407. uint8* dst_uv,
  1408. int width);
  1409. void MergeUVRow_Any_NEON(const uint8* src_u,
  1410. const uint8* src_v,
  1411. uint8* dst_uv,
  1412. int width);
  1413. void MergeUVRow_Any_MSA(const uint8* src_u,
  1414. const uint8* src_v,
  1415. uint8* dst_uv,
  1416. int width);
  1417. void SplitRGBRow_C(const uint8* src_rgb,
  1418. uint8* dst_r,
  1419. uint8* dst_g,
  1420. uint8* dst_b,
  1421. int width);
  1422. void SplitRGBRow_SSSE3(const uint8* src_rgb,
  1423. uint8* dst_r,
  1424. uint8* dst_g,
  1425. uint8* dst_b,
  1426. int width);
  1427. void SplitRGBRow_NEON(const uint8* src_rgb,
  1428. uint8* dst_r,
  1429. uint8* dst_g,
  1430. uint8* dst_b,
  1431. int width);
  1432. void SplitRGBRow_Any_SSSE3(const uint8* src_rgb,
  1433. uint8* dst_r,
  1434. uint8* dst_g,
  1435. uint8* dst_b,
  1436. int width);
  1437. void SplitRGBRow_Any_NEON(const uint8* src_rgb,
  1438. uint8* dst_r,
  1439. uint8* dst_g,
  1440. uint8* dst_b,
  1441. int width);
  1442. void MergeRGBRow_C(const uint8* src_r,
  1443. const uint8* src_g,
  1444. const uint8* src_b,
  1445. uint8* dst_rgb,
  1446. int width);
  1447. void MergeRGBRow_SSSE3(const uint8* src_r,
  1448. const uint8* src_g,
  1449. const uint8* src_b,
  1450. uint8* dst_rgb,
  1451. int width);
  1452. void MergeRGBRow_NEON(const uint8* src_r,
  1453. const uint8* src_g,
  1454. const uint8* src_b,
  1455. uint8* dst_rgb,
  1456. int width);
  1457. void MergeRGBRow_Any_SSSE3(const uint8* src_r,
  1458. const uint8* src_g,
  1459. const uint8* src_b,
  1460. uint8* dst_rgb,
  1461. int width);
  1462. void MergeRGBRow_Any_NEON(const uint8* src_r,
  1463. const uint8* src_g,
  1464. const uint8* src_b,
  1465. uint8* dst_rgb,
  1466. int width);
  1467. void MergeUVRow_16_C(const uint16* src_u,
  1468. const uint16* src_v,
  1469. uint16* dst_uv,
  1470. int scale, /* 64 for 10 bit */
  1471. int width);
  1472. void MergeUVRow_16_AVX2(const uint16* src_u,
  1473. const uint16* src_v,
  1474. uint16* dst_uv,
  1475. int scale,
  1476. int width);
  1477. void MultiplyRow_16_AVX2(const uint16* src_y,
  1478. uint16* dst_y,
  1479. int scale,
  1480. int width);
  1481. void MultiplyRow_16_C(const uint16* src_y, uint16* dst_y, int scale, int width);
  1482. void CopyRow_SSE2(const uint8* src, uint8* dst, int count);
  1483. void CopyRow_AVX(const uint8* src, uint8* dst, int count);
  1484. void CopyRow_ERMS(const uint8* src, uint8* dst, int count);
  1485. void CopyRow_NEON(const uint8* src, uint8* dst, int count);
  1486. void CopyRow_MIPS(const uint8* src, uint8* dst, int count);
  1487. void CopyRow_C(const uint8* src, uint8* dst, int count);
  1488. void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count);
  1489. void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count);
  1490. void CopyRow_Any_NEON(const uint8* src, uint8* dst, int count);
  1491. void CopyRow_16_C(const uint16* src, uint16* dst, int count);
  1492. void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  1493. void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
  1494. void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
  1495. void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb,
  1496. uint8* dst_argb,
  1497. int width);
  1498. void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb,
  1499. uint8* dst_argb,
  1500. int width);
  1501. void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width);
  1502. void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width);
  1503. void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width);
  1504. void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width);
  1505. void ARGBExtractAlphaRow_MSA(const uint8* src_argb, uint8* dst_a, int width);
  1506. void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb,
  1507. uint8* dst_a,
  1508. int width);
  1509. void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb,
  1510. uint8* dst_a,
  1511. int width);
  1512. void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb,
  1513. uint8* dst_a,
  1514. int width);
  1515. void ARGBExtractAlphaRow_Any_MSA(const uint8* src_argb,
  1516. uint8* dst_a,
  1517. int width);
  1518. void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width);
  1519. void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
  1520. void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
  1521. void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y,
  1522. uint8* dst_argb,
  1523. int width);
  1524. void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y,
  1525. uint8* dst_argb,
  1526. int width);
  1527. void SetRow_C(uint8* dst, uint8 v8, int count);
  1528. void SetRow_MSA(uint8* dst, uint8 v8, int count);
  1529. void SetRow_X86(uint8* dst, uint8 v8, int count);
  1530. void SetRow_ERMS(uint8* dst, uint8 v8, int count);
  1531. void SetRow_NEON(uint8* dst, uint8 v8, int count);
  1532. void SetRow_Any_X86(uint8* dst, uint8 v8, int count);
  1533. void SetRow_Any_NEON(uint8* dst, uint8 v8, int count);
  1534. void ARGBSetRow_C(uint8* dst_argb, uint32 v32, int count);
  1535. void ARGBSetRow_X86(uint8* dst_argb, uint32 v32, int count);
  1536. void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count);
  1537. void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count);
  1538. void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int count);
  1539. void ARGBSetRow_Any_MSA(uint8* dst_argb, uint32 v32, int count);
  1540. // ARGBShufflers for BGRAToARGB etc.
  1541. void ARGBShuffleRow_C(const uint8* src_argb,
  1542. uint8* dst_argb,
  1543. const uint8* shuffler,
  1544. int width);
  1545. void ARGBShuffleRow_SSE2(const uint8* src_argb,
  1546. uint8* dst_argb,
  1547. const uint8* shuffler,
  1548. int width);
  1549. void ARGBShuffleRow_SSSE3(const uint8* src_argb,
  1550. uint8* dst_argb,
  1551. const uint8* shuffler,
  1552. int width);
  1553. void ARGBShuffleRow_AVX2(const uint8* src_argb,
  1554. uint8* dst_argb,
  1555. const uint8* shuffler,
  1556. int width);
  1557. void ARGBShuffleRow_NEON(const uint8* src_argb,
  1558. uint8* dst_argb,
  1559. const uint8* shuffler,
  1560. int width);
  1561. void ARGBShuffleRow_MSA(const uint8* src_argb,
  1562. uint8* dst_argb,
  1563. const uint8* shuffler,
  1564. int width);
  1565. void ARGBShuffleRow_Any_SSE2(const uint8* src_argb,
  1566. uint8* dst_argb,
  1567. const uint8* shuffler,
  1568. int width);
  1569. void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb,
  1570. uint8* dst_argb,
  1571. const uint8* shuffler,
  1572. int width);
  1573. void ARGBShuffleRow_Any_AVX2(const uint8* src_argb,
  1574. uint8* dst_argb,
  1575. const uint8* shuffler,
  1576. int width);
  1577. void ARGBShuffleRow_Any_NEON(const uint8* src_argb,
  1578. uint8* dst_argb,
  1579. const uint8* shuffler,
  1580. int width);
  1581. void ARGBShuffleRow_Any_MSA(const uint8* src_argb,
  1582. uint8* dst_argb,
  1583. const uint8* shuffler,
  1584. int width);
  1585. void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width);
  1586. void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int width);
  1587. void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width);
  1588. void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width);
  1589. void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555,
  1590. uint8* dst_argb,
  1591. int width);
  1592. void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444,
  1593. uint8* dst_argb,
  1594. int width);
  1595. void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width);
  1596. void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555,
  1597. uint8* dst_argb,
  1598. int width);
  1599. void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444,
  1600. uint8* dst_argb,
  1601. int width);
  1602. void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width);
  1603. void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
  1604. void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width);
  1605. void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width);
  1606. void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
  1607. void RAWToRGB24Row_MSA(const uint8* src_raw, uint8* dst_rgb24, int width);
  1608. void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width);
  1609. void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width);
  1610. void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555,
  1611. uint8* dst_argb,
  1612. int width);
  1613. void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555,
  1614. uint8* dst_argb,
  1615. int width);
  1616. void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444,
  1617. uint8* dst_argb,
  1618. int width);
  1619. void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width);
  1620. void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
  1621. void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width);
  1622. void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555,
  1623. uint8* dst_argb,
  1624. int width);
  1625. void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444,
  1626. uint8* dst_argb,
  1627. int width);
  1628. void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444,
  1629. uint8* dst_argb,
  1630. int width);
  1631. void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width);
  1632. void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width);
  1633. void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width);
  1634. void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int width);
  1635. void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  1636. void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  1637. void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24,
  1638. uint8* dst_argb,
  1639. int width);
  1640. void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width);
  1641. void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width);
  1642. void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565,
  1643. uint8* dst_argb,
  1644. int width);
  1645. void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555,
  1646. uint8* dst_argb,
  1647. int width);
  1648. void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444,
  1649. uint8* dst_argb,
  1650. int width);
  1651. void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565,
  1652. uint8* dst_argb,
  1653. int width);
  1654. void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555,
  1655. uint8* dst_argb,
  1656. int width);
  1657. void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444,
  1658. uint8* dst_argb,
  1659. int width);
  1660. void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24,
  1661. uint8* dst_argb,
  1662. int width);
  1663. void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
  1664. void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width);
  1665. void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width);
  1666. void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
  1667. void RAWToRGB24Row_Any_MSA(const uint8* src_raw, uint8* dst_rgb24, int width);
  1668. void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565,
  1669. uint8* dst_argb,
  1670. int width);
  1671. void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565,
  1672. uint8* dst_argb,
  1673. int width);
  1674. void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555,
  1675. uint8* dst_argb,
  1676. int width);
  1677. void ARGB1555ToARGBRow_Any_MSA(const uint8* src_argb1555,
  1678. uint8* dst_argb,
  1679. int width);
  1680. void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444,
  1681. uint8* dst_argb,
  1682. int width);
  1683. void RGB24ToARGBRow_Any_DSPR2(const uint8* src_rgb24,
  1684. uint8* dst_argb,
  1685. int width);
  1686. void RAWToARGBRow_Any_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
  1687. void RGB565ToARGBRow_Any_DSPR2(const uint8* src_rgb565,
  1688. uint8* dst_argb,
  1689. int width);
  1690. void ARGB1555ToARGBRow_Any_DSPR2(const uint8* src_argb1555,
  1691. uint8* dst_argb,
  1692. int width);
  1693. void ARGB4444ToARGBRow_Any_DSPR2(const uint8* src_argb4444,
  1694. uint8* dst_argb,
  1695. int width);
  1696. void ARGB4444ToARGBRow_Any_MSA(const uint8* src_argb4444,
  1697. uint8* dst_argb,
  1698. int width);
  1699. void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
  1700. void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
  1701. void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
  1702. void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
  1703. void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
  1704. void ARGBToRGB565DitherRow_C(const uint8* src_argb,
  1705. uint8* dst_rgb,
  1706. const uint32 dither4,
  1707. int width);
  1708. void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb,
  1709. uint8* dst_rgb,
  1710. const uint32 dither4,
  1711. int width);
  1712. void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb,
  1713. uint8* dst_rgb,
  1714. const uint32 dither4,
  1715. int width);
  1716. void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
  1717. void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
  1718. void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
  1719. void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  1720. void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  1721. void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  1722. void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  1723. void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  1724. void ARGBToRGB565DitherRow_NEON(const uint8* src_argb,
  1725. uint8* dst_rgb,
  1726. const uint32 dither4,
  1727. int width);
  1728. void ARGBToRGB24Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  1729. void ARGBToRAWRow_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  1730. void ARGBToRGB565Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  1731. void ARGBToARGB1555Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  1732. void ARGBToARGB4444Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  1733. void ARGBToRGB565DitherRow_MSA(const uint8* src_argb,
  1734. uint8* dst_rgb,
  1735. const uint32 dither4,
  1736. int width);
  1737. void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1738. void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1739. void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1740. void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1741. void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1742. void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int width);
  1743. void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
  1744. void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
  1745. void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
  1746. void J400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width);
  1747. void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
  1748. void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
  1749. void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
  1750. void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
  1751. void J400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width);
  1752. void I444ToARGBRow_C(const uint8* src_y,
  1753. const uint8* src_u,
  1754. const uint8* src_v,
  1755. uint8* dst_argb,
  1756. const struct YuvConstants* yuvconstants,
  1757. int width);
  1758. void I422ToARGBRow_C(const uint8* src_y,
  1759. const uint8* src_u,
  1760. const uint8* src_v,
  1761. uint8* dst_argb,
  1762. const struct YuvConstants* yuvconstants,
  1763. int width);
  1764. void I422ToARGBRow_C(const uint8* src_y,
  1765. const uint8* src_u,
  1766. const uint8* src_v,
  1767. uint8* dst_argb,
  1768. const struct YuvConstants* yuvconstants,
  1769. int width);
  1770. void I422AlphaToARGBRow_C(const uint8* y_buf,
  1771. const uint8* u_buf,
  1772. const uint8* v_buf,
  1773. const uint8* a_buf,
  1774. uint8* dst_argb,
  1775. const struct YuvConstants* yuvconstants,
  1776. int width);
  1777. void NV12ToARGBRow_C(const uint8* src_y,
  1778. const uint8* src_uv,
  1779. uint8* dst_argb,
  1780. const struct YuvConstants* yuvconstants,
  1781. int width);
  1782. void NV12ToRGB565Row_C(const uint8* src_y,
  1783. const uint8* src_uv,
  1784. uint8* dst_argb,
  1785. const struct YuvConstants* yuvconstants,
  1786. int width);
  1787. void NV21ToARGBRow_C(const uint8* src_y,
  1788. const uint8* src_uv,
  1789. uint8* dst_argb,
  1790. const struct YuvConstants* yuvconstants,
  1791. int width);
  1792. void YUY2ToARGBRow_C(const uint8* src_yuy2,
  1793. uint8* dst_argb,
  1794. const struct YuvConstants* yuvconstants,
  1795. int width);
  1796. void UYVYToARGBRow_C(const uint8* src_uyvy,
  1797. uint8* dst_argb,
  1798. const struct YuvConstants* yuvconstants,
  1799. int width);
  1800. void I422ToRGBARow_C(const uint8* src_y,
  1801. const uint8* src_u,
  1802. const uint8* src_v,
  1803. uint8* dst_rgba,
  1804. const struct YuvConstants* yuvconstants,
  1805. int width);
  1806. void I422ToRGB24Row_C(const uint8* src_y,
  1807. const uint8* src_u,
  1808. const uint8* src_v,
  1809. uint8* dst_rgb24,
  1810. const struct YuvConstants* yuvconstants,
  1811. int width);
  1812. void I422ToARGB4444Row_C(const uint8* src_y,
  1813. const uint8* src_u,
  1814. const uint8* src_v,
  1815. uint8* dst_argb4444,
  1816. const struct YuvConstants* yuvconstants,
  1817. int width);
  1818. void I422ToARGB1555Row_C(const uint8* src_y,
  1819. const uint8* src_u,
  1820. const uint8* src_v,
  1821. uint8* dst_argb4444,
  1822. const struct YuvConstants* yuvconstants,
  1823. int width);
  1824. void I422ToRGB565Row_C(const uint8* src_y,
  1825. const uint8* src_u,
  1826. const uint8* src_v,
  1827. uint8* dst_rgb565,
  1828. const struct YuvConstants* yuvconstants,
  1829. int width);
  1830. void I422ToARGBRow_AVX2(const uint8* src_y,
  1831. const uint8* src_u,
  1832. const uint8* src_v,
  1833. uint8* dst_argb,
  1834. const struct YuvConstants* yuvconstants,
  1835. int width);
  1836. void I422ToARGBRow_AVX2(const uint8* src_y,
  1837. const uint8* src_u,
  1838. const uint8* src_v,
  1839. uint8* dst_argb,
  1840. const struct YuvConstants* yuvconstants,
  1841. int width);
  1842. void I422ToRGBARow_AVX2(const uint8* src_y,
  1843. const uint8* src_u,
  1844. const uint8* src_v,
  1845. uint8* dst_argb,
  1846. const struct YuvConstants* yuvconstants,
  1847. int width);
  1848. void I444ToARGBRow_SSSE3(const uint8* src_y,
  1849. const uint8* src_u,
  1850. const uint8* src_v,
  1851. uint8* dst_argb,
  1852. const struct YuvConstants* yuvconstants,
  1853. int width);
  1854. void I444ToARGBRow_AVX2(const uint8* src_y,
  1855. const uint8* src_u,
  1856. const uint8* src_v,
  1857. uint8* dst_argb,
  1858. const struct YuvConstants* yuvconstants,
  1859. int width);
  1860. void I444ToARGBRow_SSSE3(const uint8* src_y,
  1861. const uint8* src_u,
  1862. const uint8* src_v,
  1863. uint8* dst_argb,
  1864. const struct YuvConstants* yuvconstants,
  1865. int width);
  1866. void I444ToARGBRow_AVX2(const uint8* src_y,
  1867. const uint8* src_u,
  1868. const uint8* src_v,
  1869. uint8* dst_argb,
  1870. const struct YuvConstants* yuvconstants,
  1871. int width);
  1872. void I422ToARGBRow_SSSE3(const uint8* src_y,
  1873. const uint8* src_u,
  1874. const uint8* src_v,
  1875. uint8* dst_argb,
  1876. const struct YuvConstants* yuvconstants,
  1877. int width);
  1878. void I422AlphaToARGBRow_SSSE3(const uint8* y_buf,
  1879. const uint8* u_buf,
  1880. const uint8* v_buf,
  1881. const uint8* a_buf,
  1882. uint8* dst_argb,
  1883. const struct YuvConstants* yuvconstants,
  1884. int width);
  1885. void I422AlphaToARGBRow_AVX2(const uint8* y_buf,
  1886. const uint8* u_buf,
  1887. const uint8* v_buf,
  1888. const uint8* a_buf,
  1889. uint8* dst_argb,
  1890. const struct YuvConstants* yuvconstants,
  1891. int width);
  1892. void I422ToARGBRow_SSSE3(const uint8* src_y,
  1893. const uint8* src_u,
  1894. const uint8* src_v,
  1895. uint8* dst_argb,
  1896. const struct YuvConstants* yuvconstants,
  1897. int width);
  1898. void NV12ToARGBRow_SSSE3(const uint8* src_y,
  1899. const uint8* src_uv,
  1900. uint8* dst_argb,
  1901. const struct YuvConstants* yuvconstants,
  1902. int width);
  1903. void NV12ToARGBRow_AVX2(const uint8* src_y,
  1904. const uint8* src_uv,
  1905. uint8* dst_argb,
  1906. const struct YuvConstants* yuvconstants,
  1907. int width);
  1908. void NV12ToRGB565Row_SSSE3(const uint8* src_y,
  1909. const uint8* src_uv,
  1910. uint8* dst_argb,
  1911. const struct YuvConstants* yuvconstants,
  1912. int width);
  1913. void NV12ToRGB565Row_AVX2(const uint8* src_y,
  1914. const uint8* src_uv,
  1915. uint8* dst_argb,
  1916. const struct YuvConstants* yuvconstants,
  1917. int width);
  1918. void NV21ToARGBRow_SSSE3(const uint8* src_y,
  1919. const uint8* src_uv,
  1920. uint8* dst_argb,
  1921. const struct YuvConstants* yuvconstants,
  1922. int width);
  1923. void NV21ToARGBRow_AVX2(const uint8* src_y,
  1924. const uint8* src_uv,
  1925. uint8* dst_argb,
  1926. const struct YuvConstants* yuvconstants,
  1927. int width);
  1928. void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2,
  1929. uint8* dst_argb,
  1930. const struct YuvConstants* yuvconstants,
  1931. int width);
  1932. void UYVYToARGBRow_SSSE3(const uint8* src_uyvy,
  1933. uint8* dst_argb,
  1934. const struct YuvConstants* yuvconstants,
  1935. int width);
  1936. void YUY2ToARGBRow_AVX2(const uint8* src_yuy2,
  1937. uint8* dst_argb,
  1938. const struct YuvConstants* yuvconstants,
  1939. int width);
  1940. void UYVYToARGBRow_AVX2(const uint8* src_uyvy,
  1941. uint8* dst_argb,
  1942. const struct YuvConstants* yuvconstants,
  1943. int width);
  1944. void I422ToRGBARow_SSSE3(const uint8* src_y,
  1945. const uint8* src_u,
  1946. const uint8* src_v,
  1947. uint8* dst_rgba,
  1948. const struct YuvConstants* yuvconstants,
  1949. int width);
  1950. void I422ToARGB4444Row_SSSE3(const uint8* src_y,
  1951. const uint8* src_u,
  1952. const uint8* src_v,
  1953. uint8* dst_argb,
  1954. const struct YuvConstants* yuvconstants,
  1955. int width);
  1956. void I422ToARGB4444Row_AVX2(const uint8* src_y,
  1957. const uint8* src_u,
  1958. const uint8* src_v,
  1959. uint8* dst_argb,
  1960. const struct YuvConstants* yuvconstants,
  1961. int width);
  1962. void I422ToARGB1555Row_SSSE3(const uint8* src_y,
  1963. const uint8* src_u,
  1964. const uint8* src_v,
  1965. uint8* dst_argb,
  1966. const struct YuvConstants* yuvconstants,
  1967. int width);
  1968. void I422ToARGB1555Row_AVX2(const uint8* src_y,
  1969. const uint8* src_u,
  1970. const uint8* src_v,
  1971. uint8* dst_argb,
  1972. const struct YuvConstants* yuvconstants,
  1973. int width);
  1974. void I422ToRGB565Row_SSSE3(const uint8* src_y,
  1975. const uint8* src_u,
  1976. const uint8* src_v,
  1977. uint8* dst_argb,
  1978. const struct YuvConstants* yuvconstants,
  1979. int width);
  1980. void I422ToRGB565Row_AVX2(const uint8* src_y,
  1981. const uint8* src_u,
  1982. const uint8* src_v,
  1983. uint8* dst_argb,
  1984. const struct YuvConstants* yuvconstants,
  1985. int width);
  1986. void I422ToRGB24Row_SSSE3(const uint8* src_y,
  1987. const uint8* src_u,
  1988. const uint8* src_v,
  1989. uint8* dst_rgb24,
  1990. const struct YuvConstants* yuvconstants,
  1991. int width);
  1992. void I422ToRGB24Row_AVX2(const uint8* src_y,
  1993. const uint8* src_u,
  1994. const uint8* src_v,
  1995. uint8* dst_rgb24,
  1996. const struct YuvConstants* yuvconstants,
  1997. int width);
  1998. void I422ToARGBRow_Any_AVX2(const uint8* src_y,
  1999. const uint8* src_u,
  2000. const uint8* src_v,
  2001. uint8* dst_argb,
  2002. const struct YuvConstants* yuvconstants,
  2003. int width);
  2004. void I422ToRGBARow_Any_AVX2(const uint8* src_y,
  2005. const uint8* src_u,
  2006. const uint8* src_v,
  2007. uint8* dst_argb,
  2008. const struct YuvConstants* yuvconstants,
  2009. int width);
  2010. void I444ToARGBRow_Any_SSSE3(const uint8* src_y,
  2011. const uint8* src_u,
  2012. const uint8* src_v,
  2013. uint8* dst_argb,
  2014. const struct YuvConstants* yuvconstants,
  2015. int width);
  2016. void I444ToARGBRow_Any_AVX2(const uint8* src_y,
  2017. const uint8* src_u,
  2018. const uint8* src_v,
  2019. uint8* dst_argb,
  2020. const struct YuvConstants* yuvconstants,
  2021. int width);
  2022. void I422ToARGBRow_Any_SSSE3(const uint8* src_y,
  2023. const uint8* src_u,
  2024. const uint8* src_v,
  2025. uint8* dst_argb,
  2026. const struct YuvConstants* yuvconstants,
  2027. int width);
  2028. void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf,
  2029. const uint8* u_buf,
  2030. const uint8* v_buf,
  2031. const uint8* a_buf,
  2032. uint8* dst_argb,
  2033. const struct YuvConstants* yuvconstants,
  2034. int width);
  2035. void I422AlphaToARGBRow_Any_AVX2(const uint8* y_buf,
  2036. const uint8* u_buf,
  2037. const uint8* v_buf,
  2038. const uint8* a_buf,
  2039. uint8* dst_argb,
  2040. const struct YuvConstants* yuvconstants,
  2041. int width);
  2042. void NV12ToARGBRow_Any_SSSE3(const uint8* src_y,
  2043. const uint8* src_uv,
  2044. uint8* dst_argb,
  2045. const struct YuvConstants* yuvconstants,
  2046. int width);
  2047. void NV12ToARGBRow_Any_AVX2(const uint8* src_y,
  2048. const uint8* src_uv,
  2049. uint8* dst_argb,
  2050. const struct YuvConstants* yuvconstants,
  2051. int width);
  2052. void NV21ToARGBRow_Any_SSSE3(const uint8* src_y,
  2053. const uint8* src_vu,
  2054. uint8* dst_argb,
  2055. const struct YuvConstants* yuvconstants,
  2056. int width);
  2057. void NV21ToARGBRow_Any_AVX2(const uint8* src_y,
  2058. const uint8* src_vu,
  2059. uint8* dst_argb,
  2060. const struct YuvConstants* yuvconstants,
  2061. int width);
  2062. void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y,
  2063. const uint8* src_uv,
  2064. uint8* dst_argb,
  2065. const struct YuvConstants* yuvconstants,
  2066. int width);
  2067. void NV12ToRGB565Row_Any_AVX2(const uint8* src_y,
  2068. const uint8* src_uv,
  2069. uint8* dst_argb,
  2070. const struct YuvConstants* yuvconstants,
  2071. int width);
  2072. void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2,
  2073. uint8* dst_argb,
  2074. const struct YuvConstants* yuvconstants,
  2075. int width);
  2076. void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy,
  2077. uint8* dst_argb,
  2078. const struct YuvConstants* yuvconstants,
  2079. int width);
  2080. void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2,
  2081. uint8* dst_argb,
  2082. const struct YuvConstants* yuvconstants,
  2083. int width);
  2084. void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy,
  2085. uint8* dst_argb,
  2086. const struct YuvConstants* yuvconstants,
  2087. int width);
  2088. void I422ToRGBARow_Any_SSSE3(const uint8* src_y,
  2089. const uint8* src_u,
  2090. const uint8* src_v,
  2091. uint8* dst_rgba,
  2092. const struct YuvConstants* yuvconstants,
  2093. int width);
  2094. void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y,
  2095. const uint8* src_u,
  2096. const uint8* src_v,
  2097. uint8* dst_rgba,
  2098. const struct YuvConstants* yuvconstants,
  2099. int width);
  2100. void I422ToARGB4444Row_Any_AVX2(const uint8* src_y,
  2101. const uint8* src_u,
  2102. const uint8* src_v,
  2103. uint8* dst_rgba,
  2104. const struct YuvConstants* yuvconstants,
  2105. int width);
  2106. void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y,
  2107. const uint8* src_u,
  2108. const uint8* src_v,
  2109. uint8* dst_rgba,
  2110. const struct YuvConstants* yuvconstants,
  2111. int width);
  2112. void I422ToARGB1555Row_Any_AVX2(const uint8* src_y,
  2113. const uint8* src_u,
  2114. const uint8* src_v,
  2115. uint8* dst_rgba,
  2116. const struct YuvConstants* yuvconstants,
  2117. int width);
  2118. void I422ToRGB565Row_Any_SSSE3(const uint8* src_y,
  2119. const uint8* src_u,
  2120. const uint8* src_v,
  2121. uint8* dst_rgba,
  2122. const struct YuvConstants* yuvconstants,
  2123. int width);
  2124. void I422ToRGB565Row_Any_AVX2(const uint8* src_y,
  2125. const uint8* src_u,
  2126. const uint8* src_v,
  2127. uint8* dst_rgba,
  2128. const struct YuvConstants* yuvconstants,
  2129. int width);
  2130. void I422ToRGB24Row_Any_SSSE3(const uint8* src_y,
  2131. const uint8* src_u,
  2132. const uint8* src_v,
  2133. uint8* dst_argb,
  2134. const struct YuvConstants* yuvconstants,
  2135. int width);
  2136. void I422ToRGB24Row_Any_AVX2(const uint8* src_y,
  2137. const uint8* src_u,
  2138. const uint8* src_v,
  2139. uint8* dst_argb,
  2140. const struct YuvConstants* yuvconstants,
  2141. int width);
  2142. void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
  2143. void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
  2144. void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
  2145. void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
  2146. void I400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width);
  2147. void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
  2148. void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
  2149. void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
  2150. void I400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width);
  2151. // ARGB preattenuated alpha blend.
  2152. void ARGBBlendRow_SSSE3(const uint8* src_argb,
  2153. const uint8* src_argb1,
  2154. uint8* dst_argb,
  2155. int width);
  2156. void ARGBBlendRow_NEON(const uint8* src_argb,
  2157. const uint8* src_argb1,
  2158. uint8* dst_argb,
  2159. int width);
  2160. void ARGBBlendRow_MSA(const uint8* src_argb,
  2161. const uint8* src_argb1,
  2162. uint8* dst_argb,
  2163. int width);
  2164. void ARGBBlendRow_C(const uint8* src_argb,
  2165. const uint8* src_argb1,
  2166. uint8* dst_argb,
  2167. int width);
  2168. // Unattenuated planar alpha blend.
  2169. void BlendPlaneRow_SSSE3(const uint8* src0,
  2170. const uint8* src1,
  2171. const uint8* alpha,
  2172. uint8* dst,
  2173. int width);
  2174. void BlendPlaneRow_Any_SSSE3(const uint8* src0,
  2175. const uint8* src1,
  2176. const uint8* alpha,
  2177. uint8* dst,
  2178. int width);
  2179. void BlendPlaneRow_AVX2(const uint8* src0,
  2180. const uint8* src1,
  2181. const uint8* alpha,
  2182. uint8* dst,
  2183. int width);
  2184. void BlendPlaneRow_Any_AVX2(const uint8* src0,
  2185. const uint8* src1,
  2186. const uint8* alpha,
  2187. uint8* dst,
  2188. int width);
  2189. void BlendPlaneRow_C(const uint8* src0,
  2190. const uint8* src1,
  2191. const uint8* alpha,
  2192. uint8* dst,
  2193. int width);
  2194. // ARGB multiply images. Same API as Blend, but these require
  2195. // pointer and width alignment for SSE2.
  2196. void ARGBMultiplyRow_C(const uint8* src_argb,
  2197. const uint8* src_argb1,
  2198. uint8* dst_argb,
  2199. int width);
  2200. void ARGBMultiplyRow_SSE2(const uint8* src_argb,
  2201. const uint8* src_argb1,
  2202. uint8* dst_argb,
  2203. int width);
  2204. void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb,
  2205. const uint8* src_argb1,
  2206. uint8* dst_argb,
  2207. int width);
  2208. void ARGBMultiplyRow_AVX2(const uint8* src_argb,
  2209. const uint8* src_argb1,
  2210. uint8* dst_argb,
  2211. int width);
  2212. void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb,
  2213. const uint8* src_argb1,
  2214. uint8* dst_argb,
  2215. int width);
  2216. void ARGBMultiplyRow_NEON(const uint8* src_argb,
  2217. const uint8* src_argb1,
  2218. uint8* dst_argb,
  2219. int width);
  2220. void ARGBMultiplyRow_Any_NEON(const uint8* src_argb,
  2221. const uint8* src_argb1,
  2222. uint8* dst_argb,
  2223. int width);
  2224. void ARGBMultiplyRow_MSA(const uint8* src_argb,
  2225. const uint8* src_argb1,
  2226. uint8* dst_argb,
  2227. int width);
  2228. void ARGBMultiplyRow_Any_MSA(const uint8* src_argb,
  2229. const uint8* src_argb1,
  2230. uint8* dst_argb,
  2231. int width);
  2232. // ARGB add images.
  2233. void ARGBAddRow_C(const uint8* src_argb,
  2234. const uint8* src_argb1,
  2235. uint8* dst_argb,
  2236. int width);
  2237. void ARGBAddRow_SSE2(const uint8* src_argb,
  2238. const uint8* src_argb1,
  2239. uint8* dst_argb,
  2240. int width);
  2241. void ARGBAddRow_Any_SSE2(const uint8* src_argb,
  2242. const uint8* src_argb1,
  2243. uint8* dst_argb,
  2244. int width);
  2245. void ARGBAddRow_AVX2(const uint8* src_argb,
  2246. const uint8* src_argb1,
  2247. uint8* dst_argb,
  2248. int width);
  2249. void ARGBAddRow_Any_AVX2(const uint8* src_argb,
  2250. const uint8* src_argb1,
  2251. uint8* dst_argb,
  2252. int width);
  2253. void ARGBAddRow_NEON(const uint8* src_argb,
  2254. const uint8* src_argb1,
  2255. uint8* dst_argb,
  2256. int width);
  2257. void ARGBAddRow_Any_NEON(const uint8* src_argb,
  2258. const uint8* src_argb1,
  2259. uint8* dst_argb,
  2260. int width);
  2261. void ARGBAddRow_MSA(const uint8* src_argb,
  2262. const uint8* src_argb1,
  2263. uint8* dst_argb,
  2264. int width);
  2265. void ARGBAddRow_Any_MSA(const uint8* src_argb,
  2266. const uint8* src_argb1,
  2267. uint8* dst_argb,
  2268. int width);
  2269. // ARGB subtract images. Same API as Blend, but these require
  2270. // pointer and width alignment for SSE2.
  2271. void ARGBSubtractRow_C(const uint8* src_argb,
  2272. const uint8* src_argb1,
  2273. uint8* dst_argb,
  2274. int width);
  2275. void ARGBSubtractRow_SSE2(const uint8* src_argb,
  2276. const uint8* src_argb1,
  2277. uint8* dst_argb,
  2278. int width);
  2279. void ARGBSubtractRow_Any_SSE2(const uint8* src_argb,
  2280. const uint8* src_argb1,
  2281. uint8* dst_argb,
  2282. int width);
  2283. void ARGBSubtractRow_AVX2(const uint8* src_argb,
  2284. const uint8* src_argb1,
  2285. uint8* dst_argb,
  2286. int width);
  2287. void ARGBSubtractRow_Any_AVX2(const uint8* src_argb,
  2288. const uint8* src_argb1,
  2289. uint8* dst_argb,
  2290. int width);
  2291. void ARGBSubtractRow_NEON(const uint8* src_argb,
  2292. const uint8* src_argb1,
  2293. uint8* dst_argb,
  2294. int width);
  2295. void ARGBSubtractRow_Any_NEON(const uint8* src_argb,
  2296. const uint8* src_argb1,
  2297. uint8* dst_argb,
  2298. int width);
  2299. void ARGBSubtractRow_MSA(const uint8* src_argb,
  2300. const uint8* src_argb1,
  2301. uint8* dst_argb,
  2302. int width);
  2303. void ARGBSubtractRow_Any_MSA(const uint8* src_argb,
  2304. const uint8* src_argb1,
  2305. uint8* dst_argb,
  2306. int width);
  2307. void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
  2308. void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width);
  2309. void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int width);
  2310. void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb,
  2311. uint8* dst_rgb,
  2312. int width);
  2313. void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb,
  2314. uint8* dst_rgb,
  2315. int width);
  2316. void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb,
  2317. uint8* dst_rgb,
  2318. const uint32 dither4,
  2319. int width);
  2320. void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb,
  2321. uint8* dst_rgb,
  2322. const uint32 dither4,
  2323. int width);
  2324. void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int width);
  2325. void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb,
  2326. uint8* dst_rgb,
  2327. int width);
  2328. void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb,
  2329. uint8* dst_rgb,
  2330. int width);
  2331. void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  2332. void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  2333. void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width);
  2334. void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb,
  2335. uint8* dst_rgb,
  2336. int width);
  2337. void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb,
  2338. uint8* dst_rgb,
  2339. int width);
  2340. void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb,
  2341. uint8* dst_rgb,
  2342. const uint32 dither4,
  2343. int width);
  2344. void ARGBToRGB24Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  2345. void ARGBToRAWRow_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  2346. void ARGBToRGB565Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width);
  2347. void ARGBToARGB1555Row_Any_MSA(const uint8* src_argb,
  2348. uint8* dst_rgb,
  2349. int width);
  2350. void ARGBToARGB4444Row_Any_MSA(const uint8* src_argb,
  2351. uint8* dst_rgb,
  2352. int width);
  2353. void ARGBToRGB565DitherRow_Any_MSA(const uint8* src_argb,
  2354. uint8* dst_rgb,
  2355. const uint32 dither4,
  2356. int width);
  2357. void I444ToARGBRow_Any_NEON(const uint8* src_y,
  2358. const uint8* src_u,
  2359. const uint8* src_v,
  2360. uint8* dst_argb,
  2361. const struct YuvConstants* yuvconstants,
  2362. int width);
  2363. void I422ToARGBRow_Any_NEON(const uint8* src_y,
  2364. const uint8* src_u,
  2365. const uint8* src_v,
  2366. uint8* dst_argb,
  2367. const struct YuvConstants* yuvconstants,
  2368. int width);
  2369. void I422AlphaToARGBRow_Any_NEON(const uint8* src_y,
  2370. const uint8* src_u,
  2371. const uint8* src_v,
  2372. const uint8* src_a,
  2373. uint8* dst_argb,
  2374. const struct YuvConstants* yuvconstants,
  2375. int width);
  2376. void I422ToRGBARow_Any_NEON(const uint8* src_y,
  2377. const uint8* src_u,
  2378. const uint8* src_v,
  2379. uint8* dst_argb,
  2380. const struct YuvConstants* yuvconstants,
  2381. int width);
  2382. void I422ToRGB24Row_Any_NEON(const uint8* src_y,
  2383. const uint8* src_u,
  2384. const uint8* src_v,
  2385. uint8* dst_argb,
  2386. const struct YuvConstants* yuvconstants,
  2387. int width);
  2388. void I422ToARGB4444Row_Any_NEON(const uint8* src_y,
  2389. const uint8* src_u,
  2390. const uint8* src_v,
  2391. uint8* dst_argb,
  2392. const struct YuvConstants* yuvconstants,
  2393. int width);
  2394. void I422ToARGB1555Row_Any_NEON(const uint8* src_y,
  2395. const uint8* src_u,
  2396. const uint8* src_v,
  2397. uint8* dst_argb,
  2398. const struct YuvConstants* yuvconstants,
  2399. int width);
  2400. void I422ToRGB565Row_Any_NEON(const uint8* src_y,
  2401. const uint8* src_u,
  2402. const uint8* src_v,
  2403. uint8* dst_argb,
  2404. const struct YuvConstants* yuvconstants,
  2405. int width);
  2406. void NV12ToARGBRow_Any_NEON(const uint8* src_y,
  2407. const uint8* src_uv,
  2408. uint8* dst_argb,
  2409. const struct YuvConstants* yuvconstants,
  2410. int width);
  2411. void NV21ToARGBRow_Any_NEON(const uint8* src_y,
  2412. const uint8* src_vu,
  2413. uint8* dst_argb,
  2414. const struct YuvConstants* yuvconstants,
  2415. int width);
  2416. void NV12ToRGB565Row_Any_NEON(const uint8* src_y,
  2417. const uint8* src_uv,
  2418. uint8* dst_argb,
  2419. const struct YuvConstants* yuvconstants,
  2420. int width);
  2421. void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2,
  2422. uint8* dst_argb,
  2423. const struct YuvConstants* yuvconstants,
  2424. int width);
  2425. void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy,
  2426. uint8* dst_argb,
  2427. const struct YuvConstants* yuvconstants,
  2428. int width);
  2429. void I444ToARGBRow_Any_DSPR2(const uint8* src_y,
  2430. const uint8* src_u,
  2431. const uint8* src_v,
  2432. uint8* dst_argb,
  2433. const struct YuvConstants* yuvconstants,
  2434. int width);
  2435. void I422ToARGB4444Row_Any_DSPR2(const uint8* src_y,
  2436. const uint8* src_u,
  2437. const uint8* src_v,
  2438. uint8* dst_argb,
  2439. const struct YuvConstants* yuvconstants,
  2440. int width);
  2441. void I422ToARGBRow_Any_DSPR2(const uint8* src_y,
  2442. const uint8* src_u,
  2443. const uint8* src_v,
  2444. uint8* dst_argb,
  2445. const struct YuvConstants* yuvconstants,
  2446. int width);
  2447. void I422ToARGBRow_DSPR2(const uint8* src_y,
  2448. const uint8* src_u,
  2449. const uint8* src_v,
  2450. uint8* dst_argb,
  2451. const struct YuvConstants* yuvconstants,
  2452. int width);
  2453. void I422ToARGB1555Row_Any_DSPR2(const uint8* src_y,
  2454. const uint8* src_u,
  2455. const uint8* src_v,
  2456. uint8* dst_argb,
  2457. const struct YuvConstants* yuvconstants,
  2458. int width);
  2459. void I411ToARGBRow_Any_DSPR2(const uint8* src_y,
  2460. const uint8* src_u,
  2461. const uint8* src_v,
  2462. uint8* dst_argb,
  2463. const struct YuvConstants* yuvconstants,
  2464. int width);
  2465. void NV12ToARGBRow_Any_DSPR2(const uint8* src_y,
  2466. const uint8* src_uv,
  2467. uint8* dst_argb,
  2468. const struct YuvConstants* yuvconstants,
  2469. int width);
  2470. void I422ToARGBRow_DSPR2(const uint8* src_y,
  2471. const uint8* src_u,
  2472. const uint8* src_v,
  2473. uint8* dst_argb,
  2474. const struct YuvConstants* yuvconstants,
  2475. int width);
  2476. void I444ToARGBRow_Any_MSA(const uint8* src_y,
  2477. const uint8* src_u,
  2478. const uint8* src_v,
  2479. uint8* dst_argb,
  2480. const struct YuvConstants* yuvconstants,
  2481. int width);
  2482. void I422ToARGBRow_Any_MSA(const uint8* src_y,
  2483. const uint8* src_u,
  2484. const uint8* src_v,
  2485. uint8* dst_argb,
  2486. const struct YuvConstants* yuvconstants,
  2487. int width);
  2488. void I422ToRGBARow_Any_MSA(const uint8* src_y,
  2489. const uint8* src_u,
  2490. const uint8* src_v,
  2491. uint8* dst_argb,
  2492. const struct YuvConstants* yuvconstants,
  2493. int width);
  2494. void I422AlphaToARGBRow_Any_MSA(const uint8* src_y,
  2495. const uint8* src_u,
  2496. const uint8* src_v,
  2497. const uint8* src_a,
  2498. uint8* dst_argb,
  2499. const struct YuvConstants* yuvconstants,
  2500. int width);
  2501. void I422ToRGB24Row_Any_MSA(const uint8* src_y,
  2502. const uint8* src_u,
  2503. const uint8* src_v,
  2504. uint8* dst_rgb24,
  2505. const struct YuvConstants* yuvconstants,
  2506. int width);
  2507. void I422ToRGB565Row_Any_MSA(const uint8* src_y,
  2508. const uint8* src_u,
  2509. const uint8* src_v,
  2510. uint8* dst_rgb565,
  2511. const struct YuvConstants* yuvconstants,
  2512. int width);
  2513. void I422ToARGB4444Row_Any_MSA(const uint8* src_y,
  2514. const uint8* src_u,
  2515. const uint8* src_v,
  2516. uint8* dst_argb4444,
  2517. const struct YuvConstants* yuvconstants,
  2518. int width);
  2519. void I422ToARGB1555Row_Any_MSA(const uint8* src_y,
  2520. const uint8* src_u,
  2521. const uint8* src_v,
  2522. uint8* dst_argb1555,
  2523. const struct YuvConstants* yuvconstants,
  2524. int width);
  2525. void NV12ToARGBRow_Any_MSA(const uint8* src_y,
  2526. const uint8* src_uv,
  2527. uint8* dst_argb,
  2528. const struct YuvConstants* yuvconstants,
  2529. int width);
  2530. void NV12ToRGB565Row_Any_MSA(const uint8* src_y,
  2531. const uint8* src_uv,
  2532. uint8* dst_argb,
  2533. const struct YuvConstants* yuvconstants,
  2534. int width);
  2535. void NV21ToARGBRow_Any_MSA(const uint8* src_y,
  2536. const uint8* src_vu,
  2537. uint8* dst_argb,
  2538. const struct YuvConstants* yuvconstants,
  2539. int width);
  2540. void YUY2ToARGBRow_Any_MSA(const uint8* src_yuy2,
  2541. uint8* dst_argb,
  2542. const struct YuvConstants* yuvconstants,
  2543. int width);
  2544. void UYVYToARGBRow_Any_MSA(const uint8* src_uyvy,
  2545. uint8* dst_argb,
  2546. const struct YuvConstants* yuvconstants,
  2547. int width);
  2548. void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int width);
  2549. void YUY2ToUVRow_AVX2(const uint8* src_yuy2,
  2550. int stride_yuy2,
  2551. uint8* dst_u,
  2552. uint8* dst_v,
  2553. int width);
  2554. void YUY2ToUV422Row_AVX2(const uint8* src_yuy2,
  2555. uint8* dst_u,
  2556. uint8* dst_v,
  2557. int width);
  2558. void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int width);
  2559. void YUY2ToUVRow_SSE2(const uint8* src_yuy2,
  2560. int stride_yuy2,
  2561. uint8* dst_u,
  2562. uint8* dst_v,
  2563. int width);
  2564. void YUY2ToUV422Row_SSE2(const uint8* src_yuy2,
  2565. uint8* dst_u,
  2566. uint8* dst_v,
  2567. int width);
  2568. void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int width);
  2569. void YUY2ToUVRow_NEON(const uint8* src_yuy2,
  2570. int stride_yuy2,
  2571. uint8* dst_u,
  2572. uint8* dst_v,
  2573. int width);
  2574. void YUY2ToUV422Row_NEON(const uint8* src_yuy2,
  2575. uint8* dst_u,
  2576. uint8* dst_v,
  2577. int width);
  2578. void YUY2ToYRow_MSA(const uint8* src_yuy2, uint8* dst_y, int width);
  2579. void YUY2ToUVRow_MSA(const uint8* src_yuy2,
  2580. int stride_yuy2,
  2581. uint8* dst_u,
  2582. uint8* dst_v,
  2583. int width);
  2584. void YUY2ToUV422Row_MSA(const uint8* src_yuy2,
  2585. uint8* dst_u,
  2586. uint8* dst_v,
  2587. int width);
  2588. void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int width);
  2589. void YUY2ToUVRow_C(const uint8* src_yuy2,
  2590. int stride_yuy2,
  2591. uint8* dst_u,
  2592. uint8* dst_v,
  2593. int width);
  2594. void YUY2ToUV422Row_C(const uint8* src_yuy2,
  2595. uint8* dst_u,
  2596. uint8* dst_v,
  2597. int width);
  2598. void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int width);
  2599. void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2,
  2600. int stride_yuy2,
  2601. uint8* dst_u,
  2602. uint8* dst_v,
  2603. int width);
  2604. void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2,
  2605. uint8* dst_u,
  2606. uint8* dst_v,
  2607. int width);
  2608. void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int width);
  2609. void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2,
  2610. int stride_yuy2,
  2611. uint8* dst_u,
  2612. uint8* dst_v,
  2613. int width);
  2614. void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2,
  2615. uint8* dst_u,
  2616. uint8* dst_v,
  2617. int width);
  2618. void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int width);
  2619. void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2,
  2620. int stride_yuy2,
  2621. uint8* dst_u,
  2622. uint8* dst_v,
  2623. int width);
  2624. void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2,
  2625. uint8* dst_u,
  2626. uint8* dst_v,
  2627. int width);
  2628. void YUY2ToYRow_Any_MSA(const uint8* src_yuy2, uint8* dst_y, int width);
  2629. void YUY2ToUVRow_Any_MSA(const uint8* src_yuy2,
  2630. int stride_yuy2,
  2631. uint8* dst_u,
  2632. uint8* dst_v,
  2633. int width);
  2634. void YUY2ToUV422Row_Any_MSA(const uint8* src_yuy2,
  2635. uint8* dst_u,
  2636. uint8* dst_v,
  2637. int width);
  2638. void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
  2639. void UYVYToUVRow_AVX2(const uint8* src_uyvy,
  2640. int stride_uyvy,
  2641. uint8* dst_u,
  2642. uint8* dst_v,
  2643. int width);
  2644. void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
  2645. uint8* dst_u,
  2646. uint8* dst_v,
  2647. int width);
  2648. void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int width);
  2649. void UYVYToUVRow_SSE2(const uint8* src_uyvy,
  2650. int stride_uyvy,
  2651. uint8* dst_u,
  2652. uint8* dst_v,
  2653. int width);
  2654. void UYVYToUV422Row_SSE2(const uint8* src_uyvy,
  2655. uint8* dst_u,
  2656. uint8* dst_v,
  2657. int width);
  2658. void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
  2659. void UYVYToUVRow_AVX2(const uint8* src_uyvy,
  2660. int stride_uyvy,
  2661. uint8* dst_u,
  2662. uint8* dst_v,
  2663. int width);
  2664. void UYVYToUV422Row_AVX2(const uint8* src_uyvy,
  2665. uint8* dst_u,
  2666. uint8* dst_v,
  2667. int width);
  2668. void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int width);
  2669. void UYVYToUVRow_NEON(const uint8* src_uyvy,
  2670. int stride_uyvy,
  2671. uint8* dst_u,
  2672. uint8* dst_v,
  2673. int width);
  2674. void UYVYToUV422Row_NEON(const uint8* src_uyvy,
  2675. uint8* dst_u,
  2676. uint8* dst_v,
  2677. int width);
  2678. void UYVYToYRow_MSA(const uint8* src_uyvy, uint8* dst_y, int width);
  2679. void UYVYToUVRow_MSA(const uint8* src_uyvy,
  2680. int stride_uyvy,
  2681. uint8* dst_u,
  2682. uint8* dst_v,
  2683. int width);
  2684. void UYVYToUV422Row_MSA(const uint8* src_uyvy,
  2685. uint8* dst_u,
  2686. uint8* dst_v,
  2687. int width);
  2688. void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int width);
  2689. void UYVYToUVRow_C(const uint8* src_uyvy,
  2690. int stride_uyvy,
  2691. uint8* dst_u,
  2692. uint8* dst_v,
  2693. int width);
  2694. void UYVYToUV422Row_C(const uint8* src_uyvy,
  2695. uint8* dst_u,
  2696. uint8* dst_v,
  2697. int width);
  2698. void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int width);
  2699. void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy,
  2700. int stride_uyvy,
  2701. uint8* dst_u,
  2702. uint8* dst_v,
  2703. int width);
  2704. void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy,
  2705. uint8* dst_u,
  2706. uint8* dst_v,
  2707. int width);
  2708. void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int width);
  2709. void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy,
  2710. int stride_uyvy,
  2711. uint8* dst_u,
  2712. uint8* dst_v,
  2713. int width);
  2714. void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy,
  2715. uint8* dst_u,
  2716. uint8* dst_v,
  2717. int width);
  2718. void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int width);
  2719. void UYVYToUVRow_Any_NEON(const uint8* src_uyvy,
  2720. int stride_uyvy,
  2721. uint8* dst_u,
  2722. uint8* dst_v,
  2723. int width);
  2724. void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy,
  2725. uint8* dst_u,
  2726. uint8* dst_v,
  2727. int width);
  2728. void UYVYToYRow_Any_MSA(const uint8* src_uyvy, uint8* dst_y, int width);
  2729. void UYVYToUVRow_Any_MSA(const uint8* src_uyvy,
  2730. int stride_uyvy,
  2731. uint8* dst_u,
  2732. uint8* dst_v,
  2733. int width);
  2734. void UYVYToUV422Row_Any_MSA(const uint8* src_uyvy,
  2735. uint8* dst_u,
  2736. uint8* dst_v,
  2737. int width);
  2738. void I422ToYUY2Row_C(const uint8* src_y,
  2739. const uint8* src_u,
  2740. const uint8* src_v,
  2741. uint8* dst_yuy2,
  2742. int width);
  2743. void I422ToUYVYRow_C(const uint8* src_y,
  2744. const uint8* src_u,
  2745. const uint8* src_v,
  2746. uint8* dst_uyvy,
  2747. int width);
  2748. void I422ToYUY2Row_SSE2(const uint8* src_y,
  2749. const uint8* src_u,
  2750. const uint8* src_v,
  2751. uint8* dst_yuy2,
  2752. int width);
  2753. void I422ToUYVYRow_SSE2(const uint8* src_y,
  2754. const uint8* src_u,
  2755. const uint8* src_v,
  2756. uint8* dst_uyvy,
  2757. int width);
  2758. void I422ToYUY2Row_Any_SSE2(const uint8* src_y,
  2759. const uint8* src_u,
  2760. const uint8* src_v,
  2761. uint8* dst_yuy2,
  2762. int width);
  2763. void I422ToUYVYRow_Any_SSE2(const uint8* src_y,
  2764. const uint8* src_u,
  2765. const uint8* src_v,
  2766. uint8* dst_uyvy,
  2767. int width);
  2768. void I422ToYUY2Row_NEON(const uint8* src_y,
  2769. const uint8* src_u,
  2770. const uint8* src_v,
  2771. uint8* dst_yuy2,
  2772. int width);
  2773. void I422ToUYVYRow_NEON(const uint8* src_y,
  2774. const uint8* src_u,
  2775. const uint8* src_v,
  2776. uint8* dst_uyvy,
  2777. int width);
  2778. void I422ToYUY2Row_Any_NEON(const uint8* src_y,
  2779. const uint8* src_u,
  2780. const uint8* src_v,
  2781. uint8* dst_yuy2,
  2782. int width);
  2783. void I422ToUYVYRow_Any_NEON(const uint8* src_y,
  2784. const uint8* src_u,
  2785. const uint8* src_v,
  2786. uint8* dst_uyvy,
  2787. int width);
  2788. void I422ToYUY2Row_MSA(const uint8* src_y,
  2789. const uint8* src_u,
  2790. const uint8* src_v,
  2791. uint8* dst_yuy2,
  2792. int width);
  2793. void I422ToUYVYRow_MSA(const uint8* src_y,
  2794. const uint8* src_u,
  2795. const uint8* src_v,
  2796. uint8* dst_uyvy,
  2797. int width);
  2798. void I422ToYUY2Row_Any_MSA(const uint8* src_y,
  2799. const uint8* src_u,
  2800. const uint8* src_v,
  2801. uint8* dst_yuy2,
  2802. int width);
  2803. void I422ToUYVYRow_Any_MSA(const uint8* src_y,
  2804. const uint8* src_u,
  2805. const uint8* src_v,
  2806. uint8* dst_uyvy,
  2807. int width);
  2808. // Effects related row functions.
  2809. void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  2810. void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
  2811. void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
  2812. void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
  2813. void ARGBAttenuateRow_MSA(const uint8* src_argb, uint8* dst_argb, int width);
  2814. void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb,
  2815. uint8* dst_argb,
  2816. int width);
  2817. void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb,
  2818. uint8* dst_argb,
  2819. int width);
  2820. void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb,
  2821. uint8* dst_argb,
  2822. int width);
  2823. void ARGBAttenuateRow_Any_NEON(const uint8* src_argb,
  2824. uint8* dst_argb,
  2825. int width);
  2826. void ARGBAttenuateRow_Any_MSA(const uint8* src_argb,
  2827. uint8* dst_argb,
  2828. int width);
  2829. // Inverse table for unattenuate, shared by C and SSE2.
  2830. extern const uint32 fixed_invtbl8[256];
  2831. void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  2832. void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width);
  2833. void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width);
  2834. void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb,
  2835. uint8* dst_argb,
  2836. int width);
  2837. void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb,
  2838. uint8* dst_argb,
  2839. int width);
  2840. void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width);
  2841. void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width);
  2842. void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width);
  2843. void ARGBGrayRow_MSA(const uint8* src_argb, uint8* dst_argb, int width);
  2844. void ARGBSepiaRow_C(uint8* dst_argb, int width);
  2845. void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width);
  2846. void ARGBSepiaRow_NEON(uint8* dst_argb, int width);
  2847. void ARGBSepiaRow_MSA(uint8* dst_argb, int width);
  2848. void ARGBColorMatrixRow_C(const uint8* src_argb,
  2849. uint8* dst_argb,
  2850. const int8* matrix_argb,
  2851. int width);
  2852. void ARGBColorMatrixRow_SSSE3(const uint8* src_argb,
  2853. uint8* dst_argb,
  2854. const int8* matrix_argb,
  2855. int width);
  2856. void ARGBColorMatrixRow_NEON(const uint8* src_argb,
  2857. uint8* dst_argb,
  2858. const int8* matrix_argb,
  2859. int width);
  2860. void ARGBColorMatrixRow_MSA(const uint8* src_argb,
  2861. uint8* dst_argb,
  2862. const int8* matrix_argb,
  2863. int width);
  2864. void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
  2865. void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
  2866. void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width);
  2867. void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width);
  2868. void ARGBQuantizeRow_C(uint8* dst_argb,
  2869. int scale,
  2870. int interval_size,
  2871. int interval_offset,
  2872. int width);
  2873. void ARGBQuantizeRow_SSE2(uint8* dst_argb,
  2874. int scale,
  2875. int interval_size,
  2876. int interval_offset,
  2877. int width);
  2878. void ARGBQuantizeRow_NEON(uint8* dst_argb,
  2879. int scale,
  2880. int interval_size,
  2881. int interval_offset,
  2882. int width);
  2883. void ARGBQuantizeRow_MSA(uint8* dst_argb,
  2884. int scale,
  2885. int interval_size,
  2886. int interval_offset,
  2887. int width);
  2888. void ARGBShadeRow_C(const uint8* src_argb,
  2889. uint8* dst_argb,
  2890. int width,
  2891. uint32 value);
  2892. void ARGBShadeRow_SSE2(const uint8* src_argb,
  2893. uint8* dst_argb,
  2894. int width,
  2895. uint32 value);
  2896. void ARGBShadeRow_NEON(const uint8* src_argb,
  2897. uint8* dst_argb,
  2898. int width,
  2899. uint32 value);
  2900. void ARGBShadeRow_MSA(const uint8* src_argb,
  2901. uint8* dst_argb,
  2902. int width,
  2903. uint32 value);
  2904. // Used for blur.
  2905. void CumulativeSumToAverageRow_SSE2(const int32* topleft,
  2906. const int32* botleft,
  2907. int width,
  2908. int area,
  2909. uint8* dst,
  2910. int count);
  2911. void ComputeCumulativeSumRow_SSE2(const uint8* row,
  2912. int32* cumsum,
  2913. const int32* previous_cumsum,
  2914. int width);
  2915. void CumulativeSumToAverageRow_C(const int32* topleft,
  2916. const int32* botleft,
  2917. int width,
  2918. int area,
  2919. uint8* dst,
  2920. int count);
  2921. void ComputeCumulativeSumRow_C(const uint8* row,
  2922. int32* cumsum,
  2923. const int32* previous_cumsum,
  2924. int width);
  2925. LIBYUV_API
  2926. void ARGBAffineRow_C(const uint8* src_argb,
  2927. int src_argb_stride,
  2928. uint8* dst_argb,
  2929. const float* uv_dudv,
  2930. int width);
  2931. LIBYUV_API
  2932. void ARGBAffineRow_SSE2(const uint8* src_argb,
  2933. int src_argb_stride,
  2934. uint8* dst_argb,
  2935. const float* uv_dudv,
  2936. int width);
  2937. // Used for I420Scale, ARGBScale, and ARGBInterpolate.
  2938. void InterpolateRow_C(uint8* dst_ptr,
  2939. const uint8* src_ptr,
  2940. ptrdiff_t src_stride_ptr,
  2941. int width,
  2942. int source_y_fraction);
  2943. void InterpolateRow_SSSE3(uint8* dst_ptr,
  2944. const uint8* src_ptr,
  2945. ptrdiff_t src_stride_ptr,
  2946. int width,
  2947. int source_y_fraction);
  2948. void InterpolateRow_AVX2(uint8* dst_ptr,
  2949. const uint8* src_ptr,
  2950. ptrdiff_t src_stride_ptr,
  2951. int width,
  2952. int source_y_fraction);
  2953. void InterpolateRow_NEON(uint8* dst_ptr,
  2954. const uint8* src_ptr,
  2955. ptrdiff_t src_stride_ptr,
  2956. int width,
  2957. int source_y_fraction);
  2958. void InterpolateRow_DSPR2(uint8* dst_ptr,
  2959. const uint8* src_ptr,
  2960. ptrdiff_t src_stride_ptr,
  2961. int width,
  2962. int source_y_fraction);
  2963. void InterpolateRow_MSA(uint8* dst_ptr,
  2964. const uint8* src_ptr,
  2965. ptrdiff_t src_stride_ptr,
  2966. int width,
  2967. int source_y_fraction);
  2968. void InterpolateRow_Any_NEON(uint8* dst_ptr,
  2969. const uint8* src_ptr,
  2970. ptrdiff_t src_stride_ptr,
  2971. int width,
  2972. int source_y_fraction);
  2973. void InterpolateRow_Any_SSSE3(uint8* dst_ptr,
  2974. const uint8* src_ptr,
  2975. ptrdiff_t src_stride_ptr,
  2976. int width,
  2977. int source_y_fraction);
  2978. void InterpolateRow_Any_AVX2(uint8* dst_ptr,
  2979. const uint8* src_ptr,
  2980. ptrdiff_t src_stride_ptr,
  2981. int width,
  2982. int source_y_fraction);
  2983. void InterpolateRow_Any_DSPR2(uint8* dst_ptr,
  2984. const uint8* src_ptr,
  2985. ptrdiff_t src_stride_ptr,
  2986. int width,
  2987. int source_y_fraction);
  2988. void InterpolateRow_Any_MSA(uint8* dst_ptr,
  2989. const uint8* src_ptr,
  2990. ptrdiff_t src_stride_ptr,
  2991. int width,
  2992. int source_y_fraction);
  2993. void InterpolateRow_16_C(uint16* dst_ptr,
  2994. const uint16* src_ptr,
  2995. ptrdiff_t src_stride_ptr,
  2996. int width,
  2997. int source_y_fraction);
  2998. // Sobel images.
  2999. void SobelXRow_C(const uint8* src_y0,
  3000. const uint8* src_y1,
  3001. const uint8* src_y2,
  3002. uint8* dst_sobelx,
  3003. int width);
  3004. void SobelXRow_SSE2(const uint8* src_y0,
  3005. const uint8* src_y1,
  3006. const uint8* src_y2,
  3007. uint8* dst_sobelx,
  3008. int width);
  3009. void SobelXRow_NEON(const uint8* src_y0,
  3010. const uint8* src_y1,
  3011. const uint8* src_y2,
  3012. uint8* dst_sobelx,
  3013. int width);
  3014. void SobelXRow_MSA(const uint8* src_y0,
  3015. const uint8* src_y1,
  3016. const uint8* src_y2,
  3017. uint8* dst_sobelx,
  3018. int width);
  3019. void SobelYRow_C(const uint8* src_y0,
  3020. const uint8* src_y1,
  3021. uint8* dst_sobely,
  3022. int width);
  3023. void SobelYRow_SSE2(const uint8* src_y0,
  3024. const uint8* src_y1,
  3025. uint8* dst_sobely,
  3026. int width);
  3027. void SobelYRow_NEON(const uint8* src_y0,
  3028. const uint8* src_y1,
  3029. uint8* dst_sobely,
  3030. int width);
  3031. void SobelYRow_MSA(const uint8* src_y0,
  3032. const uint8* src_y1,
  3033. uint8* dst_sobely,
  3034. int width);
  3035. void SobelRow_C(const uint8* src_sobelx,
  3036. const uint8* src_sobely,
  3037. uint8* dst_argb,
  3038. int width);
  3039. void SobelRow_SSE2(const uint8* src_sobelx,
  3040. const uint8* src_sobely,
  3041. uint8* dst_argb,
  3042. int width);
  3043. void SobelRow_NEON(const uint8* src_sobelx,
  3044. const uint8* src_sobely,
  3045. uint8* dst_argb,
  3046. int width);
  3047. void SobelRow_MSA(const uint8* src_sobelx,
  3048. const uint8* src_sobely,
  3049. uint8* dst_argb,
  3050. int width);
  3051. void SobelToPlaneRow_C(const uint8* src_sobelx,
  3052. const uint8* src_sobely,
  3053. uint8* dst_y,
  3054. int width);
  3055. void SobelToPlaneRow_SSE2(const uint8* src_sobelx,
  3056. const uint8* src_sobely,
  3057. uint8* dst_y,
  3058. int width);
  3059. void SobelToPlaneRow_NEON(const uint8* src_sobelx,
  3060. const uint8* src_sobely,
  3061. uint8* dst_y,
  3062. int width);
  3063. void SobelToPlaneRow_MSA(const uint8* src_sobelx,
  3064. const uint8* src_sobely,
  3065. uint8* dst_y,
  3066. int width);
  3067. void SobelXYRow_C(const uint8* src_sobelx,
  3068. const uint8* src_sobely,
  3069. uint8* dst_argb,
  3070. int width);
  3071. void SobelXYRow_SSE2(const uint8* src_sobelx,
  3072. const uint8* src_sobely,
  3073. uint8* dst_argb,
  3074. int width);
  3075. void SobelXYRow_NEON(const uint8* src_sobelx,
  3076. const uint8* src_sobely,
  3077. uint8* dst_argb,
  3078. int width);
  3079. void SobelXYRow_MSA(const uint8* src_sobelx,
  3080. const uint8* src_sobely,
  3081. uint8* dst_argb,
  3082. int width);
  3083. void SobelRow_Any_SSE2(const uint8* src_sobelx,
  3084. const uint8* src_sobely,
  3085. uint8* dst_argb,
  3086. int width);
  3087. void SobelRow_Any_NEON(const uint8* src_sobelx,
  3088. const uint8* src_sobely,
  3089. uint8* dst_argb,
  3090. int width);
  3091. void SobelRow_Any_MSA(const uint8* src_sobelx,
  3092. const uint8* src_sobely,
  3093. uint8* dst_argb,
  3094. int width);
  3095. void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx,
  3096. const uint8* src_sobely,
  3097. uint8* dst_y,
  3098. int width);
  3099. void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx,
  3100. const uint8* src_sobely,
  3101. uint8* dst_y,
  3102. int width);
  3103. void SobelToPlaneRow_Any_MSA(const uint8* src_sobelx,
  3104. const uint8* src_sobely,
  3105. uint8* dst_y,
  3106. int width);
  3107. void SobelXYRow_Any_SSE2(const uint8* src_sobelx,
  3108. const uint8* src_sobely,
  3109. uint8* dst_argb,
  3110. int width);
  3111. void SobelXYRow_Any_NEON(const uint8* src_sobelx,
  3112. const uint8* src_sobely,
  3113. uint8* dst_argb,
  3114. int width);
  3115. void SobelXYRow_Any_MSA(const uint8* src_sobelx,
  3116. const uint8* src_sobely,
  3117. uint8* dst_argb,
  3118. int width);
  3119. void ARGBPolynomialRow_C(const uint8* src_argb,
  3120. uint8* dst_argb,
  3121. const float* poly,
  3122. int width);
  3123. void ARGBPolynomialRow_SSE2(const uint8* src_argb,
  3124. uint8* dst_argb,
  3125. const float* poly,
  3126. int width);
  3127. void ARGBPolynomialRow_AVX2(const uint8* src_argb,
  3128. uint8* dst_argb,
  3129. const float* poly,
  3130. int width);
  3131. // Scale and convert to half float.
  3132. void HalfFloatRow_C(const uint16* src, uint16* dst, float scale, int width);
  3133. void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width);
  3134. void HalfFloatRow_Any_SSE2(const uint16* src,
  3135. uint16* dst,
  3136. float scale,
  3137. int width);
  3138. void HalfFloatRow_AVX2(const uint16* src, uint16* dst, float scale, int width);
  3139. void HalfFloatRow_Any_AVX2(const uint16* src,
  3140. uint16* dst,
  3141. float scale,
  3142. int width);
  3143. void HalfFloatRow_F16C(const uint16* src, uint16* dst, float scale, int width);
  3144. void HalfFloatRow_Any_F16C(const uint16* src,
  3145. uint16* dst,
  3146. float scale,
  3147. int width);
  3148. void HalfFloat1Row_F16C(const uint16* src, uint16* dst, float scale, int width);
  3149. void HalfFloat1Row_Any_F16C(const uint16* src,
  3150. uint16* dst,
  3151. float scale,
  3152. int width);
  3153. void HalfFloatRow_NEON(const uint16* src, uint16* dst, float scale, int width);
  3154. void HalfFloatRow_Any_NEON(const uint16* src,
  3155. uint16* dst,
  3156. float scale,
  3157. int width);
  3158. void HalfFloat1Row_NEON(const uint16* src, uint16* dst, float scale, int width);
  3159. void HalfFloat1Row_Any_NEON(const uint16* src,
  3160. uint16* dst,
  3161. float scale,
  3162. int width);
  3163. void HalfFloatRow_MSA(const uint16* src, uint16* dst, float scale, int width);
  3164. void HalfFloatRow_Any_MSA(const uint16* src,
  3165. uint16* dst,
  3166. float scale,
  3167. int width);
  3168. void ARGBLumaColorTableRow_C(const uint8* src_argb,
  3169. uint8* dst_argb,
  3170. int width,
  3171. const uint8* luma,
  3172. uint32 lumacoeff);
  3173. void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb,
  3174. uint8* dst_argb,
  3175. int width,
  3176. const uint8* luma,
  3177. uint32 lumacoeff);
  3178. float ScaleMaxSamples_C(const float* src, float* dst, float scale, int width);
  3179. float ScaleMaxSamples_NEON(const float* src,
  3180. float* dst,
  3181. float scale,
  3182. int width);
  3183. float ScaleSumSamples_C(const float* src, float* dst, float scale, int width);
  3184. float ScaleSumSamples_NEON(const float* src,
  3185. float* dst,
  3186. float scale,
  3187. int width);
  3188. void ScaleSamples_C(const float* src, float* dst, float scale, int width);
  3189. void ScaleSamples_NEON(const float* src, float* dst, float scale, int width);
  3190. #ifdef __cplusplus
  3191. } // extern "C"
  3192. } // namespace libyuv
  3193. #endif
  3194. #endif // INCLUDE_LIBYUV_ROW_H_