blob: 53289a4f8b4bed917b97fd80679f6ac6c8835981 [file] [log] [blame]
Wind Yuan75564b12015-01-15 06:51:15 -05001/*
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
Wind Yuan75564b12015-01-15 06:51:15 -050024#include "xcam_utils.h"
25#include "x3a_analyzer.h"
26#include <linux/atomisp.h>
27
28namespace XCam {
29
30class X3aAnalyzerSimple
31 : public X3aAnalyzer
32{
33public:
34 explicit X3aAnalyzerSimple ();
35 ~X3aAnalyzerSimple ();
36
37private:
38
39 XCAM_DEAD_COPY (X3aAnalyzerSimple);
40
41protected:
42 virtual SmartPtr<AeHandler> create_ae_handler ();
43 virtual SmartPtr<AwbHandler> create_awb_handler ();
44 virtual SmartPtr<AfHandler> create_af_handler ();
45 virtual SmartPtr<CommonHandler> create_common_handler ();
46
Wind Yuan60aa8ce2015-01-26 16:56:09 +080047 virtual XCamReturn internal_init (uint32_t width, uint32_t height, double framerate) {
Wind Yuan75564b12015-01-15 06:51:15 -050048 XCAM_UNUSED (width);
49 XCAM_UNUSED (height);
Wind Yuan60aa8ce2015-01-26 16:56:09 +080050 XCAM_UNUSED (framerate);
Wind Yuan75564b12015-01-15 06:51:15 -050051 return XCAM_RETURN_NO_ERROR;
52 }
53 virtual XCamReturn internal_deinit () {
54 _is_ae_started = false;
55 return XCAM_RETURN_NO_ERROR;
56 }
57 virtual XCamReturn configure_3a ();
58 virtual XCamReturn pre_3a_analyze (SmartPtr<X3aIspStatistics> &stats);
59 virtual XCamReturn post_3a_analyze (X3aResultList &results);
60
61public:
62 XCamReturn analyze_ae (X3aResultList &output);
63 XCamReturn analyze_awb (X3aResultList &output);
64 XCamReturn analyze_af (X3aResultList &output);
65
66private:
67 SmartPtr<X3aIspStatistics> _current_stats;
68 double _last_target_exposure;
69 bool _is_ae_started;
70};
71
72};
73#endif //XCAM_3A_ANALYZER_SIMPLE_H
74