xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/aiq_core/algo_handlers/RkAiqAsdHandle.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
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_ASD_HANDLE_INT_H_
17 #define _RK_AIQ_ASD_HANDLE_INT_H_
18 
19 #include "RkAiqHandle.h"
20 #include "asd/rk_aiq_uapi_asd_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 #if RKAIQ_HAVE_ASD_V10
27 class RkAiqAsdHandleInt : virtual public RkAiqHandle {
28  public:
RkAiqAsdHandleInt(RkAiqAlgoDesComm * des,RkAiqCore * aiqCore)29     explicit RkAiqAsdHandleInt(RkAiqAlgoDesComm* des, RkAiqCore* aiqCore)
30         : RkAiqHandle(des, aiqCore) {}
~RkAiqAsdHandleInt()31     virtual ~RkAiqAsdHandleInt() { 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     // TODO add algo specific methords, this is a sample
39     XCamReturn setAttrib(asd_attrib_t att);
40     XCamReturn getAttrib(asd_attrib_t* att);
41 
42  protected:
43     virtual void init();
deInit()44     virtual void deInit() { RkAiqHandle::deInit(); };
45 
46  private:
47 #ifndef DISABLE_HANDLE_ATTRIB
48     asd_attrib_t mCurAtt;
49     asd_attrib_t mNewAtt;
50 #endif
51 
52  private:
53     DECLARE_HANDLE_REGISTER_TYPE(RkAiqAsdHandleInt);
54 };
55 #endif
56 }  // namespace RkCam
57 
58 #endif
59