1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * IspParamsSplitter.h - Split ISP params to Left/Right ISP params 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (c) 2021 Rockchip Electronics Co., Ltd 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Licensed under the Apache License, Version 2.0 (the "License"); 7*4882a593Smuzhiyun * you may not use this file except in compliance with the License. 8*4882a593Smuzhiyun * You may obtain a copy of the License at 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * http://www.apache.org/licenses/LICENSE-2.0 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * Unless required by applicable law or agreed to in writing, software 13*4882a593Smuzhiyun * distributed under the License is distributed on an "AS IS" BASIS, 14*4882a593Smuzhiyun * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15*4882a593Smuzhiyun * See the License for the specific language governing permissions and 16*4882a593Smuzhiyun * limitations under the License. 17*4882a593Smuzhiyun * 18*4882a593Smuzhiyun * Author: Cody Xie <cody.xie@rock-chips.com> 19*4882a593Smuzhiyun */ 20*4882a593Smuzhiyun #ifndef __COMMON_HWI_ISP_PARAMS_SPLITTER_H__ 21*4882a593Smuzhiyun #define __COMMON_HWI_ISP_PARAMS_SPLITTER_H__ 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun #include "xcam_common.h" 24*4882a593Smuzhiyun #include "xcam_log.h" 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun namespace RkCam { 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun class IspParamsSplitter { 30*4882a593Smuzhiyun public: 31*4882a593Smuzhiyun struct Rectangle { 32*4882a593Smuzhiyun uint32_t x; 33*4882a593Smuzhiyun uint32_t y; 34*4882a593Smuzhiyun uint32_t w; 35*4882a593Smuzhiyun uint32_t h; 36*4882a593Smuzhiyun }; 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun IspParamsSplitter() = default; 39*4882a593Smuzhiyun ~IspParamsSplitter() = default; 40*4882a593Smuzhiyun IspParamsSplitter(const IspParamsSplitter&) = delete; 41*4882a593Smuzhiyun IspParamsSplitter& operator=(const IspParamsSplitter&) = delete; 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun IspParamsSplitter& SetPicInfo(IspParamsSplitter::Rectangle&& pic_rect); 44*4882a593Smuzhiyun IspParamsSplitter& SetLeftIspRect(IspParamsSplitter::Rectangle&& left_isp_rect); 45*4882a593Smuzhiyun IspParamsSplitter& SetRightIspRect(IspParamsSplitter::Rectangle&& right_isp_rect); 46*4882a593Smuzhiyun IspParamsSplitter& SetPicInfo(IspParamsSplitter::Rectangle& pic_rect); 47*4882a593Smuzhiyun IspParamsSplitter& SetLeftIspRect(IspParamsSplitter::Rectangle& left_isp_rect); 48*4882a593Smuzhiyun IspParamsSplitter& SetRightIspRect(IspParamsSplitter::Rectangle& right_isp_rect); 49*4882a593Smuzhiyun const IspParamsSplitter::Rectangle& GetPicInfo() const; 50*4882a593Smuzhiyun const IspParamsSplitter::Rectangle& GetLeftIspRect() const; 51*4882a593Smuzhiyun const IspParamsSplitter::Rectangle& GetRightIspRect() const; 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun template <typename U> 54*4882a593Smuzhiyun XCamReturn SplitIspParams(U* orig_isp_params, U* isp_params); 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun private: 57*4882a593Smuzhiyun //ae 58*4882a593Smuzhiyun template <typename U> 59*4882a593Smuzhiyun XCamReturn SplitAecParams(U* ori, U* left, U* right); 60*4882a593Smuzhiyun template <typename U> 61*4882a593Smuzhiyun XCamReturn SplitRawHistLiteParams(U* ori, U* left, U* right); 62*4882a593Smuzhiyun template <typename U> 63*4882a593Smuzhiyun XCamReturn SplitRawHistBigParams(U* ori, U* left, U* right); 64*4882a593Smuzhiyun template <typename U> 65*4882a593Smuzhiyun XCamReturn SplitRawAeLiteParams(U* ori, U* left, U* right); 66*4882a593Smuzhiyun template <typename U> 67*4882a593Smuzhiyun XCamReturn SplitRawAeBigParams(U* ori, U* left, U* right); 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun //awb 70*4882a593Smuzhiyun template <typename U> 71*4882a593Smuzhiyun XCamReturn SplitAwbParams(U* ori, U* left, U* right); 72*4882a593Smuzhiyun template <typename U> 73*4882a593Smuzhiyun XCamReturn SplitAfParams(U* ori, U* left, U* right); 74*4882a593Smuzhiyun // LSC 75*4882a593Smuzhiyun template <typename U> 76*4882a593Smuzhiyun XCamReturn SplitAlscParams(U* ori, U* left, U* right); 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun Rectangle pic_rect_; 80*4882a593Smuzhiyun Rectangle left_isp_rect_; 81*4882a593Smuzhiyun Rectangle right_isp_rect_; 82*4882a593Smuzhiyun }; 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun } // namespace RkCam 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun #endif // __COMMON_HWI_ISP_PARAMS_SPLITTER_H__ 87