blob: 1c6876c4b7c0f0c7b618c7a163f1113a17c3f5a7 [file] [log] [blame]
wangfei6ea22212015-03-23 19:10:26 +08001/*
2 * cl_csc_handler.h - CL csc 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: wangfei <feix.w.wang@intel.com>
19 */
20
21#ifndef XCAM_CL_CSC_HANLDER_H
22#define XCAM_CL_CSC_HANLDER_H
23
24#include "xcam_utils.h"
25#include "cl_image_handler.h"
26
27namespace XCam {
28
29class CLCscImageKernel
30 : public CLImageKernel
31{
32public:
33 explicit CLCscImageKernel (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 (CLCscImageKernel);
Wind Yuande4c6362015-03-25 17:34:22 +080043
44 uint32_t _vertical_offset;
wangfei6ea22212015-03-23 19:10:26 +080045};
46
47class CLRgba2Nv12ImageHandler
48 : public CLImageHandler
49{
50public:
51 explicit CLRgba2Nv12ImageHandler (const char *name);
wangfei6ea22212015-03-23 19:10:26 +080052
53protected:
54 virtual XCamReturn prepare_buffer_pool_video_info (
55 const VideoBufferInfo &input,
56 VideoBufferInfo &output);
57
58private:
59 XCAM_DEAD_COPY (CLRgba2Nv12ImageHandler);
wangfei6ea22212015-03-23 19:10:26 +080060};
61
62SmartPtr<CLImageHandler>
63create_cl_csc_image_handler (SmartPtr<CLContext> &context);
64
65};
66
67#endif //XCAM_CL_CSC_HANLDER_H