scale_row.h 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  1. /*
  2. * Copyright 2013 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_SCALE_ROW_H_
  11. #define INCLUDE_LIBYUV_SCALE_ROW_H_
  12. #include "libyuv/basic_types.h"
  13. #include "libyuv/scale.h"
  14. #ifdef __cplusplus
  15. namespace libyuv {
  16. extern "C" {
  17. #endif
  18. #if defined(__pnacl__) || defined(__CLR_VER) || \
  19. (defined(__native_client__) && defined(__x86_64__)) || \
  20. (defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
  21. #define LIBYUV_DISABLE_X86
  22. #endif
  23. #if defined(__native_client__)
  24. #define LIBYUV_DISABLE_NEON
  25. #endif
  26. // MemorySanitizer does not support assembly code yet. http://crbug.com/344505
  27. #if defined(__has_feature)
  28. #if __has_feature(memory_sanitizer)
  29. #define LIBYUV_DISABLE_X86
  30. #endif
  31. #endif
  32. // GCC >= 4.7.0 required for AVX2.
  33. #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
  34. #if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7))
  35. #define GCC_HAS_AVX2 1
  36. #endif // GNUC >= 4.7
  37. #endif // __GNUC__
  38. // clang >= 3.4.0 required for AVX2.
  39. #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
  40. #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
  41. #define CLANG_HAS_AVX2 1
  42. #endif // clang >= 3.4
  43. #endif // __clang__
  44. // Visual C 2012 required for AVX2.
  45. #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
  46. _MSC_VER >= 1700
  47. #define VISUALC_HAS_AVX2 1
  48. #endif // VisualStudio >= 2012
  49. // The following are available on all x86 platforms:
  50. #if !defined(LIBYUV_DISABLE_X86) && \
  51. (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
  52. #define HAS_FIXEDDIV1_X86
  53. #define HAS_FIXEDDIV_X86
  54. #define HAS_SCALEADDROW_SSE2
  55. #define HAS_SCALEARGBCOLS_SSE2
  56. #define HAS_SCALEARGBCOLSUP2_SSE2
  57. #define HAS_SCALEARGBFILTERCOLS_SSSE3
  58. #define HAS_SCALEARGBROWDOWN2_SSE2
  59. #define HAS_SCALEARGBROWDOWNEVEN_SSE2
  60. #define HAS_SCALECOLSUP2_SSE2
  61. #define HAS_SCALEFILTERCOLS_SSSE3
  62. #define HAS_SCALEROWDOWN2_SSSE3
  63. #define HAS_SCALEROWDOWN34_SSSE3
  64. #define HAS_SCALEROWDOWN38_SSSE3
  65. #define HAS_SCALEROWDOWN4_SSSE3
  66. #endif
  67. // The following are available on all x86 platforms, but
  68. // require VS2012, clang 3.4 or gcc 4.7.
  69. // The code supports NaCL but requires a new compiler and validator.
  70. #if !defined(LIBYUV_DISABLE_X86) && \
  71. (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \
  72. defined(GCC_HAS_AVX2))
  73. #define HAS_SCALEADDROW_AVX2
  74. #define HAS_SCALEROWDOWN2_AVX2
  75. #define HAS_SCALEROWDOWN4_AVX2
  76. #endif
  77. // The following are available on Neon platforms:
  78. #if !defined(LIBYUV_DISABLE_NEON) && \
  79. (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
  80. #define HAS_SCALEADDROW_NEON
  81. #define HAS_SCALEARGBCOLS_NEON
  82. #define HAS_SCALEARGBFILTERCOLS_NEON
  83. #define HAS_SCALEARGBROWDOWN2_NEON
  84. #define HAS_SCALEARGBROWDOWNEVEN_NEON
  85. #define HAS_SCALEFILTERCOLS_NEON
  86. #define HAS_SCALEROWDOWN2_NEON
  87. #define HAS_SCALEROWDOWN34_NEON
  88. #define HAS_SCALEROWDOWN38_NEON
  89. #define HAS_SCALEROWDOWN4_NEON
  90. #endif
  91. #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
  92. #define HAS_SCALEADDROW_MSA
  93. #define HAS_SCALEARGBCOLS_MSA
  94. #define HAS_SCALEARGBFILTERCOLS_MSA
  95. #define HAS_SCALEARGBROWDOWN2_MSA
  96. #define HAS_SCALEARGBROWDOWNEVEN_MSA
  97. #define HAS_SCALEFILTERCOLS_MSA
  98. #define HAS_SCALEROWDOWN2_MSA
  99. #define HAS_SCALEROWDOWN34_MSA
  100. #define HAS_SCALEROWDOWN38_MSA
  101. #define HAS_SCALEROWDOWN4_MSA
  102. #endif
  103. #if !defined(LIBYUV_DISABLE_MMI) && defined(_MIPS_ARCH_LOONGSON3A)
  104. #define HAS_FIXEDDIV1_MIPS
  105. #define HAS_FIXEDDIV_MIPS
  106. #define HAS_SCALEADDROW_16_MMI
  107. #define HAS_SCALEADDROW_MMI
  108. #define HAS_SCALEARGBCOLS_MMI
  109. #define HAS_SCALEARGBCOLSUP2_MMI
  110. #define HAS_SCALEARGBROWDOWN2_MMI
  111. #define HAS_SCALEARGBROWDOWNEVEN_MMI
  112. #define HAS_SCALECOLS_16_MMI
  113. #define HAS_SCALECOLS_MMI
  114. #define HAS_SCALEROWDOWN2_16_MMI
  115. #define HAS_SCALEROWDOWN2_MMI
  116. #define HAS_SCALEROWDOWN4_16_MMI
  117. #define HAS_SCALEROWDOWN4_MMI
  118. #define HAS_SCALEROWDOWN34_MMI
  119. #endif
  120. // Scale ARGB vertically with bilinear interpolation.
  121. void ScalePlaneVertical(int src_height,
  122. int dst_width,
  123. int dst_height,
  124. int src_stride,
  125. int dst_stride,
  126. const uint8_t* src_argb,
  127. uint8_t* dst_argb,
  128. int x,
  129. int y,
  130. int dy,
  131. int bpp,
  132. enum FilterMode filtering);
  133. void ScalePlaneVertical_16(int src_height,
  134. int dst_width,
  135. int dst_height,
  136. int src_stride,
  137. int dst_stride,
  138. const uint16_t* src_argb,
  139. uint16_t* dst_argb,
  140. int x,
  141. int y,
  142. int dy,
  143. int wpp,
  144. enum FilterMode filtering);
  145. // Simplify the filtering based on scale factors.
  146. enum FilterMode ScaleFilterReduce(int src_width,
  147. int src_height,
  148. int dst_width,
  149. int dst_height,
  150. enum FilterMode filtering);
  151. // Divide num by div and return as 16.16 fixed point result.
  152. int FixedDiv_C(int num, int div);
  153. int FixedDiv_X86(int num, int div);
  154. int FixedDiv_MIPS(int num, int div);
  155. // Divide num - 1 by div - 1 and return as 16.16 fixed point result.
  156. int FixedDiv1_C(int num, int div);
  157. int FixedDiv1_X86(int num, int div);
  158. int FixedDiv1_MIPS(int num, int div);
  159. #ifdef HAS_FIXEDDIV_X86
  160. #define FixedDiv FixedDiv_X86
  161. #define FixedDiv1 FixedDiv1_X86
  162. #elif defined HAS_FIXEDDIV_MIPS
  163. #define FixedDiv FixedDiv_MIPS
  164. #define FixedDiv1 FixedDiv1_MIPS
  165. #else
  166. #define FixedDiv FixedDiv_C
  167. #define FixedDiv1 FixedDiv1_C
  168. #endif
  169. // Compute slope values for stepping.
  170. void ScaleSlope(int src_width,
  171. int src_height,
  172. int dst_width,
  173. int dst_height,
  174. enum FilterMode filtering,
  175. int* x,
  176. int* y,
  177. int* dx,
  178. int* dy);
  179. void ScaleRowDown2_C(const uint8_t* src_ptr,
  180. ptrdiff_t src_stride,
  181. uint8_t* dst,
  182. int dst_width);
  183. void ScaleRowDown2_16_C(const uint16_t* src_ptr,
  184. ptrdiff_t src_stride,
  185. uint16_t* dst,
  186. int dst_width);
  187. void ScaleRowDown2Linear_C(const uint8_t* src_ptr,
  188. ptrdiff_t src_stride,
  189. uint8_t* dst,
  190. int dst_width);
  191. void ScaleRowDown2Linear_16_C(const uint16_t* src_ptr,
  192. ptrdiff_t src_stride,
  193. uint16_t* dst,
  194. int dst_width);
  195. void ScaleRowDown2Box_C(const uint8_t* src_ptr,
  196. ptrdiff_t src_stride,
  197. uint8_t* dst,
  198. int dst_width);
  199. void ScaleRowDown2Box_Odd_C(const uint8_t* src_ptr,
  200. ptrdiff_t src_stride,
  201. uint8_t* dst,
  202. int dst_width);
  203. void ScaleRowDown2Box_16_C(const uint16_t* src_ptr,
  204. ptrdiff_t src_stride,
  205. uint16_t* dst,
  206. int dst_width);
  207. void ScaleRowDown4_C(const uint8_t* src_ptr,
  208. ptrdiff_t src_stride,
  209. uint8_t* dst,
  210. int dst_width);
  211. void ScaleRowDown4_16_C(const uint16_t* src_ptr,
  212. ptrdiff_t src_stride,
  213. uint16_t* dst,
  214. int dst_width);
  215. void ScaleRowDown4Box_C(const uint8_t* src_ptr,
  216. ptrdiff_t src_stride,
  217. uint8_t* dst,
  218. int dst_width);
  219. void ScaleRowDown4Box_16_C(const uint16_t* src_ptr,
  220. ptrdiff_t src_stride,
  221. uint16_t* dst,
  222. int dst_width);
  223. void ScaleRowDown34_C(const uint8_t* src_ptr,
  224. ptrdiff_t src_stride,
  225. uint8_t* dst,
  226. int dst_width);
  227. void ScaleRowDown34_16_C(const uint16_t* src_ptr,
  228. ptrdiff_t src_stride,
  229. uint16_t* dst,
  230. int dst_width);
  231. void ScaleRowDown34_0_Box_C(const uint8_t* src_ptr,
  232. ptrdiff_t src_stride,
  233. uint8_t* d,
  234. int dst_width);
  235. void ScaleRowDown34_0_Box_16_C(const uint16_t* src_ptr,
  236. ptrdiff_t src_stride,
  237. uint16_t* d,
  238. int dst_width);
  239. void ScaleRowDown34_1_Box_C(const uint8_t* src_ptr,
  240. ptrdiff_t src_stride,
  241. uint8_t* d,
  242. int dst_width);
  243. void ScaleRowDown34_1_Box_16_C(const uint16_t* src_ptr,
  244. ptrdiff_t src_stride,
  245. uint16_t* d,
  246. int dst_width);
  247. void ScaleCols_C(uint8_t* dst_ptr,
  248. const uint8_t* src_ptr,
  249. int dst_width,
  250. int x,
  251. int dx);
  252. void ScaleCols_16_C(uint16_t* dst_ptr,
  253. const uint16_t* src_ptr,
  254. int dst_width,
  255. int x,
  256. int dx);
  257. void ScaleColsUp2_C(uint8_t* dst_ptr,
  258. const uint8_t* src_ptr,
  259. int dst_width,
  260. int,
  261. int);
  262. void ScaleColsUp2_16_C(uint16_t* dst_ptr,
  263. const uint16_t* src_ptr,
  264. int dst_width,
  265. int,
  266. int);
  267. void ScaleFilterCols_C(uint8_t* dst_ptr,
  268. const uint8_t* src_ptr,
  269. int dst_width,
  270. int x,
  271. int dx);
  272. void ScaleFilterCols_16_C(uint16_t* dst_ptr,
  273. const uint16_t* src_ptr,
  274. int dst_width,
  275. int x,
  276. int dx);
  277. void ScaleFilterCols64_C(uint8_t* dst_ptr,
  278. const uint8_t* src_ptr,
  279. int dst_width,
  280. int x32,
  281. int dx);
  282. void ScaleFilterCols64_16_C(uint16_t* dst_ptr,
  283. const uint16_t* src_ptr,
  284. int dst_width,
  285. int x32,
  286. int dx);
  287. void ScaleRowDown38_C(const uint8_t* src_ptr,
  288. ptrdiff_t src_stride,
  289. uint8_t* dst,
  290. int dst_width);
  291. void ScaleRowDown38_16_C(const uint16_t* src_ptr,
  292. ptrdiff_t src_stride,
  293. uint16_t* dst,
  294. int dst_width);
  295. void ScaleRowDown38_3_Box_C(const uint8_t* src_ptr,
  296. ptrdiff_t src_stride,
  297. uint8_t* dst_ptr,
  298. int dst_width);
  299. void ScaleRowDown38_3_Box_16_C(const uint16_t* src_ptr,
  300. ptrdiff_t src_stride,
  301. uint16_t* dst_ptr,
  302. int dst_width);
  303. void ScaleRowDown38_2_Box_C(const uint8_t* src_ptr,
  304. ptrdiff_t src_stride,
  305. uint8_t* dst_ptr,
  306. int dst_width);
  307. void ScaleRowDown38_2_Box_16_C(const uint16_t* src_ptr,
  308. ptrdiff_t src_stride,
  309. uint16_t* dst_ptr,
  310. int dst_width);
  311. void ScaleAddRow_C(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  312. void ScaleAddRow_16_C(const uint16_t* src_ptr,
  313. uint32_t* dst_ptr,
  314. int src_width);
  315. void ScaleARGBRowDown2_C(const uint8_t* src_argb,
  316. ptrdiff_t src_stride,
  317. uint8_t* dst_argb,
  318. int dst_width);
  319. void ScaleARGBRowDown2Linear_C(const uint8_t* src_argb,
  320. ptrdiff_t src_stride,
  321. uint8_t* dst_argb,
  322. int dst_width);
  323. void ScaleARGBRowDown2Box_C(const uint8_t* src_argb,
  324. ptrdiff_t src_stride,
  325. uint8_t* dst_argb,
  326. int dst_width);
  327. void ScaleARGBRowDownEven_C(const uint8_t* src_argb,
  328. ptrdiff_t src_stride,
  329. int src_stepx,
  330. uint8_t* dst_argb,
  331. int dst_width);
  332. void ScaleARGBRowDownEvenBox_C(const uint8_t* src_argb,
  333. ptrdiff_t src_stride,
  334. int src_stepx,
  335. uint8_t* dst_argb,
  336. int dst_width);
  337. void ScaleARGBCols_C(uint8_t* dst_argb,
  338. const uint8_t* src_argb,
  339. int dst_width,
  340. int x,
  341. int dx);
  342. void ScaleARGBCols64_C(uint8_t* dst_argb,
  343. const uint8_t* src_argb,
  344. int dst_width,
  345. int x32,
  346. int dx);
  347. void ScaleARGBColsUp2_C(uint8_t* dst_argb,
  348. const uint8_t* src_argb,
  349. int dst_width,
  350. int,
  351. int);
  352. void ScaleARGBFilterCols_C(uint8_t* dst_argb,
  353. const uint8_t* src_argb,
  354. int dst_width,
  355. int x,
  356. int dx);
  357. void ScaleARGBFilterCols64_C(uint8_t* dst_argb,
  358. const uint8_t* src_argb,
  359. int dst_width,
  360. int x32,
  361. int dx);
  362. // Specialized scalers for x86.
  363. void ScaleRowDown2_SSSE3(const uint8_t* src_ptr,
  364. ptrdiff_t src_stride,
  365. uint8_t* dst_ptr,
  366. int dst_width);
  367. void ScaleRowDown2Linear_SSSE3(const uint8_t* src_ptr,
  368. ptrdiff_t src_stride,
  369. uint8_t* dst_ptr,
  370. int dst_width);
  371. void ScaleRowDown2Box_SSSE3(const uint8_t* src_ptr,
  372. ptrdiff_t src_stride,
  373. uint8_t* dst_ptr,
  374. int dst_width);
  375. void ScaleRowDown2_AVX2(const uint8_t* src_ptr,
  376. ptrdiff_t src_stride,
  377. uint8_t* dst_ptr,
  378. int dst_width);
  379. void ScaleRowDown2Linear_AVX2(const uint8_t* src_ptr,
  380. ptrdiff_t src_stride,
  381. uint8_t* dst_ptr,
  382. int dst_width);
  383. void ScaleRowDown2Box_AVX2(const uint8_t* src_ptr,
  384. ptrdiff_t src_stride,
  385. uint8_t* dst_ptr,
  386. int dst_width);
  387. void ScaleRowDown4_SSSE3(const uint8_t* src_ptr,
  388. ptrdiff_t src_stride,
  389. uint8_t* dst_ptr,
  390. int dst_width);
  391. void ScaleRowDown4Box_SSSE3(const uint8_t* src_ptr,
  392. ptrdiff_t src_stride,
  393. uint8_t* dst_ptr,
  394. int dst_width);
  395. void ScaleRowDown4_AVX2(const uint8_t* src_ptr,
  396. ptrdiff_t src_stride,
  397. uint8_t* dst_ptr,
  398. int dst_width);
  399. void ScaleRowDown4Box_AVX2(const uint8_t* src_ptr,
  400. ptrdiff_t src_stride,
  401. uint8_t* dst_ptr,
  402. int dst_width);
  403. void ScaleRowDown34_SSSE3(const uint8_t* src_ptr,
  404. ptrdiff_t src_stride,
  405. uint8_t* dst_ptr,
  406. int dst_width);
  407. void ScaleRowDown34_1_Box_SSSE3(const uint8_t* src_ptr,
  408. ptrdiff_t src_stride,
  409. uint8_t* dst_ptr,
  410. int dst_width);
  411. void ScaleRowDown34_0_Box_SSSE3(const uint8_t* src_ptr,
  412. ptrdiff_t src_stride,
  413. uint8_t* dst_ptr,
  414. int dst_width);
  415. void ScaleRowDown38_SSSE3(const uint8_t* src_ptr,
  416. ptrdiff_t src_stride,
  417. uint8_t* dst_ptr,
  418. int dst_width);
  419. void ScaleRowDown38_3_Box_SSSE3(const uint8_t* src_ptr,
  420. ptrdiff_t src_stride,
  421. uint8_t* dst_ptr,
  422. int dst_width);
  423. void ScaleRowDown38_2_Box_SSSE3(const uint8_t* src_ptr,
  424. ptrdiff_t src_stride,
  425. uint8_t* dst_ptr,
  426. int dst_width);
  427. void ScaleRowDown2_Any_SSSE3(const uint8_t* src_ptr,
  428. ptrdiff_t src_stride,
  429. uint8_t* dst_ptr,
  430. int dst_width);
  431. void ScaleRowDown2Linear_Any_SSSE3(const uint8_t* src_ptr,
  432. ptrdiff_t src_stride,
  433. uint8_t* dst_ptr,
  434. int dst_width);
  435. void ScaleRowDown2Box_Any_SSSE3(const uint8_t* src_ptr,
  436. ptrdiff_t src_stride,
  437. uint8_t* dst_ptr,
  438. int dst_width);
  439. void ScaleRowDown2Box_Odd_SSSE3(const uint8_t* src_ptr,
  440. ptrdiff_t src_stride,
  441. uint8_t* dst_ptr,
  442. int dst_width);
  443. void ScaleRowDown2_Any_AVX2(const uint8_t* src_ptr,
  444. ptrdiff_t src_stride,
  445. uint8_t* dst_ptr,
  446. int dst_width);
  447. void ScaleRowDown2Linear_Any_AVX2(const uint8_t* src_ptr,
  448. ptrdiff_t src_stride,
  449. uint8_t* dst_ptr,
  450. int dst_width);
  451. void ScaleRowDown2Box_Any_AVX2(const uint8_t* src_ptr,
  452. ptrdiff_t src_stride,
  453. uint8_t* dst_ptr,
  454. int dst_width);
  455. void ScaleRowDown2Box_Odd_AVX2(const uint8_t* src_ptr,
  456. ptrdiff_t src_stride,
  457. uint8_t* dst_ptr,
  458. int dst_width);
  459. void ScaleRowDown4_Any_SSSE3(const uint8_t* src_ptr,
  460. ptrdiff_t src_stride,
  461. uint8_t* dst_ptr,
  462. int dst_width);
  463. void ScaleRowDown4Box_Any_SSSE3(const uint8_t* src_ptr,
  464. ptrdiff_t src_stride,
  465. uint8_t* dst_ptr,
  466. int dst_width);
  467. void ScaleRowDown4_Any_AVX2(const uint8_t* src_ptr,
  468. ptrdiff_t src_stride,
  469. uint8_t* dst_ptr,
  470. int dst_width);
  471. void ScaleRowDown4Box_Any_AVX2(const uint8_t* src_ptr,
  472. ptrdiff_t src_stride,
  473. uint8_t* dst_ptr,
  474. int dst_width);
  475. void ScaleRowDown34_Any_SSSE3(const uint8_t* src_ptr,
  476. ptrdiff_t src_stride,
  477. uint8_t* dst_ptr,
  478. int dst_width);
  479. void ScaleRowDown34_1_Box_Any_SSSE3(const uint8_t* src_ptr,
  480. ptrdiff_t src_stride,
  481. uint8_t* dst_ptr,
  482. int dst_width);
  483. void ScaleRowDown34_0_Box_Any_SSSE3(const uint8_t* src_ptr,
  484. ptrdiff_t src_stride,
  485. uint8_t* dst_ptr,
  486. int dst_width);
  487. void ScaleRowDown38_Any_SSSE3(const uint8_t* src_ptr,
  488. ptrdiff_t src_stride,
  489. uint8_t* dst_ptr,
  490. int dst_width);
  491. void ScaleRowDown38_3_Box_Any_SSSE3(const uint8_t* src_ptr,
  492. ptrdiff_t src_stride,
  493. uint8_t* dst_ptr,
  494. int dst_width);
  495. void ScaleRowDown38_2_Box_Any_SSSE3(const uint8_t* src_ptr,
  496. ptrdiff_t src_stride,
  497. uint8_t* dst_ptr,
  498. int dst_width);
  499. void ScaleAddRow_SSE2(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  500. void ScaleAddRow_AVX2(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  501. void ScaleAddRow_Any_SSE2(const uint8_t* src_ptr,
  502. uint16_t* dst_ptr,
  503. int src_width);
  504. void ScaleAddRow_Any_AVX2(const uint8_t* src_ptr,
  505. uint16_t* dst_ptr,
  506. int src_width);
  507. void ScaleFilterCols_SSSE3(uint8_t* dst_ptr,
  508. const uint8_t* src_ptr,
  509. int dst_width,
  510. int x,
  511. int dx);
  512. void ScaleColsUp2_SSE2(uint8_t* dst_ptr,
  513. const uint8_t* src_ptr,
  514. int dst_width,
  515. int x,
  516. int dx);
  517. // ARGB Column functions
  518. void ScaleARGBCols_SSE2(uint8_t* dst_argb,
  519. const uint8_t* src_argb,
  520. int dst_width,
  521. int x,
  522. int dx);
  523. void ScaleARGBFilterCols_SSSE3(uint8_t* dst_argb,
  524. const uint8_t* src_argb,
  525. int dst_width,
  526. int x,
  527. int dx);
  528. void ScaleARGBColsUp2_SSE2(uint8_t* dst_argb,
  529. const uint8_t* src_argb,
  530. int dst_width,
  531. int x,
  532. int dx);
  533. void ScaleARGBFilterCols_NEON(uint8_t* dst_argb,
  534. const uint8_t* src_argb,
  535. int dst_width,
  536. int x,
  537. int dx);
  538. void ScaleARGBCols_NEON(uint8_t* dst_argb,
  539. const uint8_t* src_argb,
  540. int dst_width,
  541. int x,
  542. int dx);
  543. void ScaleARGBFilterCols_Any_NEON(uint8_t* dst_ptr,
  544. const uint8_t* src_ptr,
  545. int dst_width,
  546. int x,
  547. int dx);
  548. void ScaleARGBCols_Any_NEON(uint8_t* dst_ptr,
  549. const uint8_t* src_ptr,
  550. int dst_width,
  551. int x,
  552. int dx);
  553. void ScaleARGBFilterCols_MSA(uint8_t* dst_argb,
  554. const uint8_t* src_argb,
  555. int dst_width,
  556. int x,
  557. int dx);
  558. void ScaleARGBCols_MSA(uint8_t* dst_argb,
  559. const uint8_t* src_argb,
  560. int dst_width,
  561. int x,
  562. int dx);
  563. void ScaleARGBFilterCols_Any_MSA(uint8_t* dst_ptr,
  564. const uint8_t* src_ptr,
  565. int dst_width,
  566. int x,
  567. int dx);
  568. void ScaleARGBCols_Any_MSA(uint8_t* dst_ptr,
  569. const uint8_t* src_ptr,
  570. int dst_width,
  571. int x,
  572. int dx);
  573. void ScaleARGBCols_MMI(uint8_t* dst_argb,
  574. const uint8_t* src_argb,
  575. int dst_width,
  576. int x,
  577. int dx);
  578. void ScaleARGBCols_Any_MMI(uint8_t* dst_ptr,
  579. const uint8_t* src_ptr,
  580. int dst_width,
  581. int x,
  582. int dx);
  583. // ARGB Row functions
  584. void ScaleARGBRowDown2_SSE2(const uint8_t* src_argb,
  585. ptrdiff_t src_stride,
  586. uint8_t* dst_argb,
  587. int dst_width);
  588. void ScaleARGBRowDown2Linear_SSE2(const uint8_t* src_argb,
  589. ptrdiff_t src_stride,
  590. uint8_t* dst_argb,
  591. int dst_width);
  592. void ScaleARGBRowDown2Box_SSE2(const uint8_t* src_argb,
  593. ptrdiff_t src_stride,
  594. uint8_t* dst_argb,
  595. int dst_width);
  596. void ScaleARGBRowDown2_NEON(const uint8_t* src_ptr,
  597. ptrdiff_t src_stride,
  598. uint8_t* dst,
  599. int dst_width);
  600. void ScaleARGBRowDown2Linear_NEON(const uint8_t* src_argb,
  601. ptrdiff_t src_stride,
  602. uint8_t* dst_argb,
  603. int dst_width);
  604. void ScaleARGBRowDown2Box_NEON(const uint8_t* src_ptr,
  605. ptrdiff_t src_stride,
  606. uint8_t* dst,
  607. int dst_width);
  608. void ScaleARGBRowDown2_MSA(const uint8_t* src_argb,
  609. ptrdiff_t src_stride,
  610. uint8_t* dst_argb,
  611. int dst_width);
  612. void ScaleARGBRowDown2Linear_MSA(const uint8_t* src_argb,
  613. ptrdiff_t src_stride,
  614. uint8_t* dst_argb,
  615. int dst_width);
  616. void ScaleARGBRowDown2Box_MSA(const uint8_t* src_argb,
  617. ptrdiff_t src_stride,
  618. uint8_t* dst_argb,
  619. int dst_width);
  620. void ScaleARGBRowDown2_MMI(const uint8_t* src_argb,
  621. ptrdiff_t src_stride,
  622. uint8_t* dst_argb,
  623. int dst_width);
  624. void ScaleARGBRowDown2Linear_MMI(const uint8_t* src_argb,
  625. ptrdiff_t src_stride,
  626. uint8_t* dst_argb,
  627. int dst_width);
  628. void ScaleARGBRowDown2Box_MMI(const uint8_t* src_argb,
  629. ptrdiff_t src_stride,
  630. uint8_t* dst_argb,
  631. int dst_width);
  632. void ScaleARGBRowDown2_Any_SSE2(const uint8_t* src_ptr,
  633. ptrdiff_t src_stride,
  634. uint8_t* dst_ptr,
  635. int dst_width);
  636. void ScaleARGBRowDown2Linear_Any_SSE2(const uint8_t* src_ptr,
  637. ptrdiff_t src_stride,
  638. uint8_t* dst_ptr,
  639. int dst_width);
  640. void ScaleARGBRowDown2Box_Any_SSE2(const uint8_t* src_ptr,
  641. ptrdiff_t src_stride,
  642. uint8_t* dst_ptr,
  643. int dst_width);
  644. void ScaleARGBRowDown2_Any_NEON(const uint8_t* src_ptr,
  645. ptrdiff_t src_stride,
  646. uint8_t* dst_ptr,
  647. int dst_width);
  648. void ScaleARGBRowDown2Linear_Any_NEON(const uint8_t* src_ptr,
  649. ptrdiff_t src_stride,
  650. uint8_t* dst_ptr,
  651. int dst_width);
  652. void ScaleARGBRowDown2Box_Any_NEON(const uint8_t* src_ptr,
  653. ptrdiff_t src_stride,
  654. uint8_t* dst_ptr,
  655. int dst_width);
  656. void ScaleARGBRowDown2_Any_MSA(const uint8_t* src_ptr,
  657. ptrdiff_t src_stride,
  658. uint8_t* dst_ptr,
  659. int dst_width);
  660. void ScaleARGBRowDown2Linear_Any_MSA(const uint8_t* src_ptr,
  661. ptrdiff_t src_stride,
  662. uint8_t* dst_ptr,
  663. int dst_width);
  664. void ScaleARGBRowDown2Box_Any_MSA(const uint8_t* src_ptr,
  665. ptrdiff_t src_stride,
  666. uint8_t* dst_ptr,
  667. int dst_width);
  668. void ScaleARGBRowDown2_Any_MMI(const uint8_t* src_ptr,
  669. ptrdiff_t src_stride,
  670. uint8_t* dst_ptr,
  671. int dst_width);
  672. void ScaleARGBRowDown2Linear_Any_MMI(const uint8_t* src_ptr,
  673. ptrdiff_t src_stride,
  674. uint8_t* dst_ptr,
  675. int dst_width);
  676. void ScaleARGBRowDown2Box_Any_MMI(const uint8_t* src_ptr,
  677. ptrdiff_t src_stride,
  678. uint8_t* dst_ptr,
  679. int dst_width);
  680. void ScaleARGBRowDownEven_SSE2(const uint8_t* src_argb,
  681. ptrdiff_t src_stride,
  682. int src_stepx,
  683. uint8_t* dst_argb,
  684. int dst_width);
  685. void ScaleARGBRowDownEvenBox_SSE2(const uint8_t* src_argb,
  686. ptrdiff_t src_stride,
  687. int src_stepx,
  688. uint8_t* dst_argb,
  689. int dst_width);
  690. void ScaleARGBRowDownEven_NEON(const uint8_t* src_argb,
  691. ptrdiff_t src_stride,
  692. int src_stepx,
  693. uint8_t* dst_argb,
  694. int dst_width);
  695. void ScaleARGBRowDownEvenBox_NEON(const uint8_t* src_argb,
  696. ptrdiff_t src_stride,
  697. int src_stepx,
  698. uint8_t* dst_argb,
  699. int dst_width);
  700. void ScaleARGBRowDownEven_MSA(const uint8_t* src_argb,
  701. ptrdiff_t src_stride,
  702. int32_t src_stepx,
  703. uint8_t* dst_argb,
  704. int dst_width);
  705. void ScaleARGBRowDownEvenBox_MSA(const uint8_t* src_argb,
  706. ptrdiff_t src_stride,
  707. int src_stepx,
  708. uint8_t* dst_argb,
  709. int dst_width);
  710. void ScaleARGBRowDownEven_MMI(const uint8_t* src_argb,
  711. ptrdiff_t src_stride,
  712. int32_t src_stepx,
  713. uint8_t* dst_argb,
  714. int dst_width);
  715. void ScaleARGBRowDownEvenBox_MMI(const uint8_t* src_argb,
  716. ptrdiff_t src_stride,
  717. int src_stepx,
  718. uint8_t* dst_argb,
  719. int dst_width);
  720. void ScaleARGBRowDownEven_Any_SSE2(const uint8_t* src_ptr,
  721. ptrdiff_t src_stride,
  722. int src_stepx,
  723. uint8_t* dst_ptr,
  724. int dst_width);
  725. void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8_t* src_ptr,
  726. ptrdiff_t src_stride,
  727. int src_stepx,
  728. uint8_t* dst_ptr,
  729. int dst_width);
  730. void ScaleARGBRowDownEven_Any_NEON(const uint8_t* src_ptr,
  731. ptrdiff_t src_stride,
  732. int src_stepx,
  733. uint8_t* dst_ptr,
  734. int dst_width);
  735. void ScaleARGBRowDownEvenBox_Any_NEON(const uint8_t* src_ptr,
  736. ptrdiff_t src_stride,
  737. int src_stepx,
  738. uint8_t* dst_ptr,
  739. int dst_width);
  740. void ScaleARGBRowDownEven_Any_MSA(const uint8_t* src_ptr,
  741. ptrdiff_t src_stride,
  742. int32_t src_stepx,
  743. uint8_t* dst_ptr,
  744. int dst_width);
  745. void ScaleARGBRowDownEvenBox_Any_MSA(const uint8_t* src_ptr,
  746. ptrdiff_t src_stride,
  747. int src_stepx,
  748. uint8_t* dst_ptr,
  749. int dst_width);
  750. void ScaleARGBRowDownEven_Any_MMI(const uint8_t* src_ptr,
  751. ptrdiff_t src_stride,
  752. int32_t src_stepx,
  753. uint8_t* dst_ptr,
  754. int dst_width);
  755. void ScaleARGBRowDownEvenBox_Any_MMI(const uint8_t* src_ptr,
  756. ptrdiff_t src_stride,
  757. int src_stepx,
  758. uint8_t* dst_ptr,
  759. int dst_width);
  760. // ScaleRowDown2Box also used by planar functions
  761. // NEON downscalers with interpolation.
  762. // Note - not static due to reuse in convert for 444 to 420.
  763. void ScaleRowDown2_NEON(const uint8_t* src_ptr,
  764. ptrdiff_t src_stride,
  765. uint8_t* dst,
  766. int dst_width);
  767. void ScaleRowDown2Linear_NEON(const uint8_t* src_ptr,
  768. ptrdiff_t src_stride,
  769. uint8_t* dst,
  770. int dst_width);
  771. void ScaleRowDown2Box_NEON(const uint8_t* src_ptr,
  772. ptrdiff_t src_stride,
  773. uint8_t* dst,
  774. int dst_width);
  775. void ScaleRowDown4_NEON(const uint8_t* src_ptr,
  776. ptrdiff_t src_stride,
  777. uint8_t* dst_ptr,
  778. int dst_width);
  779. void ScaleRowDown4Box_NEON(const uint8_t* src_ptr,
  780. ptrdiff_t src_stride,
  781. uint8_t* dst_ptr,
  782. int dst_width);
  783. // Down scale from 4 to 3 pixels. Use the neon multilane read/write
  784. // to load up the every 4th pixel into a 4 different registers.
  785. // Point samples 32 pixels to 24 pixels.
  786. void ScaleRowDown34_NEON(const uint8_t* src_ptr,
  787. ptrdiff_t src_stride,
  788. uint8_t* dst_ptr,
  789. int dst_width);
  790. void ScaleRowDown34_0_Box_NEON(const uint8_t* src_ptr,
  791. ptrdiff_t src_stride,
  792. uint8_t* dst_ptr,
  793. int dst_width);
  794. void ScaleRowDown34_1_Box_NEON(const uint8_t* src_ptr,
  795. ptrdiff_t src_stride,
  796. uint8_t* dst_ptr,
  797. int dst_width);
  798. // 32 -> 12
  799. void ScaleRowDown38_NEON(const uint8_t* src_ptr,
  800. ptrdiff_t src_stride,
  801. uint8_t* dst_ptr,
  802. int dst_width);
  803. // 32x3 -> 12x1
  804. void ScaleRowDown38_3_Box_NEON(const uint8_t* src_ptr,
  805. ptrdiff_t src_stride,
  806. uint8_t* dst_ptr,
  807. int dst_width);
  808. // 32x2 -> 12x1
  809. void ScaleRowDown38_2_Box_NEON(const uint8_t* src_ptr,
  810. ptrdiff_t src_stride,
  811. uint8_t* dst_ptr,
  812. int dst_width);
  813. void ScaleRowDown2_Any_NEON(const uint8_t* src_ptr,
  814. ptrdiff_t src_stride,
  815. uint8_t* dst_ptr,
  816. int dst_width);
  817. void ScaleRowDown2Linear_Any_NEON(const uint8_t* src_ptr,
  818. ptrdiff_t src_stride,
  819. uint8_t* dst_ptr,
  820. int dst_width);
  821. void ScaleRowDown2Box_Any_NEON(const uint8_t* src_ptr,
  822. ptrdiff_t src_stride,
  823. uint8_t* dst_ptr,
  824. int dst_width);
  825. void ScaleRowDown2Box_Odd_NEON(const uint8_t* src_ptr,
  826. ptrdiff_t src_stride,
  827. uint8_t* dst_ptr,
  828. int dst_width);
  829. void ScaleRowDown4_Any_NEON(const uint8_t* src_ptr,
  830. ptrdiff_t src_stride,
  831. uint8_t* dst_ptr,
  832. int dst_width);
  833. void ScaleRowDown4Box_Any_NEON(const uint8_t* src_ptr,
  834. ptrdiff_t src_stride,
  835. uint8_t* dst_ptr,
  836. int dst_width);
  837. void ScaleRowDown34_Any_NEON(const uint8_t* src_ptr,
  838. ptrdiff_t src_stride,
  839. uint8_t* dst_ptr,
  840. int dst_width);
  841. void ScaleRowDown34_0_Box_Any_NEON(const uint8_t* src_ptr,
  842. ptrdiff_t src_stride,
  843. uint8_t* dst_ptr,
  844. int dst_width);
  845. void ScaleRowDown34_1_Box_Any_NEON(const uint8_t* src_ptr,
  846. ptrdiff_t src_stride,
  847. uint8_t* dst_ptr,
  848. int dst_width);
  849. // 32 -> 12
  850. void ScaleRowDown38_Any_NEON(const uint8_t* src_ptr,
  851. ptrdiff_t src_stride,
  852. uint8_t* dst_ptr,
  853. int dst_width);
  854. // 32x3 -> 12x1
  855. void ScaleRowDown38_3_Box_Any_NEON(const uint8_t* src_ptr,
  856. ptrdiff_t src_stride,
  857. uint8_t* dst_ptr,
  858. int dst_width);
  859. // 32x2 -> 12x1
  860. void ScaleRowDown38_2_Box_Any_NEON(const uint8_t* src_ptr,
  861. ptrdiff_t src_stride,
  862. uint8_t* dst_ptr,
  863. int dst_width);
  864. void ScaleAddRow_NEON(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  865. void ScaleAddRow_Any_NEON(const uint8_t* src_ptr,
  866. uint16_t* dst_ptr,
  867. int src_width);
  868. void ScaleFilterCols_NEON(uint8_t* dst_ptr,
  869. const uint8_t* src_ptr,
  870. int dst_width,
  871. int x,
  872. int dx);
  873. void ScaleFilterCols_Any_NEON(uint8_t* dst_ptr,
  874. const uint8_t* src_ptr,
  875. int dst_width,
  876. int x,
  877. int dx);
  878. void ScaleRowDown2_MSA(const uint8_t* src_ptr,
  879. ptrdiff_t src_stride,
  880. uint8_t* dst,
  881. int dst_width);
  882. void ScaleRowDown2Linear_MSA(const uint8_t* src_ptr,
  883. ptrdiff_t src_stride,
  884. uint8_t* dst,
  885. int dst_width);
  886. void ScaleRowDown2Box_MSA(const uint8_t* src_ptr,
  887. ptrdiff_t src_stride,
  888. uint8_t* dst,
  889. int dst_width);
  890. void ScaleRowDown4_MSA(const uint8_t* src_ptr,
  891. ptrdiff_t src_stride,
  892. uint8_t* dst,
  893. int dst_width);
  894. void ScaleRowDown4Box_MSA(const uint8_t* src_ptr,
  895. ptrdiff_t src_stride,
  896. uint8_t* dst,
  897. int dst_width);
  898. void ScaleRowDown38_MSA(const uint8_t* src_ptr,
  899. ptrdiff_t src_stride,
  900. uint8_t* dst,
  901. int dst_width);
  902. void ScaleRowDown38_2_Box_MSA(const uint8_t* src_ptr,
  903. ptrdiff_t src_stride,
  904. uint8_t* dst_ptr,
  905. int dst_width);
  906. void ScaleRowDown38_3_Box_MSA(const uint8_t* src_ptr,
  907. ptrdiff_t src_stride,
  908. uint8_t* dst_ptr,
  909. int dst_width);
  910. void ScaleAddRow_MSA(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  911. void ScaleFilterCols_MSA(uint8_t* dst_ptr,
  912. const uint8_t* src_ptr,
  913. int dst_width,
  914. int x,
  915. int dx);
  916. void ScaleRowDown34_MSA(const uint8_t* src_ptr,
  917. ptrdiff_t src_stride,
  918. uint8_t* dst,
  919. int dst_width);
  920. void ScaleRowDown34_MMI(const uint8_t* src_ptr,
  921. ptrdiff_t src_stride,
  922. uint8_t* dst,
  923. int dst_width);
  924. void ScaleRowDown34_0_Box_MSA(const uint8_t* src_ptr,
  925. ptrdiff_t src_stride,
  926. uint8_t* d,
  927. int dst_width);
  928. void ScaleRowDown34_1_Box_MSA(const uint8_t* src_ptr,
  929. ptrdiff_t src_stride,
  930. uint8_t* d,
  931. int dst_width);
  932. void ScaleRowDown2_Any_MSA(const uint8_t* src_ptr,
  933. ptrdiff_t src_stride,
  934. uint8_t* dst_ptr,
  935. int dst_width);
  936. void ScaleRowDown2Linear_Any_MSA(const uint8_t* src_ptr,
  937. ptrdiff_t src_stride,
  938. uint8_t* dst_ptr,
  939. int dst_width);
  940. void ScaleRowDown2Box_Any_MSA(const uint8_t* src_ptr,
  941. ptrdiff_t src_stride,
  942. uint8_t* dst_ptr,
  943. int dst_width);
  944. void ScaleRowDown4_Any_MSA(const uint8_t* src_ptr,
  945. ptrdiff_t src_stride,
  946. uint8_t* dst_ptr,
  947. int dst_width);
  948. void ScaleRowDown4Box_Any_MSA(const uint8_t* src_ptr,
  949. ptrdiff_t src_stride,
  950. uint8_t* dst_ptr,
  951. int dst_width);
  952. void ScaleRowDown38_Any_MSA(const uint8_t* src_ptr,
  953. ptrdiff_t src_stride,
  954. uint8_t* dst_ptr,
  955. int dst_width);
  956. void ScaleRowDown38_2_Box_Any_MSA(const uint8_t* src_ptr,
  957. ptrdiff_t src_stride,
  958. uint8_t* dst_ptr,
  959. int dst_width);
  960. void ScaleRowDown38_3_Box_Any_MSA(const uint8_t* src_ptr,
  961. ptrdiff_t src_stride,
  962. uint8_t* dst_ptr,
  963. int dst_width);
  964. void ScaleAddRow_Any_MSA(const uint8_t* src_ptr,
  965. uint16_t* dst_ptr,
  966. int src_width);
  967. void ScaleFilterCols_Any_MSA(uint8_t* dst_ptr,
  968. const uint8_t* src_ptr,
  969. int dst_width,
  970. int x,
  971. int dx);
  972. void ScaleRowDown34_Any_MSA(const uint8_t* src_ptr,
  973. ptrdiff_t src_stride,
  974. uint8_t* dst_ptr,
  975. int dst_width);
  976. void ScaleRowDown34_Any_MMI(const uint8_t* src_ptr,
  977. ptrdiff_t src_stride,
  978. uint8_t* dst_ptr,
  979. int dst_width);
  980. void ScaleRowDown34_0_Box_Any_MSA(const uint8_t* src_ptr,
  981. ptrdiff_t src_stride,
  982. uint8_t* dst_ptr,
  983. int dst_width);
  984. void ScaleRowDown34_1_Box_Any_MSA(const uint8_t* src_ptr,
  985. ptrdiff_t src_stride,
  986. uint8_t* dst_ptr,
  987. int dst_width);
  988. void ScaleRowDown2_MMI(const uint8_t* src_ptr,
  989. ptrdiff_t src_stride,
  990. uint8_t* dst,
  991. int dst_width);
  992. void ScaleRowDown2_16_MMI(const uint16_t* src_ptr,
  993. ptrdiff_t src_stride,
  994. uint16_t* dst,
  995. int dst_width);
  996. void ScaleRowDown2Linear_MMI(const uint8_t* src_ptr,
  997. ptrdiff_t src_stride,
  998. uint8_t* dst,
  999. int dst_width);
  1000. void ScaleRowDown2Linear_16_MMI(const uint16_t* src_ptr,
  1001. ptrdiff_t src_stride,
  1002. uint16_t* dst,
  1003. int dst_width);
  1004. void ScaleRowDown2Box_MMI(const uint8_t* src_ptr,
  1005. ptrdiff_t src_stride,
  1006. uint8_t* dst,
  1007. int dst_width);
  1008. void ScaleRowDown2Box_16_MMI(const uint16_t* src_ptr,
  1009. ptrdiff_t src_stride,
  1010. uint16_t* dst,
  1011. int dst_width);
  1012. void ScaleRowDown2Box_Odd_MMI(const uint8_t* src_ptr,
  1013. ptrdiff_t src_stride,
  1014. uint8_t* dst,
  1015. int dst_width);
  1016. void ScaleRowDown4_MMI(const uint8_t* src_ptr,
  1017. ptrdiff_t src_stride,
  1018. uint8_t* dst,
  1019. int dst_width);
  1020. void ScaleRowDown4_16_MMI(const uint16_t* src_ptr,
  1021. ptrdiff_t src_stride,
  1022. uint16_t* dst,
  1023. int dst_width);
  1024. void ScaleRowDown4Box_MMI(const uint8_t* src_ptr,
  1025. ptrdiff_t src_stride,
  1026. uint8_t* dst,
  1027. int dst_width);
  1028. void ScaleRowDown4Box_16_MMI(const uint16_t* src_ptr,
  1029. ptrdiff_t src_stride,
  1030. uint16_t* dst,
  1031. int dst_width);
  1032. void ScaleAddRow_MMI(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width);
  1033. void ScaleAddRow_16_MMI(const uint16_t* src_ptr,
  1034. uint32_t* dst_ptr,
  1035. int src_width);
  1036. void ScaleColsUp2_MMI(uint8_t* dst_ptr,
  1037. const uint8_t* src_ptr,
  1038. int dst_width,
  1039. int x,
  1040. int dx);
  1041. void ScaleColsUp2_16_MMI(uint16_t* dst_ptr,
  1042. const uint16_t* src_ptr,
  1043. int dst_width,
  1044. int x,
  1045. int dx);
  1046. void ScaleARGBColsUp2_MMI(uint8_t* dst_argb,
  1047. const uint8_t* src_argb,
  1048. int dst_width,
  1049. int x,
  1050. int dx);
  1051. void ScaleRowDown2_Any_MMI(const uint8_t* src_ptr,
  1052. ptrdiff_t src_stride,
  1053. uint8_t* dst_ptr,
  1054. int dst_width);
  1055. void ScaleRowDown2Linear_Any_MMI(const uint8_t* src_ptr,
  1056. ptrdiff_t src_stride,
  1057. uint8_t* dst_ptr,
  1058. int dst_width);
  1059. void ScaleRowDown2Box_Any_MMI(const uint8_t* src_ptr,
  1060. ptrdiff_t src_stride,
  1061. uint8_t* dst_ptr,
  1062. int dst_width);
  1063. void ScaleRowDown4_Any_MMI(const uint8_t* src_ptr,
  1064. ptrdiff_t src_stride,
  1065. uint8_t* dst_ptr,
  1066. int dst_width);
  1067. void ScaleRowDown4Box_Any_MMI(const uint8_t* src_ptr,
  1068. ptrdiff_t src_stride,
  1069. uint8_t* dst_ptr,
  1070. int dst_width);
  1071. void ScaleAddRow_Any_MMI(const uint8_t* src_ptr,
  1072. uint16_t* dst_ptr,
  1073. int src_width);
  1074. #ifdef __cplusplus
  1075. } // extern "C"
  1076. } // namespace libyuv
  1077. #endif
  1078. #endif // INCLUDE_LIBYUV_SCALE_ROW_H_