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