blob: e0f7507208dad4ba0f11587a09a613713a4fe63c [file] [log] [blame]
Wind Yuand50fde62015-03-25 17:43:49 +08001/*
2 * cl_3a_image_processor.h - CL 3A image processor
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_3A_IMAGE_PROCESSOR_H
22#define XCAM_CL_3A_IMAGE_PROCESSOR_H
23
24#include "xcam_utils.h"
25#include "cl_image_processor.h"
26
27namespace XCam {
28
29class CLBayer2RGBImageHandler;
wangfei1a7d9f32015-03-26 18:30:00 +080030class CLCscImageHandler;
Wind Yuand50fde62015-03-25 17:43:49 +080031
32class CL3aImageProcessor
33 : public CLImageProcessor
34{
Wind Yuane4ba0c92015-03-26 16:59:06 +080035 enum OutSampleType {
36 OutSampleYuv,
37 OutSampleRGB,
38 OutSampleBayer,
39 };
40
Wind Yuand50fde62015-03-25 17:43:49 +080041public:
42 explicit CL3aImageProcessor ();
43 virtual ~CL3aImageProcessor ();
44
45 bool set_output_format (uint32_t fourcc);
46 void set_hdr (bool enable) {
47 _enable_hdr = enable;
48 }
49
50protected:
51
52 //derive from ImageProcessor
53 virtual bool can_process_result (SmartPtr<X3aResult> &result);
54 virtual XCamReturn apply_3a_results (X3aResultList &results);
55 virtual XCamReturn apply_3a_result (SmartPtr<X3aResult> &result);
56
57private:
58 virtual XCamReturn create_handlers ();
59 XCAM_DEAD_COPY (CL3aImageProcessor);
60
61private:
62 uint32_t _output_fourcc;
63 bool _enable_hdr;
Wind Yuane4ba0c92015-03-26 16:59:06 +080064 OutSampleType _out_smaple_type;
Wind Yuand50fde62015-03-25 17:43:49 +080065
66 SmartPtr<CLImageHandler> _black_level;
67 SmartPtr<CLBayer2RGBImageHandler> _demosaic;
68 SmartPtr<CLImageHandler> _hdr;
Wind Yuane4ba0c92015-03-26 16:59:06 +080069 SmartPtr<CLCscImageHandler> _csc;
Wind Yuand50fde62015-03-25 17:43:49 +080070};
71
72};
73#endif //XCAM_CL_3A_IMAGE_PROCESSOR_H