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_ABLC_V32_HANDLE_INT_H_ 17 #define _RK_AIQ_ABLC_V32_HANDLE_INT_H_ 18 19 #include "RkAiqHandle.h" 20 #include "ablcV32/rk_aiq_uapi_ablc_int_v32.h" 21 #include "rk_aiq_api_private.h" 22 #include "rk_aiq_pool.h" 23 #include "xcam_mutex.h" 24 25 namespace RkCam { 26 #if RKAIQ_HAVE_BLC_V32 27 28 class RkAiqAblcV32HandleInt : virtual public RkAiqHandle { 29 public: RkAiqAblcV32HandleInt(RkAiqAlgoDesComm * des,RkAiqCore * aiqCore)30 explicit RkAiqAblcV32HandleInt(RkAiqAlgoDesComm* des, RkAiqCore* aiqCore) 31 : RkAiqHandle(des, aiqCore) { 32 #ifndef DISABLE_HANDLE_ATTRIB 33 memset(&mCurAtt, 0, sizeof(mCurAtt)); 34 memset(&mNewAtt, 0, sizeof(mCurAtt)); 35 updateAtt = false; 36 #endif 37 }; ~RkAiqAblcV32HandleInt()38 virtual ~RkAiqAblcV32HandleInt() { 39 RkAiqHandle::deInit(); 40 }; 41 virtual XCamReturn updateConfig(bool needSync); 42 virtual XCamReturn prepare(); 43 virtual XCamReturn preProcess(); 44 virtual XCamReturn processing(); 45 virtual XCamReturn postProcess(); 46 virtual XCamReturn genIspResult(RkAiqFullParams* params, RkAiqFullParams* cur_params); 47 // TODO add algo specific methords, this is a sample 48 XCamReturn setAttrib(const rk_aiq_blc_attrib_V32_t* att); 49 XCamReturn getAttrib(rk_aiq_blc_attrib_V32_t* att); 50 XCamReturn getProcRes(AblcProc_V32_t* ProcRes); 51 XCamReturn getInfo(rk_aiq_blc_info_v32_t* pInfo); 52 53 protected: 54 virtual void init(); deInit()55 virtual void deInit() { 56 RkAiqHandle::deInit(); 57 }; 58 SmartPtr<RkAiqAlgoProcResAblcV32IntShared> mProcResShared; 59 60 private: 61 #ifndef DISABLE_HANDLE_ATTRIB 62 // TODO 63 rk_aiq_blc_attrib_V32_t mCurAtt; 64 rk_aiq_blc_attrib_V32_t mNewAtt; 65 #endif 66 rk_aiq_isp_blc_v32_t* mLatestparam; 67 68 private: 69 DECLARE_HANDLE_REGISTER_TYPE(RkAiqAblcV32HandleInt); 70 }; 71 72 #endif // RKAIQ_HAVE_BLC_V32 73 74 } // namespace RkCam 75 76 #endif //_RK_AIQ_ABLC_V32_HANDLE_INT_H_ 77