Wind Yuan | d50fde6 | 2015-03-25 17:43:49 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 27 | namespace XCam { |
| 28 | |
| 29 | class CLBayer2RGBImageHandler; |
wangfei | 1a7d9f3 | 2015-03-26 18:30:00 +0800 | [diff] [blame] | 30 | class CLCscImageHandler; |
Wind Yuan | d50fde6 | 2015-03-25 17:43:49 +0800 | [diff] [blame] | 31 | |
| 32 | class CL3aImageProcessor |
| 33 | : public CLImageProcessor |
| 34 | { |
Wind Yuan | e4ba0c9 | 2015-03-26 16:59:06 +0800 | [diff] [blame] | 35 | enum OutSampleType { |
| 36 | OutSampleYuv, |
| 37 | OutSampleRGB, |
| 38 | OutSampleBayer, |
| 39 | }; |
| 40 | |
Wind Yuan | d50fde6 | 2015-03-25 17:43:49 +0800 | [diff] [blame] | 41 | public: |
| 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 | |
| 50 | protected: |
| 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 | |
| 57 | private: |
| 58 | virtual XCamReturn create_handlers (); |
| 59 | XCAM_DEAD_COPY (CL3aImageProcessor); |
| 60 | |
| 61 | private: |
| 62 | uint32_t _output_fourcc; |
| 63 | bool _enable_hdr; |
Wind Yuan | e4ba0c9 | 2015-03-26 16:59:06 +0800 | [diff] [blame] | 64 | OutSampleType _out_smaple_type; |
Wind Yuan | d50fde6 | 2015-03-25 17:43:49 +0800 | [diff] [blame] | 65 | |
| 66 | SmartPtr<CLImageHandler> _black_level; |
| 67 | SmartPtr<CLBayer2RGBImageHandler> _demosaic; |
| 68 | SmartPtr<CLImageHandler> _hdr; |
Wind Yuan | e4ba0c9 | 2015-03-26 16:59:06 +0800 | [diff] [blame] | 69 | SmartPtr<CLCscImageHandler> _csc; |
Wind Yuan | d50fde6 | 2015-03-25 17:43:49 +0800 | [diff] [blame] | 70 | }; |
| 71 | |
| 72 | }; |
| 73 | #endif //XCAM_CL_3A_IMAGE_PROCESSOR_H |