• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2016-2020 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef ARM_COMPUTE_CLCOLORCONVERT_H
25 #define ARM_COMPUTE_CLCOLORCONVERT_H
26 
27 #include "arm_compute/runtime/CL/ICLSimpleFunction.h"
28 
29 namespace arm_compute
30 {
31 class CLCompileContext;
32 class ICLMultiImage;
33 class ICLTensor;
34 using ICLImage = ICLTensor;
35 
36 /** Basic function to run @ref CLColorConvertKernel
37  *
38  * @note The function performs color convert between images.
39  *
40  * @deprecated This function is deprecated and is intended to be removed in 21.05 release
41  *
42  */
43 class CLColorConvert : public ICLSimpleFunction
44 {
45 public:
46     /** Initialize the function's source, destination
47      *
48      * @param[in]  input  Source tensor. Formats supported: RGBA8888/UYVY422/YUYV422/RGB888
49      * @param[out] output Destination tensor. Formats supported: RGB888 (if the formats of @p input are RGBA8888/UYVY422/YUYV422),
50      *                                                          RGBA8888 (if the formats of @p input are UYVY422/YUYV422/RGB888/),
51      *                                                          U8 (if the formats of @p input is RGB888)
52      */
53     void configure(const ICLTensor *input, ICLTensor *output);
54     /** Initialize the function's source, destination
55      *
56      * @param[in]  compile_context The compile context to be used.
57      * @param[in]  input           Source tensor. Formats supported: RGBA8888/UYVY422/YUYV422/RGB888
58      * @param[out] output          Destination tensor. Formats supported: RGB888 (if the formats of @p input are RGBA8888/UYVY422/YUYV422),
59      *                                                          RGBA8888 (if the formats of @p input are UYVY422/YUYV422/RGB888/),
60      *                                                          U8 (if the formats of @p input is RGB888)
61      */
62     void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output);
63     /** Initialize the function's source, destination
64      *
65      * @param[in]  input  Multi-planar source image. Formats supported: NV12/NV21/IYUV
66      * @param[out] output Single-planar destination image. Formats supported: RGB888/RGBA8888
67      */
68     void configure(const ICLMultiImage *input, ICLImage *output);
69     /** Initialize the function's source, destination
70      *
71      * @param[in]  compile_context The compile context to be used.
72      * @param[in]  input           Multi-planar source image. Formats supported: NV12/NV21/IYUV
73      * @param[out] output          Single-planar destination image. Formats supported: RGB888/RGBA8888
74      */
75     void configure(const CLCompileContext &compile_context, const ICLMultiImage *input, ICLImage *output);
76     /** Initialize the function's source, destination
77      *
78      * @param[in]  input  Single-planar source image. Formats supported: RGB888/RGBA8888/UYVY422/YUYV422
79      * @param[out] output Multi-planar destination image. Formats supported: NV12/IYUV/YUV444 (if the formats of @p input are RGB888/RGB8888)
80      */
81     void configure(const ICLImage *input, ICLMultiImage *output);
82     /** Initialize the function's source, destination
83      *
84      * @param[in]  compile_context The compile context to be used.
85      * @param[in]  input           Single-planar source image. Formats supported: RGB888/RGBA8888/UYVY422/YUYV422
86      * @param[out] output          Multi-planar destination image. Formats supported: NV12/IYUV/YUV444 (if the formats of @p input are RGB888/RGB8888)
87      */
88     void configure(const CLCompileContext &compile_context, const ICLImage *input, ICLMultiImage *output);
89     /** Initialize the function's source, destination
90      *
91      * @param[in]  input  Multi-planar source image. Formats supported: NV12/NV21/IYUV
92      * @param[out] output Multi-planar destination image. Formats supported: YUV444/IYUV (if the formats of @p input are NV12/NV21)/NV12 (if the format of  @p input is IYUV)
93      */
94     void configure(const ICLMultiImage *input, ICLMultiImage *output);
95     /** Initialize the function's source, destination
96      *
97      * @param[in]  compile_context The compile context to be used.
98      * @param[in]  input           Multi-planar source image. Formats supported: NV12/NV21/IYUV
99      * @param[out] output          Multi-planar destination image. Formats supported: YUV444/IYUV (if the formats of @p input are NV12/NV21)/NV12 (if the format of  @p input is IYUV)
100      */
101     void configure(const CLCompileContext &compile_context, const ICLMultiImage *input, ICLMultiImage *output);
102 };
103 }
104 #endif /* ARM_COMPUTE_CLCOLORCONVERT_H */
105