blob: 8e38a4abdc1fc41da68b93229ca209d3caefbff7 [file] [log] [blame]
Jean-Luc Brouilletbe216382015-03-22 12:44:27 -07001#
2# Copyright (C) 2014 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17header:
18summary: Conversion functions
19description:
20 TODO Add desc.
21end:
22
23function: convert_#3#1
24version: 9
25attrib: const
26w: 2, 3, 4
27t: u8, u16, u32, i8, i16, i32, f32
28t: u8, u16, u32, i8, i16, i32, f32
29ret: #3#1
30arg: #2#1 v, compatible(#3)
31summary: Converts numerical vectors
32description:
33 Component wise conversion from a numerical type to another.
34
35 Conversions of floating point values to integer will truncate.
36
37 Conversions of numbers too large to fit the destination type yield undefined results.
38 For example, converting a float that contains 1.0e18 to a short is undefined.
39 Use @clamp() to avoid this.
40end:
41
42function: convert_#3#1
43version: 21
44attrib: const
45w: 2, 3, 4
46t: u64, i64, f64
47t: u64, i64, f64
48ret: #3#1
49arg: #2#1 v, compatible(#3)
50end:
51
52function: convert_#3#1
53version: 21
54attrib: const
55w: 2, 3, 4
56t: u64, i64, f64
57t: u8, u16, u32, i8, i16, i32, f32
58ret: #3#1
59arg: #2#1 v, compatible(#3)
60end:
61
62function: convert_#3#1
63version: 21
64attrib: const
65w: 2, 3, 4
66t: u8, u16, u32, i8, i16, i32, f32
67t: u64, i64, f64
68ret: #3#1
69arg: #2#1 v, compatible(#3)
70end:
71
72function: rsPackColorTo8888
73attrib: const
74ret: uchar4
75arg: float r
76arg: float g
77arg: float b
78summary:
79description:
80 Pack floating point (0-1) RGB values into a uchar4.
81
82 For the float3 variant and the variant that only specifies r, g, b,
83 the alpha component is set to 255 (1.0).
84test: none
85end:
86
87function: rsPackColorTo8888
88attrib: const
89ret: uchar4
90arg: float r
91arg: float g
92arg: float b
93arg: float a
94test: none
95end:
96
97function: rsPackColorTo8888
98attrib: const
99ret: uchar4
100arg: float3 color
101test: none
102end:
103
104function: rsPackColorTo8888
105attrib: const
106ret: uchar4
107arg: float4 color
108test: none
109end:
110
111function: rsUnpackColor8888
112attrib: =const
113ret: float4
114arg: uchar4 c
115summary:
116description:
117 Unpack a uchar4 color to float4. The resulting float range will be (0-1).
118test: none
119end:
120
121function: rsYuvToRGBA_#2#1
122attrib: const
123w: 4
124t: u8, f32
125ret: #2#1
126arg: uchar y
127arg: uchar u
128arg: uchar v
129summary:
130description:
131 Convert from YUV to RGBA.
132test: none
133end: