1 /* 2 * Copyright (c) 2019-2022 Rockchip Eletronics Co., Ltd. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef _RK_AIQ_MERGE_HANDLE_INT_H_ 17 #define _RK_AIQ_MERGE_HANDLE_INT_H_ 18 19 #include "RkAiqHandle.h" 20 #include "amerge/rk_aiq_uapi_amerge_int.h" 21 #include "rk_aiq_api_private.h" 22 #include "rk_aiq_pool.h" 23 #include "xcam_mutex.h" 24 25 namespace RkCam { 26 27 class RkAiqAmergeHandleInt : virtual public RkAiqHandle { 28 public: RkAiqAmergeHandleInt(RkAiqAlgoDesComm * des,RkAiqCore * aiqCore)29 explicit RkAiqAmergeHandleInt(RkAiqAlgoDesComm* des, RkAiqCore* aiqCore) 30 : RkAiqHandle(des, aiqCore) {} ~RkAiqAmergeHandleInt()31 virtual ~RkAiqAmergeHandleInt() { RkAiqHandle::deInit(); }; 32 virtual XCamReturn updateConfig(bool needSync); 33 virtual XCamReturn prepare(); 34 virtual XCamReturn preProcess(); 35 virtual XCamReturn processing(); 36 virtual XCamReturn postProcess(); 37 virtual XCamReturn genIspResult(RkAiqFullParams* params, RkAiqFullParams* cur_params); 38 #if RKAIQ_HAVE_MERGE_V10 39 XCamReturn setAttribV10(const mergeAttrV10_t* att); 40 XCamReturn getAttribV10(mergeAttrV10_t* att); 41 #endif 42 #if RKAIQ_HAVE_MERGE_V11 43 XCamReturn setAttribV11(const mergeAttrV11_t* att); 44 XCamReturn getAttribV11(mergeAttrV11_t* att); 45 #endif 46 #if RKAIQ_HAVE_MERGE_V12 47 XCamReturn setAttribV12(const mergeAttrV12_t* att); 48 XCamReturn getAttribV12(mergeAttrV12_t* att); 49 #endif 50 setAeProcRes(RkAiqAlgoProcResAeShared_t * aeProcRes)51 void setAeProcRes(RkAiqAlgoProcResAeShared_t* aeProcRes) { 52 mAeProcRes = *aeProcRes; 53 } 54 55 protected: 56 virtual void init(); deInit()57 virtual void deInit() { RkAiqHandle::deInit(); }; 58 59 private: 60 #ifndef DISABLE_HANDLE_ATTRIB 61 #if RKAIQ_HAVE_MERGE_V10 62 mergeAttrV10_t mCurAttV10; 63 mergeAttrV10_t mNewAttV10; 64 #endif 65 #if RKAIQ_HAVE_MERGE_V11 66 mergeAttrV11_t mCurAttV11; 67 mergeAttrV11_t mNewAttV11; 68 #endif 69 #if RKAIQ_HAVE_MERGE_V12 70 mergeAttrV12_t mCurAttV12; 71 mergeAttrV12_t mNewAttV12; 72 #endif 73 #endif 74 RkAiqAlgoProcResAeShared_t mAeProcRes; 75 76 private: 77 DECLARE_HANDLE_REGISTER_TYPE(RkAiqAmergeHandleInt); 78 }; 79 80 } // namespace RkCam 81 82 #endif 83