added dual tvl1 optical flow gpu implementation
[profile/ivi/opencv.git] / modules / gpu / src / cuda / color.cu
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 //  By downloading, copying, installing or using the software you agree to this license.
6 //  If you do not agree to this license, do not download, install,
7 //  copy or use the software.
8 //
9 //
10 //                           License Agreement
11 //                For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 // Third party copyrights are property of their respective owners.
16 //
17 // Redistribution and use in source and binary forms, with or without modification,
18 // are permitted provided that the following conditions are met:
19 //
20 //   * Redistribution's of source code must retain the above copyright notice,
21 //     this list of conditions and the following disclaimer.
22 //
23 //   * Redistribution's in binary form must reproduce the above copyright notice,
24 //     this list of conditions and the following disclaimer in the documentation
25 //     and/or other materials provided with the distribution.
26 //
27 //   * The name of the copyright holders may not be used to endorse or promote products
28 //     derived from this software without specific prior written permission.
29 //
30 // This software is provided by the copyright holders and contributors "as is" and
31 // any express or implied warranties, including, but not limited to, the implied
32 // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 // In no event shall the Intel Corporation or contributors be liable for any direct,
34 // indirect, incidental, special, exemplary, or consequential damages
35 // (including, but not limited to, procurement of substitute goods or services;
36 // loss of use, data, or profits; or business interruption) however caused
37 // and on any theory of liability, whether in contract, strict liability,
38 // or tort (including negligence or otherwise) arising in any way out of
39 // the use of this software, even if advised of the possibility of such damage.
40 //
41 //M*/
42
43 #if !defined CUDA_DISABLER
44
45 #include "internal_shared.hpp"
46 #include "opencv2/gpu/device/transform.hpp"
47 #include "opencv2/gpu/device/color.hpp"
48 #include "cvt_color_internal.h"
49
50 namespace cv { namespace gpu { namespace device
51 {
52     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_rgba_traits<uchar>::functor_type)
53     {
54         enum { smart_block_dim_x = 8 };
55         enum { smart_block_dim_y = 8 };
56         enum { smart_shift = 4 };
57     };
58
59     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr555_traits::functor_type)
60     {
61         enum { smart_block_dim_y = 8 };
62         enum { smart_shift = 4 };
63     };
64     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr555_traits::functor_type)
65     {
66         enum { smart_block_dim_y = 8 };
67         enum { smart_shift = 4 };
68     };
69     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_bgr565_traits::functor_type)
70     {
71         enum { smart_block_dim_y = 8 };
72         enum { smart_shift = 4 };
73     };
74     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_bgr565_traits::functor_type)
75     {
76         enum { smart_block_dim_y = 8 };
77         enum { smart_shift = 4 };
78     };
79
80     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_bgra_traits::functor_type)
81     {
82         enum { smart_block_dim_y = 8 };
83         enum { smart_shift = 4 };
84     };
85     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr555_to_rgba_traits::functor_type)
86     {
87         enum { smart_block_dim_y = 8 };
88         enum { smart_shift = 4 };
89     };
90     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_bgra_traits::functor_type)
91     {
92         enum { smart_block_dim_y = 8 };
93         enum { smart_shift = 4 };
94     };
95     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgr565_to_rgba_traits::functor_type)
96     {
97         enum { smart_block_dim_y = 8 };
98         enum { smart_shift = 4 };
99     };
100
101     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgra_traits<uchar>::functor_type)
102     {
103         enum { smart_block_dim_y = 8 };
104         enum { smart_shift = 4 };
105     };
106
107     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr555_traits::functor_type)
108     {
109         enum { smart_shift = 4 };
110     };
111     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(gray_to_bgr565_traits::functor_type)
112     {
113         enum { smart_shift = 4 };
114     };
115
116     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_yuv4_traits<uchar>::functor_type)
117     {
118         enum { smart_block_dim_y = 8 };
119         enum { smart_shift = 4 };
120     };
121     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_yuv4_traits<uchar>::functor_type)
122     {
123         enum { smart_block_dim_y = 8 };
124         enum { smart_shift = 4 };
125     };
126
127     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_bgra_traits<uchar>::functor_type)
128     {
129         enum { smart_block_dim_y = 8 };
130         enum { smart_shift = 4 };
131     };
132     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(yuv4_to_rgba_traits<uchar>::functor_type)
133     {
134         enum { smart_block_dim_y = 8 };
135         enum { smart_shift = 4 };
136     };
137
138     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_YCrCb4_traits<uchar>::functor_type)
139     {
140         enum { smart_block_dim_y = 8 };
141         enum { smart_shift = 4 };
142     };
143     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_YCrCb4_traits<uchar>::functor_type)
144     {
145         enum { smart_block_dim_y = 8 };
146         enum { smart_shift = 4 };
147     };
148
149     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_bgra_traits<uchar>::functor_type)
150     {
151         enum { smart_block_dim_y = 8 };
152         enum { smart_shift = 4 };
153     };
154     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(YCrCb4_to_rgba_traits<uchar>::functor_type)
155     {
156         enum { smart_block_dim_y = 8 };
157         enum { smart_shift = 4 };
158     };
159
160     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_xyz4_traits<uchar>::functor_type)
161     {
162         enum { smart_block_dim_y = 8 };
163         enum { smart_shift = 4 };
164     };
165     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_xyz4_traits<uchar>::functor_type)
166     {
167         enum { smart_block_dim_y = 8 };
168         enum { smart_shift = 4 };
169     };
170
171     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_bgra_traits<uchar>::functor_type)
172     {
173         enum { smart_block_dim_y = 8 };
174         enum { smart_shift = 4 };
175     };
176     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(xyz4_to_rgba_traits<uchar>::functor_type)
177     {
178         enum { smart_block_dim_y = 8 };
179         enum { smart_shift = 4 };
180     };
181
182     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hsv4_traits<uchar>::functor_type)
183     {
184         enum { smart_block_dim_y = 8 };
185         enum { smart_shift = 4 };
186     };
187     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hsv4_traits<uchar>::functor_type)
188     {
189         enum { smart_block_dim_y = 8 };
190         enum { smart_shift = 4 };
191     };
192
193     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_bgra_traits<uchar>::functor_type)
194     {
195         enum { smart_block_dim_y = 8 };
196         enum { smart_shift = 4 };
197     };
198     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hsv4_to_rgba_traits<uchar>::functor_type)
199     {
200         enum { smart_block_dim_y = 8 };
201         enum { smart_shift = 4 };
202     };
203
204     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_hls4_traits<uchar>::functor_type)
205     {
206         enum { smart_block_dim_y = 8 };
207         enum { smart_shift = 4 };
208     };
209     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(rgba_to_hls4_traits<uchar>::functor_type)
210     {
211         enum { smart_block_dim_y = 8 };
212         enum { smart_shift = 4 };
213     };
214
215     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hls4_to_bgra_traits<uchar>::functor_type)
216     {
217         enum { smart_block_dim_y = 8 };
218         enum { smart_shift = 4 };
219     };
220     OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(hls4_to_rgba_traits<uchar>::functor_type)
221     {
222         enum { smart_block_dim_y = 8 };
223         enum { smart_shift = 4 };
224     };
225
226 #define OPENCV_GPU_IMPLEMENT_CVTCOLOR(name, traits) \
227     void name(PtrStepSzb src, PtrStepSzb dst, cudaStream_t stream) \
228     { \
229         traits::functor_type functor = traits::create_functor(); \
230         typedef typename traits::functor_type::argument_type src_t; \
231         typedef typename traits::functor_type::result_type   dst_t; \
232         cv::gpu::device::transform((PtrStepSz<src_t>)src, (PtrStepSz<dst_t>)dst, functor, WithOutMask(), stream); \
233     }
234
235 #define OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(name) \
236     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name, name ## _traits)
237
238 #define OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(name) \
239     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits<uchar>) \
240     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _16u, name ## _traits<ushort>) \
241     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits<float>)
242
243 #define OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(name) \
244     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits<uchar>) \
245     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits<float>)
246
247 #define OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(name) \
248     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _8u, name ## _traits<uchar>) \
249     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _32f, name ## _traits<float>) \
250     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _full_8u, name ## _full_traits<uchar>) \
251     OPENCV_GPU_IMPLEMENT_CVTCOLOR(name ## _full_32f, name ## _full_traits<float>)
252
253     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgb)
254     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_bgra)
255     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_rgba)
256     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_bgr)
257     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgb)
258     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_rgba)
259
260     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr555)
261     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr_to_bgr565)
262     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr555)
263     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgb_to_bgr565)
264     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr555)
265     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgra_to_bgr565)
266     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr555)
267     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(rgba_to_bgr565)
268
269     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgb)
270     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgb)
271     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgr)
272     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgr)
273     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_rgba)
274     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_rgba)
275     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_bgra)
276     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_bgra)
277
278     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgr)
279     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(gray_to_bgra)
280
281     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr555)
282     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(gray_to_bgr565)
283
284     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr555_to_gray)
285     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE(bgr565_to_gray)
286
287     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_gray)
288     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_gray)
289     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_gray)
290     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_gray)
291
292     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv)
293     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv)
294     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_yuv4)
295     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_yuv4)
296     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv)
297     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv)
298     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_yuv4)
299     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_yuv4)
300
301     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgb)
302     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_rgba)
303     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgb)
304     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_rgba)
305     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgr)
306     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv_to_bgra)
307     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgr)
308     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(yuv4_to_bgra)
309
310     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb)
311     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb)
312     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_YCrCb4)
313     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_YCrCb4)
314     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb)
315     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb)
316     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_YCrCb4)
317     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_YCrCb4)
318
319     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgb)
320     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_rgba)
321     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgb)
322     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_rgba)
323     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgr)
324     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb_to_bgra)
325     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgr)
326     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(YCrCb4_to_bgra)
327
328     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz)
329     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz)
330     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgb_to_xyz4)
331     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(rgba_to_xyz4)
332     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz)
333     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz)
334     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgr_to_xyz4)
335     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(bgra_to_xyz4)
336
337     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgb)
338     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgb)
339     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_rgba)
340     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_rgba)
341     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgr)
342     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgr)
343     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz_to_bgra)
344     OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL(xyz4_to_bgra)
345
346     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv)
347     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv)
348     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hsv4)
349     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hsv4)
350     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv)
351     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv)
352     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hsv4)
353     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hsv4)
354
355     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgb)
356     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_rgba)
357     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgb)
358     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_rgba)
359     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgr)
360     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv_to_bgra)
361     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgr)
362     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hsv4_to_bgra)
363
364     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls)
365     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls)
366     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgb_to_hls4)
367     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(rgba_to_hls4)
368     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls)
369     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls)
370     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgr_to_hls4)
371     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(bgra_to_hls4)
372
373     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgb)
374     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_rgba)
375     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgb)
376     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_rgba)
377     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgr)
378     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls_to_bgra)
379     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgr)
380     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL(hls4_to_bgra)
381
382     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab)
383     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab)
384     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_lab4)
385     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_lab4)
386     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab)
387     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab)
388     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_lab4)
389     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_lab4)
390
391     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab)
392     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab)
393     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_lab4)
394     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_lab4)
395     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab)
396     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab)
397     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_lab4)
398     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_lab4)
399
400     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgb)
401     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgb)
402     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_rgba)
403     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_rgba)
404     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgr)
405     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgr)
406     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_bgra)
407     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_bgra)
408
409     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgb)
410     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgb)
411     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lrgba)
412     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lrgba)
413     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgr)
414     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgr)
415     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab_to_lbgra)
416     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lab4_to_lbgra)
417
418     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv)
419     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv)
420     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgb_to_luv4)
421     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(rgba_to_luv4)
422     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv)
423     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv)
424     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgr_to_luv4)
425     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(bgra_to_luv4)
426
427     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv)
428     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv)
429     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgb_to_luv4)
430     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lrgba_to_luv4)
431     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv)
432     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv)
433     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgr_to_luv4)
434     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(lbgra_to_luv4)
435
436     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgb)
437     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgb)
438     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_rgba)
439     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_rgba)
440     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgr)
441     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgr)
442     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_bgra)
443     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_bgra)
444
445     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgb)
446     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgb)
447     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lrgba)
448     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lrgba)
449     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgr)
450     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgr)
451     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv_to_lbgra)
452     OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F(luv4_to_lbgra)
453
454     #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR
455     #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_ONE
456     #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_ALL
457     #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F
458     #undef OPENCV_GPU_IMPLEMENT_CVTCOLOR_8U32F_FULL
459 }}} // namespace cv { namespace gpu { namespace device
460
461 #endif /* CUDA_DISABLER */