• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * isp_config_translator.h - isp config translator
3  *
4  *  Copyright (c) 2014-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_ISP_CONFIG_TRANSLATOR_H
22 #define XCAM_ISP_CONFIG_TRANSLATOR_H
23 
24 #include <xcam_std.h>
25 #include <linux/atomisp.h>
26 #include "x3a_result.h"
27 #include "sensor_descriptor.h"
28 
29 namespace XCam {
30 
31 class IspConfigTranslator {
32 public:
33     explicit IspConfigTranslator (SmartPtr<SensorDescriptor> &sensor);
34     ~IspConfigTranslator ();
35 
36     XCamReturn translate_white_balance (const XCam3aResultWhiteBalance &from, struct atomisp_wb_config &to);
37     XCamReturn translate_black_level (const XCam3aResultBlackLevel &from, struct atomisp_ob_config &to);
38     XCamReturn translate_color_matrix (const XCam3aResultColorMatrix &from, struct atomisp_cc_config &to);
39     XCamReturn translate_exposure (const XCam3aResultExposure &from, struct atomisp_exposure &to);
40     XCamReturn translate_demosaicing (const X3aDemosaicResult &from, struct atomisp_de_config &to);
41     XCamReturn translate_defect_pixel (const XCam3aResultDefectPixel &from, struct atomisp_dp_config &to);
42     XCamReturn translate_noise_reduction (const XCam3aResultNoiseReduction &from, struct atomisp_nr_config &to);
43     XCamReturn translate_edge_enhancement (const XCam3aResultEdgeEnhancement &from, struct atomisp_ee_config &to);
44     XCamReturn translate_gamma_table (const XCam3aResultGammaTable &from, struct atomisp_gamma_table &to);
45     XCamReturn translate_macc (const XCam3aResultMaccMatrix &from, struct atomisp_macc_table &to);
46     XCamReturn translate_ctc (const XCam3aResultChromaToneControl &from, struct atomisp_ctc_table &to);
47 
48 private:
49     XCAM_DEAD_COPY (IspConfigTranslator);
50 
51 private:
52     SmartPtr<SensorDescriptor> _sensor;
53 };
54 
55 }
56 
57 #endif //XCAM_ISP_CONFIG_TRANSLATOR_H
58