react-native-vision-camera-spoof-detector 1.0.22 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +442 -442
  2. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  3. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  4. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  7. package/android/build/reports/problems/problems-report.html +659 -0
  8. package/android/build.gradle +12 -4
  9. package/android/src/main/cpp/CMakeLists.txt +101 -94
  10. package/android/src/main/cpp/libyuv/.clang-format +6 -6
  11. package/android/src/main/cpp/libyuv/.gn +40 -40
  12. package/android/src/main/cpp/libyuv/.vpython3 +410 -410
  13. package/android/src/main/cpp/libyuv/AUTHORS +7 -7
  14. package/android/src/main/cpp/libyuv/Android.bp +202 -202
  15. package/android/src/main/cpp/libyuv/Android.mk +106 -106
  16. package/android/src/main/cpp/libyuv/BUILD.gn +490 -490
  17. package/android/src/main/cpp/libyuv/CM_linux_packages.cmake +70 -70
  18. package/android/src/main/cpp/libyuv/CMakeLists.txt +259 -252
  19. package/android/src/main/cpp/libyuv/DEPS +935 -935
  20. package/android/src/main/cpp/libyuv/DIR_METADATA +3 -3
  21. package/android/src/main/cpp/libyuv/LICENSE +29 -29
  22. package/android/src/main/cpp/libyuv/OWNERS +11 -11
  23. package/android/src/main/cpp/libyuv/PATENTS +23 -23
  24. package/android/src/main/cpp/libyuv/PRESUBMIT.py +65 -65
  25. package/android/src/main/cpp/libyuv/README.chromium +11 -11
  26. package/android/src/main/cpp/libyuv/README.md +19 -19
  27. package/android/src/main/cpp/libyuv/build_overrides/build.gni +60 -60
  28. package/android/src/main/cpp/libyuv/build_overrides/gtest.gni +19 -19
  29. package/android/src/main/cpp/libyuv/build_overrides/partition_alloc.gni +17 -17
  30. package/android/src/main/cpp/libyuv/codereview.settings +5 -5
  31. package/android/src/main/cpp/libyuv/docs/deprecated_builds.md +409 -409
  32. package/android/src/main/cpp/libyuv/docs/environment_variables.md +64 -64
  33. package/android/src/main/cpp/libyuv/docs/feature_detection.md +108 -108
  34. package/android/src/main/cpp/libyuv/docs/filtering.md +196 -196
  35. package/android/src/main/cpp/libyuv/docs/formats.md +208 -208
  36. package/android/src/main/cpp/libyuv/docs/getting_started.md +296 -296
  37. package/android/src/main/cpp/libyuv/docs/rotation.md +107 -107
  38. package/android/src/main/cpp/libyuv/download_vs_toolchain.py +29 -29
  39. package/android/src/main/cpp/libyuv/include/libyuv/basic_types.h +68 -68
  40. package/android/src/main/cpp/libyuv/include/libyuv/compare.h +111 -111
  41. package/android/src/main/cpp/libyuv/include/libyuv/compare_row.h +112 -112
  42. package/android/src/main/cpp/libyuv/include/libyuv/convert.h +1117 -1117
  43. package/android/src/main/cpp/libyuv/include/libyuv/convert_argb.h +2335 -2335
  44. package/android/src/main/cpp/libyuv/include/libyuv/convert_from.h +203 -203
  45. package/android/src/main/cpp/libyuv/include/libyuv/convert_from_argb.h +394 -394
  46. package/android/src/main/cpp/libyuv/include/libyuv/cpu_id.h +147 -147
  47. package/android/src/main/cpp/libyuv/include/libyuv/cpu_support.h +99 -99
  48. package/android/src/main/cpp/libyuv/include/libyuv/loongson_intrinsics.h +1949 -1949
  49. package/android/src/main/cpp/libyuv/include/libyuv/mjpeg_decoder.h +195 -195
  50. package/android/src/main/cpp/libyuv/include/libyuv/planar_functions.h +1131 -1131
  51. package/android/src/main/cpp/libyuv/include/libyuv/rotate.h +296 -296
  52. package/android/src/main/cpp/libyuv/include/libyuv/rotate_argb.h +37 -37
  53. package/android/src/main/cpp/libyuv/include/libyuv/rotate_row.h +265 -265
  54. package/android/src/main/cpp/libyuv/include/libyuv/row.h +6738 -6738
  55. package/android/src/main/cpp/libyuv/include/libyuv/row_sve.h +2154 -2154
  56. package/android/src/main/cpp/libyuv/include/libyuv/scale.h +336 -336
  57. package/android/src/main/cpp/libyuv/include/libyuv/scale_argb.h +76 -76
  58. package/android/src/main/cpp/libyuv/include/libyuv/scale_rgb.h +42 -42
  59. package/android/src/main/cpp/libyuv/include/libyuv/scale_row.h +1726 -1726
  60. package/android/src/main/cpp/libyuv/include/libyuv/scale_uv.h +51 -51
  61. package/android/src/main/cpp/libyuv/include/libyuv/version.h +16 -16
  62. package/android/src/main/cpp/libyuv/include/libyuv/video_common.h +222 -222
  63. package/android/src/main/cpp/libyuv/include/libyuv.h +33 -33
  64. package/android/src/main/cpp/libyuv/infra/config/OWNERS +3 -3
  65. package/android/src/main/cpp/libyuv/infra/config/PRESUBMIT.py +17 -17
  66. package/android/src/main/cpp/libyuv/infra/config/README.md +2 -2
  67. package/android/src/main/cpp/libyuv/infra/config/codereview.settings +6 -6
  68. package/android/src/main/cpp/libyuv/infra/config/commit-queue.cfg +144 -144
  69. package/android/src/main/cpp/libyuv/infra/config/cr-buildbucket.cfg +1185 -1185
  70. package/android/src/main/cpp/libyuv/infra/config/luci-logdog.cfg +9 -9
  71. package/android/src/main/cpp/libyuv/infra/config/luci-milo.cfg +246 -246
  72. package/android/src/main/cpp/libyuv/infra/config/luci-scheduler.cfg +385 -385
  73. package/android/src/main/cpp/libyuv/infra/config/main.star +402 -402
  74. package/android/src/main/cpp/libyuv/infra/config/project.cfg +16 -16
  75. package/android/src/main/cpp/libyuv/infra/config/realms.cfg +111 -111
  76. package/android/src/main/cpp/libyuv/libyuv.gni +34 -34
  77. package/android/src/main/cpp/libyuv/libyuv.gyp +149 -149
  78. package/android/src/main/cpp/libyuv/libyuv.gypi +87 -87
  79. package/android/src/main/cpp/libyuv/linux.mk +96 -96
  80. package/android/src/main/cpp/libyuv/public.mk +13 -13
  81. package/android/src/main/cpp/libyuv/pylintrc +49 -49
  82. package/android/src/main/cpp/libyuv/riscv_script/prepare_toolchain_qemu.sh +74 -74
  83. package/android/src/main/cpp/libyuv/riscv_script/riscv-clang.cmake +56 -56
  84. package/android/src/main/cpp/libyuv/riscv_script/run_qemu.sh +15 -15
  85. package/android/src/main/cpp/libyuv/source/compare.cc +435 -435
  86. package/android/src/main/cpp/libyuv/source/compare_common.cc +74 -74
  87. package/android/src/main/cpp/libyuv/source/compare_gcc.cc +362 -362
  88. package/android/src/main/cpp/libyuv/source/compare_neon.cc +96 -96
  89. package/android/src/main/cpp/libyuv/source/compare_neon64.cc +223 -223
  90. package/android/src/main/cpp/libyuv/source/compare_win.cc +241 -241
  91. package/android/src/main/cpp/libyuv/source/convert.cc +4746 -4746
  92. package/android/src/main/cpp/libyuv/source/convert_argb.cc +9179 -9179
  93. package/android/src/main/cpp/libyuv/source/convert_from.cc +866 -866
  94. package/android/src/main/cpp/libyuv/source/convert_from_argb.cc +3671 -3671
  95. package/android/src/main/cpp/libyuv/source/convert_jpeg.cc +602 -602
  96. package/android/src/main/cpp/libyuv/source/convert_to_argb.cc +391 -391
  97. package/android/src/main/cpp/libyuv/source/convert_to_i420.cc +288 -288
  98. package/android/src/main/cpp/libyuv/source/cpu_id.cc +496 -496
  99. package/android/src/main/cpp/libyuv/source/mjpeg_decoder.cc +580 -580
  100. package/android/src/main/cpp/libyuv/source/mjpeg_validate.cc +71 -71
  101. package/android/src/main/cpp/libyuv/source/planar_functions.cc +5663 -5663
  102. package/android/src/main/cpp/libyuv/source/rotate.cc +1241 -1241
  103. package/android/src/main/cpp/libyuv/source/rotate_any.cc +76 -76
  104. package/android/src/main/cpp/libyuv/source/rotate_argb.cc +259 -259
  105. package/android/src/main/cpp/libyuv/source/rotate_common.cc +208 -208
  106. package/android/src/main/cpp/libyuv/source/rotate_gcc.cc +505 -505
  107. package/android/src/main/cpp/libyuv/source/rotate_lsx.cc +233 -233
  108. package/android/src/main/cpp/libyuv/source/rotate_neon.cc +219 -219
  109. package/android/src/main/cpp/libyuv/source/rotate_neon64.cc +273 -273
  110. package/android/src/main/cpp/libyuv/source/rotate_sme.cc +174 -174
  111. package/android/src/main/cpp/libyuv/source/rotate_win.cc +253 -253
  112. package/android/src/main/cpp/libyuv/source/row_any.cc +2519 -2519
  113. package/android/src/main/cpp/libyuv/source/row_common.cc +4461 -4461
  114. package/android/src/main/cpp/libyuv/source/row_gcc.cc +9570 -9570
  115. package/android/src/main/cpp/libyuv/source/row_lasx.cc +2343 -2343
  116. package/android/src/main/cpp/libyuv/source/row_lsx.cc +3030 -3030
  117. package/android/src/main/cpp/libyuv/source/row_neon.cc +4026 -4026
  118. package/android/src/main/cpp/libyuv/source/row_neon64.cc +5617 -5617
  119. package/android/src/main/cpp/libyuv/source/row_rvv.cc +2599 -2599
  120. package/android/src/main/cpp/libyuv/source/row_sme.cc +1183 -1183
  121. package/android/src/main/cpp/libyuv/source/row_sve.cc +1088 -1088
  122. package/android/src/main/cpp/libyuv/source/row_win.cc +6453 -6453
  123. package/android/src/main/cpp/libyuv/source/scale.cc +2710 -2710
  124. package/android/src/main/cpp/libyuv/source/scale_any.cc +991 -991
  125. package/android/src/main/cpp/libyuv/source/scale_argb.cc +1158 -1158
  126. package/android/src/main/cpp/libyuv/source/scale_common.cc +1977 -1977
  127. package/android/src/main/cpp/libyuv/source/scale_gcc.cc +2947 -2947
  128. package/android/src/main/cpp/libyuv/source/scale_lsx.cc +739 -739
  129. package/android/src/main/cpp/libyuv/source/scale_neon.cc +1449 -1449
  130. package/android/src/main/cpp/libyuv/source/scale_neon64.cc +1552 -1552
  131. package/android/src/main/cpp/libyuv/source/scale_rgb.cc +82 -82
  132. package/android/src/main/cpp/libyuv/source/scale_rvv.cc +1971 -1971
  133. package/android/src/main/cpp/libyuv/source/scale_sme.cc +555 -555
  134. package/android/src/main/cpp/libyuv/source/scale_uv.cc +1159 -1159
  135. package/android/src/main/cpp/libyuv/source/scale_win.cc +1392 -1392
  136. package/android/src/main/cpp/libyuv/source/test.sh +35 -35
  137. package/android/src/main/cpp/libyuv/source/video_common.cc +62 -62
  138. package/android/src/main/cpp/libyuv/tools_libyuv/OWNERS +4 -4
  139. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/roll_deps.py +931 -931
  140. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py +164 -164
  141. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS +21 -21
  142. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new +13 -13
  143. package/android/src/main/cpp/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old +13 -13
  144. package/android/src/main/cpp/libyuv/tools_libyuv/get_landmines.py +38 -38
  145. package/android/src/main/cpp/libyuv/tools_libyuv/msan/OWNERS +3 -3
  146. package/android/src/main/cpp/libyuv/tools_libyuv/msan/blacklist.txt +9 -9
  147. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/OWNERS +3 -3
  148. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/blacklist.txt +15 -15
  149. package/android/src/main/cpp/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt +25 -25
  150. package/android/src/main/cpp/libyuv/unit_test/basictypes_test.cc +43 -43
  151. package/android/src/main/cpp/libyuv/unit_test/color_test.cc +848 -848
  152. package/android/src/main/cpp/libyuv/unit_test/compare_test.cc +739 -739
  153. package/android/src/main/cpp/libyuv/unit_test/convert_argb_test.cc +2867 -2867
  154. package/android/src/main/cpp/libyuv/unit_test/convert_test.cc +2133 -2133
  155. package/android/src/main/cpp/libyuv/unit_test/cpu_test.cc +427 -427
  156. package/android/src/main/cpp/libyuv/unit_test/cpu_thread_test.cc +63 -63
  157. package/android/src/main/cpp/libyuv/unit_test/math_test.cc +160 -160
  158. package/android/src/main/cpp/libyuv/unit_test/planar_test.cc +4731 -4731
  159. package/android/src/main/cpp/libyuv/unit_test/rotate_argb_test.cc +334 -334
  160. package/android/src/main/cpp/libyuv/unit_test/rotate_test.cc +962 -962
  161. package/android/src/main/cpp/libyuv/unit_test/scale_argb_test.cc +590 -590
  162. package/android/src/main/cpp/libyuv/unit_test/scale_plane_test.cc +465 -465
  163. package/android/src/main/cpp/libyuv/unit_test/scale_rgb_test.cc +280 -280
  164. package/android/src/main/cpp/libyuv/unit_test/scale_test.cc +1135 -1135
  165. package/android/src/main/cpp/libyuv/unit_test/scale_uv_test.cc +249 -249
  166. package/android/src/main/cpp/libyuv/unit_test/testdata/arm_v7.txt +12 -12
  167. package/android/src/main/cpp/libyuv/unit_test/testdata/mips.txt +7 -7
  168. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson2k.txt +5 -5
  169. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson3.txt +10 -10
  170. package/android/src/main/cpp/libyuv/unit_test/testdata/mips_loongson_mmi.txt +7 -7
  171. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64.txt +3 -3
  172. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv.txt +3 -3
  173. package/android/src/main/cpp/libyuv/unit_test/testdata/riscv64_rvv_zvfh.txt +3 -3
  174. package/android/src/main/cpp/libyuv/unit_test/testdata/tegra3.txt +23 -23
  175. package/android/src/main/cpp/libyuv/unit_test/unit_test.cc +581 -581
  176. package/android/src/main/cpp/libyuv/unit_test/unit_test.h +232 -232
  177. package/android/src/main/cpp/libyuv/unit_test/video_common_test.cc +112 -112
  178. package/android/src/main/cpp/libyuv/util/Makefile +9 -9
  179. package/android/src/main/cpp/libyuv/util/color.cc +120 -120
  180. package/android/src/main/cpp/libyuv/util/compare.cc +67 -67
  181. package/android/src/main/cpp/libyuv/util/cpuid.c +211 -211
  182. package/android/src/main/cpp/libyuv/util/i444tonv12_eg.cc +27 -27
  183. package/android/src/main/cpp/libyuv/util/psnr.cc +291 -291
  184. package/android/src/main/cpp/libyuv/util/psnr.h +47 -47
  185. package/android/src/main/cpp/libyuv/util/psnr_main.cc +620 -620
  186. package/android/src/main/cpp/libyuv/util/ssim.cc +364 -364
  187. package/android/src/main/cpp/libyuv/util/ssim.h +38 -38
  188. package/android/src/main/cpp/libyuv/util/yuvconstants.c +114 -114
  189. package/android/src/main/cpp/libyuv/util/yuvconvert.cc +367 -367
  190. package/android/src/main/cpp/libyuv/winarm.mk +47 -47
  191. package/index.js +17 -1
  192. package/ios/FaceAntiSpoofFrameProcessor.swift +283 -0
  193. package/ios/FaceAntiSpoofJSI.h +12 -0
  194. package/ios/FaceAntiSpoofJSI.mm +92 -0
  195. package/ios/FaceAntiSpoofManager.swift +63 -0
  196. package/ios/FaceAntiSpoofModule.m +191 -0
  197. package/ios/FaceAntiSpoofPluginRegister.m +42 -0
  198. package/ios/models/FaceAntiSpoofing.tflite +0 -0
  199. package/ios/models/model_spec.json +16 -0
  200. package/package.json +87 -86
  201. package/.gitignore +0 -27
  202. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  203. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  204. package/android/.gradle/8.9/gc.properties +0 -0
  205. /package/android/.gradle/{8.9 → 9.2.0}/fileChanges/last-build.bin +0 -0
  206. /package/android/.gradle/{8.9/dependencies-accessors → 9.2.0}/gc.properties +0 -0
@@ -1,2335 +1,2335 @@
1
- /*
2
- * Copyright 2012 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
-
11
- #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_
12
- #define INCLUDE_LIBYUV_CONVERT_ARGB_H_
13
-
14
- #include "libyuv/basic_types.h"
15
-
16
- #include "libyuv/rotate.h" // For enum RotationMode.
17
- #include "libyuv/scale.h" // For enum FilterMode.
18
-
19
- #ifdef __cplusplus
20
- namespace libyuv {
21
- extern "C" {
22
- #endif
23
-
24
- // Conversion matrix for YUV to RGB
25
- LIBYUV_API extern const struct YuvConstants kYuvI601Constants; // BT.601
26
- LIBYUV_API extern const struct YuvConstants kYuvJPEGConstants; // BT.601 full
27
- LIBYUV_API extern const struct YuvConstants kYuvH709Constants; // BT.709
28
- LIBYUV_API extern const struct YuvConstants kYuvF709Constants; // BT.709 full
29
- LIBYUV_API extern const struct YuvConstants kYuv2020Constants; // BT.2020
30
- LIBYUV_API extern const struct YuvConstants kYuvV2020Constants; // BT.2020 full
31
-
32
- // Conversion matrix for YVU to BGR
33
- LIBYUV_API extern const struct YuvConstants kYvuI601Constants; // BT.601
34
- LIBYUV_API extern const struct YuvConstants kYvuJPEGConstants; // BT.601 full
35
- LIBYUV_API extern const struct YuvConstants kYvuH709Constants; // BT.709
36
- LIBYUV_API extern const struct YuvConstants kYvuF709Constants; // BT.709 full
37
- LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
38
- LIBYUV_API extern const struct YuvConstants kYvuV2020Constants; // BT.2020 full
39
-
40
- // Macros for end swapped destination Matrix conversions.
41
- // Swap UV and pass mirrored kYvuJPEGConstants matrix.
42
- // TODO(fbarchard): Add macro for each Matrix function.
43
- #define kYuvI601ConstantsVU kYvuI601Constants
44
- #define kYuvJPEGConstantsVU kYvuJPEGConstants
45
- #define kYuvH709ConstantsVU kYvuH709Constants
46
- #define kYuvF709ConstantsVU kYvuF709Constants
47
- #define kYuv2020ConstantsVU kYvu2020Constants
48
- #define kYuvV2020ConstantsVU kYvuV2020Constants
49
-
50
- #define NV12ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
51
- NV21ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
52
- #define NV21ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
53
- NV12ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
54
- #define NV12ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
55
- NV21ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
56
- #define NV21ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
57
- NV12ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
58
- #define I010ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
59
- I010ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
60
- #define I210ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
61
- I210ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
62
- #define I410ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
63
- I410ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
64
- #define I010ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
65
- I010ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
66
- #define I210ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
67
- I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
68
- #define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
69
- I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
70
- #define I012ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
71
- I012ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
72
- #define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
73
- I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
74
- #define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
75
- I422AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
76
- #define I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
77
- I444AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
78
- #define I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
79
- I010AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
80
- #define I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
81
- I210AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
82
- #define I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
83
- I410AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
84
-
85
- // Alias.
86
- #define ARGBToARGB ARGBCopy
87
-
88
- // Copy ARGB to ARGB.
89
- LIBYUV_API
90
- int ARGBCopy(const uint8_t* src_argb,
91
- int src_stride_argb,
92
- uint8_t* dst_argb,
93
- int dst_stride_argb,
94
- int width,
95
- int height);
96
-
97
- // Convert I420 to ARGB.
98
- LIBYUV_API
99
- int I420ToARGB(const uint8_t* src_y,
100
- int src_stride_y,
101
- const uint8_t* src_u,
102
- int src_stride_u,
103
- const uint8_t* src_v,
104
- int src_stride_v,
105
- uint8_t* dst_argb,
106
- int dst_stride_argb,
107
- int width,
108
- int height);
109
-
110
- // Convert I420 to ABGR.
111
- LIBYUV_API
112
- int I420ToABGR(const uint8_t* src_y,
113
- int src_stride_y,
114
- const uint8_t* src_u,
115
- int src_stride_u,
116
- const uint8_t* src_v,
117
- int src_stride_v,
118
- uint8_t* dst_abgr,
119
- int dst_stride_abgr,
120
- int width,
121
- int height);
122
-
123
- // Convert J420 to ARGB.
124
- LIBYUV_API
125
- int J420ToARGB(const uint8_t* src_y,
126
- int src_stride_y,
127
- const uint8_t* src_u,
128
- int src_stride_u,
129
- const uint8_t* src_v,
130
- int src_stride_v,
131
- uint8_t* dst_argb,
132
- int dst_stride_argb,
133
- int width,
134
- int height);
135
-
136
- // Convert J420 to ABGR.
137
- LIBYUV_API
138
- int J420ToABGR(const uint8_t* src_y,
139
- int src_stride_y,
140
- const uint8_t* src_u,
141
- int src_stride_u,
142
- const uint8_t* src_v,
143
- int src_stride_v,
144
- uint8_t* dst_abgr,
145
- int dst_stride_abgr,
146
- int width,
147
- int height);
148
-
149
- // Convert H420 to ARGB.
150
- LIBYUV_API
151
- int H420ToARGB(const uint8_t* src_y,
152
- int src_stride_y,
153
- const uint8_t* src_u,
154
- int src_stride_u,
155
- const uint8_t* src_v,
156
- int src_stride_v,
157
- uint8_t* dst_argb,
158
- int dst_stride_argb,
159
- int width,
160
- int height);
161
-
162
- // Convert H420 to ABGR.
163
- LIBYUV_API
164
- int H420ToABGR(const uint8_t* src_y,
165
- int src_stride_y,
166
- const uint8_t* src_u,
167
- int src_stride_u,
168
- const uint8_t* src_v,
169
- int src_stride_v,
170
- uint8_t* dst_abgr,
171
- int dst_stride_abgr,
172
- int width,
173
- int height);
174
-
175
- // Convert U420 to ARGB.
176
- LIBYUV_API
177
- int U420ToARGB(const uint8_t* src_y,
178
- int src_stride_y,
179
- const uint8_t* src_u,
180
- int src_stride_u,
181
- const uint8_t* src_v,
182
- int src_stride_v,
183
- uint8_t* dst_argb,
184
- int dst_stride_argb,
185
- int width,
186
- int height);
187
-
188
- // Convert U420 to ABGR.
189
- LIBYUV_API
190
- int U420ToABGR(const uint8_t* src_y,
191
- int src_stride_y,
192
- const uint8_t* src_u,
193
- int src_stride_u,
194
- const uint8_t* src_v,
195
- int src_stride_v,
196
- uint8_t* dst_abgr,
197
- int dst_stride_abgr,
198
- int width,
199
- int height);
200
-
201
- // Convert I422 to ARGB.
202
- LIBYUV_API
203
- int I422ToARGB(const uint8_t* src_y,
204
- int src_stride_y,
205
- const uint8_t* src_u,
206
- int src_stride_u,
207
- const uint8_t* src_v,
208
- int src_stride_v,
209
- uint8_t* dst_argb,
210
- int dst_stride_argb,
211
- int width,
212
- int height);
213
-
214
- // Convert I422 to ABGR.
215
- LIBYUV_API
216
- int I422ToABGR(const uint8_t* src_y,
217
- int src_stride_y,
218
- const uint8_t* src_u,
219
- int src_stride_u,
220
- const uint8_t* src_v,
221
- int src_stride_v,
222
- uint8_t* dst_abgr,
223
- int dst_stride_abgr,
224
- int width,
225
- int height);
226
-
227
- // Convert J422 to ARGB.
228
- LIBYUV_API
229
- int J422ToARGB(const uint8_t* src_y,
230
- int src_stride_y,
231
- const uint8_t* src_u,
232
- int src_stride_u,
233
- const uint8_t* src_v,
234
- int src_stride_v,
235
- uint8_t* dst_argb,
236
- int dst_stride_argb,
237
- int width,
238
- int height);
239
-
240
- // Convert J422 to ABGR.
241
- LIBYUV_API
242
- int J422ToABGR(const uint8_t* src_y,
243
- int src_stride_y,
244
- const uint8_t* src_u,
245
- int src_stride_u,
246
- const uint8_t* src_v,
247
- int src_stride_v,
248
- uint8_t* dst_abgr,
249
- int dst_stride_abgr,
250
- int width,
251
- int height);
252
-
253
- // Convert H422 to ARGB.
254
- LIBYUV_API
255
- int H422ToARGB(const uint8_t* src_y,
256
- int src_stride_y,
257
- const uint8_t* src_u,
258
- int src_stride_u,
259
- const uint8_t* src_v,
260
- int src_stride_v,
261
- uint8_t* dst_argb,
262
- int dst_stride_argb,
263
- int width,
264
- int height);
265
-
266
- // Convert H422 to ABGR.
267
- LIBYUV_API
268
- int H422ToABGR(const uint8_t* src_y,
269
- int src_stride_y,
270
- const uint8_t* src_u,
271
- int src_stride_u,
272
- const uint8_t* src_v,
273
- int src_stride_v,
274
- uint8_t* dst_abgr,
275
- int dst_stride_abgr,
276
- int width,
277
- int height);
278
-
279
- // Convert U422 to ARGB.
280
- LIBYUV_API
281
- int U422ToARGB(const uint8_t* src_y,
282
- int src_stride_y,
283
- const uint8_t* src_u,
284
- int src_stride_u,
285
- const uint8_t* src_v,
286
- int src_stride_v,
287
- uint8_t* dst_argb,
288
- int dst_stride_argb,
289
- int width,
290
- int height);
291
-
292
- // Convert U422 to ABGR.
293
- LIBYUV_API
294
- int U422ToABGR(const uint8_t* src_y,
295
- int src_stride_y,
296
- const uint8_t* src_u,
297
- int src_stride_u,
298
- const uint8_t* src_v,
299
- int src_stride_v,
300
- uint8_t* dst_abgr,
301
- int dst_stride_abgr,
302
- int width,
303
- int height);
304
-
305
- // Convert I444 to ARGB.
306
- LIBYUV_API
307
- int I444ToARGB(const uint8_t* src_y,
308
- int src_stride_y,
309
- const uint8_t* src_u,
310
- int src_stride_u,
311
- const uint8_t* src_v,
312
- int src_stride_v,
313
- uint8_t* dst_argb,
314
- int dst_stride_argb,
315
- int width,
316
- int height);
317
-
318
- // Convert I444 to ABGR.
319
- LIBYUV_API
320
- int I444ToABGR(const uint8_t* src_y,
321
- int src_stride_y,
322
- const uint8_t* src_u,
323
- int src_stride_u,
324
- const uint8_t* src_v,
325
- int src_stride_v,
326
- uint8_t* dst_abgr,
327
- int dst_stride_abgr,
328
- int width,
329
- int height);
330
-
331
- // Convert J444 to ARGB.
332
- LIBYUV_API
333
- int J444ToARGB(const uint8_t* src_y,
334
- int src_stride_y,
335
- const uint8_t* src_u,
336
- int src_stride_u,
337
- const uint8_t* src_v,
338
- int src_stride_v,
339
- uint8_t* dst_argb,
340
- int dst_stride_argb,
341
- int width,
342
- int height);
343
-
344
- // Convert J444 to ABGR.
345
- LIBYUV_API
346
- int J444ToABGR(const uint8_t* src_y,
347
- int src_stride_y,
348
- const uint8_t* src_u,
349
- int src_stride_u,
350
- const uint8_t* src_v,
351
- int src_stride_v,
352
- uint8_t* dst_abgr,
353
- int dst_stride_abgr,
354
- int width,
355
- int height);
356
-
357
- // Convert H444 to ARGB.
358
- LIBYUV_API
359
- int H444ToARGB(const uint8_t* src_y,
360
- int src_stride_y,
361
- const uint8_t* src_u,
362
- int src_stride_u,
363
- const uint8_t* src_v,
364
- int src_stride_v,
365
- uint8_t* dst_argb,
366
- int dst_stride_argb,
367
- int width,
368
- int height);
369
-
370
- // Convert H444 to ABGR.
371
- LIBYUV_API
372
- int H444ToABGR(const uint8_t* src_y,
373
- int src_stride_y,
374
- const uint8_t* src_u,
375
- int src_stride_u,
376
- const uint8_t* src_v,
377
- int src_stride_v,
378
- uint8_t* dst_abgr,
379
- int dst_stride_abgr,
380
- int width,
381
- int height);
382
-
383
- // Convert U444 to ARGB.
384
- LIBYUV_API
385
- int U444ToARGB(const uint8_t* src_y,
386
- int src_stride_y,
387
- const uint8_t* src_u,
388
- int src_stride_u,
389
- const uint8_t* src_v,
390
- int src_stride_v,
391
- uint8_t* dst_argb,
392
- int dst_stride_argb,
393
- int width,
394
- int height);
395
-
396
- // Convert U444 to ABGR.
397
- LIBYUV_API
398
- int U444ToABGR(const uint8_t* src_y,
399
- int src_stride_y,
400
- const uint8_t* src_u,
401
- int src_stride_u,
402
- const uint8_t* src_v,
403
- int src_stride_v,
404
- uint8_t* dst_abgr,
405
- int dst_stride_abgr,
406
- int width,
407
- int height);
408
-
409
- // Convert I444 to RGB24.
410
- LIBYUV_API
411
- int I444ToRGB24(const uint8_t* src_y,
412
- int src_stride_y,
413
- const uint8_t* src_u,
414
- int src_stride_u,
415
- const uint8_t* src_v,
416
- int src_stride_v,
417
- uint8_t* dst_rgb24,
418
- int dst_stride_rgb24,
419
- int width,
420
- int height);
421
-
422
- // Convert I444 to RAW.
423
- LIBYUV_API
424
- int I444ToRAW(const uint8_t* src_y,
425
- int src_stride_y,
426
- const uint8_t* src_u,
427
- int src_stride_u,
428
- const uint8_t* src_v,
429
- int src_stride_v,
430
- uint8_t* dst_raw,
431
- int dst_stride_raw,
432
- int width,
433
- int height);
434
-
435
- // Convert I010 to ARGB.
436
- LIBYUV_API
437
- int I010ToARGB(const uint16_t* src_y,
438
- int src_stride_y,
439
- const uint16_t* src_u,
440
- int src_stride_u,
441
- const uint16_t* src_v,
442
- int src_stride_v,
443
- uint8_t* dst_argb,
444
- int dst_stride_argb,
445
- int width,
446
- int height);
447
-
448
- // Convert I010 to ABGR.
449
- LIBYUV_API
450
- int I010ToABGR(const uint16_t* src_y,
451
- int src_stride_y,
452
- const uint16_t* src_u,
453
- int src_stride_u,
454
- const uint16_t* src_v,
455
- int src_stride_v,
456
- uint8_t* dst_abgr,
457
- int dst_stride_abgr,
458
- int width,
459
- int height);
460
-
461
- // Convert H010 to ARGB.
462
- LIBYUV_API
463
- int H010ToARGB(const uint16_t* src_y,
464
- int src_stride_y,
465
- const uint16_t* src_u,
466
- int src_stride_u,
467
- const uint16_t* src_v,
468
- int src_stride_v,
469
- uint8_t* dst_argb,
470
- int dst_stride_argb,
471
- int width,
472
- int height);
473
-
474
- // Convert H010 to ABGR.
475
- LIBYUV_API
476
- int H010ToABGR(const uint16_t* src_y,
477
- int src_stride_y,
478
- const uint16_t* src_u,
479
- int src_stride_u,
480
- const uint16_t* src_v,
481
- int src_stride_v,
482
- uint8_t* dst_abgr,
483
- int dst_stride_abgr,
484
- int width,
485
- int height);
486
-
487
- // Convert U010 to ARGB.
488
- LIBYUV_API
489
- int U010ToARGB(const uint16_t* src_y,
490
- int src_stride_y,
491
- const uint16_t* src_u,
492
- int src_stride_u,
493
- const uint16_t* src_v,
494
- int src_stride_v,
495
- uint8_t* dst_argb,
496
- int dst_stride_argb,
497
- int width,
498
- int height);
499
-
500
- // Convert U010 to ABGR.
501
- LIBYUV_API
502
- int U010ToABGR(const uint16_t* src_y,
503
- int src_stride_y,
504
- const uint16_t* src_u,
505
- int src_stride_u,
506
- const uint16_t* src_v,
507
- int src_stride_v,
508
- uint8_t* dst_abgr,
509
- int dst_stride_abgr,
510
- int width,
511
- int height);
512
-
513
- // Convert I210 to ARGB.
514
- LIBYUV_API
515
- int I210ToARGB(const uint16_t* src_y,
516
- int src_stride_y,
517
- const uint16_t* src_u,
518
- int src_stride_u,
519
- const uint16_t* src_v,
520
- int src_stride_v,
521
- uint8_t* dst_argb,
522
- int dst_stride_argb,
523
- int width,
524
- int height);
525
-
526
- // Convert I210 to ABGR.
527
- LIBYUV_API
528
- int I210ToABGR(const uint16_t* src_y,
529
- int src_stride_y,
530
- const uint16_t* src_u,
531
- int src_stride_u,
532
- const uint16_t* src_v,
533
- int src_stride_v,
534
- uint8_t* dst_abgr,
535
- int dst_stride_abgr,
536
- int width,
537
- int height);
538
-
539
- // Convert H210 to ARGB.
540
- LIBYUV_API
541
- int H210ToARGB(const uint16_t* src_y,
542
- int src_stride_y,
543
- const uint16_t* src_u,
544
- int src_stride_u,
545
- const uint16_t* src_v,
546
- int src_stride_v,
547
- uint8_t* dst_argb,
548
- int dst_stride_argb,
549
- int width,
550
- int height);
551
-
552
- // Convert H210 to ABGR.
553
- LIBYUV_API
554
- int H210ToABGR(const uint16_t* src_y,
555
- int src_stride_y,
556
- const uint16_t* src_u,
557
- int src_stride_u,
558
- const uint16_t* src_v,
559
- int src_stride_v,
560
- uint8_t* dst_abgr,
561
- int dst_stride_abgr,
562
- int width,
563
- int height);
564
-
565
- // Convert U210 to ARGB.
566
- LIBYUV_API
567
- int U210ToARGB(const uint16_t* src_y,
568
- int src_stride_y,
569
- const uint16_t* src_u,
570
- int src_stride_u,
571
- const uint16_t* src_v,
572
- int src_stride_v,
573
- uint8_t* dst_argb,
574
- int dst_stride_argb,
575
- int width,
576
- int height);
577
-
578
- // Convert U210 to ABGR.
579
- LIBYUV_API
580
- int U210ToABGR(const uint16_t* src_y,
581
- int src_stride_y,
582
- const uint16_t* src_u,
583
- int src_stride_u,
584
- const uint16_t* src_v,
585
- int src_stride_v,
586
- uint8_t* dst_abgr,
587
- int dst_stride_abgr,
588
- int width,
589
- int height);
590
-
591
- // Convert I420 with Alpha to preattenuated ARGB.
592
- LIBYUV_API
593
- int I420AlphaToARGB(const uint8_t* src_y,
594
- int src_stride_y,
595
- const uint8_t* src_u,
596
- int src_stride_u,
597
- const uint8_t* src_v,
598
- int src_stride_v,
599
- const uint8_t* src_a,
600
- int src_stride_a,
601
- uint8_t* dst_argb,
602
- int dst_stride_argb,
603
- int width,
604
- int height,
605
- int attenuate);
606
-
607
- // Convert I420 with Alpha to preattenuated ABGR.
608
- LIBYUV_API
609
- int I420AlphaToABGR(const uint8_t* src_y,
610
- int src_stride_y,
611
- const uint8_t* src_u,
612
- int src_stride_u,
613
- const uint8_t* src_v,
614
- int src_stride_v,
615
- const uint8_t* src_a,
616
- int src_stride_a,
617
- uint8_t* dst_abgr,
618
- int dst_stride_abgr,
619
- int width,
620
- int height,
621
- int attenuate);
622
-
623
- // Convert I422 with Alpha to preattenuated ARGB.
624
- LIBYUV_API
625
- int I422AlphaToARGB(const uint8_t* src_y,
626
- int src_stride_y,
627
- const uint8_t* src_u,
628
- int src_stride_u,
629
- const uint8_t* src_v,
630
- int src_stride_v,
631
- const uint8_t* src_a,
632
- int src_stride_a,
633
- uint8_t* dst_argb,
634
- int dst_stride_argb,
635
- int width,
636
- int height,
637
- int attenuate);
638
-
639
- // Convert I422 with Alpha to preattenuated ABGR.
640
- LIBYUV_API
641
- int I422AlphaToABGR(const uint8_t* src_y,
642
- int src_stride_y,
643
- const uint8_t* src_u,
644
- int src_stride_u,
645
- const uint8_t* src_v,
646
- int src_stride_v,
647
- const uint8_t* src_a,
648
- int src_stride_a,
649
- uint8_t* dst_abgr,
650
- int dst_stride_abgr,
651
- int width,
652
- int height,
653
- int attenuate);
654
-
655
- // Convert I444 with Alpha to preattenuated ARGB.
656
- LIBYUV_API
657
- int I444AlphaToARGB(const uint8_t* src_y,
658
- int src_stride_y,
659
- const uint8_t* src_u,
660
- int src_stride_u,
661
- const uint8_t* src_v,
662
- int src_stride_v,
663
- const uint8_t* src_a,
664
- int src_stride_a,
665
- uint8_t* dst_argb,
666
- int dst_stride_argb,
667
- int width,
668
- int height,
669
- int attenuate);
670
-
671
- // Convert I444 with Alpha to preattenuated ABGR.
672
- LIBYUV_API
673
- int I444AlphaToABGR(const uint8_t* src_y,
674
- int src_stride_y,
675
- const uint8_t* src_u,
676
- int src_stride_u,
677
- const uint8_t* src_v,
678
- int src_stride_v,
679
- const uint8_t* src_a,
680
- int src_stride_a,
681
- uint8_t* dst_abgr,
682
- int dst_stride_abgr,
683
- int width,
684
- int height,
685
- int attenuate);
686
-
687
- // Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
688
- LIBYUV_API
689
- int I400ToARGB(const uint8_t* src_y,
690
- int src_stride_y,
691
- uint8_t* dst_argb,
692
- int dst_stride_argb,
693
- int width,
694
- int height);
695
-
696
- // Convert J400 (jpeg grey) to ARGB.
697
- LIBYUV_API
698
- int J400ToARGB(const uint8_t* src_y,
699
- int src_stride_y,
700
- uint8_t* dst_argb,
701
- int dst_stride_argb,
702
- int width,
703
- int height);
704
-
705
- // Alias.
706
- #define YToARGB I400ToARGB
707
-
708
- // Convert NV12 to ARGB.
709
- LIBYUV_API
710
- int NV12ToARGB(const uint8_t* src_y,
711
- int src_stride_y,
712
- const uint8_t* src_uv,
713
- int src_stride_uv,
714
- uint8_t* dst_argb,
715
- int dst_stride_argb,
716
- int width,
717
- int height);
718
-
719
- // Convert NV21 to ARGB.
720
- LIBYUV_API
721
- int NV21ToARGB(const uint8_t* src_y,
722
- int src_stride_y,
723
- const uint8_t* src_vu,
724
- int src_stride_vu,
725
- uint8_t* dst_argb,
726
- int dst_stride_argb,
727
- int width,
728
- int height);
729
-
730
- // Convert NV12 to ABGR.
731
- LIBYUV_API
732
- int NV12ToABGR(const uint8_t* src_y,
733
- int src_stride_y,
734
- const uint8_t* src_uv,
735
- int src_stride_uv,
736
- uint8_t* dst_abgr,
737
- int dst_stride_abgr,
738
- int width,
739
- int height);
740
-
741
- // Convert NV21 to ABGR.
742
- LIBYUV_API
743
- int NV21ToABGR(const uint8_t* src_y,
744
- int src_stride_y,
745
- const uint8_t* src_vu,
746
- int src_stride_vu,
747
- uint8_t* dst_abgr,
748
- int dst_stride_abgr,
749
- int width,
750
- int height);
751
-
752
- // Convert NV12 to RGB24.
753
- LIBYUV_API
754
- int NV12ToRGB24(const uint8_t* src_y,
755
- int src_stride_y,
756
- const uint8_t* src_uv,
757
- int src_stride_uv,
758
- uint8_t* dst_rgb24,
759
- int dst_stride_rgb24,
760
- int width,
761
- int height);
762
-
763
- // Convert NV21 to RGB24.
764
- LIBYUV_API
765
- int NV21ToRGB24(const uint8_t* src_y,
766
- int src_stride_y,
767
- const uint8_t* src_vu,
768
- int src_stride_vu,
769
- uint8_t* dst_rgb24,
770
- int dst_stride_rgb24,
771
- int width,
772
- int height);
773
-
774
- // Convert NV21 to YUV24.
775
- LIBYUV_API
776
- int NV21ToYUV24(const uint8_t* src_y,
777
- int src_stride_y,
778
- const uint8_t* src_vu,
779
- int src_stride_vu,
780
- uint8_t* dst_yuv24,
781
- int dst_stride_yuv24,
782
- int width,
783
- int height);
784
-
785
- // Convert NV12 to RAW.
786
- LIBYUV_API
787
- int NV12ToRAW(const uint8_t* src_y,
788
- int src_stride_y,
789
- const uint8_t* src_uv,
790
- int src_stride_uv,
791
- uint8_t* dst_raw,
792
- int dst_stride_raw,
793
- int width,
794
- int height);
795
-
796
- // Convert NV21 to RAW.
797
- LIBYUV_API
798
- int NV21ToRAW(const uint8_t* src_y,
799
- int src_stride_y,
800
- const uint8_t* src_vu,
801
- int src_stride_vu,
802
- uint8_t* dst_raw,
803
- int dst_stride_raw,
804
- int width,
805
- int height);
806
-
807
- // Convert YUY2 to ARGB.
808
- LIBYUV_API
809
- int YUY2ToARGB(const uint8_t* src_yuy2,
810
- int src_stride_yuy2,
811
- uint8_t* dst_argb,
812
- int dst_stride_argb,
813
- int width,
814
- int height);
815
-
816
- // Convert UYVY to ARGB.
817
- LIBYUV_API
818
- int UYVYToARGB(const uint8_t* src_uyvy,
819
- int src_stride_uyvy,
820
- uint8_t* dst_argb,
821
- int dst_stride_argb,
822
- int width,
823
- int height);
824
-
825
- // Convert I010 to AR30.
826
- LIBYUV_API
827
- int I010ToAR30(const uint16_t* src_y,
828
- int src_stride_y,
829
- const uint16_t* src_u,
830
- int src_stride_u,
831
- const uint16_t* src_v,
832
- int src_stride_v,
833
- uint8_t* dst_ar30,
834
- int dst_stride_ar30,
835
- int width,
836
- int height);
837
-
838
- // Convert H010 to AR30.
839
- LIBYUV_API
840
- int H010ToAR30(const uint16_t* src_y,
841
- int src_stride_y,
842
- const uint16_t* src_u,
843
- int src_stride_u,
844
- const uint16_t* src_v,
845
- int src_stride_v,
846
- uint8_t* dst_ar30,
847
- int dst_stride_ar30,
848
- int width,
849
- int height);
850
-
851
- // Convert I010 to AB30.
852
- LIBYUV_API
853
- int I010ToAB30(const uint16_t* src_y,
854
- int src_stride_y,
855
- const uint16_t* src_u,
856
- int src_stride_u,
857
- const uint16_t* src_v,
858
- int src_stride_v,
859
- uint8_t* dst_ab30,
860
- int dst_stride_ab30,
861
- int width,
862
- int height);
863
-
864
- // Convert H010 to AB30.
865
- LIBYUV_API
866
- int H010ToAB30(const uint16_t* src_y,
867
- int src_stride_y,
868
- const uint16_t* src_u,
869
- int src_stride_u,
870
- const uint16_t* src_v,
871
- int src_stride_v,
872
- uint8_t* dst_ab30,
873
- int dst_stride_ab30,
874
- int width,
875
- int height);
876
-
877
- // Convert U010 to AR30.
878
- LIBYUV_API
879
- int U010ToAR30(const uint16_t* src_y,
880
- int src_stride_y,
881
- const uint16_t* src_u,
882
- int src_stride_u,
883
- const uint16_t* src_v,
884
- int src_stride_v,
885
- uint8_t* dst_ar30,
886
- int dst_stride_ar30,
887
- int width,
888
- int height);
889
-
890
- // Convert U010 to AB30.
891
- LIBYUV_API
892
- int U010ToAB30(const uint16_t* src_y,
893
- int src_stride_y,
894
- const uint16_t* src_u,
895
- int src_stride_u,
896
- const uint16_t* src_v,
897
- int src_stride_v,
898
- uint8_t* dst_ab30,
899
- int dst_stride_ab30,
900
- int width,
901
- int height);
902
-
903
- // Convert I210 to AR30.
904
- LIBYUV_API
905
- int I210ToAR30(const uint16_t* src_y,
906
- int src_stride_y,
907
- const uint16_t* src_u,
908
- int src_stride_u,
909
- const uint16_t* src_v,
910
- int src_stride_v,
911
- uint8_t* dst_ar30,
912
- int dst_stride_ar30,
913
- int width,
914
- int height);
915
-
916
- // Convert I210 to AB30.
917
- LIBYUV_API
918
- int I210ToAB30(const uint16_t* src_y,
919
- int src_stride_y,
920
- const uint16_t* src_u,
921
- int src_stride_u,
922
- const uint16_t* src_v,
923
- int src_stride_v,
924
- uint8_t* dst_ab30,
925
- int dst_stride_ab30,
926
- int width,
927
- int height);
928
-
929
- // Convert H210 to AR30.
930
- LIBYUV_API
931
- int H210ToAR30(const uint16_t* src_y,
932
- int src_stride_y,
933
- const uint16_t* src_u,
934
- int src_stride_u,
935
- const uint16_t* src_v,
936
- int src_stride_v,
937
- uint8_t* dst_ar30,
938
- int dst_stride_ar30,
939
- int width,
940
- int height);
941
-
942
- // Convert H210 to AB30.
943
- LIBYUV_API
944
- int H210ToAB30(const uint16_t* src_y,
945
- int src_stride_y,
946
- const uint16_t* src_u,
947
- int src_stride_u,
948
- const uint16_t* src_v,
949
- int src_stride_v,
950
- uint8_t* dst_ab30,
951
- int dst_stride_ab30,
952
- int width,
953
- int height);
954
-
955
- // Convert U210 to AR30.
956
- LIBYUV_API
957
- int U210ToAR30(const uint16_t* src_y,
958
- int src_stride_y,
959
- const uint16_t* src_u,
960
- int src_stride_u,
961
- const uint16_t* src_v,
962
- int src_stride_v,
963
- uint8_t* dst_ar30,
964
- int dst_stride_ar30,
965
- int width,
966
- int height);
967
-
968
- // Convert U210 to AB30.
969
- LIBYUV_API
970
- int U210ToAB30(const uint16_t* src_y,
971
- int src_stride_y,
972
- const uint16_t* src_u,
973
- int src_stride_u,
974
- const uint16_t* src_v,
975
- int src_stride_v,
976
- uint8_t* dst_ab30,
977
- int dst_stride_ab30,
978
- int width,
979
- int height);
980
-
981
- // BGRA little endian (argb in memory) to ARGB.
982
- LIBYUV_API
983
- int BGRAToARGB(const uint8_t* src_bgra,
984
- int src_stride_bgra,
985
- uint8_t* dst_argb,
986
- int dst_stride_argb,
987
- int width,
988
- int height);
989
-
990
- // ABGR little endian (rgba in memory) to ARGB.
991
- LIBYUV_API
992
- int ABGRToARGB(const uint8_t* src_abgr,
993
- int src_stride_abgr,
994
- uint8_t* dst_argb,
995
- int dst_stride_argb,
996
- int width,
997
- int height);
998
-
999
- // RGBA little endian (abgr in memory) to ARGB.
1000
- LIBYUV_API
1001
- int RGBAToARGB(const uint8_t* src_rgba,
1002
- int src_stride_rgba,
1003
- uint8_t* dst_argb,
1004
- int dst_stride_argb,
1005
- int width,
1006
- int height);
1007
-
1008
- // Deprecated function name.
1009
- #define BG24ToARGB RGB24ToARGB
1010
-
1011
- // RGB little endian (bgr in memory) to ARGB.
1012
- LIBYUV_API
1013
- int RGB24ToARGB(const uint8_t* src_rgb24,
1014
- int src_stride_rgb24,
1015
- uint8_t* dst_argb,
1016
- int dst_stride_argb,
1017
- int width,
1018
- int height);
1019
-
1020
- // RGB big endian (rgb in memory) to ARGB.
1021
- LIBYUV_API
1022
- int RAWToARGB(const uint8_t* src_raw,
1023
- int src_stride_raw,
1024
- uint8_t* dst_argb,
1025
- int dst_stride_argb,
1026
- int width,
1027
- int height);
1028
-
1029
- // RGB big endian (rgb in memory) to RGBA.
1030
- LIBYUV_API
1031
- int RAWToRGBA(const uint8_t* src_raw,
1032
- int src_stride_raw,
1033
- uint8_t* dst_rgba,
1034
- int dst_stride_rgba,
1035
- int width,
1036
- int height);
1037
-
1038
- // RGB16 (RGBP fourcc) little endian to ARGB.
1039
- LIBYUV_API
1040
- int RGB565ToARGB(const uint8_t* src_rgb565,
1041
- int src_stride_rgb565,
1042
- uint8_t* dst_argb,
1043
- int dst_stride_argb,
1044
- int width,
1045
- int height);
1046
-
1047
- // RGB15 (RGBO fourcc) little endian to ARGB.
1048
- LIBYUV_API
1049
- int ARGB1555ToARGB(const uint8_t* src_argb1555,
1050
- int src_stride_argb1555,
1051
- uint8_t* dst_argb,
1052
- int dst_stride_argb,
1053
- int width,
1054
- int height);
1055
-
1056
- // RGB12 (R444 fourcc) little endian to ARGB.
1057
- LIBYUV_API
1058
- int ARGB4444ToARGB(const uint8_t* src_argb4444,
1059
- int src_stride_argb4444,
1060
- uint8_t* dst_argb,
1061
- int dst_stride_argb,
1062
- int width,
1063
- int height);
1064
-
1065
- // Aliases
1066
- #define AB30ToARGB AR30ToABGR
1067
- #define AB30ToABGR AR30ToARGB
1068
- #define AB30ToAR30 AR30ToAB30
1069
-
1070
- // Convert AR30 To ARGB.
1071
- LIBYUV_API
1072
- int AR30ToARGB(const uint8_t* src_ar30,
1073
- int src_stride_ar30,
1074
- uint8_t* dst_argb,
1075
- int dst_stride_argb,
1076
- int width,
1077
- int height);
1078
-
1079
- // Convert AR30 To ABGR.
1080
- LIBYUV_API
1081
- int AR30ToABGR(const uint8_t* src_ar30,
1082
- int src_stride_ar30,
1083
- uint8_t* dst_abgr,
1084
- int dst_stride_abgr,
1085
- int width,
1086
- int height);
1087
-
1088
- // Convert AR30 To AB30.
1089
- LIBYUV_API
1090
- int AR30ToAB30(const uint8_t* src_ar30,
1091
- int src_stride_ar30,
1092
- uint8_t* dst_ab30,
1093
- int dst_stride_ab30,
1094
- int width,
1095
- int height);
1096
-
1097
- // Convert AR64 to ARGB.
1098
- LIBYUV_API
1099
- int AR64ToARGB(const uint16_t* src_ar64,
1100
- int src_stride_ar64,
1101
- uint8_t* dst_argb,
1102
- int dst_stride_argb,
1103
- int width,
1104
- int height);
1105
-
1106
- // Convert AB64 to ABGR.
1107
- #define AB64ToABGR AR64ToARGB
1108
-
1109
- // Convert AB64 to ARGB.
1110
- LIBYUV_API
1111
- int AB64ToARGB(const uint16_t* src_ab64,
1112
- int src_stride_ab64,
1113
- uint8_t* dst_argb,
1114
- int dst_stride_argb,
1115
- int width,
1116
- int height);
1117
-
1118
- // Convert AR64 to ABGR.
1119
- #define AR64ToABGR AB64ToARGB
1120
-
1121
- // Convert AR64 To AB64.
1122
- LIBYUV_API
1123
- int AR64ToAB64(const uint16_t* src_ar64,
1124
- int src_stride_ar64,
1125
- uint16_t* dst_ab64,
1126
- int dst_stride_ab64,
1127
- int width,
1128
- int height);
1129
-
1130
- // Convert AB64 To AR64.
1131
- #define AB64ToAR64 AR64ToAB64
1132
-
1133
- // src_width/height provided by capture
1134
- // dst_width/height for clipping determine final size.
1135
- LIBYUV_API
1136
- int MJPGToARGB(const uint8_t* sample,
1137
- size_t sample_size,
1138
- uint8_t* dst_argb,
1139
- int dst_stride_argb,
1140
- int src_width,
1141
- int src_height,
1142
- int dst_width,
1143
- int dst_height);
1144
-
1145
- // Convert Android420 to ARGB.
1146
- LIBYUV_API
1147
- int Android420ToARGB(const uint8_t* src_y,
1148
- int src_stride_y,
1149
- const uint8_t* src_u,
1150
- int src_stride_u,
1151
- const uint8_t* src_v,
1152
- int src_stride_v,
1153
- int src_pixel_stride_uv,
1154
- uint8_t* dst_argb,
1155
- int dst_stride_argb,
1156
- int width,
1157
- int height);
1158
-
1159
- // Convert Android420 to ABGR.
1160
- LIBYUV_API
1161
- int Android420ToABGR(const uint8_t* src_y,
1162
- int src_stride_y,
1163
- const uint8_t* src_u,
1164
- int src_stride_u,
1165
- const uint8_t* src_v,
1166
- int src_stride_v,
1167
- int src_pixel_stride_uv,
1168
- uint8_t* dst_abgr,
1169
- int dst_stride_abgr,
1170
- int width,
1171
- int height);
1172
-
1173
- // Convert NV12 to RGB565.
1174
- LIBYUV_API
1175
- int NV12ToRGB565(const uint8_t* src_y,
1176
- int src_stride_y,
1177
- const uint8_t* src_uv,
1178
- int src_stride_uv,
1179
- uint8_t* dst_rgb565,
1180
- int dst_stride_rgb565,
1181
- int width,
1182
- int height);
1183
-
1184
- // Convert I422 to BGRA.
1185
- LIBYUV_API
1186
- int I422ToBGRA(const uint8_t* src_y,
1187
- int src_stride_y,
1188
- const uint8_t* src_u,
1189
- int src_stride_u,
1190
- const uint8_t* src_v,
1191
- int src_stride_v,
1192
- uint8_t* dst_bgra,
1193
- int dst_stride_bgra,
1194
- int width,
1195
- int height);
1196
-
1197
- // Convert I422 to ABGR.
1198
- LIBYUV_API
1199
- int I422ToABGR(const uint8_t* src_y,
1200
- int src_stride_y,
1201
- const uint8_t* src_u,
1202
- int src_stride_u,
1203
- const uint8_t* src_v,
1204
- int src_stride_v,
1205
- uint8_t* dst_abgr,
1206
- int dst_stride_abgr,
1207
- int width,
1208
- int height);
1209
-
1210
- // Convert I422 to RGBA.
1211
- LIBYUV_API
1212
- int I422ToRGBA(const uint8_t* src_y,
1213
- int src_stride_y,
1214
- const uint8_t* src_u,
1215
- int src_stride_u,
1216
- const uint8_t* src_v,
1217
- int src_stride_v,
1218
- uint8_t* dst_rgba,
1219
- int dst_stride_rgba,
1220
- int width,
1221
- int height);
1222
-
1223
- LIBYUV_API
1224
- int I420ToARGB(const uint8_t* src_y,
1225
- int src_stride_y,
1226
- const uint8_t* src_u,
1227
- int src_stride_u,
1228
- const uint8_t* src_v,
1229
- int src_stride_v,
1230
- uint8_t* dst_argb,
1231
- int dst_stride_argb,
1232
- int width,
1233
- int height);
1234
-
1235
- LIBYUV_API
1236
- int I420ToBGRA(const uint8_t* src_y,
1237
- int src_stride_y,
1238
- const uint8_t* src_u,
1239
- int src_stride_u,
1240
- const uint8_t* src_v,
1241
- int src_stride_v,
1242
- uint8_t* dst_bgra,
1243
- int dst_stride_bgra,
1244
- int width,
1245
- int height);
1246
-
1247
- LIBYUV_API
1248
- int I420ToABGR(const uint8_t* src_y,
1249
- int src_stride_y,
1250
- const uint8_t* src_u,
1251
- int src_stride_u,
1252
- const uint8_t* src_v,
1253
- int src_stride_v,
1254
- uint8_t* dst_abgr,
1255
- int dst_stride_abgr,
1256
- int width,
1257
- int height);
1258
-
1259
- LIBYUV_API
1260
- int I420ToRGBA(const uint8_t* src_y,
1261
- int src_stride_y,
1262
- const uint8_t* src_u,
1263
- int src_stride_u,
1264
- const uint8_t* src_v,
1265
- int src_stride_v,
1266
- uint8_t* dst_rgba,
1267
- int dst_stride_rgba,
1268
- int width,
1269
- int height);
1270
-
1271
- LIBYUV_API
1272
- int I420ToRGB24(const uint8_t* src_y,
1273
- int src_stride_y,
1274
- const uint8_t* src_u,
1275
- int src_stride_u,
1276
- const uint8_t* src_v,
1277
- int src_stride_v,
1278
- uint8_t* dst_rgb24,
1279
- int dst_stride_rgb24,
1280
- int width,
1281
- int height);
1282
-
1283
- LIBYUV_API
1284
- int I420ToRAW(const uint8_t* src_y,
1285
- int src_stride_y,
1286
- const uint8_t* src_u,
1287
- int src_stride_u,
1288
- const uint8_t* src_v,
1289
- int src_stride_v,
1290
- uint8_t* dst_raw,
1291
- int dst_stride_raw,
1292
- int width,
1293
- int height);
1294
-
1295
- LIBYUV_API
1296
- int H420ToRGB24(const uint8_t* src_y,
1297
- int src_stride_y,
1298
- const uint8_t* src_u,
1299
- int src_stride_u,
1300
- const uint8_t* src_v,
1301
- int src_stride_v,
1302
- uint8_t* dst_rgb24,
1303
- int dst_stride_rgb24,
1304
- int width,
1305
- int height);
1306
-
1307
- LIBYUV_API
1308
- int H420ToRAW(const uint8_t* src_y,
1309
- int src_stride_y,
1310
- const uint8_t* src_u,
1311
- int src_stride_u,
1312
- const uint8_t* src_v,
1313
- int src_stride_v,
1314
- uint8_t* dst_raw,
1315
- int dst_stride_raw,
1316
- int width,
1317
- int height);
1318
-
1319
- LIBYUV_API
1320
- int J420ToRGB24(const uint8_t* src_y,
1321
- int src_stride_y,
1322
- const uint8_t* src_u,
1323
- int src_stride_u,
1324
- const uint8_t* src_v,
1325
- int src_stride_v,
1326
- uint8_t* dst_rgb24,
1327
- int dst_stride_rgb24,
1328
- int width,
1329
- int height);
1330
-
1331
- LIBYUV_API
1332
- int J420ToRAW(const uint8_t* src_y,
1333
- int src_stride_y,
1334
- const uint8_t* src_u,
1335
- int src_stride_u,
1336
- const uint8_t* src_v,
1337
- int src_stride_v,
1338
- uint8_t* dst_raw,
1339
- int dst_stride_raw,
1340
- int width,
1341
- int height);
1342
-
1343
- // Convert I422 to RGB24.
1344
- LIBYUV_API
1345
- int I422ToRGB24(const uint8_t* src_y,
1346
- int src_stride_y,
1347
- const uint8_t* src_u,
1348
- int src_stride_u,
1349
- const uint8_t* src_v,
1350
- int src_stride_v,
1351
- uint8_t* dst_rgb24,
1352
- int dst_stride_rgb24,
1353
- int width,
1354
- int height);
1355
-
1356
- // Convert I422 to RAW.
1357
- LIBYUV_API
1358
- int I422ToRAW(const uint8_t* src_y,
1359
- int src_stride_y,
1360
- const uint8_t* src_u,
1361
- int src_stride_u,
1362
- const uint8_t* src_v,
1363
- int src_stride_v,
1364
- uint8_t* dst_raw,
1365
- int dst_stride_raw,
1366
- int width,
1367
- int height);
1368
-
1369
- LIBYUV_API
1370
- int I420ToRGB565(const uint8_t* src_y,
1371
- int src_stride_y,
1372
- const uint8_t* src_u,
1373
- int src_stride_u,
1374
- const uint8_t* src_v,
1375
- int src_stride_v,
1376
- uint8_t* dst_rgb565,
1377
- int dst_stride_rgb565,
1378
- int width,
1379
- int height);
1380
-
1381
- LIBYUV_API
1382
- int J420ToRGB565(const uint8_t* src_y,
1383
- int src_stride_y,
1384
- const uint8_t* src_u,
1385
- int src_stride_u,
1386
- const uint8_t* src_v,
1387
- int src_stride_v,
1388
- uint8_t* dst_rgb565,
1389
- int dst_stride_rgb565,
1390
- int width,
1391
- int height);
1392
-
1393
- LIBYUV_API
1394
- int H420ToRGB565(const uint8_t* src_y,
1395
- int src_stride_y,
1396
- const uint8_t* src_u,
1397
- int src_stride_u,
1398
- const uint8_t* src_v,
1399
- int src_stride_v,
1400
- uint8_t* dst_rgb565,
1401
- int dst_stride_rgb565,
1402
- int width,
1403
- int height);
1404
-
1405
- LIBYUV_API
1406
- int I422ToRGB565(const uint8_t* src_y,
1407
- int src_stride_y,
1408
- const uint8_t* src_u,
1409
- int src_stride_u,
1410
- const uint8_t* src_v,
1411
- int src_stride_v,
1412
- uint8_t* dst_rgb565,
1413
- int dst_stride_rgb565,
1414
- int width,
1415
- int height);
1416
-
1417
- // Convert I420 To RGB565 with 4x4 dither matrix (16 bytes).
1418
- // Values in dither matrix from 0 to 7 recommended.
1419
- // The order of the dither matrix is first byte is upper left.
1420
-
1421
- LIBYUV_API
1422
- int I420ToRGB565Dither(const uint8_t* src_y,
1423
- int src_stride_y,
1424
- const uint8_t* src_u,
1425
- int src_stride_u,
1426
- const uint8_t* src_v,
1427
- int src_stride_v,
1428
- uint8_t* dst_rgb565,
1429
- int dst_stride_rgb565,
1430
- const uint8_t* dither4x4,
1431
- int width,
1432
- int height);
1433
-
1434
- LIBYUV_API
1435
- int I420ToARGB1555(const uint8_t* src_y,
1436
- int src_stride_y,
1437
- const uint8_t* src_u,
1438
- int src_stride_u,
1439
- const uint8_t* src_v,
1440
- int src_stride_v,
1441
- uint8_t* dst_argb1555,
1442
- int dst_stride_argb1555,
1443
- int width,
1444
- int height);
1445
-
1446
- LIBYUV_API
1447
- int I420ToARGB4444(const uint8_t* src_y,
1448
- int src_stride_y,
1449
- const uint8_t* src_u,
1450
- int src_stride_u,
1451
- const uint8_t* src_v,
1452
- int src_stride_v,
1453
- uint8_t* dst_argb4444,
1454
- int dst_stride_argb4444,
1455
- int width,
1456
- int height);
1457
-
1458
- // Convert I420 to AR30.
1459
- LIBYUV_API
1460
- int I420ToAR30(const uint8_t* src_y,
1461
- int src_stride_y,
1462
- const uint8_t* src_u,
1463
- int src_stride_u,
1464
- const uint8_t* src_v,
1465
- int src_stride_v,
1466
- uint8_t* dst_ar30,
1467
- int dst_stride_ar30,
1468
- int width,
1469
- int height);
1470
-
1471
- // Convert I420 to AB30.
1472
- LIBYUV_API
1473
- int I420ToAB30(const uint8_t* src_y,
1474
- int src_stride_y,
1475
- const uint8_t* src_u,
1476
- int src_stride_u,
1477
- const uint8_t* src_v,
1478
- int src_stride_v,
1479
- uint8_t* dst_ab30,
1480
- int dst_stride_ab30,
1481
- int width,
1482
- int height);
1483
-
1484
- // Convert H420 to AR30.
1485
- LIBYUV_API
1486
- int H420ToAR30(const uint8_t* src_y,
1487
- int src_stride_y,
1488
- const uint8_t* src_u,
1489
- int src_stride_u,
1490
- const uint8_t* src_v,
1491
- int src_stride_v,
1492
- uint8_t* dst_ar30,
1493
- int dst_stride_ar30,
1494
- int width,
1495
- int height);
1496
-
1497
- // Convert H420 to AB30.
1498
- LIBYUV_API
1499
- int H420ToAB30(const uint8_t* src_y,
1500
- int src_stride_y,
1501
- const uint8_t* src_u,
1502
- int src_stride_u,
1503
- const uint8_t* src_v,
1504
- int src_stride_v,
1505
- uint8_t* dst_ab30,
1506
- int dst_stride_ab30,
1507
- int width,
1508
- int height);
1509
-
1510
- // Convert I420 to ARGB with matrix.
1511
- LIBYUV_API
1512
- int I420ToARGBMatrix(const uint8_t* src_y,
1513
- int src_stride_y,
1514
- const uint8_t* src_u,
1515
- int src_stride_u,
1516
- const uint8_t* src_v,
1517
- int src_stride_v,
1518
- uint8_t* dst_argb,
1519
- int dst_stride_argb,
1520
- const struct YuvConstants* yuvconstants,
1521
- int width,
1522
- int height);
1523
-
1524
- // Convert I422 to ARGB with matrix.
1525
- LIBYUV_API
1526
- int I422ToARGBMatrix(const uint8_t* src_y,
1527
- int src_stride_y,
1528
- const uint8_t* src_u,
1529
- int src_stride_u,
1530
- const uint8_t* src_v,
1531
- int src_stride_v,
1532
- uint8_t* dst_argb,
1533
- int dst_stride_argb,
1534
- const struct YuvConstants* yuvconstants,
1535
- int width,
1536
- int height);
1537
-
1538
- // Convert I444 to ARGB with matrix.
1539
- LIBYUV_API
1540
- int I444ToARGBMatrix(const uint8_t* src_y,
1541
- int src_stride_y,
1542
- const uint8_t* src_u,
1543
- int src_stride_u,
1544
- const uint8_t* src_v,
1545
- int src_stride_v,
1546
- uint8_t* dst_argb,
1547
- int dst_stride_argb,
1548
- const struct YuvConstants* yuvconstants,
1549
- int width,
1550
- int height);
1551
-
1552
- // Convert I444 to RGB24 with matrix.
1553
- LIBYUV_API
1554
- int I444ToRGB24Matrix(const uint8_t* src_y,
1555
- int src_stride_y,
1556
- const uint8_t* src_u,
1557
- int src_stride_u,
1558
- const uint8_t* src_v,
1559
- int src_stride_v,
1560
- uint8_t* dst_rgb24,
1561
- int dst_stride_rgb24,
1562
- const struct YuvConstants* yuvconstants,
1563
- int width,
1564
- int height);
1565
-
1566
- // Convert 10 bit 420 YUV to ARGB with matrix.
1567
- LIBYUV_API
1568
- int I010ToAR30Matrix(const uint16_t* src_y,
1569
- int src_stride_y,
1570
- const uint16_t* src_u,
1571
- int src_stride_u,
1572
- const uint16_t* src_v,
1573
- int src_stride_v,
1574
- uint8_t* dst_ar30,
1575
- int dst_stride_ar30,
1576
- const struct YuvConstants* yuvconstants,
1577
- int width,
1578
- int height);
1579
-
1580
- // Convert 10 bit 420 YUV to ARGB with matrix.
1581
- LIBYUV_API
1582
- int I210ToAR30Matrix(const uint16_t* src_y,
1583
- int src_stride_y,
1584
- const uint16_t* src_u,
1585
- int src_stride_u,
1586
- const uint16_t* src_v,
1587
- int src_stride_v,
1588
- uint8_t* dst_ar30,
1589
- int dst_stride_ar30,
1590
- const struct YuvConstants* yuvconstants,
1591
- int width,
1592
- int height);
1593
-
1594
- // Convert 10 bit 444 YUV to ARGB with matrix.
1595
- LIBYUV_API
1596
- int I410ToAR30Matrix(const uint16_t* src_y,
1597
- int src_stride_y,
1598
- const uint16_t* src_u,
1599
- int src_stride_u,
1600
- const uint16_t* src_v,
1601
- int src_stride_v,
1602
- uint8_t* dst_ar30,
1603
- int dst_stride_ar30,
1604
- const struct YuvConstants* yuvconstants,
1605
- int width,
1606
- int height);
1607
-
1608
- // Convert 10 bit YUV to ARGB with matrix.
1609
- LIBYUV_API
1610
- int I010ToARGBMatrix(const uint16_t* src_y,
1611
- int src_stride_y,
1612
- const uint16_t* src_u,
1613
- int src_stride_u,
1614
- const uint16_t* src_v,
1615
- int src_stride_v,
1616
- uint8_t* dst_argb,
1617
- int dst_stride_argb,
1618
- const struct YuvConstants* yuvconstants,
1619
- int width,
1620
- int height);
1621
-
1622
- // multiply 12 bit yuv into high bits to allow any number of bits.
1623
- LIBYUV_API
1624
- int I012ToAR30Matrix(const uint16_t* src_y,
1625
- int src_stride_y,
1626
- const uint16_t* src_u,
1627
- int src_stride_u,
1628
- const uint16_t* src_v,
1629
- int src_stride_v,
1630
- uint8_t* dst_ar30,
1631
- int dst_stride_ar30,
1632
- const struct YuvConstants* yuvconstants,
1633
- int width,
1634
- int height);
1635
-
1636
- // Convert 12 bit YUV to ARGB with matrix.
1637
- LIBYUV_API
1638
- int I012ToARGBMatrix(const uint16_t* src_y,
1639
- int src_stride_y,
1640
- const uint16_t* src_u,
1641
- int src_stride_u,
1642
- const uint16_t* src_v,
1643
- int src_stride_v,
1644
- uint8_t* dst_argb,
1645
- int dst_stride_argb,
1646
- const struct YuvConstants* yuvconstants,
1647
- int width,
1648
- int height);
1649
-
1650
- // Convert 10 bit 422 YUV to ARGB with matrix.
1651
- LIBYUV_API
1652
- int I210ToARGBMatrix(const uint16_t* src_y,
1653
- int src_stride_y,
1654
- const uint16_t* src_u,
1655
- int src_stride_u,
1656
- const uint16_t* src_v,
1657
- int src_stride_v,
1658
- uint8_t* dst_argb,
1659
- int dst_stride_argb,
1660
- const struct YuvConstants* yuvconstants,
1661
- int width,
1662
- int height);
1663
-
1664
- // Convert 10 bit 444 YUV to ARGB with matrix.
1665
- LIBYUV_API
1666
- int I410ToARGBMatrix(const uint16_t* src_y,
1667
- int src_stride_y,
1668
- const uint16_t* src_u,
1669
- int src_stride_u,
1670
- const uint16_t* src_v,
1671
- int src_stride_v,
1672
- uint8_t* dst_argb,
1673
- int dst_stride_argb,
1674
- const struct YuvConstants* yuvconstants,
1675
- int width,
1676
- int height);
1677
-
1678
- // Convert P010 to ARGB with matrix.
1679
- LIBYUV_API
1680
- int P010ToARGBMatrix(const uint16_t* src_y,
1681
- int src_stride_y,
1682
- const uint16_t* src_uv,
1683
- int src_stride_uv,
1684
- uint8_t* dst_argb,
1685
- int dst_stride_argb,
1686
- const struct YuvConstants* yuvconstants,
1687
- int width,
1688
- int height);
1689
-
1690
- // Convert P210 to ARGB with matrix.
1691
- LIBYUV_API
1692
- int P210ToARGBMatrix(const uint16_t* src_y,
1693
- int src_stride_y,
1694
- const uint16_t* src_uv,
1695
- int src_stride_uv,
1696
- uint8_t* dst_argb,
1697
- int dst_stride_argb,
1698
- const struct YuvConstants* yuvconstants,
1699
- int width,
1700
- int height);
1701
-
1702
- // Convert P010 to AR30 with matrix.
1703
- LIBYUV_API
1704
- int P010ToAR30Matrix(const uint16_t* src_y,
1705
- int src_stride_y,
1706
- const uint16_t* src_uv,
1707
- int src_stride_uv,
1708
- uint8_t* dst_ar30,
1709
- int dst_stride_ar30,
1710
- const struct YuvConstants* yuvconstants,
1711
- int width,
1712
- int height);
1713
-
1714
- // Convert P210 to AR30 with matrix.
1715
- LIBYUV_API
1716
- int P210ToAR30Matrix(const uint16_t* src_y,
1717
- int src_stride_y,
1718
- const uint16_t* src_uv,
1719
- int src_stride_uv,
1720
- uint8_t* dst_ar30,
1721
- int dst_stride_ar30,
1722
- const struct YuvConstants* yuvconstants,
1723
- int width,
1724
- int height);
1725
-
1726
- // P012 and P010 use most significant bits so the conversion is the same.
1727
- // Convert P012 to ARGB with matrix.
1728
- #define P012ToARGBMatrix P010ToARGBMatrix
1729
- // Convert P012 to AR30 with matrix.
1730
- #define P012ToAR30Matrix P010ToAR30Matrix
1731
- // Convert P212 to ARGB with matrix.
1732
- #define P212ToARGBMatrix P210ToARGBMatrix
1733
- // Convert P212 to AR30 with matrix.
1734
- #define P212ToAR30Matrix P210ToAR30Matrix
1735
-
1736
- // Convert P016 to ARGB with matrix.
1737
- #define P016ToARGBMatrix P010ToARGBMatrix
1738
- // Convert P016 to AR30 with matrix.
1739
- #define P016ToAR30Matrix P010ToAR30Matrix
1740
- // Convert P216 to ARGB with matrix.
1741
- #define P216ToARGBMatrix P210ToARGBMatrix
1742
- // Convert P216 to AR30 with matrix.
1743
- #define P216ToAR30Matrix P210ToAR30Matrix
1744
-
1745
- // Convert I420 with Alpha to preattenuated ARGB with matrix.
1746
- LIBYUV_API
1747
- int I420AlphaToARGBMatrix(const uint8_t* src_y,
1748
- int src_stride_y,
1749
- const uint8_t* src_u,
1750
- int src_stride_u,
1751
- const uint8_t* src_v,
1752
- int src_stride_v,
1753
- const uint8_t* src_a,
1754
- int src_stride_a,
1755
- uint8_t* dst_argb,
1756
- int dst_stride_argb,
1757
- const struct YuvConstants* yuvconstants,
1758
- int width,
1759
- int height,
1760
- int attenuate);
1761
-
1762
- // Convert I422 with Alpha to preattenuated ARGB with matrix.
1763
- LIBYUV_API
1764
- int I422AlphaToARGBMatrix(const uint8_t* src_y,
1765
- int src_stride_y,
1766
- const uint8_t* src_u,
1767
- int src_stride_u,
1768
- const uint8_t* src_v,
1769
- int src_stride_v,
1770
- const uint8_t* src_a,
1771
- int src_stride_a,
1772
- uint8_t* dst_argb,
1773
- int dst_stride_argb,
1774
- const struct YuvConstants* yuvconstants,
1775
- int width,
1776
- int height,
1777
- int attenuate);
1778
-
1779
- // Convert I444 with Alpha to preattenuated ARGB with matrix.
1780
- LIBYUV_API
1781
- int I444AlphaToARGBMatrix(const uint8_t* src_y,
1782
- int src_stride_y,
1783
- const uint8_t* src_u,
1784
- int src_stride_u,
1785
- const uint8_t* src_v,
1786
- int src_stride_v,
1787
- const uint8_t* src_a,
1788
- int src_stride_a,
1789
- uint8_t* dst_argb,
1790
- int dst_stride_argb,
1791
- const struct YuvConstants* yuvconstants,
1792
- int width,
1793
- int height,
1794
- int attenuate);
1795
-
1796
- // Convert I010 with Alpha to preattenuated ARGB with matrix.
1797
- LIBYUV_API
1798
- int I010AlphaToARGBMatrix(const uint16_t* src_y,
1799
- int src_stride_y,
1800
- const uint16_t* src_u,
1801
- int src_stride_u,
1802
- const uint16_t* src_v,
1803
- int src_stride_v,
1804
- const uint16_t* src_a,
1805
- int src_stride_a,
1806
- uint8_t* dst_argb,
1807
- int dst_stride_argb,
1808
- const struct YuvConstants* yuvconstants,
1809
- int width,
1810
- int height,
1811
- int attenuate);
1812
-
1813
- // Convert I210 with Alpha to preattenuated ARGB with matrix.
1814
- LIBYUV_API
1815
- int I210AlphaToARGBMatrix(const uint16_t* src_y,
1816
- int src_stride_y,
1817
- const uint16_t* src_u,
1818
- int src_stride_u,
1819
- const uint16_t* src_v,
1820
- int src_stride_v,
1821
- const uint16_t* src_a,
1822
- int src_stride_a,
1823
- uint8_t* dst_argb,
1824
- int dst_stride_argb,
1825
- const struct YuvConstants* yuvconstants,
1826
- int width,
1827
- int height,
1828
- int attenuate);
1829
-
1830
- // Convert I410 with Alpha to preattenuated ARGB with matrix.
1831
- LIBYUV_API
1832
- int I410AlphaToARGBMatrix(const uint16_t* src_y,
1833
- int src_stride_y,
1834
- const uint16_t* src_u,
1835
- int src_stride_u,
1836
- const uint16_t* src_v,
1837
- int src_stride_v,
1838
- const uint16_t* src_a,
1839
- int src_stride_a,
1840
- uint8_t* dst_argb,
1841
- int dst_stride_argb,
1842
- const struct YuvConstants* yuvconstants,
1843
- int width,
1844
- int height,
1845
- int attenuate);
1846
-
1847
- // Convert NV12 to ARGB with matrix.
1848
- LIBYUV_API
1849
- int NV12ToARGBMatrix(const uint8_t* src_y,
1850
- int src_stride_y,
1851
- const uint8_t* src_uv,
1852
- int src_stride_uv,
1853
- uint8_t* dst_argb,
1854
- int dst_stride_argb,
1855
- const struct YuvConstants* yuvconstants,
1856
- int width,
1857
- int height);
1858
-
1859
- // Convert NV21 to ARGB with matrix.
1860
- LIBYUV_API
1861
- int NV21ToARGBMatrix(const uint8_t* src_y,
1862
- int src_stride_y,
1863
- const uint8_t* src_vu,
1864
- int src_stride_vu,
1865
- uint8_t* dst_argb,
1866
- int dst_stride_argb,
1867
- const struct YuvConstants* yuvconstants,
1868
- int width,
1869
- int height);
1870
-
1871
- // Convert NV12 to RGB565 with matrix.
1872
- LIBYUV_API
1873
- int NV12ToRGB565Matrix(const uint8_t* src_y,
1874
- int src_stride_y,
1875
- const uint8_t* src_uv,
1876
- int src_stride_uv,
1877
- uint8_t* dst_rgb565,
1878
- int dst_stride_rgb565,
1879
- const struct YuvConstants* yuvconstants,
1880
- int width,
1881
- int height);
1882
-
1883
- // Convert NV12 to RGB24 with matrix.
1884
- LIBYUV_API
1885
- int NV12ToRGB24Matrix(const uint8_t* src_y,
1886
- int src_stride_y,
1887
- const uint8_t* src_uv,
1888
- int src_stride_uv,
1889
- uint8_t* dst_rgb24,
1890
- int dst_stride_rgb24,
1891
- const struct YuvConstants* yuvconstants,
1892
- int width,
1893
- int height);
1894
-
1895
- // Convert NV21 to RGB24 with matrix.
1896
- LIBYUV_API
1897
- int NV21ToRGB24Matrix(const uint8_t* src_y,
1898
- int src_stride_y,
1899
- const uint8_t* src_vu,
1900
- int src_stride_vu,
1901
- uint8_t* dst_rgb24,
1902
- int dst_stride_rgb24,
1903
- const struct YuvConstants* yuvconstants,
1904
- int width,
1905
- int height);
1906
-
1907
- // Convert YUY2 to ARGB with matrix.
1908
- LIBYUV_API
1909
- int YUY2ToARGBMatrix(const uint8_t* src_yuy2,
1910
- int src_stride_yuy2,
1911
- uint8_t* dst_argb,
1912
- int dst_stride_argb,
1913
- const struct YuvConstants* yuvconstants,
1914
- int width,
1915
- int height);
1916
-
1917
- // Convert UYVY to ARGB with matrix.
1918
- LIBYUV_API
1919
- int UYVYToARGBMatrix(const uint8_t* src_uyvy,
1920
- int src_stride_uyvy,
1921
- uint8_t* dst_argb,
1922
- int dst_stride_argb,
1923
- const struct YuvConstants* yuvconstants,
1924
- int width,
1925
- int height);
1926
-
1927
- // Convert Android420 to ARGB with matrix.
1928
- LIBYUV_API
1929
- int Android420ToARGBMatrix(const uint8_t* src_y,
1930
- int src_stride_y,
1931
- const uint8_t* src_u,
1932
- int src_stride_u,
1933
- const uint8_t* src_v,
1934
- int src_stride_v,
1935
- int src_pixel_stride_uv,
1936
- uint8_t* dst_argb,
1937
- int dst_stride_argb,
1938
- const struct YuvConstants* yuvconstants,
1939
- int width,
1940
- int height);
1941
-
1942
- // Convert I422 to RGBA with matrix.
1943
- LIBYUV_API
1944
- int I422ToRGBAMatrix(const uint8_t* src_y,
1945
- int src_stride_y,
1946
- const uint8_t* src_u,
1947
- int src_stride_u,
1948
- const uint8_t* src_v,
1949
- int src_stride_v,
1950
- uint8_t* dst_rgba,
1951
- int dst_stride_rgba,
1952
- const struct YuvConstants* yuvconstants,
1953
- int width,
1954
- int height);
1955
-
1956
- // Convert I420 to RGBA with matrix.
1957
- LIBYUV_API
1958
- int I420ToRGBAMatrix(const uint8_t* src_y,
1959
- int src_stride_y,
1960
- const uint8_t* src_u,
1961
- int src_stride_u,
1962
- const uint8_t* src_v,
1963
- int src_stride_v,
1964
- uint8_t* dst_rgba,
1965
- int dst_stride_rgba,
1966
- const struct YuvConstants* yuvconstants,
1967
- int width,
1968
- int height);
1969
-
1970
- // Convert I420 to RGB24 with matrix.
1971
- LIBYUV_API
1972
- int I420ToRGB24Matrix(const uint8_t* src_y,
1973
- int src_stride_y,
1974
- const uint8_t* src_u,
1975
- int src_stride_u,
1976
- const uint8_t* src_v,
1977
- int src_stride_v,
1978
- uint8_t* dst_rgb24,
1979
- int dst_stride_rgb24,
1980
- const struct YuvConstants* yuvconstants,
1981
- int width,
1982
- int height);
1983
-
1984
- // Convert I422 to RGB24 with matrix.
1985
- LIBYUV_API
1986
- int I422ToRGB24Matrix(const uint8_t* src_y,
1987
- int src_stride_y,
1988
- const uint8_t* src_u,
1989
- int src_stride_u,
1990
- const uint8_t* src_v,
1991
- int src_stride_v,
1992
- uint8_t* dst_rgb24,
1993
- int dst_stride_rgb24,
1994
- const struct YuvConstants* yuvconstants,
1995
- int width,
1996
- int height);
1997
-
1998
- // Convert I420 to RGB565 with specified color matrix.
1999
- LIBYUV_API
2000
- int I420ToRGB565Matrix(const uint8_t* src_y,
2001
- int src_stride_y,
2002
- const uint8_t* src_u,
2003
- int src_stride_u,
2004
- const uint8_t* src_v,
2005
- int src_stride_v,
2006
- uint8_t* dst_rgb565,
2007
- int dst_stride_rgb565,
2008
- const struct YuvConstants* yuvconstants,
2009
- int width,
2010
- int height);
2011
-
2012
- // Convert I422 to RGB565 with specified color matrix.
2013
- LIBYUV_API
2014
- int I422ToRGB565Matrix(const uint8_t* src_y,
2015
- int src_stride_y,
2016
- const uint8_t* src_u,
2017
- int src_stride_u,
2018
- const uint8_t* src_v,
2019
- int src_stride_v,
2020
- uint8_t* dst_rgb565,
2021
- int dst_stride_rgb565,
2022
- const struct YuvConstants* yuvconstants,
2023
- int width,
2024
- int height);
2025
-
2026
- // Convert I420 to AR30 with matrix.
2027
- LIBYUV_API
2028
- int I420ToAR30Matrix(const uint8_t* src_y,
2029
- int src_stride_y,
2030
- const uint8_t* src_u,
2031
- int src_stride_u,
2032
- const uint8_t* src_v,
2033
- int src_stride_v,
2034
- uint8_t* dst_ar30,
2035
- int dst_stride_ar30,
2036
- const struct YuvConstants* yuvconstants,
2037
- int width,
2038
- int height);
2039
-
2040
- // Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
2041
- LIBYUV_API
2042
- int I400ToARGBMatrix(const uint8_t* src_y,
2043
- int src_stride_y,
2044
- uint8_t* dst_argb,
2045
- int dst_stride_argb,
2046
- const struct YuvConstants* yuvconstants,
2047
- int width,
2048
- int height);
2049
-
2050
- // Convert I420 to ARGB with matrix and UV filter mode.
2051
- LIBYUV_API
2052
- int I420ToARGBMatrixFilter(const uint8_t* src_y,
2053
- int src_stride_y,
2054
- const uint8_t* src_u,
2055
- int src_stride_u,
2056
- const uint8_t* src_v,
2057
- int src_stride_v,
2058
- uint8_t* dst_argb,
2059
- int dst_stride_argb,
2060
- const struct YuvConstants* yuvconstants,
2061
- int width,
2062
- int height,
2063
- enum FilterMode filter);
2064
-
2065
- // Convert I422 to ARGB with matrix and UV filter mode.
2066
- LIBYUV_API
2067
- int I422ToARGBMatrixFilter(const uint8_t* src_y,
2068
- int src_stride_y,
2069
- const uint8_t* src_u,
2070
- int src_stride_u,
2071
- const uint8_t* src_v,
2072
- int src_stride_v,
2073
- uint8_t* dst_argb,
2074
- int dst_stride_argb,
2075
- const struct YuvConstants* yuvconstants,
2076
- int width,
2077
- int height,
2078
- enum FilterMode filter);
2079
-
2080
- // Convert I422 to RGB24 with matrix and UV filter mode.
2081
- LIBYUV_API
2082
- int I422ToRGB24MatrixFilter(const uint8_t* src_y,
2083
- int src_stride_y,
2084
- const uint8_t* src_u,
2085
- int src_stride_u,
2086
- const uint8_t* src_v,
2087
- int src_stride_v,
2088
- uint8_t* dst_rgb24,
2089
- int dst_stride_rgb24,
2090
- const struct YuvConstants* yuvconstants,
2091
- int width,
2092
- int height,
2093
- enum FilterMode filter);
2094
-
2095
- // Convert I420 to RGB24 with matrix and UV filter mode.
2096
- LIBYUV_API
2097
- int I420ToRGB24MatrixFilter(const uint8_t* src_y,
2098
- int src_stride_y,
2099
- const uint8_t* src_u,
2100
- int src_stride_u,
2101
- const uint8_t* src_v,
2102
- int src_stride_v,
2103
- uint8_t* dst_rgb24,
2104
- int dst_stride_rgb24,
2105
- const struct YuvConstants* yuvconstants,
2106
- int width,
2107
- int height,
2108
- enum FilterMode filter);
2109
-
2110
- // Convert I010 to AR30 with matrix and UV filter mode.
2111
- LIBYUV_API
2112
- int I010ToAR30MatrixFilter(const uint16_t* src_y,
2113
- int src_stride_y,
2114
- const uint16_t* src_u,
2115
- int src_stride_u,
2116
- const uint16_t* src_v,
2117
- int src_stride_v,
2118
- uint8_t* dst_ar30,
2119
- int dst_stride_ar30,
2120
- const struct YuvConstants* yuvconstants,
2121
- int width,
2122
- int height,
2123
- enum FilterMode filter);
2124
-
2125
- // Convert I210 to AR30 with matrix and UV filter mode.
2126
- LIBYUV_API
2127
- int I210ToAR30MatrixFilter(const uint16_t* src_y,
2128
- int src_stride_y,
2129
- const uint16_t* src_u,
2130
- int src_stride_u,
2131
- const uint16_t* src_v,
2132
- int src_stride_v,
2133
- uint8_t* dst_ar30,
2134
- int dst_stride_ar30,
2135
- const struct YuvConstants* yuvconstants,
2136
- int width,
2137
- int height,
2138
- enum FilterMode filter);
2139
-
2140
- // Convert I010 to ARGB with matrix and UV filter mode.
2141
- LIBYUV_API
2142
- int I010ToARGBMatrixFilter(const uint16_t* src_y,
2143
- int src_stride_y,
2144
- const uint16_t* src_u,
2145
- int src_stride_u,
2146
- const uint16_t* src_v,
2147
- int src_stride_v,
2148
- uint8_t* dst_argb,
2149
- int dst_stride_argb,
2150
- const struct YuvConstants* yuvconstants,
2151
- int width,
2152
- int height,
2153
- enum FilterMode filter);
2154
-
2155
- // Convert I210 to ARGB with matrix and UV filter mode.
2156
- LIBYUV_API
2157
- int I210ToARGBMatrixFilter(const uint16_t* src_y,
2158
- int src_stride_y,
2159
- const uint16_t* src_u,
2160
- int src_stride_u,
2161
- const uint16_t* src_v,
2162
- int src_stride_v,
2163
- uint8_t* dst_argb,
2164
- int dst_stride_argb,
2165
- const struct YuvConstants* yuvconstants,
2166
- int width,
2167
- int height,
2168
- enum FilterMode filter);
2169
-
2170
- // Convert I420 with Alpha to attenuated ARGB with matrix and UV filter mode.
2171
- LIBYUV_API
2172
- int I420AlphaToARGBMatrixFilter(const uint8_t* src_y,
2173
- int src_stride_y,
2174
- const uint8_t* src_u,
2175
- int src_stride_u,
2176
- const uint8_t* src_v,
2177
- int src_stride_v,
2178
- const uint8_t* src_a,
2179
- int src_stride_a,
2180
- uint8_t* dst_argb,
2181
- int dst_stride_argb,
2182
- const struct YuvConstants* yuvconstants,
2183
- int width,
2184
- int height,
2185
- int attenuate,
2186
- enum FilterMode filter);
2187
-
2188
- // Convert I422 with Alpha to attenuated ARGB with matrix and UV filter mode.
2189
- LIBYUV_API
2190
- int I422AlphaToARGBMatrixFilter(const uint8_t* src_y,
2191
- int src_stride_y,
2192
- const uint8_t* src_u,
2193
- int src_stride_u,
2194
- const uint8_t* src_v,
2195
- int src_stride_v,
2196
- const uint8_t* src_a,
2197
- int src_stride_a,
2198
- uint8_t* dst_argb,
2199
- int dst_stride_argb,
2200
- const struct YuvConstants* yuvconstants,
2201
- int width,
2202
- int height,
2203
- int attenuate,
2204
- enum FilterMode filter);
2205
-
2206
- // Convert I010 with Alpha to attenuated ARGB with matrix and UV filter mode.
2207
- LIBYUV_API
2208
- int I010AlphaToARGBMatrixFilter(const uint16_t* src_y,
2209
- int src_stride_y,
2210
- const uint16_t* src_u,
2211
- int src_stride_u,
2212
- const uint16_t* src_v,
2213
- int src_stride_v,
2214
- const uint16_t* src_a,
2215
- int src_stride_a,
2216
- uint8_t* dst_argb,
2217
- int dst_stride_argb,
2218
- const struct YuvConstants* yuvconstants,
2219
- int width,
2220
- int height,
2221
- int attenuate,
2222
- enum FilterMode filter);
2223
-
2224
- // Convert I210 with Alpha to attenuated ARGB with matrix and UV filter mode.
2225
- LIBYUV_API
2226
- int I210AlphaToARGBMatrixFilter(const uint16_t* src_y,
2227
- int src_stride_y,
2228
- const uint16_t* src_u,
2229
- int src_stride_u,
2230
- const uint16_t* src_v,
2231
- int src_stride_v,
2232
- const uint16_t* src_a,
2233
- int src_stride_a,
2234
- uint8_t* dst_argb,
2235
- int dst_stride_argb,
2236
- const struct YuvConstants* yuvconstants,
2237
- int width,
2238
- int height,
2239
- int attenuate,
2240
- enum FilterMode filter);
2241
-
2242
- // Convert P010 to ARGB with matrix and UV filter mode.
2243
- LIBYUV_API
2244
- int P010ToARGBMatrixFilter(const uint16_t* src_y,
2245
- int src_stride_y,
2246
- const uint16_t* src_uv,
2247
- int src_stride_uv,
2248
- uint8_t* dst_argb,
2249
- int dst_stride_argb,
2250
- const struct YuvConstants* yuvconstants,
2251
- int width,
2252
- int height,
2253
- enum FilterMode filter);
2254
-
2255
- // Convert P210 to ARGB with matrix and UV filter mode.
2256
- LIBYUV_API
2257
- int P210ToARGBMatrixFilter(const uint16_t* src_y,
2258
- int src_stride_y,
2259
- const uint16_t* src_uv,
2260
- int src_stride_uv,
2261
- uint8_t* dst_argb,
2262
- int dst_stride_argb,
2263
- const struct YuvConstants* yuvconstants,
2264
- int width,
2265
- int height,
2266
- enum FilterMode filter);
2267
-
2268
- // Convert P010 to AR30 with matrix and UV filter mode.
2269
- LIBYUV_API
2270
- int P010ToAR30MatrixFilter(const uint16_t* src_y,
2271
- int src_stride_y,
2272
- const uint16_t* src_uv,
2273
- int src_stride_uv,
2274
- uint8_t* dst_ar30,
2275
- int dst_stride_ar30,
2276
- const struct YuvConstants* yuvconstants,
2277
- int width,
2278
- int height,
2279
- enum FilterMode filter);
2280
-
2281
- // Convert P210 to AR30 with matrix and UV filter mode.
2282
- LIBYUV_API
2283
- int P210ToAR30MatrixFilter(const uint16_t* src_y,
2284
- int src_stride_y,
2285
- const uint16_t* src_uv,
2286
- int src_stride_uv,
2287
- uint8_t* dst_ar30,
2288
- int dst_stride_ar30,
2289
- const struct YuvConstants* yuvconstants,
2290
- int width,
2291
- int height,
2292
- enum FilterMode filter);
2293
-
2294
- // Convert camera sample to ARGB with cropping, rotation and vertical flip.
2295
- // "sample_size" is needed to parse MJPG.
2296
- // "dst_stride_argb" number of bytes in a row of the dst_argb plane.
2297
- // Normally this would be the same as dst_width, with recommended alignment
2298
- // to 16 bytes for better efficiency.
2299
- // If rotation of 90 or 270 is used, stride is affected. The caller should
2300
- // allocate the I420 buffer according to rotation.
2301
- // "dst_stride_u" number of bytes in a row of the dst_u plane.
2302
- // Normally this would be the same as (dst_width + 1) / 2, with
2303
- // recommended alignment to 16 bytes for better efficiency.
2304
- // If rotation of 90 or 270 is used, stride is affected.
2305
- // "crop_x" and "crop_y" are starting position for cropping.
2306
- // To center, crop_x = (src_width - dst_width) / 2
2307
- // crop_y = (src_height - dst_height) / 2
2308
- // "src_width" / "src_height" is size of src_frame in pixels.
2309
- // "src_height" can be negative indicating a vertically flipped image source.
2310
- // "crop_width" / "crop_height" is the size to crop the src to.
2311
- // Must be less than or equal to src_width/src_height
2312
- // Cropping parameters are pre-rotation.
2313
- // "rotation" can be 0, 90, 180 or 270.
2314
- // "fourcc" is a fourcc. ie 'I420', 'YUY2'
2315
- // Returns 0 for successful; -1 for invalid parameter. Non-zero for failure.
2316
- LIBYUV_API
2317
- int ConvertToARGB(const uint8_t* sample,
2318
- size_t sample_size,
2319
- uint8_t* dst_argb,
2320
- int dst_stride_argb,
2321
- int crop_x,
2322
- int crop_y,
2323
- int src_width,
2324
- int src_height,
2325
- int crop_width,
2326
- int crop_height,
2327
- enum RotationMode rotation,
2328
- uint32_t fourcc);
2329
-
2330
- #ifdef __cplusplus
2331
- } // extern "C"
2332
- } // namespace libyuv
2333
- #endif
2334
-
2335
- #endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_
1
+ /*
2
+ * Copyright 2012 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
+
11
+ #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_
12
+ #define INCLUDE_LIBYUV_CONVERT_ARGB_H_
13
+
14
+ #include "libyuv/basic_types.h"
15
+
16
+ #include "libyuv/rotate.h" // For enum RotationMode.
17
+ #include "libyuv/scale.h" // For enum FilterMode.
18
+
19
+ #ifdef __cplusplus
20
+ namespace libyuv {
21
+ extern "C" {
22
+ #endif
23
+
24
+ // Conversion matrix for YUV to RGB
25
+ LIBYUV_API extern const struct YuvConstants kYuvI601Constants; // BT.601
26
+ LIBYUV_API extern const struct YuvConstants kYuvJPEGConstants; // BT.601 full
27
+ LIBYUV_API extern const struct YuvConstants kYuvH709Constants; // BT.709
28
+ LIBYUV_API extern const struct YuvConstants kYuvF709Constants; // BT.709 full
29
+ LIBYUV_API extern const struct YuvConstants kYuv2020Constants; // BT.2020
30
+ LIBYUV_API extern const struct YuvConstants kYuvV2020Constants; // BT.2020 full
31
+
32
+ // Conversion matrix for YVU to BGR
33
+ LIBYUV_API extern const struct YuvConstants kYvuI601Constants; // BT.601
34
+ LIBYUV_API extern const struct YuvConstants kYvuJPEGConstants; // BT.601 full
35
+ LIBYUV_API extern const struct YuvConstants kYvuH709Constants; // BT.709
36
+ LIBYUV_API extern const struct YuvConstants kYvuF709Constants; // BT.709 full
37
+ LIBYUV_API extern const struct YuvConstants kYvu2020Constants; // BT.2020
38
+ LIBYUV_API extern const struct YuvConstants kYvuV2020Constants; // BT.2020 full
39
+
40
+ // Macros for end swapped destination Matrix conversions.
41
+ // Swap UV and pass mirrored kYvuJPEGConstants matrix.
42
+ // TODO(fbarchard): Add macro for each Matrix function.
43
+ #define kYuvI601ConstantsVU kYvuI601Constants
44
+ #define kYuvJPEGConstantsVU kYvuJPEGConstants
45
+ #define kYuvH709ConstantsVU kYvuH709Constants
46
+ #define kYuvF709ConstantsVU kYvuF709Constants
47
+ #define kYuv2020ConstantsVU kYvu2020Constants
48
+ #define kYuvV2020ConstantsVU kYvuV2020Constants
49
+
50
+ #define NV12ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
51
+ NV21ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
52
+ #define NV21ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
53
+ NV12ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
54
+ #define NV12ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
55
+ NV21ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
56
+ #define NV21ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
57
+ NV12ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
58
+ #define I010ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
59
+ I010ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
60
+ #define I210ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
61
+ I210ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
62
+ #define I410ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
63
+ I410ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
64
+ #define I010ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
65
+ I010ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
66
+ #define I210ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
67
+ I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
68
+ #define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
69
+ I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
70
+ #define I012ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
71
+ I012ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
72
+ #define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
73
+ I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
74
+ #define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
75
+ I422AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
76
+ #define I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
77
+ I444AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
78
+ #define I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
79
+ I010AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
80
+ #define I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
81
+ I210AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
82
+ #define I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
83
+ I410AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
84
+
85
+ // Alias.
86
+ #define ARGBToARGB ARGBCopy
87
+
88
+ // Copy ARGB to ARGB.
89
+ LIBYUV_API
90
+ int ARGBCopy(const uint8_t* src_argb,
91
+ int src_stride_argb,
92
+ uint8_t* dst_argb,
93
+ int dst_stride_argb,
94
+ int width,
95
+ int height);
96
+
97
+ // Convert I420 to ARGB.
98
+ LIBYUV_API
99
+ int I420ToARGB(const uint8_t* src_y,
100
+ int src_stride_y,
101
+ const uint8_t* src_u,
102
+ int src_stride_u,
103
+ const uint8_t* src_v,
104
+ int src_stride_v,
105
+ uint8_t* dst_argb,
106
+ int dst_stride_argb,
107
+ int width,
108
+ int height);
109
+
110
+ // Convert I420 to ABGR.
111
+ LIBYUV_API
112
+ int I420ToABGR(const uint8_t* src_y,
113
+ int src_stride_y,
114
+ const uint8_t* src_u,
115
+ int src_stride_u,
116
+ const uint8_t* src_v,
117
+ int src_stride_v,
118
+ uint8_t* dst_abgr,
119
+ int dst_stride_abgr,
120
+ int width,
121
+ int height);
122
+
123
+ // Convert J420 to ARGB.
124
+ LIBYUV_API
125
+ int J420ToARGB(const uint8_t* src_y,
126
+ int src_stride_y,
127
+ const uint8_t* src_u,
128
+ int src_stride_u,
129
+ const uint8_t* src_v,
130
+ int src_stride_v,
131
+ uint8_t* dst_argb,
132
+ int dst_stride_argb,
133
+ int width,
134
+ int height);
135
+
136
+ // Convert J420 to ABGR.
137
+ LIBYUV_API
138
+ int J420ToABGR(const uint8_t* src_y,
139
+ int src_stride_y,
140
+ const uint8_t* src_u,
141
+ int src_stride_u,
142
+ const uint8_t* src_v,
143
+ int src_stride_v,
144
+ uint8_t* dst_abgr,
145
+ int dst_stride_abgr,
146
+ int width,
147
+ int height);
148
+
149
+ // Convert H420 to ARGB.
150
+ LIBYUV_API
151
+ int H420ToARGB(const uint8_t* src_y,
152
+ int src_stride_y,
153
+ const uint8_t* src_u,
154
+ int src_stride_u,
155
+ const uint8_t* src_v,
156
+ int src_stride_v,
157
+ uint8_t* dst_argb,
158
+ int dst_stride_argb,
159
+ int width,
160
+ int height);
161
+
162
+ // Convert H420 to ABGR.
163
+ LIBYUV_API
164
+ int H420ToABGR(const uint8_t* src_y,
165
+ int src_stride_y,
166
+ const uint8_t* src_u,
167
+ int src_stride_u,
168
+ const uint8_t* src_v,
169
+ int src_stride_v,
170
+ uint8_t* dst_abgr,
171
+ int dst_stride_abgr,
172
+ int width,
173
+ int height);
174
+
175
+ // Convert U420 to ARGB.
176
+ LIBYUV_API
177
+ int U420ToARGB(const uint8_t* src_y,
178
+ int src_stride_y,
179
+ const uint8_t* src_u,
180
+ int src_stride_u,
181
+ const uint8_t* src_v,
182
+ int src_stride_v,
183
+ uint8_t* dst_argb,
184
+ int dst_stride_argb,
185
+ int width,
186
+ int height);
187
+
188
+ // Convert U420 to ABGR.
189
+ LIBYUV_API
190
+ int U420ToABGR(const uint8_t* src_y,
191
+ int src_stride_y,
192
+ const uint8_t* src_u,
193
+ int src_stride_u,
194
+ const uint8_t* src_v,
195
+ int src_stride_v,
196
+ uint8_t* dst_abgr,
197
+ int dst_stride_abgr,
198
+ int width,
199
+ int height);
200
+
201
+ // Convert I422 to ARGB.
202
+ LIBYUV_API
203
+ int I422ToARGB(const uint8_t* src_y,
204
+ int src_stride_y,
205
+ const uint8_t* src_u,
206
+ int src_stride_u,
207
+ const uint8_t* src_v,
208
+ int src_stride_v,
209
+ uint8_t* dst_argb,
210
+ int dst_stride_argb,
211
+ int width,
212
+ int height);
213
+
214
+ // Convert I422 to ABGR.
215
+ LIBYUV_API
216
+ int I422ToABGR(const uint8_t* src_y,
217
+ int src_stride_y,
218
+ const uint8_t* src_u,
219
+ int src_stride_u,
220
+ const uint8_t* src_v,
221
+ int src_stride_v,
222
+ uint8_t* dst_abgr,
223
+ int dst_stride_abgr,
224
+ int width,
225
+ int height);
226
+
227
+ // Convert J422 to ARGB.
228
+ LIBYUV_API
229
+ int J422ToARGB(const uint8_t* src_y,
230
+ int src_stride_y,
231
+ const uint8_t* src_u,
232
+ int src_stride_u,
233
+ const uint8_t* src_v,
234
+ int src_stride_v,
235
+ uint8_t* dst_argb,
236
+ int dst_stride_argb,
237
+ int width,
238
+ int height);
239
+
240
+ // Convert J422 to ABGR.
241
+ LIBYUV_API
242
+ int J422ToABGR(const uint8_t* src_y,
243
+ int src_stride_y,
244
+ const uint8_t* src_u,
245
+ int src_stride_u,
246
+ const uint8_t* src_v,
247
+ int src_stride_v,
248
+ uint8_t* dst_abgr,
249
+ int dst_stride_abgr,
250
+ int width,
251
+ int height);
252
+
253
+ // Convert H422 to ARGB.
254
+ LIBYUV_API
255
+ int H422ToARGB(const uint8_t* src_y,
256
+ int src_stride_y,
257
+ const uint8_t* src_u,
258
+ int src_stride_u,
259
+ const uint8_t* src_v,
260
+ int src_stride_v,
261
+ uint8_t* dst_argb,
262
+ int dst_stride_argb,
263
+ int width,
264
+ int height);
265
+
266
+ // Convert H422 to ABGR.
267
+ LIBYUV_API
268
+ int H422ToABGR(const uint8_t* src_y,
269
+ int src_stride_y,
270
+ const uint8_t* src_u,
271
+ int src_stride_u,
272
+ const uint8_t* src_v,
273
+ int src_stride_v,
274
+ uint8_t* dst_abgr,
275
+ int dst_stride_abgr,
276
+ int width,
277
+ int height);
278
+
279
+ // Convert U422 to ARGB.
280
+ LIBYUV_API
281
+ int U422ToARGB(const uint8_t* src_y,
282
+ int src_stride_y,
283
+ const uint8_t* src_u,
284
+ int src_stride_u,
285
+ const uint8_t* src_v,
286
+ int src_stride_v,
287
+ uint8_t* dst_argb,
288
+ int dst_stride_argb,
289
+ int width,
290
+ int height);
291
+
292
+ // Convert U422 to ABGR.
293
+ LIBYUV_API
294
+ int U422ToABGR(const uint8_t* src_y,
295
+ int src_stride_y,
296
+ const uint8_t* src_u,
297
+ int src_stride_u,
298
+ const uint8_t* src_v,
299
+ int src_stride_v,
300
+ uint8_t* dst_abgr,
301
+ int dst_stride_abgr,
302
+ int width,
303
+ int height);
304
+
305
+ // Convert I444 to ARGB.
306
+ LIBYUV_API
307
+ int I444ToARGB(const uint8_t* src_y,
308
+ int src_stride_y,
309
+ const uint8_t* src_u,
310
+ int src_stride_u,
311
+ const uint8_t* src_v,
312
+ int src_stride_v,
313
+ uint8_t* dst_argb,
314
+ int dst_stride_argb,
315
+ int width,
316
+ int height);
317
+
318
+ // Convert I444 to ABGR.
319
+ LIBYUV_API
320
+ int I444ToABGR(const uint8_t* src_y,
321
+ int src_stride_y,
322
+ const uint8_t* src_u,
323
+ int src_stride_u,
324
+ const uint8_t* src_v,
325
+ int src_stride_v,
326
+ uint8_t* dst_abgr,
327
+ int dst_stride_abgr,
328
+ int width,
329
+ int height);
330
+
331
+ // Convert J444 to ARGB.
332
+ LIBYUV_API
333
+ int J444ToARGB(const uint8_t* src_y,
334
+ int src_stride_y,
335
+ const uint8_t* src_u,
336
+ int src_stride_u,
337
+ const uint8_t* src_v,
338
+ int src_stride_v,
339
+ uint8_t* dst_argb,
340
+ int dst_stride_argb,
341
+ int width,
342
+ int height);
343
+
344
+ // Convert J444 to ABGR.
345
+ LIBYUV_API
346
+ int J444ToABGR(const uint8_t* src_y,
347
+ int src_stride_y,
348
+ const uint8_t* src_u,
349
+ int src_stride_u,
350
+ const uint8_t* src_v,
351
+ int src_stride_v,
352
+ uint8_t* dst_abgr,
353
+ int dst_stride_abgr,
354
+ int width,
355
+ int height);
356
+
357
+ // Convert H444 to ARGB.
358
+ LIBYUV_API
359
+ int H444ToARGB(const uint8_t* src_y,
360
+ int src_stride_y,
361
+ const uint8_t* src_u,
362
+ int src_stride_u,
363
+ const uint8_t* src_v,
364
+ int src_stride_v,
365
+ uint8_t* dst_argb,
366
+ int dst_stride_argb,
367
+ int width,
368
+ int height);
369
+
370
+ // Convert H444 to ABGR.
371
+ LIBYUV_API
372
+ int H444ToABGR(const uint8_t* src_y,
373
+ int src_stride_y,
374
+ const uint8_t* src_u,
375
+ int src_stride_u,
376
+ const uint8_t* src_v,
377
+ int src_stride_v,
378
+ uint8_t* dst_abgr,
379
+ int dst_stride_abgr,
380
+ int width,
381
+ int height);
382
+
383
+ // Convert U444 to ARGB.
384
+ LIBYUV_API
385
+ int U444ToARGB(const uint8_t* src_y,
386
+ int src_stride_y,
387
+ const uint8_t* src_u,
388
+ int src_stride_u,
389
+ const uint8_t* src_v,
390
+ int src_stride_v,
391
+ uint8_t* dst_argb,
392
+ int dst_stride_argb,
393
+ int width,
394
+ int height);
395
+
396
+ // Convert U444 to ABGR.
397
+ LIBYUV_API
398
+ int U444ToABGR(const uint8_t* src_y,
399
+ int src_stride_y,
400
+ const uint8_t* src_u,
401
+ int src_stride_u,
402
+ const uint8_t* src_v,
403
+ int src_stride_v,
404
+ uint8_t* dst_abgr,
405
+ int dst_stride_abgr,
406
+ int width,
407
+ int height);
408
+
409
+ // Convert I444 to RGB24.
410
+ LIBYUV_API
411
+ int I444ToRGB24(const uint8_t* src_y,
412
+ int src_stride_y,
413
+ const uint8_t* src_u,
414
+ int src_stride_u,
415
+ const uint8_t* src_v,
416
+ int src_stride_v,
417
+ uint8_t* dst_rgb24,
418
+ int dst_stride_rgb24,
419
+ int width,
420
+ int height);
421
+
422
+ // Convert I444 to RAW.
423
+ LIBYUV_API
424
+ int I444ToRAW(const uint8_t* src_y,
425
+ int src_stride_y,
426
+ const uint8_t* src_u,
427
+ int src_stride_u,
428
+ const uint8_t* src_v,
429
+ int src_stride_v,
430
+ uint8_t* dst_raw,
431
+ int dst_stride_raw,
432
+ int width,
433
+ int height);
434
+
435
+ // Convert I010 to ARGB.
436
+ LIBYUV_API
437
+ int I010ToARGB(const uint16_t* src_y,
438
+ int src_stride_y,
439
+ const uint16_t* src_u,
440
+ int src_stride_u,
441
+ const uint16_t* src_v,
442
+ int src_stride_v,
443
+ uint8_t* dst_argb,
444
+ int dst_stride_argb,
445
+ int width,
446
+ int height);
447
+
448
+ // Convert I010 to ABGR.
449
+ LIBYUV_API
450
+ int I010ToABGR(const uint16_t* src_y,
451
+ int src_stride_y,
452
+ const uint16_t* src_u,
453
+ int src_stride_u,
454
+ const uint16_t* src_v,
455
+ int src_stride_v,
456
+ uint8_t* dst_abgr,
457
+ int dst_stride_abgr,
458
+ int width,
459
+ int height);
460
+
461
+ // Convert H010 to ARGB.
462
+ LIBYUV_API
463
+ int H010ToARGB(const uint16_t* src_y,
464
+ int src_stride_y,
465
+ const uint16_t* src_u,
466
+ int src_stride_u,
467
+ const uint16_t* src_v,
468
+ int src_stride_v,
469
+ uint8_t* dst_argb,
470
+ int dst_stride_argb,
471
+ int width,
472
+ int height);
473
+
474
+ // Convert H010 to ABGR.
475
+ LIBYUV_API
476
+ int H010ToABGR(const uint16_t* src_y,
477
+ int src_stride_y,
478
+ const uint16_t* src_u,
479
+ int src_stride_u,
480
+ const uint16_t* src_v,
481
+ int src_stride_v,
482
+ uint8_t* dst_abgr,
483
+ int dst_stride_abgr,
484
+ int width,
485
+ int height);
486
+
487
+ // Convert U010 to ARGB.
488
+ LIBYUV_API
489
+ int U010ToARGB(const uint16_t* src_y,
490
+ int src_stride_y,
491
+ const uint16_t* src_u,
492
+ int src_stride_u,
493
+ const uint16_t* src_v,
494
+ int src_stride_v,
495
+ uint8_t* dst_argb,
496
+ int dst_stride_argb,
497
+ int width,
498
+ int height);
499
+
500
+ // Convert U010 to ABGR.
501
+ LIBYUV_API
502
+ int U010ToABGR(const uint16_t* src_y,
503
+ int src_stride_y,
504
+ const uint16_t* src_u,
505
+ int src_stride_u,
506
+ const uint16_t* src_v,
507
+ int src_stride_v,
508
+ uint8_t* dst_abgr,
509
+ int dst_stride_abgr,
510
+ int width,
511
+ int height);
512
+
513
+ // Convert I210 to ARGB.
514
+ LIBYUV_API
515
+ int I210ToARGB(const uint16_t* src_y,
516
+ int src_stride_y,
517
+ const uint16_t* src_u,
518
+ int src_stride_u,
519
+ const uint16_t* src_v,
520
+ int src_stride_v,
521
+ uint8_t* dst_argb,
522
+ int dst_stride_argb,
523
+ int width,
524
+ int height);
525
+
526
+ // Convert I210 to ABGR.
527
+ LIBYUV_API
528
+ int I210ToABGR(const uint16_t* src_y,
529
+ int src_stride_y,
530
+ const uint16_t* src_u,
531
+ int src_stride_u,
532
+ const uint16_t* src_v,
533
+ int src_stride_v,
534
+ uint8_t* dst_abgr,
535
+ int dst_stride_abgr,
536
+ int width,
537
+ int height);
538
+
539
+ // Convert H210 to ARGB.
540
+ LIBYUV_API
541
+ int H210ToARGB(const uint16_t* src_y,
542
+ int src_stride_y,
543
+ const uint16_t* src_u,
544
+ int src_stride_u,
545
+ const uint16_t* src_v,
546
+ int src_stride_v,
547
+ uint8_t* dst_argb,
548
+ int dst_stride_argb,
549
+ int width,
550
+ int height);
551
+
552
+ // Convert H210 to ABGR.
553
+ LIBYUV_API
554
+ int H210ToABGR(const uint16_t* src_y,
555
+ int src_stride_y,
556
+ const uint16_t* src_u,
557
+ int src_stride_u,
558
+ const uint16_t* src_v,
559
+ int src_stride_v,
560
+ uint8_t* dst_abgr,
561
+ int dst_stride_abgr,
562
+ int width,
563
+ int height);
564
+
565
+ // Convert U210 to ARGB.
566
+ LIBYUV_API
567
+ int U210ToARGB(const uint16_t* src_y,
568
+ int src_stride_y,
569
+ const uint16_t* src_u,
570
+ int src_stride_u,
571
+ const uint16_t* src_v,
572
+ int src_stride_v,
573
+ uint8_t* dst_argb,
574
+ int dst_stride_argb,
575
+ int width,
576
+ int height);
577
+
578
+ // Convert U210 to ABGR.
579
+ LIBYUV_API
580
+ int U210ToABGR(const uint16_t* src_y,
581
+ int src_stride_y,
582
+ const uint16_t* src_u,
583
+ int src_stride_u,
584
+ const uint16_t* src_v,
585
+ int src_stride_v,
586
+ uint8_t* dst_abgr,
587
+ int dst_stride_abgr,
588
+ int width,
589
+ int height);
590
+
591
+ // Convert I420 with Alpha to preattenuated ARGB.
592
+ LIBYUV_API
593
+ int I420AlphaToARGB(const uint8_t* src_y,
594
+ int src_stride_y,
595
+ const uint8_t* src_u,
596
+ int src_stride_u,
597
+ const uint8_t* src_v,
598
+ int src_stride_v,
599
+ const uint8_t* src_a,
600
+ int src_stride_a,
601
+ uint8_t* dst_argb,
602
+ int dst_stride_argb,
603
+ int width,
604
+ int height,
605
+ int attenuate);
606
+
607
+ // Convert I420 with Alpha to preattenuated ABGR.
608
+ LIBYUV_API
609
+ int I420AlphaToABGR(const uint8_t* src_y,
610
+ int src_stride_y,
611
+ const uint8_t* src_u,
612
+ int src_stride_u,
613
+ const uint8_t* src_v,
614
+ int src_stride_v,
615
+ const uint8_t* src_a,
616
+ int src_stride_a,
617
+ uint8_t* dst_abgr,
618
+ int dst_stride_abgr,
619
+ int width,
620
+ int height,
621
+ int attenuate);
622
+
623
+ // Convert I422 with Alpha to preattenuated ARGB.
624
+ LIBYUV_API
625
+ int I422AlphaToARGB(const uint8_t* src_y,
626
+ int src_stride_y,
627
+ const uint8_t* src_u,
628
+ int src_stride_u,
629
+ const uint8_t* src_v,
630
+ int src_stride_v,
631
+ const uint8_t* src_a,
632
+ int src_stride_a,
633
+ uint8_t* dst_argb,
634
+ int dst_stride_argb,
635
+ int width,
636
+ int height,
637
+ int attenuate);
638
+
639
+ // Convert I422 with Alpha to preattenuated ABGR.
640
+ LIBYUV_API
641
+ int I422AlphaToABGR(const uint8_t* src_y,
642
+ int src_stride_y,
643
+ const uint8_t* src_u,
644
+ int src_stride_u,
645
+ const uint8_t* src_v,
646
+ int src_stride_v,
647
+ const uint8_t* src_a,
648
+ int src_stride_a,
649
+ uint8_t* dst_abgr,
650
+ int dst_stride_abgr,
651
+ int width,
652
+ int height,
653
+ int attenuate);
654
+
655
+ // Convert I444 with Alpha to preattenuated ARGB.
656
+ LIBYUV_API
657
+ int I444AlphaToARGB(const uint8_t* src_y,
658
+ int src_stride_y,
659
+ const uint8_t* src_u,
660
+ int src_stride_u,
661
+ const uint8_t* src_v,
662
+ int src_stride_v,
663
+ const uint8_t* src_a,
664
+ int src_stride_a,
665
+ uint8_t* dst_argb,
666
+ int dst_stride_argb,
667
+ int width,
668
+ int height,
669
+ int attenuate);
670
+
671
+ // Convert I444 with Alpha to preattenuated ABGR.
672
+ LIBYUV_API
673
+ int I444AlphaToABGR(const uint8_t* src_y,
674
+ int src_stride_y,
675
+ const uint8_t* src_u,
676
+ int src_stride_u,
677
+ const uint8_t* src_v,
678
+ int src_stride_v,
679
+ const uint8_t* src_a,
680
+ int src_stride_a,
681
+ uint8_t* dst_abgr,
682
+ int dst_stride_abgr,
683
+ int width,
684
+ int height,
685
+ int attenuate);
686
+
687
+ // Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
688
+ LIBYUV_API
689
+ int I400ToARGB(const uint8_t* src_y,
690
+ int src_stride_y,
691
+ uint8_t* dst_argb,
692
+ int dst_stride_argb,
693
+ int width,
694
+ int height);
695
+
696
+ // Convert J400 (jpeg grey) to ARGB.
697
+ LIBYUV_API
698
+ int J400ToARGB(const uint8_t* src_y,
699
+ int src_stride_y,
700
+ uint8_t* dst_argb,
701
+ int dst_stride_argb,
702
+ int width,
703
+ int height);
704
+
705
+ // Alias.
706
+ #define YToARGB I400ToARGB
707
+
708
+ // Convert NV12 to ARGB.
709
+ LIBYUV_API
710
+ int NV12ToARGB(const uint8_t* src_y,
711
+ int src_stride_y,
712
+ const uint8_t* src_uv,
713
+ int src_stride_uv,
714
+ uint8_t* dst_argb,
715
+ int dst_stride_argb,
716
+ int width,
717
+ int height);
718
+
719
+ // Convert NV21 to ARGB.
720
+ LIBYUV_API
721
+ int NV21ToARGB(const uint8_t* src_y,
722
+ int src_stride_y,
723
+ const uint8_t* src_vu,
724
+ int src_stride_vu,
725
+ uint8_t* dst_argb,
726
+ int dst_stride_argb,
727
+ int width,
728
+ int height);
729
+
730
+ // Convert NV12 to ABGR.
731
+ LIBYUV_API
732
+ int NV12ToABGR(const uint8_t* src_y,
733
+ int src_stride_y,
734
+ const uint8_t* src_uv,
735
+ int src_stride_uv,
736
+ uint8_t* dst_abgr,
737
+ int dst_stride_abgr,
738
+ int width,
739
+ int height);
740
+
741
+ // Convert NV21 to ABGR.
742
+ LIBYUV_API
743
+ int NV21ToABGR(const uint8_t* src_y,
744
+ int src_stride_y,
745
+ const uint8_t* src_vu,
746
+ int src_stride_vu,
747
+ uint8_t* dst_abgr,
748
+ int dst_stride_abgr,
749
+ int width,
750
+ int height);
751
+
752
+ // Convert NV12 to RGB24.
753
+ LIBYUV_API
754
+ int NV12ToRGB24(const uint8_t* src_y,
755
+ int src_stride_y,
756
+ const uint8_t* src_uv,
757
+ int src_stride_uv,
758
+ uint8_t* dst_rgb24,
759
+ int dst_stride_rgb24,
760
+ int width,
761
+ int height);
762
+
763
+ // Convert NV21 to RGB24.
764
+ LIBYUV_API
765
+ int NV21ToRGB24(const uint8_t* src_y,
766
+ int src_stride_y,
767
+ const uint8_t* src_vu,
768
+ int src_stride_vu,
769
+ uint8_t* dst_rgb24,
770
+ int dst_stride_rgb24,
771
+ int width,
772
+ int height);
773
+
774
+ // Convert NV21 to YUV24.
775
+ LIBYUV_API
776
+ int NV21ToYUV24(const uint8_t* src_y,
777
+ int src_stride_y,
778
+ const uint8_t* src_vu,
779
+ int src_stride_vu,
780
+ uint8_t* dst_yuv24,
781
+ int dst_stride_yuv24,
782
+ int width,
783
+ int height);
784
+
785
+ // Convert NV12 to RAW.
786
+ LIBYUV_API
787
+ int NV12ToRAW(const uint8_t* src_y,
788
+ int src_stride_y,
789
+ const uint8_t* src_uv,
790
+ int src_stride_uv,
791
+ uint8_t* dst_raw,
792
+ int dst_stride_raw,
793
+ int width,
794
+ int height);
795
+
796
+ // Convert NV21 to RAW.
797
+ LIBYUV_API
798
+ int NV21ToRAW(const uint8_t* src_y,
799
+ int src_stride_y,
800
+ const uint8_t* src_vu,
801
+ int src_stride_vu,
802
+ uint8_t* dst_raw,
803
+ int dst_stride_raw,
804
+ int width,
805
+ int height);
806
+
807
+ // Convert YUY2 to ARGB.
808
+ LIBYUV_API
809
+ int YUY2ToARGB(const uint8_t* src_yuy2,
810
+ int src_stride_yuy2,
811
+ uint8_t* dst_argb,
812
+ int dst_stride_argb,
813
+ int width,
814
+ int height);
815
+
816
+ // Convert UYVY to ARGB.
817
+ LIBYUV_API
818
+ int UYVYToARGB(const uint8_t* src_uyvy,
819
+ int src_stride_uyvy,
820
+ uint8_t* dst_argb,
821
+ int dst_stride_argb,
822
+ int width,
823
+ int height);
824
+
825
+ // Convert I010 to AR30.
826
+ LIBYUV_API
827
+ int I010ToAR30(const uint16_t* src_y,
828
+ int src_stride_y,
829
+ const uint16_t* src_u,
830
+ int src_stride_u,
831
+ const uint16_t* src_v,
832
+ int src_stride_v,
833
+ uint8_t* dst_ar30,
834
+ int dst_stride_ar30,
835
+ int width,
836
+ int height);
837
+
838
+ // Convert H010 to AR30.
839
+ LIBYUV_API
840
+ int H010ToAR30(const uint16_t* src_y,
841
+ int src_stride_y,
842
+ const uint16_t* src_u,
843
+ int src_stride_u,
844
+ const uint16_t* src_v,
845
+ int src_stride_v,
846
+ uint8_t* dst_ar30,
847
+ int dst_stride_ar30,
848
+ int width,
849
+ int height);
850
+
851
+ // Convert I010 to AB30.
852
+ LIBYUV_API
853
+ int I010ToAB30(const uint16_t* src_y,
854
+ int src_stride_y,
855
+ const uint16_t* src_u,
856
+ int src_stride_u,
857
+ const uint16_t* src_v,
858
+ int src_stride_v,
859
+ uint8_t* dst_ab30,
860
+ int dst_stride_ab30,
861
+ int width,
862
+ int height);
863
+
864
+ // Convert H010 to AB30.
865
+ LIBYUV_API
866
+ int H010ToAB30(const uint16_t* src_y,
867
+ int src_stride_y,
868
+ const uint16_t* src_u,
869
+ int src_stride_u,
870
+ const uint16_t* src_v,
871
+ int src_stride_v,
872
+ uint8_t* dst_ab30,
873
+ int dst_stride_ab30,
874
+ int width,
875
+ int height);
876
+
877
+ // Convert U010 to AR30.
878
+ LIBYUV_API
879
+ int U010ToAR30(const uint16_t* src_y,
880
+ int src_stride_y,
881
+ const uint16_t* src_u,
882
+ int src_stride_u,
883
+ const uint16_t* src_v,
884
+ int src_stride_v,
885
+ uint8_t* dst_ar30,
886
+ int dst_stride_ar30,
887
+ int width,
888
+ int height);
889
+
890
+ // Convert U010 to AB30.
891
+ LIBYUV_API
892
+ int U010ToAB30(const uint16_t* src_y,
893
+ int src_stride_y,
894
+ const uint16_t* src_u,
895
+ int src_stride_u,
896
+ const uint16_t* src_v,
897
+ int src_stride_v,
898
+ uint8_t* dst_ab30,
899
+ int dst_stride_ab30,
900
+ int width,
901
+ int height);
902
+
903
+ // Convert I210 to AR30.
904
+ LIBYUV_API
905
+ int I210ToAR30(const uint16_t* src_y,
906
+ int src_stride_y,
907
+ const uint16_t* src_u,
908
+ int src_stride_u,
909
+ const uint16_t* src_v,
910
+ int src_stride_v,
911
+ uint8_t* dst_ar30,
912
+ int dst_stride_ar30,
913
+ int width,
914
+ int height);
915
+
916
+ // Convert I210 to AB30.
917
+ LIBYUV_API
918
+ int I210ToAB30(const uint16_t* src_y,
919
+ int src_stride_y,
920
+ const uint16_t* src_u,
921
+ int src_stride_u,
922
+ const uint16_t* src_v,
923
+ int src_stride_v,
924
+ uint8_t* dst_ab30,
925
+ int dst_stride_ab30,
926
+ int width,
927
+ int height);
928
+
929
+ // Convert H210 to AR30.
930
+ LIBYUV_API
931
+ int H210ToAR30(const uint16_t* src_y,
932
+ int src_stride_y,
933
+ const uint16_t* src_u,
934
+ int src_stride_u,
935
+ const uint16_t* src_v,
936
+ int src_stride_v,
937
+ uint8_t* dst_ar30,
938
+ int dst_stride_ar30,
939
+ int width,
940
+ int height);
941
+
942
+ // Convert H210 to AB30.
943
+ LIBYUV_API
944
+ int H210ToAB30(const uint16_t* src_y,
945
+ int src_stride_y,
946
+ const uint16_t* src_u,
947
+ int src_stride_u,
948
+ const uint16_t* src_v,
949
+ int src_stride_v,
950
+ uint8_t* dst_ab30,
951
+ int dst_stride_ab30,
952
+ int width,
953
+ int height);
954
+
955
+ // Convert U210 to AR30.
956
+ LIBYUV_API
957
+ int U210ToAR30(const uint16_t* src_y,
958
+ int src_stride_y,
959
+ const uint16_t* src_u,
960
+ int src_stride_u,
961
+ const uint16_t* src_v,
962
+ int src_stride_v,
963
+ uint8_t* dst_ar30,
964
+ int dst_stride_ar30,
965
+ int width,
966
+ int height);
967
+
968
+ // Convert U210 to AB30.
969
+ LIBYUV_API
970
+ int U210ToAB30(const uint16_t* src_y,
971
+ int src_stride_y,
972
+ const uint16_t* src_u,
973
+ int src_stride_u,
974
+ const uint16_t* src_v,
975
+ int src_stride_v,
976
+ uint8_t* dst_ab30,
977
+ int dst_stride_ab30,
978
+ int width,
979
+ int height);
980
+
981
+ // BGRA little endian (argb in memory) to ARGB.
982
+ LIBYUV_API
983
+ int BGRAToARGB(const uint8_t* src_bgra,
984
+ int src_stride_bgra,
985
+ uint8_t* dst_argb,
986
+ int dst_stride_argb,
987
+ int width,
988
+ int height);
989
+
990
+ // ABGR little endian (rgba in memory) to ARGB.
991
+ LIBYUV_API
992
+ int ABGRToARGB(const uint8_t* src_abgr,
993
+ int src_stride_abgr,
994
+ uint8_t* dst_argb,
995
+ int dst_stride_argb,
996
+ int width,
997
+ int height);
998
+
999
+ // RGBA little endian (abgr in memory) to ARGB.
1000
+ LIBYUV_API
1001
+ int RGBAToARGB(const uint8_t* src_rgba,
1002
+ int src_stride_rgba,
1003
+ uint8_t* dst_argb,
1004
+ int dst_stride_argb,
1005
+ int width,
1006
+ int height);
1007
+
1008
+ // Deprecated function name.
1009
+ #define BG24ToARGB RGB24ToARGB
1010
+
1011
+ // RGB little endian (bgr in memory) to ARGB.
1012
+ LIBYUV_API
1013
+ int RGB24ToARGB(const uint8_t* src_rgb24,
1014
+ int src_stride_rgb24,
1015
+ uint8_t* dst_argb,
1016
+ int dst_stride_argb,
1017
+ int width,
1018
+ int height);
1019
+
1020
+ // RGB big endian (rgb in memory) to ARGB.
1021
+ LIBYUV_API
1022
+ int RAWToARGB(const uint8_t* src_raw,
1023
+ int src_stride_raw,
1024
+ uint8_t* dst_argb,
1025
+ int dst_stride_argb,
1026
+ int width,
1027
+ int height);
1028
+
1029
+ // RGB big endian (rgb in memory) to RGBA.
1030
+ LIBYUV_API
1031
+ int RAWToRGBA(const uint8_t* src_raw,
1032
+ int src_stride_raw,
1033
+ uint8_t* dst_rgba,
1034
+ int dst_stride_rgba,
1035
+ int width,
1036
+ int height);
1037
+
1038
+ // RGB16 (RGBP fourcc) little endian to ARGB.
1039
+ LIBYUV_API
1040
+ int RGB565ToARGB(const uint8_t* src_rgb565,
1041
+ int src_stride_rgb565,
1042
+ uint8_t* dst_argb,
1043
+ int dst_stride_argb,
1044
+ int width,
1045
+ int height);
1046
+
1047
+ // RGB15 (RGBO fourcc) little endian to ARGB.
1048
+ LIBYUV_API
1049
+ int ARGB1555ToARGB(const uint8_t* src_argb1555,
1050
+ int src_stride_argb1555,
1051
+ uint8_t* dst_argb,
1052
+ int dst_stride_argb,
1053
+ int width,
1054
+ int height);
1055
+
1056
+ // RGB12 (R444 fourcc) little endian to ARGB.
1057
+ LIBYUV_API
1058
+ int ARGB4444ToARGB(const uint8_t* src_argb4444,
1059
+ int src_stride_argb4444,
1060
+ uint8_t* dst_argb,
1061
+ int dst_stride_argb,
1062
+ int width,
1063
+ int height);
1064
+
1065
+ // Aliases
1066
+ #define AB30ToARGB AR30ToABGR
1067
+ #define AB30ToABGR AR30ToARGB
1068
+ #define AB30ToAR30 AR30ToAB30
1069
+
1070
+ // Convert AR30 To ARGB.
1071
+ LIBYUV_API
1072
+ int AR30ToARGB(const uint8_t* src_ar30,
1073
+ int src_stride_ar30,
1074
+ uint8_t* dst_argb,
1075
+ int dst_stride_argb,
1076
+ int width,
1077
+ int height);
1078
+
1079
+ // Convert AR30 To ABGR.
1080
+ LIBYUV_API
1081
+ int AR30ToABGR(const uint8_t* src_ar30,
1082
+ int src_stride_ar30,
1083
+ uint8_t* dst_abgr,
1084
+ int dst_stride_abgr,
1085
+ int width,
1086
+ int height);
1087
+
1088
+ // Convert AR30 To AB30.
1089
+ LIBYUV_API
1090
+ int AR30ToAB30(const uint8_t* src_ar30,
1091
+ int src_stride_ar30,
1092
+ uint8_t* dst_ab30,
1093
+ int dst_stride_ab30,
1094
+ int width,
1095
+ int height);
1096
+
1097
+ // Convert AR64 to ARGB.
1098
+ LIBYUV_API
1099
+ int AR64ToARGB(const uint16_t* src_ar64,
1100
+ int src_stride_ar64,
1101
+ uint8_t* dst_argb,
1102
+ int dst_stride_argb,
1103
+ int width,
1104
+ int height);
1105
+
1106
+ // Convert AB64 to ABGR.
1107
+ #define AB64ToABGR AR64ToARGB
1108
+
1109
+ // Convert AB64 to ARGB.
1110
+ LIBYUV_API
1111
+ int AB64ToARGB(const uint16_t* src_ab64,
1112
+ int src_stride_ab64,
1113
+ uint8_t* dst_argb,
1114
+ int dst_stride_argb,
1115
+ int width,
1116
+ int height);
1117
+
1118
+ // Convert AR64 to ABGR.
1119
+ #define AR64ToABGR AB64ToARGB
1120
+
1121
+ // Convert AR64 To AB64.
1122
+ LIBYUV_API
1123
+ int AR64ToAB64(const uint16_t* src_ar64,
1124
+ int src_stride_ar64,
1125
+ uint16_t* dst_ab64,
1126
+ int dst_stride_ab64,
1127
+ int width,
1128
+ int height);
1129
+
1130
+ // Convert AB64 To AR64.
1131
+ #define AB64ToAR64 AR64ToAB64
1132
+
1133
+ // src_width/height provided by capture
1134
+ // dst_width/height for clipping determine final size.
1135
+ LIBYUV_API
1136
+ int MJPGToARGB(const uint8_t* sample,
1137
+ size_t sample_size,
1138
+ uint8_t* dst_argb,
1139
+ int dst_stride_argb,
1140
+ int src_width,
1141
+ int src_height,
1142
+ int dst_width,
1143
+ int dst_height);
1144
+
1145
+ // Convert Android420 to ARGB.
1146
+ LIBYUV_API
1147
+ int Android420ToARGB(const uint8_t* src_y,
1148
+ int src_stride_y,
1149
+ const uint8_t* src_u,
1150
+ int src_stride_u,
1151
+ const uint8_t* src_v,
1152
+ int src_stride_v,
1153
+ int src_pixel_stride_uv,
1154
+ uint8_t* dst_argb,
1155
+ int dst_stride_argb,
1156
+ int width,
1157
+ int height);
1158
+
1159
+ // Convert Android420 to ABGR.
1160
+ LIBYUV_API
1161
+ int Android420ToABGR(const uint8_t* src_y,
1162
+ int src_stride_y,
1163
+ const uint8_t* src_u,
1164
+ int src_stride_u,
1165
+ const uint8_t* src_v,
1166
+ int src_stride_v,
1167
+ int src_pixel_stride_uv,
1168
+ uint8_t* dst_abgr,
1169
+ int dst_stride_abgr,
1170
+ int width,
1171
+ int height);
1172
+
1173
+ // Convert NV12 to RGB565.
1174
+ LIBYUV_API
1175
+ int NV12ToRGB565(const uint8_t* src_y,
1176
+ int src_stride_y,
1177
+ const uint8_t* src_uv,
1178
+ int src_stride_uv,
1179
+ uint8_t* dst_rgb565,
1180
+ int dst_stride_rgb565,
1181
+ int width,
1182
+ int height);
1183
+
1184
+ // Convert I422 to BGRA.
1185
+ LIBYUV_API
1186
+ int I422ToBGRA(const uint8_t* src_y,
1187
+ int src_stride_y,
1188
+ const uint8_t* src_u,
1189
+ int src_stride_u,
1190
+ const uint8_t* src_v,
1191
+ int src_stride_v,
1192
+ uint8_t* dst_bgra,
1193
+ int dst_stride_bgra,
1194
+ int width,
1195
+ int height);
1196
+
1197
+ // Convert I422 to ABGR.
1198
+ LIBYUV_API
1199
+ int I422ToABGR(const uint8_t* src_y,
1200
+ int src_stride_y,
1201
+ const uint8_t* src_u,
1202
+ int src_stride_u,
1203
+ const uint8_t* src_v,
1204
+ int src_stride_v,
1205
+ uint8_t* dst_abgr,
1206
+ int dst_stride_abgr,
1207
+ int width,
1208
+ int height);
1209
+
1210
+ // Convert I422 to RGBA.
1211
+ LIBYUV_API
1212
+ int I422ToRGBA(const uint8_t* src_y,
1213
+ int src_stride_y,
1214
+ const uint8_t* src_u,
1215
+ int src_stride_u,
1216
+ const uint8_t* src_v,
1217
+ int src_stride_v,
1218
+ uint8_t* dst_rgba,
1219
+ int dst_stride_rgba,
1220
+ int width,
1221
+ int height);
1222
+
1223
+ LIBYUV_API
1224
+ int I420ToARGB(const uint8_t* src_y,
1225
+ int src_stride_y,
1226
+ const uint8_t* src_u,
1227
+ int src_stride_u,
1228
+ const uint8_t* src_v,
1229
+ int src_stride_v,
1230
+ uint8_t* dst_argb,
1231
+ int dst_stride_argb,
1232
+ int width,
1233
+ int height);
1234
+
1235
+ LIBYUV_API
1236
+ int I420ToBGRA(const uint8_t* src_y,
1237
+ int src_stride_y,
1238
+ const uint8_t* src_u,
1239
+ int src_stride_u,
1240
+ const uint8_t* src_v,
1241
+ int src_stride_v,
1242
+ uint8_t* dst_bgra,
1243
+ int dst_stride_bgra,
1244
+ int width,
1245
+ int height);
1246
+
1247
+ LIBYUV_API
1248
+ int I420ToABGR(const uint8_t* src_y,
1249
+ int src_stride_y,
1250
+ const uint8_t* src_u,
1251
+ int src_stride_u,
1252
+ const uint8_t* src_v,
1253
+ int src_stride_v,
1254
+ uint8_t* dst_abgr,
1255
+ int dst_stride_abgr,
1256
+ int width,
1257
+ int height);
1258
+
1259
+ LIBYUV_API
1260
+ int I420ToRGBA(const uint8_t* src_y,
1261
+ int src_stride_y,
1262
+ const uint8_t* src_u,
1263
+ int src_stride_u,
1264
+ const uint8_t* src_v,
1265
+ int src_stride_v,
1266
+ uint8_t* dst_rgba,
1267
+ int dst_stride_rgba,
1268
+ int width,
1269
+ int height);
1270
+
1271
+ LIBYUV_API
1272
+ int I420ToRGB24(const uint8_t* src_y,
1273
+ int src_stride_y,
1274
+ const uint8_t* src_u,
1275
+ int src_stride_u,
1276
+ const uint8_t* src_v,
1277
+ int src_stride_v,
1278
+ uint8_t* dst_rgb24,
1279
+ int dst_stride_rgb24,
1280
+ int width,
1281
+ int height);
1282
+
1283
+ LIBYUV_API
1284
+ int I420ToRAW(const uint8_t* src_y,
1285
+ int src_stride_y,
1286
+ const uint8_t* src_u,
1287
+ int src_stride_u,
1288
+ const uint8_t* src_v,
1289
+ int src_stride_v,
1290
+ uint8_t* dst_raw,
1291
+ int dst_stride_raw,
1292
+ int width,
1293
+ int height);
1294
+
1295
+ LIBYUV_API
1296
+ int H420ToRGB24(const uint8_t* src_y,
1297
+ int src_stride_y,
1298
+ const uint8_t* src_u,
1299
+ int src_stride_u,
1300
+ const uint8_t* src_v,
1301
+ int src_stride_v,
1302
+ uint8_t* dst_rgb24,
1303
+ int dst_stride_rgb24,
1304
+ int width,
1305
+ int height);
1306
+
1307
+ LIBYUV_API
1308
+ int H420ToRAW(const uint8_t* src_y,
1309
+ int src_stride_y,
1310
+ const uint8_t* src_u,
1311
+ int src_stride_u,
1312
+ const uint8_t* src_v,
1313
+ int src_stride_v,
1314
+ uint8_t* dst_raw,
1315
+ int dst_stride_raw,
1316
+ int width,
1317
+ int height);
1318
+
1319
+ LIBYUV_API
1320
+ int J420ToRGB24(const uint8_t* src_y,
1321
+ int src_stride_y,
1322
+ const uint8_t* src_u,
1323
+ int src_stride_u,
1324
+ const uint8_t* src_v,
1325
+ int src_stride_v,
1326
+ uint8_t* dst_rgb24,
1327
+ int dst_stride_rgb24,
1328
+ int width,
1329
+ int height);
1330
+
1331
+ LIBYUV_API
1332
+ int J420ToRAW(const uint8_t* src_y,
1333
+ int src_stride_y,
1334
+ const uint8_t* src_u,
1335
+ int src_stride_u,
1336
+ const uint8_t* src_v,
1337
+ int src_stride_v,
1338
+ uint8_t* dst_raw,
1339
+ int dst_stride_raw,
1340
+ int width,
1341
+ int height);
1342
+
1343
+ // Convert I422 to RGB24.
1344
+ LIBYUV_API
1345
+ int I422ToRGB24(const uint8_t* src_y,
1346
+ int src_stride_y,
1347
+ const uint8_t* src_u,
1348
+ int src_stride_u,
1349
+ const uint8_t* src_v,
1350
+ int src_stride_v,
1351
+ uint8_t* dst_rgb24,
1352
+ int dst_stride_rgb24,
1353
+ int width,
1354
+ int height);
1355
+
1356
+ // Convert I422 to RAW.
1357
+ LIBYUV_API
1358
+ int I422ToRAW(const uint8_t* src_y,
1359
+ int src_stride_y,
1360
+ const uint8_t* src_u,
1361
+ int src_stride_u,
1362
+ const uint8_t* src_v,
1363
+ int src_stride_v,
1364
+ uint8_t* dst_raw,
1365
+ int dst_stride_raw,
1366
+ int width,
1367
+ int height);
1368
+
1369
+ LIBYUV_API
1370
+ int I420ToRGB565(const uint8_t* src_y,
1371
+ int src_stride_y,
1372
+ const uint8_t* src_u,
1373
+ int src_stride_u,
1374
+ const uint8_t* src_v,
1375
+ int src_stride_v,
1376
+ uint8_t* dst_rgb565,
1377
+ int dst_stride_rgb565,
1378
+ int width,
1379
+ int height);
1380
+
1381
+ LIBYUV_API
1382
+ int J420ToRGB565(const uint8_t* src_y,
1383
+ int src_stride_y,
1384
+ const uint8_t* src_u,
1385
+ int src_stride_u,
1386
+ const uint8_t* src_v,
1387
+ int src_stride_v,
1388
+ uint8_t* dst_rgb565,
1389
+ int dst_stride_rgb565,
1390
+ int width,
1391
+ int height);
1392
+
1393
+ LIBYUV_API
1394
+ int H420ToRGB565(const uint8_t* src_y,
1395
+ int src_stride_y,
1396
+ const uint8_t* src_u,
1397
+ int src_stride_u,
1398
+ const uint8_t* src_v,
1399
+ int src_stride_v,
1400
+ uint8_t* dst_rgb565,
1401
+ int dst_stride_rgb565,
1402
+ int width,
1403
+ int height);
1404
+
1405
+ LIBYUV_API
1406
+ int I422ToRGB565(const uint8_t* src_y,
1407
+ int src_stride_y,
1408
+ const uint8_t* src_u,
1409
+ int src_stride_u,
1410
+ const uint8_t* src_v,
1411
+ int src_stride_v,
1412
+ uint8_t* dst_rgb565,
1413
+ int dst_stride_rgb565,
1414
+ int width,
1415
+ int height);
1416
+
1417
+ // Convert I420 To RGB565 with 4x4 dither matrix (16 bytes).
1418
+ // Values in dither matrix from 0 to 7 recommended.
1419
+ // The order of the dither matrix is first byte is upper left.
1420
+
1421
+ LIBYUV_API
1422
+ int I420ToRGB565Dither(const uint8_t* src_y,
1423
+ int src_stride_y,
1424
+ const uint8_t* src_u,
1425
+ int src_stride_u,
1426
+ const uint8_t* src_v,
1427
+ int src_stride_v,
1428
+ uint8_t* dst_rgb565,
1429
+ int dst_stride_rgb565,
1430
+ const uint8_t* dither4x4,
1431
+ int width,
1432
+ int height);
1433
+
1434
+ LIBYUV_API
1435
+ int I420ToARGB1555(const uint8_t* src_y,
1436
+ int src_stride_y,
1437
+ const uint8_t* src_u,
1438
+ int src_stride_u,
1439
+ const uint8_t* src_v,
1440
+ int src_stride_v,
1441
+ uint8_t* dst_argb1555,
1442
+ int dst_stride_argb1555,
1443
+ int width,
1444
+ int height);
1445
+
1446
+ LIBYUV_API
1447
+ int I420ToARGB4444(const uint8_t* src_y,
1448
+ int src_stride_y,
1449
+ const uint8_t* src_u,
1450
+ int src_stride_u,
1451
+ const uint8_t* src_v,
1452
+ int src_stride_v,
1453
+ uint8_t* dst_argb4444,
1454
+ int dst_stride_argb4444,
1455
+ int width,
1456
+ int height);
1457
+
1458
+ // Convert I420 to AR30.
1459
+ LIBYUV_API
1460
+ int I420ToAR30(const uint8_t* src_y,
1461
+ int src_stride_y,
1462
+ const uint8_t* src_u,
1463
+ int src_stride_u,
1464
+ const uint8_t* src_v,
1465
+ int src_stride_v,
1466
+ uint8_t* dst_ar30,
1467
+ int dst_stride_ar30,
1468
+ int width,
1469
+ int height);
1470
+
1471
+ // Convert I420 to AB30.
1472
+ LIBYUV_API
1473
+ int I420ToAB30(const uint8_t* src_y,
1474
+ int src_stride_y,
1475
+ const uint8_t* src_u,
1476
+ int src_stride_u,
1477
+ const uint8_t* src_v,
1478
+ int src_stride_v,
1479
+ uint8_t* dst_ab30,
1480
+ int dst_stride_ab30,
1481
+ int width,
1482
+ int height);
1483
+
1484
+ // Convert H420 to AR30.
1485
+ LIBYUV_API
1486
+ int H420ToAR30(const uint8_t* src_y,
1487
+ int src_stride_y,
1488
+ const uint8_t* src_u,
1489
+ int src_stride_u,
1490
+ const uint8_t* src_v,
1491
+ int src_stride_v,
1492
+ uint8_t* dst_ar30,
1493
+ int dst_stride_ar30,
1494
+ int width,
1495
+ int height);
1496
+
1497
+ // Convert H420 to AB30.
1498
+ LIBYUV_API
1499
+ int H420ToAB30(const uint8_t* src_y,
1500
+ int src_stride_y,
1501
+ const uint8_t* src_u,
1502
+ int src_stride_u,
1503
+ const uint8_t* src_v,
1504
+ int src_stride_v,
1505
+ uint8_t* dst_ab30,
1506
+ int dst_stride_ab30,
1507
+ int width,
1508
+ int height);
1509
+
1510
+ // Convert I420 to ARGB with matrix.
1511
+ LIBYUV_API
1512
+ int I420ToARGBMatrix(const uint8_t* src_y,
1513
+ int src_stride_y,
1514
+ const uint8_t* src_u,
1515
+ int src_stride_u,
1516
+ const uint8_t* src_v,
1517
+ int src_stride_v,
1518
+ uint8_t* dst_argb,
1519
+ int dst_stride_argb,
1520
+ const struct YuvConstants* yuvconstants,
1521
+ int width,
1522
+ int height);
1523
+
1524
+ // Convert I422 to ARGB with matrix.
1525
+ LIBYUV_API
1526
+ int I422ToARGBMatrix(const uint8_t* src_y,
1527
+ int src_stride_y,
1528
+ const uint8_t* src_u,
1529
+ int src_stride_u,
1530
+ const uint8_t* src_v,
1531
+ int src_stride_v,
1532
+ uint8_t* dst_argb,
1533
+ int dst_stride_argb,
1534
+ const struct YuvConstants* yuvconstants,
1535
+ int width,
1536
+ int height);
1537
+
1538
+ // Convert I444 to ARGB with matrix.
1539
+ LIBYUV_API
1540
+ int I444ToARGBMatrix(const uint8_t* src_y,
1541
+ int src_stride_y,
1542
+ const uint8_t* src_u,
1543
+ int src_stride_u,
1544
+ const uint8_t* src_v,
1545
+ int src_stride_v,
1546
+ uint8_t* dst_argb,
1547
+ int dst_stride_argb,
1548
+ const struct YuvConstants* yuvconstants,
1549
+ int width,
1550
+ int height);
1551
+
1552
+ // Convert I444 to RGB24 with matrix.
1553
+ LIBYUV_API
1554
+ int I444ToRGB24Matrix(const uint8_t* src_y,
1555
+ int src_stride_y,
1556
+ const uint8_t* src_u,
1557
+ int src_stride_u,
1558
+ const uint8_t* src_v,
1559
+ int src_stride_v,
1560
+ uint8_t* dst_rgb24,
1561
+ int dst_stride_rgb24,
1562
+ const struct YuvConstants* yuvconstants,
1563
+ int width,
1564
+ int height);
1565
+
1566
+ // Convert 10 bit 420 YUV to ARGB with matrix.
1567
+ LIBYUV_API
1568
+ int I010ToAR30Matrix(const uint16_t* src_y,
1569
+ int src_stride_y,
1570
+ const uint16_t* src_u,
1571
+ int src_stride_u,
1572
+ const uint16_t* src_v,
1573
+ int src_stride_v,
1574
+ uint8_t* dst_ar30,
1575
+ int dst_stride_ar30,
1576
+ const struct YuvConstants* yuvconstants,
1577
+ int width,
1578
+ int height);
1579
+
1580
+ // Convert 10 bit 420 YUV to ARGB with matrix.
1581
+ LIBYUV_API
1582
+ int I210ToAR30Matrix(const uint16_t* src_y,
1583
+ int src_stride_y,
1584
+ const uint16_t* src_u,
1585
+ int src_stride_u,
1586
+ const uint16_t* src_v,
1587
+ int src_stride_v,
1588
+ uint8_t* dst_ar30,
1589
+ int dst_stride_ar30,
1590
+ const struct YuvConstants* yuvconstants,
1591
+ int width,
1592
+ int height);
1593
+
1594
+ // Convert 10 bit 444 YUV to ARGB with matrix.
1595
+ LIBYUV_API
1596
+ int I410ToAR30Matrix(const uint16_t* src_y,
1597
+ int src_stride_y,
1598
+ const uint16_t* src_u,
1599
+ int src_stride_u,
1600
+ const uint16_t* src_v,
1601
+ int src_stride_v,
1602
+ uint8_t* dst_ar30,
1603
+ int dst_stride_ar30,
1604
+ const struct YuvConstants* yuvconstants,
1605
+ int width,
1606
+ int height);
1607
+
1608
+ // Convert 10 bit YUV to ARGB with matrix.
1609
+ LIBYUV_API
1610
+ int I010ToARGBMatrix(const uint16_t* src_y,
1611
+ int src_stride_y,
1612
+ const uint16_t* src_u,
1613
+ int src_stride_u,
1614
+ const uint16_t* src_v,
1615
+ int src_stride_v,
1616
+ uint8_t* dst_argb,
1617
+ int dst_stride_argb,
1618
+ const struct YuvConstants* yuvconstants,
1619
+ int width,
1620
+ int height);
1621
+
1622
+ // multiply 12 bit yuv into high bits to allow any number of bits.
1623
+ LIBYUV_API
1624
+ int I012ToAR30Matrix(const uint16_t* src_y,
1625
+ int src_stride_y,
1626
+ const uint16_t* src_u,
1627
+ int src_stride_u,
1628
+ const uint16_t* src_v,
1629
+ int src_stride_v,
1630
+ uint8_t* dst_ar30,
1631
+ int dst_stride_ar30,
1632
+ const struct YuvConstants* yuvconstants,
1633
+ int width,
1634
+ int height);
1635
+
1636
+ // Convert 12 bit YUV to ARGB with matrix.
1637
+ LIBYUV_API
1638
+ int I012ToARGBMatrix(const uint16_t* src_y,
1639
+ int src_stride_y,
1640
+ const uint16_t* src_u,
1641
+ int src_stride_u,
1642
+ const uint16_t* src_v,
1643
+ int src_stride_v,
1644
+ uint8_t* dst_argb,
1645
+ int dst_stride_argb,
1646
+ const struct YuvConstants* yuvconstants,
1647
+ int width,
1648
+ int height);
1649
+
1650
+ // Convert 10 bit 422 YUV to ARGB with matrix.
1651
+ LIBYUV_API
1652
+ int I210ToARGBMatrix(const uint16_t* src_y,
1653
+ int src_stride_y,
1654
+ const uint16_t* src_u,
1655
+ int src_stride_u,
1656
+ const uint16_t* src_v,
1657
+ int src_stride_v,
1658
+ uint8_t* dst_argb,
1659
+ int dst_stride_argb,
1660
+ const struct YuvConstants* yuvconstants,
1661
+ int width,
1662
+ int height);
1663
+
1664
+ // Convert 10 bit 444 YUV to ARGB with matrix.
1665
+ LIBYUV_API
1666
+ int I410ToARGBMatrix(const uint16_t* src_y,
1667
+ int src_stride_y,
1668
+ const uint16_t* src_u,
1669
+ int src_stride_u,
1670
+ const uint16_t* src_v,
1671
+ int src_stride_v,
1672
+ uint8_t* dst_argb,
1673
+ int dst_stride_argb,
1674
+ const struct YuvConstants* yuvconstants,
1675
+ int width,
1676
+ int height);
1677
+
1678
+ // Convert P010 to ARGB with matrix.
1679
+ LIBYUV_API
1680
+ int P010ToARGBMatrix(const uint16_t* src_y,
1681
+ int src_stride_y,
1682
+ const uint16_t* src_uv,
1683
+ int src_stride_uv,
1684
+ uint8_t* dst_argb,
1685
+ int dst_stride_argb,
1686
+ const struct YuvConstants* yuvconstants,
1687
+ int width,
1688
+ int height);
1689
+
1690
+ // Convert P210 to ARGB with matrix.
1691
+ LIBYUV_API
1692
+ int P210ToARGBMatrix(const uint16_t* src_y,
1693
+ int src_stride_y,
1694
+ const uint16_t* src_uv,
1695
+ int src_stride_uv,
1696
+ uint8_t* dst_argb,
1697
+ int dst_stride_argb,
1698
+ const struct YuvConstants* yuvconstants,
1699
+ int width,
1700
+ int height);
1701
+
1702
+ // Convert P010 to AR30 with matrix.
1703
+ LIBYUV_API
1704
+ int P010ToAR30Matrix(const uint16_t* src_y,
1705
+ int src_stride_y,
1706
+ const uint16_t* src_uv,
1707
+ int src_stride_uv,
1708
+ uint8_t* dst_ar30,
1709
+ int dst_stride_ar30,
1710
+ const struct YuvConstants* yuvconstants,
1711
+ int width,
1712
+ int height);
1713
+
1714
+ // Convert P210 to AR30 with matrix.
1715
+ LIBYUV_API
1716
+ int P210ToAR30Matrix(const uint16_t* src_y,
1717
+ int src_stride_y,
1718
+ const uint16_t* src_uv,
1719
+ int src_stride_uv,
1720
+ uint8_t* dst_ar30,
1721
+ int dst_stride_ar30,
1722
+ const struct YuvConstants* yuvconstants,
1723
+ int width,
1724
+ int height);
1725
+
1726
+ // P012 and P010 use most significant bits so the conversion is the same.
1727
+ // Convert P012 to ARGB with matrix.
1728
+ #define P012ToARGBMatrix P010ToARGBMatrix
1729
+ // Convert P012 to AR30 with matrix.
1730
+ #define P012ToAR30Matrix P010ToAR30Matrix
1731
+ // Convert P212 to ARGB with matrix.
1732
+ #define P212ToARGBMatrix P210ToARGBMatrix
1733
+ // Convert P212 to AR30 with matrix.
1734
+ #define P212ToAR30Matrix P210ToAR30Matrix
1735
+
1736
+ // Convert P016 to ARGB with matrix.
1737
+ #define P016ToARGBMatrix P010ToARGBMatrix
1738
+ // Convert P016 to AR30 with matrix.
1739
+ #define P016ToAR30Matrix P010ToAR30Matrix
1740
+ // Convert P216 to ARGB with matrix.
1741
+ #define P216ToARGBMatrix P210ToARGBMatrix
1742
+ // Convert P216 to AR30 with matrix.
1743
+ #define P216ToAR30Matrix P210ToAR30Matrix
1744
+
1745
+ // Convert I420 with Alpha to preattenuated ARGB with matrix.
1746
+ LIBYUV_API
1747
+ int I420AlphaToARGBMatrix(const uint8_t* src_y,
1748
+ int src_stride_y,
1749
+ const uint8_t* src_u,
1750
+ int src_stride_u,
1751
+ const uint8_t* src_v,
1752
+ int src_stride_v,
1753
+ const uint8_t* src_a,
1754
+ int src_stride_a,
1755
+ uint8_t* dst_argb,
1756
+ int dst_stride_argb,
1757
+ const struct YuvConstants* yuvconstants,
1758
+ int width,
1759
+ int height,
1760
+ int attenuate);
1761
+
1762
+ // Convert I422 with Alpha to preattenuated ARGB with matrix.
1763
+ LIBYUV_API
1764
+ int I422AlphaToARGBMatrix(const uint8_t* src_y,
1765
+ int src_stride_y,
1766
+ const uint8_t* src_u,
1767
+ int src_stride_u,
1768
+ const uint8_t* src_v,
1769
+ int src_stride_v,
1770
+ const uint8_t* src_a,
1771
+ int src_stride_a,
1772
+ uint8_t* dst_argb,
1773
+ int dst_stride_argb,
1774
+ const struct YuvConstants* yuvconstants,
1775
+ int width,
1776
+ int height,
1777
+ int attenuate);
1778
+
1779
+ // Convert I444 with Alpha to preattenuated ARGB with matrix.
1780
+ LIBYUV_API
1781
+ int I444AlphaToARGBMatrix(const uint8_t* src_y,
1782
+ int src_stride_y,
1783
+ const uint8_t* src_u,
1784
+ int src_stride_u,
1785
+ const uint8_t* src_v,
1786
+ int src_stride_v,
1787
+ const uint8_t* src_a,
1788
+ int src_stride_a,
1789
+ uint8_t* dst_argb,
1790
+ int dst_stride_argb,
1791
+ const struct YuvConstants* yuvconstants,
1792
+ int width,
1793
+ int height,
1794
+ int attenuate);
1795
+
1796
+ // Convert I010 with Alpha to preattenuated ARGB with matrix.
1797
+ LIBYUV_API
1798
+ int I010AlphaToARGBMatrix(const uint16_t* src_y,
1799
+ int src_stride_y,
1800
+ const uint16_t* src_u,
1801
+ int src_stride_u,
1802
+ const uint16_t* src_v,
1803
+ int src_stride_v,
1804
+ const uint16_t* src_a,
1805
+ int src_stride_a,
1806
+ uint8_t* dst_argb,
1807
+ int dst_stride_argb,
1808
+ const struct YuvConstants* yuvconstants,
1809
+ int width,
1810
+ int height,
1811
+ int attenuate);
1812
+
1813
+ // Convert I210 with Alpha to preattenuated ARGB with matrix.
1814
+ LIBYUV_API
1815
+ int I210AlphaToARGBMatrix(const uint16_t* src_y,
1816
+ int src_stride_y,
1817
+ const uint16_t* src_u,
1818
+ int src_stride_u,
1819
+ const uint16_t* src_v,
1820
+ int src_stride_v,
1821
+ const uint16_t* src_a,
1822
+ int src_stride_a,
1823
+ uint8_t* dst_argb,
1824
+ int dst_stride_argb,
1825
+ const struct YuvConstants* yuvconstants,
1826
+ int width,
1827
+ int height,
1828
+ int attenuate);
1829
+
1830
+ // Convert I410 with Alpha to preattenuated ARGB with matrix.
1831
+ LIBYUV_API
1832
+ int I410AlphaToARGBMatrix(const uint16_t* src_y,
1833
+ int src_stride_y,
1834
+ const uint16_t* src_u,
1835
+ int src_stride_u,
1836
+ const uint16_t* src_v,
1837
+ int src_stride_v,
1838
+ const uint16_t* src_a,
1839
+ int src_stride_a,
1840
+ uint8_t* dst_argb,
1841
+ int dst_stride_argb,
1842
+ const struct YuvConstants* yuvconstants,
1843
+ int width,
1844
+ int height,
1845
+ int attenuate);
1846
+
1847
+ // Convert NV12 to ARGB with matrix.
1848
+ LIBYUV_API
1849
+ int NV12ToARGBMatrix(const uint8_t* src_y,
1850
+ int src_stride_y,
1851
+ const uint8_t* src_uv,
1852
+ int src_stride_uv,
1853
+ uint8_t* dst_argb,
1854
+ int dst_stride_argb,
1855
+ const struct YuvConstants* yuvconstants,
1856
+ int width,
1857
+ int height);
1858
+
1859
+ // Convert NV21 to ARGB with matrix.
1860
+ LIBYUV_API
1861
+ int NV21ToARGBMatrix(const uint8_t* src_y,
1862
+ int src_stride_y,
1863
+ const uint8_t* src_vu,
1864
+ int src_stride_vu,
1865
+ uint8_t* dst_argb,
1866
+ int dst_stride_argb,
1867
+ const struct YuvConstants* yuvconstants,
1868
+ int width,
1869
+ int height);
1870
+
1871
+ // Convert NV12 to RGB565 with matrix.
1872
+ LIBYUV_API
1873
+ int NV12ToRGB565Matrix(const uint8_t* src_y,
1874
+ int src_stride_y,
1875
+ const uint8_t* src_uv,
1876
+ int src_stride_uv,
1877
+ uint8_t* dst_rgb565,
1878
+ int dst_stride_rgb565,
1879
+ const struct YuvConstants* yuvconstants,
1880
+ int width,
1881
+ int height);
1882
+
1883
+ // Convert NV12 to RGB24 with matrix.
1884
+ LIBYUV_API
1885
+ int NV12ToRGB24Matrix(const uint8_t* src_y,
1886
+ int src_stride_y,
1887
+ const uint8_t* src_uv,
1888
+ int src_stride_uv,
1889
+ uint8_t* dst_rgb24,
1890
+ int dst_stride_rgb24,
1891
+ const struct YuvConstants* yuvconstants,
1892
+ int width,
1893
+ int height);
1894
+
1895
+ // Convert NV21 to RGB24 with matrix.
1896
+ LIBYUV_API
1897
+ int NV21ToRGB24Matrix(const uint8_t* src_y,
1898
+ int src_stride_y,
1899
+ const uint8_t* src_vu,
1900
+ int src_stride_vu,
1901
+ uint8_t* dst_rgb24,
1902
+ int dst_stride_rgb24,
1903
+ const struct YuvConstants* yuvconstants,
1904
+ int width,
1905
+ int height);
1906
+
1907
+ // Convert YUY2 to ARGB with matrix.
1908
+ LIBYUV_API
1909
+ int YUY2ToARGBMatrix(const uint8_t* src_yuy2,
1910
+ int src_stride_yuy2,
1911
+ uint8_t* dst_argb,
1912
+ int dst_stride_argb,
1913
+ const struct YuvConstants* yuvconstants,
1914
+ int width,
1915
+ int height);
1916
+
1917
+ // Convert UYVY to ARGB with matrix.
1918
+ LIBYUV_API
1919
+ int UYVYToARGBMatrix(const uint8_t* src_uyvy,
1920
+ int src_stride_uyvy,
1921
+ uint8_t* dst_argb,
1922
+ int dst_stride_argb,
1923
+ const struct YuvConstants* yuvconstants,
1924
+ int width,
1925
+ int height);
1926
+
1927
+ // Convert Android420 to ARGB with matrix.
1928
+ LIBYUV_API
1929
+ int Android420ToARGBMatrix(const uint8_t* src_y,
1930
+ int src_stride_y,
1931
+ const uint8_t* src_u,
1932
+ int src_stride_u,
1933
+ const uint8_t* src_v,
1934
+ int src_stride_v,
1935
+ int src_pixel_stride_uv,
1936
+ uint8_t* dst_argb,
1937
+ int dst_stride_argb,
1938
+ const struct YuvConstants* yuvconstants,
1939
+ int width,
1940
+ int height);
1941
+
1942
+ // Convert I422 to RGBA with matrix.
1943
+ LIBYUV_API
1944
+ int I422ToRGBAMatrix(const uint8_t* src_y,
1945
+ int src_stride_y,
1946
+ const uint8_t* src_u,
1947
+ int src_stride_u,
1948
+ const uint8_t* src_v,
1949
+ int src_stride_v,
1950
+ uint8_t* dst_rgba,
1951
+ int dst_stride_rgba,
1952
+ const struct YuvConstants* yuvconstants,
1953
+ int width,
1954
+ int height);
1955
+
1956
+ // Convert I420 to RGBA with matrix.
1957
+ LIBYUV_API
1958
+ int I420ToRGBAMatrix(const uint8_t* src_y,
1959
+ int src_stride_y,
1960
+ const uint8_t* src_u,
1961
+ int src_stride_u,
1962
+ const uint8_t* src_v,
1963
+ int src_stride_v,
1964
+ uint8_t* dst_rgba,
1965
+ int dst_stride_rgba,
1966
+ const struct YuvConstants* yuvconstants,
1967
+ int width,
1968
+ int height);
1969
+
1970
+ // Convert I420 to RGB24 with matrix.
1971
+ LIBYUV_API
1972
+ int I420ToRGB24Matrix(const uint8_t* src_y,
1973
+ int src_stride_y,
1974
+ const uint8_t* src_u,
1975
+ int src_stride_u,
1976
+ const uint8_t* src_v,
1977
+ int src_stride_v,
1978
+ uint8_t* dst_rgb24,
1979
+ int dst_stride_rgb24,
1980
+ const struct YuvConstants* yuvconstants,
1981
+ int width,
1982
+ int height);
1983
+
1984
+ // Convert I422 to RGB24 with matrix.
1985
+ LIBYUV_API
1986
+ int I422ToRGB24Matrix(const uint8_t* src_y,
1987
+ int src_stride_y,
1988
+ const uint8_t* src_u,
1989
+ int src_stride_u,
1990
+ const uint8_t* src_v,
1991
+ int src_stride_v,
1992
+ uint8_t* dst_rgb24,
1993
+ int dst_stride_rgb24,
1994
+ const struct YuvConstants* yuvconstants,
1995
+ int width,
1996
+ int height);
1997
+
1998
+ // Convert I420 to RGB565 with specified color matrix.
1999
+ LIBYUV_API
2000
+ int I420ToRGB565Matrix(const uint8_t* src_y,
2001
+ int src_stride_y,
2002
+ const uint8_t* src_u,
2003
+ int src_stride_u,
2004
+ const uint8_t* src_v,
2005
+ int src_stride_v,
2006
+ uint8_t* dst_rgb565,
2007
+ int dst_stride_rgb565,
2008
+ const struct YuvConstants* yuvconstants,
2009
+ int width,
2010
+ int height);
2011
+
2012
+ // Convert I422 to RGB565 with specified color matrix.
2013
+ LIBYUV_API
2014
+ int I422ToRGB565Matrix(const uint8_t* src_y,
2015
+ int src_stride_y,
2016
+ const uint8_t* src_u,
2017
+ int src_stride_u,
2018
+ const uint8_t* src_v,
2019
+ int src_stride_v,
2020
+ uint8_t* dst_rgb565,
2021
+ int dst_stride_rgb565,
2022
+ const struct YuvConstants* yuvconstants,
2023
+ int width,
2024
+ int height);
2025
+
2026
+ // Convert I420 to AR30 with matrix.
2027
+ LIBYUV_API
2028
+ int I420ToAR30Matrix(const uint8_t* src_y,
2029
+ int src_stride_y,
2030
+ const uint8_t* src_u,
2031
+ int src_stride_u,
2032
+ const uint8_t* src_v,
2033
+ int src_stride_v,
2034
+ uint8_t* dst_ar30,
2035
+ int dst_stride_ar30,
2036
+ const struct YuvConstants* yuvconstants,
2037
+ int width,
2038
+ int height);
2039
+
2040
+ // Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
2041
+ LIBYUV_API
2042
+ int I400ToARGBMatrix(const uint8_t* src_y,
2043
+ int src_stride_y,
2044
+ uint8_t* dst_argb,
2045
+ int dst_stride_argb,
2046
+ const struct YuvConstants* yuvconstants,
2047
+ int width,
2048
+ int height);
2049
+
2050
+ // Convert I420 to ARGB with matrix and UV filter mode.
2051
+ LIBYUV_API
2052
+ int I420ToARGBMatrixFilter(const uint8_t* src_y,
2053
+ int src_stride_y,
2054
+ const uint8_t* src_u,
2055
+ int src_stride_u,
2056
+ const uint8_t* src_v,
2057
+ int src_stride_v,
2058
+ uint8_t* dst_argb,
2059
+ int dst_stride_argb,
2060
+ const struct YuvConstants* yuvconstants,
2061
+ int width,
2062
+ int height,
2063
+ enum FilterMode filter);
2064
+
2065
+ // Convert I422 to ARGB with matrix and UV filter mode.
2066
+ LIBYUV_API
2067
+ int I422ToARGBMatrixFilter(const uint8_t* src_y,
2068
+ int src_stride_y,
2069
+ const uint8_t* src_u,
2070
+ int src_stride_u,
2071
+ const uint8_t* src_v,
2072
+ int src_stride_v,
2073
+ uint8_t* dst_argb,
2074
+ int dst_stride_argb,
2075
+ const struct YuvConstants* yuvconstants,
2076
+ int width,
2077
+ int height,
2078
+ enum FilterMode filter);
2079
+
2080
+ // Convert I422 to RGB24 with matrix and UV filter mode.
2081
+ LIBYUV_API
2082
+ int I422ToRGB24MatrixFilter(const uint8_t* src_y,
2083
+ int src_stride_y,
2084
+ const uint8_t* src_u,
2085
+ int src_stride_u,
2086
+ const uint8_t* src_v,
2087
+ int src_stride_v,
2088
+ uint8_t* dst_rgb24,
2089
+ int dst_stride_rgb24,
2090
+ const struct YuvConstants* yuvconstants,
2091
+ int width,
2092
+ int height,
2093
+ enum FilterMode filter);
2094
+
2095
+ // Convert I420 to RGB24 with matrix and UV filter mode.
2096
+ LIBYUV_API
2097
+ int I420ToRGB24MatrixFilter(const uint8_t* src_y,
2098
+ int src_stride_y,
2099
+ const uint8_t* src_u,
2100
+ int src_stride_u,
2101
+ const uint8_t* src_v,
2102
+ int src_stride_v,
2103
+ uint8_t* dst_rgb24,
2104
+ int dst_stride_rgb24,
2105
+ const struct YuvConstants* yuvconstants,
2106
+ int width,
2107
+ int height,
2108
+ enum FilterMode filter);
2109
+
2110
+ // Convert I010 to AR30 with matrix and UV filter mode.
2111
+ LIBYUV_API
2112
+ int I010ToAR30MatrixFilter(const uint16_t* src_y,
2113
+ int src_stride_y,
2114
+ const uint16_t* src_u,
2115
+ int src_stride_u,
2116
+ const uint16_t* src_v,
2117
+ int src_stride_v,
2118
+ uint8_t* dst_ar30,
2119
+ int dst_stride_ar30,
2120
+ const struct YuvConstants* yuvconstants,
2121
+ int width,
2122
+ int height,
2123
+ enum FilterMode filter);
2124
+
2125
+ // Convert I210 to AR30 with matrix and UV filter mode.
2126
+ LIBYUV_API
2127
+ int I210ToAR30MatrixFilter(const uint16_t* src_y,
2128
+ int src_stride_y,
2129
+ const uint16_t* src_u,
2130
+ int src_stride_u,
2131
+ const uint16_t* src_v,
2132
+ int src_stride_v,
2133
+ uint8_t* dst_ar30,
2134
+ int dst_stride_ar30,
2135
+ const struct YuvConstants* yuvconstants,
2136
+ int width,
2137
+ int height,
2138
+ enum FilterMode filter);
2139
+
2140
+ // Convert I010 to ARGB with matrix and UV filter mode.
2141
+ LIBYUV_API
2142
+ int I010ToARGBMatrixFilter(const uint16_t* src_y,
2143
+ int src_stride_y,
2144
+ const uint16_t* src_u,
2145
+ int src_stride_u,
2146
+ const uint16_t* src_v,
2147
+ int src_stride_v,
2148
+ uint8_t* dst_argb,
2149
+ int dst_stride_argb,
2150
+ const struct YuvConstants* yuvconstants,
2151
+ int width,
2152
+ int height,
2153
+ enum FilterMode filter);
2154
+
2155
+ // Convert I210 to ARGB with matrix and UV filter mode.
2156
+ LIBYUV_API
2157
+ int I210ToARGBMatrixFilter(const uint16_t* src_y,
2158
+ int src_stride_y,
2159
+ const uint16_t* src_u,
2160
+ int src_stride_u,
2161
+ const uint16_t* src_v,
2162
+ int src_stride_v,
2163
+ uint8_t* dst_argb,
2164
+ int dst_stride_argb,
2165
+ const struct YuvConstants* yuvconstants,
2166
+ int width,
2167
+ int height,
2168
+ enum FilterMode filter);
2169
+
2170
+ // Convert I420 with Alpha to attenuated ARGB with matrix and UV filter mode.
2171
+ LIBYUV_API
2172
+ int I420AlphaToARGBMatrixFilter(const uint8_t* src_y,
2173
+ int src_stride_y,
2174
+ const uint8_t* src_u,
2175
+ int src_stride_u,
2176
+ const uint8_t* src_v,
2177
+ int src_stride_v,
2178
+ const uint8_t* src_a,
2179
+ int src_stride_a,
2180
+ uint8_t* dst_argb,
2181
+ int dst_stride_argb,
2182
+ const struct YuvConstants* yuvconstants,
2183
+ int width,
2184
+ int height,
2185
+ int attenuate,
2186
+ enum FilterMode filter);
2187
+
2188
+ // Convert I422 with Alpha to attenuated ARGB with matrix and UV filter mode.
2189
+ LIBYUV_API
2190
+ int I422AlphaToARGBMatrixFilter(const uint8_t* src_y,
2191
+ int src_stride_y,
2192
+ const uint8_t* src_u,
2193
+ int src_stride_u,
2194
+ const uint8_t* src_v,
2195
+ int src_stride_v,
2196
+ const uint8_t* src_a,
2197
+ int src_stride_a,
2198
+ uint8_t* dst_argb,
2199
+ int dst_stride_argb,
2200
+ const struct YuvConstants* yuvconstants,
2201
+ int width,
2202
+ int height,
2203
+ int attenuate,
2204
+ enum FilterMode filter);
2205
+
2206
+ // Convert I010 with Alpha to attenuated ARGB with matrix and UV filter mode.
2207
+ LIBYUV_API
2208
+ int I010AlphaToARGBMatrixFilter(const uint16_t* src_y,
2209
+ int src_stride_y,
2210
+ const uint16_t* src_u,
2211
+ int src_stride_u,
2212
+ const uint16_t* src_v,
2213
+ int src_stride_v,
2214
+ const uint16_t* src_a,
2215
+ int src_stride_a,
2216
+ uint8_t* dst_argb,
2217
+ int dst_stride_argb,
2218
+ const struct YuvConstants* yuvconstants,
2219
+ int width,
2220
+ int height,
2221
+ int attenuate,
2222
+ enum FilterMode filter);
2223
+
2224
+ // Convert I210 with Alpha to attenuated ARGB with matrix and UV filter mode.
2225
+ LIBYUV_API
2226
+ int I210AlphaToARGBMatrixFilter(const uint16_t* src_y,
2227
+ int src_stride_y,
2228
+ const uint16_t* src_u,
2229
+ int src_stride_u,
2230
+ const uint16_t* src_v,
2231
+ int src_stride_v,
2232
+ const uint16_t* src_a,
2233
+ int src_stride_a,
2234
+ uint8_t* dst_argb,
2235
+ int dst_stride_argb,
2236
+ const struct YuvConstants* yuvconstants,
2237
+ int width,
2238
+ int height,
2239
+ int attenuate,
2240
+ enum FilterMode filter);
2241
+
2242
+ // Convert P010 to ARGB with matrix and UV filter mode.
2243
+ LIBYUV_API
2244
+ int P010ToARGBMatrixFilter(const uint16_t* src_y,
2245
+ int src_stride_y,
2246
+ const uint16_t* src_uv,
2247
+ int src_stride_uv,
2248
+ uint8_t* dst_argb,
2249
+ int dst_stride_argb,
2250
+ const struct YuvConstants* yuvconstants,
2251
+ int width,
2252
+ int height,
2253
+ enum FilterMode filter);
2254
+
2255
+ // Convert P210 to ARGB with matrix and UV filter mode.
2256
+ LIBYUV_API
2257
+ int P210ToARGBMatrixFilter(const uint16_t* src_y,
2258
+ int src_stride_y,
2259
+ const uint16_t* src_uv,
2260
+ int src_stride_uv,
2261
+ uint8_t* dst_argb,
2262
+ int dst_stride_argb,
2263
+ const struct YuvConstants* yuvconstants,
2264
+ int width,
2265
+ int height,
2266
+ enum FilterMode filter);
2267
+
2268
+ // Convert P010 to AR30 with matrix and UV filter mode.
2269
+ LIBYUV_API
2270
+ int P010ToAR30MatrixFilter(const uint16_t* src_y,
2271
+ int src_stride_y,
2272
+ const uint16_t* src_uv,
2273
+ int src_stride_uv,
2274
+ uint8_t* dst_ar30,
2275
+ int dst_stride_ar30,
2276
+ const struct YuvConstants* yuvconstants,
2277
+ int width,
2278
+ int height,
2279
+ enum FilterMode filter);
2280
+
2281
+ // Convert P210 to AR30 with matrix and UV filter mode.
2282
+ LIBYUV_API
2283
+ int P210ToAR30MatrixFilter(const uint16_t* src_y,
2284
+ int src_stride_y,
2285
+ const uint16_t* src_uv,
2286
+ int src_stride_uv,
2287
+ uint8_t* dst_ar30,
2288
+ int dst_stride_ar30,
2289
+ const struct YuvConstants* yuvconstants,
2290
+ int width,
2291
+ int height,
2292
+ enum FilterMode filter);
2293
+
2294
+ // Convert camera sample to ARGB with cropping, rotation and vertical flip.
2295
+ // "sample_size" is needed to parse MJPG.
2296
+ // "dst_stride_argb" number of bytes in a row of the dst_argb plane.
2297
+ // Normally this would be the same as dst_width, with recommended alignment
2298
+ // to 16 bytes for better efficiency.
2299
+ // If rotation of 90 or 270 is used, stride is affected. The caller should
2300
+ // allocate the I420 buffer according to rotation.
2301
+ // "dst_stride_u" number of bytes in a row of the dst_u plane.
2302
+ // Normally this would be the same as (dst_width + 1) / 2, with
2303
+ // recommended alignment to 16 bytes for better efficiency.
2304
+ // If rotation of 90 or 270 is used, stride is affected.
2305
+ // "crop_x" and "crop_y" are starting position for cropping.
2306
+ // To center, crop_x = (src_width - dst_width) / 2
2307
+ // crop_y = (src_height - dst_height) / 2
2308
+ // "src_width" / "src_height" is size of src_frame in pixels.
2309
+ // "src_height" can be negative indicating a vertically flipped image source.
2310
+ // "crop_width" / "crop_height" is the size to crop the src to.
2311
+ // Must be less than or equal to src_width/src_height
2312
+ // Cropping parameters are pre-rotation.
2313
+ // "rotation" can be 0, 90, 180 or 270.
2314
+ // "fourcc" is a fourcc. ie 'I420', 'YUY2'
2315
+ // Returns 0 for successful; -1 for invalid parameter. Non-zero for failure.
2316
+ LIBYUV_API
2317
+ int ConvertToARGB(const uint8_t* sample,
2318
+ size_t sample_size,
2319
+ uint8_t* dst_argb,
2320
+ int dst_stride_argb,
2321
+ int crop_x,
2322
+ int crop_y,
2323
+ int src_width,
2324
+ int src_height,
2325
+ int crop_width,
2326
+ int crop_height,
2327
+ enum RotationMode rotation,
2328
+ uint32_t fourcc);
2329
+
2330
+ #ifdef __cplusplus
2331
+ } // extern "C"
2332
+ } // namespace libyuv
2333
+ #endif
2334
+
2335
+ #endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_