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_FROM_ARGB_H_ // NOLINT 12 #define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ 13 14 #include "libyuv/basic_types.h" 15 16 #ifdef __cplusplus 17 namespace libyuv { 18 extern "C" { 19 #endif 20 21 // Copy ARGB to ARGB. 22 #define ARGBToARGB ARGBCopy 23 LIBYUV_API 24 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 25 uint8* dst_argb, int dst_stride_argb, 26 int width, int height); 27 28 // Convert ARGB To BGRA. (alias) 29 #define ARGBToBGRA BGRAToARGB 30 LIBYUV_API 31 int BGRAToARGB(const uint8* src_frame, int src_stride_frame, 32 uint8* dst_argb, int dst_stride_argb, 33 int width, int height); 34 35 // Convert ARGB To ABGR. (alias) 36 #define ARGBToABGR ABGRToARGB 37 LIBYUV_API 38 int ABGRToARGB(const uint8* src_frame, int src_stride_frame, 39 uint8* dst_argb, int dst_stride_argb, 40 int width, int height); 41 42 // Convert ARGB To RGBA. 43 LIBYUV_API 44 int ARGBToRGBA(const uint8* src_frame, int src_stride_frame, 45 uint8* dst_argb, int dst_stride_argb, 46 int width, int height); 47 48 // Convert ARGB To RGB24. 49 LIBYUV_API 50 int ARGBToRGB24(const uint8* src_argb, int src_stride_argb, 51 uint8* dst_rgb24, int dst_stride_rgb24, 52 int width, int height); 53 54 // Convert ARGB To RAW. 55 LIBYUV_API 56 int ARGBToRAW(const uint8* src_argb, int src_stride_argb, 57 uint8* dst_rgb, int dst_stride_rgb, 58 int width, int height); 59 60 // Convert ARGB To RGB565. 61 LIBYUV_API 62 int ARGBToRGB565(const uint8* src_argb, int src_stride_argb, 63 uint8* dst_rgb565, int dst_stride_rgb565, 64 int width, int height); 65 66 // Convert ARGB To ARGB1555. 67 LIBYUV_API 68 int ARGBToARGB1555(const uint8* src_argb, int src_stride_argb, 69 uint8* dst_argb1555, int dst_stride_argb1555, 70 int width, int height); 71 72 // Convert ARGB To ARGB4444. 73 LIBYUV_API 74 int ARGBToARGB4444(const uint8* src_argb, int src_stride_argb, 75 uint8* dst_argb4444, int dst_stride_argb4444, 76 int width, int height); 77 78 // Convert ARGB To I444. 79 LIBYUV_API 80 int ARGBToI444(const uint8* src_argb, int src_stride_argb, 81 uint8* dst_y, int dst_stride_y, 82 uint8* dst_u, int dst_stride_u, 83 uint8* dst_v, int dst_stride_v, 84 int width, int height); 85 86 // Convert ARGB To I422. 87 LIBYUV_API 88 int ARGBToI422(const uint8* src_argb, int src_stride_argb, 89 uint8* dst_y, int dst_stride_y, 90 uint8* dst_u, int dst_stride_u, 91 uint8* dst_v, int dst_stride_v, 92 int width, int height); 93 94 // Convert ARGB To I420. (also in convert.h) 95 LIBYUV_API 96 int ARGBToI420(const uint8* src_argb, int src_stride_argb, 97 uint8* dst_y, int dst_stride_y, 98 uint8* dst_u, int dst_stride_u, 99 uint8* dst_v, int dst_stride_v, 100 int width, int height); 101 102 // Convert ARGB to J420. (JPeg full range I420). 103 LIBYUV_API 104 int ARGBToJ420(const uint8* src_argb, int src_stride_argb, 105 uint8* dst_yj, int dst_stride_yj, 106 uint8* dst_u, int dst_stride_u, 107 uint8* dst_v, int dst_stride_v, 108 int width, int height); 109 110 // Convert ARGB To I411. 111 LIBYUV_API 112 int ARGBToI411(const uint8* src_argb, int src_stride_argb, 113 uint8* dst_y, int dst_stride_y, 114 uint8* dst_u, int dst_stride_u, 115 uint8* dst_v, int dst_stride_v, 116 int width, int height); 117 118 // Convert ARGB to J400. (JPeg full range). 119 LIBYUV_API 120 int ARGBToJ400(const uint8* src_argb, int src_stride_argb, 121 uint8* dst_yj, int dst_stride_yj, 122 int width, int height); 123 124 // Convert ARGB to I400. 125 LIBYUV_API 126 int ARGBToI400(const uint8* src_argb, int src_stride_argb, 127 uint8* dst_y, int dst_stride_y, 128 int width, int height); 129 130 // Convert ARGB To NV12. 131 LIBYUV_API 132 int ARGBToNV12(const uint8* src_argb, int src_stride_argb, 133 uint8* dst_y, int dst_stride_y, 134 uint8* dst_uv, int dst_stride_uv, 135 int width, int height); 136 137 // Convert ARGB To NV21. 138 LIBYUV_API 139 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 140 uint8* dst_y, int dst_stride_y, 141 uint8* dst_vu, int dst_stride_vu, 142 int width, int height); 143 144 // Convert ARGB To NV21. 145 LIBYUV_API 146 int ARGBToNV21(const uint8* src_argb, int src_stride_argb, 147 uint8* dst_y, int dst_stride_y, 148 uint8* dst_vu, int dst_stride_vu, 149 int width, int height); 150 151 // Convert ARGB To YUY2. 152 LIBYUV_API 153 int ARGBToYUY2(const uint8* src_argb, int src_stride_argb, 154 uint8* dst_yuy2, int dst_stride_yuy2, 155 int width, int height); 156 157 // Convert ARGB To UYVY. 158 LIBYUV_API 159 int ARGBToUYVY(const uint8* src_argb, int src_stride_argb, 160 uint8* dst_uyvy, int dst_stride_uyvy, 161 int width, int height); 162 163 #ifdef __cplusplus 164 } // extern "C" 165 } // namespace libyuv 166 #endif 167 168 #endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ NOLINT 169