Wind Yuan | 9669e4c | 2015-01-26 15:52:26 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * x3a_result_factory.h - 3A result factory |
| 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_RESULT_FACTORY_H |
| 22 | #define XCAM_3A_RESULT_FACTORY_H |
| 23 | |
| 24 | #include "xcam_common.h" |
| 25 | #include "xcam_utils.h" |
| 26 | #include "smartptr.h" |
| 27 | #include "x3a_result.h" |
| 28 | |
| 29 | namespace XCam { |
| 30 | |
| 31 | class X3aResultFactory { |
| 32 | public: |
| 33 | virtual ~X3aResultFactory (); |
| 34 | |
| 35 | static SmartPtr<X3aResultFactory> instance (); |
| 36 | |
| 37 | SmartPtr<X3aResult> create_3a_result (XCam3aResultHead *from); |
| 38 | |
| 39 | SmartPtr<X3aWhiteBalanceResult> create_whitebalance (XCam3aResultWhiteBalance *from = NULL); |
| 40 | SmartPtr<X3aBlackLevelResult> create_blacklevel (XCam3aResultBlackLevel *from = NULL); |
| 41 | SmartPtr<X3aColorMatrixResult> create_rgb2yuv_colormatrix (XCam3aResultColorMatrix *from = NULL); |
| 42 | SmartPtr<X3aColorMatrixResult> create_yuv2rgb_colormatrix (XCam3aResultColorMatrix *from = NULL); |
| 43 | SmartPtr<X3aExposureResult> create_exposure (XCam3aResultExposure *from = NULL); |
| 44 | SmartPtr<X3aFocusResult> create_focus (XCam3aResultFocus *from = NULL); |
| 45 | SmartPtr<X3aDemosaicResult> create_demosaicing (XCam3aResultDemosaic *from = NULL); |
| 46 | SmartPtr<X3aDefectPixelResult> create_defectpixel (XCam3aResultDefectPixel *from = NULL); |
| 47 | SmartPtr<X3aNoiseReductionResult> create_noise_reduction (XCam3aResultNoiseReduction *from = NULL); |
| 48 | SmartPtr<X3aNoiseReductionResult> create_temp_noise_reduction (XCam3aResultNoiseReduction *from = NULL); |
| 49 | SmartPtr<X3aEdgeEnhancementResult> create_edge_enhancement (XCam3aResultEdgeEnhancement *from = NULL); |
| 50 | SmartPtr<X3aGammaTableResult> create_y_gamma_table (XCam3aResultGammaTable *from = NULL); |
| 51 | SmartPtr<X3aGammaTableResult> create_r_gamma_table (XCam3aResultGammaTable *from = NULL); |
| 52 | SmartPtr<X3aGammaTableResult> create_g_gamma_table (XCam3aResultGammaTable *from = NULL); |
| 53 | SmartPtr<X3aGammaTableResult> create_b_gamma_table (XCam3aResultGammaTable *from = NULL); |
| 54 | SmartPtr<X3aMaccMatrixResult> create_macc (XCam3aResultMaccMatrix *from = NULL); |
| 55 | SmartPtr<X3aChromaToneControlResult> create_chroma_tone_control (XCam3aResultChromaToneControl *from = NULL); |
| 56 | |
| 57 | protected: |
| 58 | explicit X3aResultFactory (); |
| 59 | |
| 60 | XCAM_DEAD_COPY (X3aResultFactory); |
| 61 | |
| 62 | private: |
| 63 | static Mutex _mutex; |
| 64 | static SmartPtr<X3aResultFactory> _instance; |
| 65 | }; |
| 66 | |
| 67 | }; |
| 68 | |
| 69 | #endif // XCAM_3A_RESULT_FACTORY_H |