Wind Yuan | 75564b1 | 2015-01-15 06:51:15 -0500 | [diff] [blame^] | 1 | /* |
| 2 | * x3a_analyzer_simple.h - a simple 3a analyzer |
| 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_3A_ANALYZER_SIMPLE_H |
| 22 | #define XCAM_3A_ANALYZER_SIMPLE_H |
| 23 | |
| 24 | #include "xcam_common.h" |
| 25 | #include "xcam_defs.h" |
| 26 | #include "xcam_utils.h" |
| 27 | #include "x3a_analyzer.h" |
| 28 | #include <linux/atomisp.h> |
| 29 | |
| 30 | namespace XCam { |
| 31 | |
| 32 | class X3aAnalyzerSimple |
| 33 | : public X3aAnalyzer |
| 34 | { |
| 35 | public: |
| 36 | explicit X3aAnalyzerSimple (); |
| 37 | ~X3aAnalyzerSimple (); |
| 38 | |
| 39 | private: |
| 40 | |
| 41 | XCAM_DEAD_COPY (X3aAnalyzerSimple); |
| 42 | |
| 43 | protected: |
| 44 | virtual SmartPtr<AeHandler> create_ae_handler (); |
| 45 | virtual SmartPtr<AwbHandler> create_awb_handler (); |
| 46 | virtual SmartPtr<AfHandler> create_af_handler (); |
| 47 | virtual SmartPtr<CommonHandler> create_common_handler (); |
| 48 | |
| 49 | virtual XCamReturn internal_init (uint32_t width, uint32_t height) { |
| 50 | XCAM_UNUSED (width); |
| 51 | XCAM_UNUSED (height); |
| 52 | return XCAM_RETURN_NO_ERROR; |
| 53 | } |
| 54 | virtual XCamReturn internal_deinit () { |
| 55 | _is_ae_started = false; |
| 56 | return XCAM_RETURN_NO_ERROR; |
| 57 | } |
| 58 | virtual XCamReturn configure_3a (); |
| 59 | virtual XCamReturn pre_3a_analyze (SmartPtr<X3aIspStatistics> &stats); |
| 60 | virtual XCamReturn post_3a_analyze (X3aResultList &results); |
| 61 | |
| 62 | public: |
| 63 | XCamReturn analyze_ae (X3aResultList &output); |
| 64 | XCamReturn analyze_awb (X3aResultList &output); |
| 65 | XCamReturn analyze_af (X3aResultList &output); |
| 66 | |
| 67 | private: |
| 68 | SmartPtr<X3aIspStatistics> _current_stats; |
| 69 | double _last_target_exposure; |
| 70 | bool _is_ae_started; |
| 71 | }; |
| 72 | |
| 73 | }; |
| 74 | #endif //XCAM_3A_ANALYZER_SIMPLE_H |
| 75 | |