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