blob: 62dbadeb45b23f08e8c08ba143686c45eff09e9a [file] [log] [blame]
Wind Yuance2778b2015-03-18 15:32:12 +08001/*
2 * cl_demosaic_handler.h - CL demosaic handler
3 *
4 * Copyright (c) 2015 Intel Corporation
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * Author: Wind Yuan <feng.yuan@intel.com>
19 */
20
21#ifndef XCAM_CL_DEMOSAIC_HANLDER_H
22#define XCAM_CL_DEMOSAIC_HANLDER_H
23
24#include "xcam_utils.h"
25#include "cl_image_handler.h"
26
27namespace XCam {
28
29class CLDemosaicImageKernel
30 : public CLImageKernel
31{
32public:
33 explicit CLDemosaicImageKernel (SmartPtr<CLContext> &context);
34
35protected:
36 virtual XCamReturn prepare_arguments (
37 SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffer> &output,
38 CLArgument args[], uint32_t &arg_count,
39 CLWorkSize &work_size);
40
41private:
42 XCAM_DEAD_COPY (CLDemosaicImageKernel);
43};
44
45class CLBayer2RGBImageHandler
46 : public CLImageHandler
47{
48public:
49 explicit CLBayer2RGBImageHandler (const char *name);
50 bool set_output_format (uint32_t fourcc);
51
52protected:
53 virtual XCamReturn prepare_buffer_pool_video_info (
54 const VideoBufferInfo &input,
55 VideoBufferInfo &output);
56
57private:
58 XCAM_DEAD_COPY (CLBayer2RGBImageHandler);
59
60private:
61 uint32_t _output_format;
62};
63
64SmartPtr<CLImageHandler>
65create_cl_demosaic_image_handler (SmartPtr<CLContext> &context);
66
67};
68
69#endif //XCAM_CL_DEMOSAIC_HANLDER_H