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_CAC_V03_HANDLE_INT_H_ 17 #define _RK_AIQ_CAC_V03_HANDLE_INT_H_ 18 19 #include "RkAiqHandle.h" 20 #include "acac/rk_aiq_uapi_acac_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 RkAiqAcacV3HandleInt : virtual public RkAiqHandle { 28 public: RkAiqAcacV3HandleInt(RkAiqAlgoDesComm * des,RkAiqCore * aiqCore)29 explicit RkAiqAcacV3HandleInt(RkAiqAlgoDesComm* des, RkAiqCore* aiqCore) 30 : RkAiqHandle(des, aiqCore) { 31 #ifndef DISABLE_HANDLE_ATTRIB 32 memset(&mCurAtt, 0, sizeof(rkaiq_cac_v03_api_attr_t)); 33 memset(&mNewAtt, 0, sizeof(rkaiq_cac_v03_api_attr_t)); 34 #endif 35 }; ~RkAiqAcacV3HandleInt()36 virtual ~RkAiqAcacV3HandleInt() { RkAiqHandle::deInit(); }; 37 virtual XCamReturn updateConfig(bool needSync); 38 virtual XCamReturn prepare(); 39 virtual XCamReturn preProcess(); 40 virtual XCamReturn processing(); 41 virtual XCamReturn postProcess(); 42 virtual XCamReturn genIspResult(RkAiqFullParams* params, RkAiqFullParams* cur_params); 43 44 XCamReturn setAttrib(const rkaiq_cac_v03_api_attr_t* att); 45 XCamReturn getAttrib(rkaiq_cac_v03_api_attr_t* att); 46 47 protected: 48 virtual void init(); deInit()49 virtual void deInit() { RkAiqHandle::deInit(); }; 50 51 private: 52 #ifndef DISABLE_HANDLE_ATTRIB 53 rkaiq_cac_v03_api_attr_t mCurAtt; 54 rkaiq_cac_v03_api_attr_t mNewAtt; 55 #endif 56 57 private: 58 DECLARE_HANDLE_REGISTER_TYPE(RkAiqAcacV3HandleInt); 59 }; 60 61 } // namespace RkCam 62 63 #endif // _RK_AIQ_CAC_V03_HANDLE_INT_H_ 64