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_std.h> 25 #include <xcam_mutex.h> 26 #include <x3a_result.h> 27 28 namespace XCam { 29 30 class X3aResultFactory { 31 public: 32 virtual ~X3aResultFactory (); 33 34 static SmartPtr<X3aResultFactory> instance (); 35 36 SmartPtr<X3aResult> create_3a_result (XCam3aResultHead *from); 37 38 SmartPtr<X3aWhiteBalanceResult> create_whitebalance (XCam3aResultWhiteBalance *from = NULL); 39 SmartPtr<X3aBlackLevelResult> create_blacklevel (XCam3aResultBlackLevel *from = NULL); 40 SmartPtr<X3aColorMatrixResult> create_rgb2yuv_colormatrix (XCam3aResultColorMatrix *from = NULL); 41 SmartPtr<X3aColorMatrixResult> create_yuv2rgb_colormatrix (XCam3aResultColorMatrix *from = NULL); 42 SmartPtr<X3aExposureResult> create_exposure (XCam3aResultExposure *from = NULL); 43 SmartPtr<X3aFocusResult> create_focus (XCam3aResultFocus *from = NULL); 44 SmartPtr<X3aDemosaicResult> create_demosaicing (XCam3aResultDemosaic *from = NULL); 45 SmartPtr<X3aDefectPixelResult> create_defectpixel (XCam3aResultDefectPixel *from = NULL); 46 SmartPtr<X3aNoiseReductionResult> create_noise_reduction (XCam3aResultNoiseReduction *from = NULL); 47 SmartPtr<X3aTemporalNoiseReduction> create_3d_noise_reduction (XCam3aResultTemporalNoiseReduction *from = NULL); 48 SmartPtr<X3aTemporalNoiseReduction> create_yuv_temp_noise_reduction (XCam3aResultTemporalNoiseReduction *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 SmartPtr<X3aBayerNoiseReduction> create_bayer_noise_reduction (XCam3aResultBayerNoiseReduction *from = NULL); 57 SmartPtr<X3aBrightnessResult> create_brightness (XCam3aResultBrightness *from = NULL); 58 SmartPtr<X3aWaveletNoiseReduction> create_wavelet_noise_reduction (XCam3aResultWaveletNoiseReduction *from = NULL); 59 SmartPtr<X3aFaceDetectionResult> create_face_detection (XCamFDResult *from = NULL); 60 SmartPtr<X3aDVSResult> create_digital_video_stabilizer (XCamDVSResult *from = NULL); 61 protected: 62 explicit X3aResultFactory (); 63 64 XCAM_DEAD_COPY (X3aResultFactory); 65 66 private: 67 static Mutex _mutex; 68 static SmartPtr<X3aResultFactory> _instance; 69 }; 70 71 }; 72 73 #endif // XCAM_3A_RESULT_FACTORY_H 74