xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/aiq_core/algo_handlers/RkAiqAgainV2Handle.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_GAIN_V2_HANDLE_INT_H_
17 #define _RK_AIQ_GAIN_V2_HANDLE_INT_H_
18 
19 #include "RkAiqHandle.h"
20 #include "again2/rk_aiq_uapi_again_int_v2.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_GAIN_V2
27 
28 class RkAiqAgainV2HandleInt:
29     virtual public RkAiqHandle {
30 public:
RkAiqAgainV2HandleInt(RkAiqAlgoDesComm * des,RkAiqCore * aiqCore)31     explicit RkAiqAgainV2HandleInt(RkAiqAlgoDesComm* des, RkAiqCore* aiqCore)
32         : RkAiqHandle(des, aiqCore) {}
~RkAiqAgainV2HandleInt()33     virtual ~RkAiqAgainV2HandleInt() {
34         RkAiqHandle::deInit();
35     };
36     virtual XCamReturn updateConfig(bool needSync);
37     virtual XCamReturn prepare();
38     virtual XCamReturn preProcess();
39     virtual XCamReturn processing();
40     virtual XCamReturn postProcess();
41     virtual XCamReturn genIspResult(RkAiqFullParams* params, RkAiqFullParams* cur_params);
42     XCamReturn setAttrib(const rk_aiq_gain_attrib_v2_t *att);
43     XCamReturn getAttrib(rk_aiq_gain_attrib_v2_t *att);
44     XCamReturn getInfo(rk_aiq_gain_info_v2_t *pInfo);
45 protected:
46     virtual void init();
deInit()47     virtual void deInit() {
48         RkAiqHandle::deInit();
49     };
50 private:
51 #ifndef DISABLE_HANDLE_ATTRIB
52     rk_aiq_gain_attrib_v2_t mCurAtt;
53     rk_aiq_gain_attrib_v2_t mNewAtt;
54     rk_aiq_gain_info_v2_t mCurInfo;
55     rk_aiq_gain_info_v2_t mNewInfo;
56 #endif
57     DECLARE_HANDLE_REGISTER_TYPE(RkAiqAgainV2HandleInt);
58 };
59 #endif
60 }  // namespace RkCam
61 
62 #endif
63