1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Isp20StatsBuffer.h - isp20 stats buffer 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (c) 2019 Rockchip Corporation 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 */ 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #ifndef ISP20_STATS_BUFFER_H 21*4882a593Smuzhiyun #define ISP20_STATS_BUFFER_H 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun #include "rk_aiq_pool.h" 24*4882a593Smuzhiyun #include "v4l2_buffer_proxy.h" 25*4882a593Smuzhiyun #include "ICamHw.h" 26*4882a593Smuzhiyun #include "SensorHw.h" 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun using namespace XCam; 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun namespace RkCam { 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun class Isp20StatsBuffer 33*4882a593Smuzhiyun : public V4l2BufferProxy { 34*4882a593Smuzhiyun public: 35*4882a593Smuzhiyun explicit Isp20StatsBuffer(SmartPtr<V4l2Buffer> buf, 36*4882a593Smuzhiyun SmartPtr<V4l2Device> &device, 37*4882a593Smuzhiyun SmartPtr<BaseSensorHw> sensor, 38*4882a593Smuzhiyun ICamHw *camHw, 39*4882a593Smuzhiyun SmartPtr<RkAiqAfInfoProxy> AfParams, 40*4882a593Smuzhiyun SmartPtr<RkAiqIrisParamsProxy> IrisParams); ~Isp20StatsBuffer()41*4882a593Smuzhiyun virtual ~Isp20StatsBuffer() {}; 42*4882a593Smuzhiyun getEffectiveExpParams(uint32_t frameId,SmartPtr<RkAiqSensorExpParamsProxy> & expParams)43*4882a593Smuzhiyun XCamReturn getEffectiveExpParams (uint32_t frameId, SmartPtr<RkAiqSensorExpParamsProxy>& expParams) { 44*4882a593Smuzhiyun XCAM_ASSERT (mSensor.ptr ()); 45*4882a593Smuzhiyun return mSensor->getEffectiveExpParams(expParams, frameId); 46*4882a593Smuzhiyun } 47*4882a593Smuzhiyun getEffectiveIspParams(uint32_t frameId,rkisp_effect_params_v20 & ispParams)48*4882a593Smuzhiyun XCamReturn getEffectiveIspParams(uint32_t frameId, rkisp_effect_params_v20& ispParams) { 49*4882a593Smuzhiyun XCAM_ASSERT (mCamHw); 50*4882a593Smuzhiyun return mCamHw->getEffectiveIspParams(ispParams, frameId); 51*4882a593Smuzhiyun } 52*4882a593Smuzhiyun get_af_params()53*4882a593Smuzhiyun SmartPtr<RkAiqAfInfoProxy>& get_af_params () { 54*4882a593Smuzhiyun return _afParams; 55*4882a593Smuzhiyun } 56*4882a593Smuzhiyun get_iris_params()57*4882a593Smuzhiyun SmartPtr<RkAiqIrisParamsProxy>& get_iris_params () { 58*4882a593Smuzhiyun return _irisParams; 59*4882a593Smuzhiyun } 60*4882a593Smuzhiyun private: 61*4882a593Smuzhiyun XCAM_DEAD_COPY(Isp20StatsBuffer); 62*4882a593Smuzhiyun SmartPtr<BaseSensorHw> mSensor; 63*4882a593Smuzhiyun ICamHw *mCamHw; 64*4882a593Smuzhiyun SmartPtr<RkAiqAfInfoProxy> _afParams; 65*4882a593Smuzhiyun SmartPtr<RkAiqIrisParamsProxy> _irisParams; 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun class SofEventData : public BufferData 69*4882a593Smuzhiyun { 70*4882a593Smuzhiyun public: SofEventData()71*4882a593Smuzhiyun explicit SofEventData () {} ~SofEventData()72*4882a593Smuzhiyun ~SofEventData() {} map()73*4882a593Smuzhiyun virtual uint8_t *map () {return NULL;} unmap()74*4882a593Smuzhiyun virtual bool unmap () {return false;} 75*4882a593Smuzhiyun int64_t _timestamp; 76*4882a593Smuzhiyun uint32_t _frameid; 77*4882a593Smuzhiyun }; 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun class SofEventBuffer 80*4882a593Smuzhiyun : public BufferProxy { 81*4882a593Smuzhiyun public: 82*4882a593Smuzhiyun explicit SofEventBuffer(SmartPtr<SofEventData> &buf, 83*4882a593Smuzhiyun SmartPtr<V4l2Device> &device); ~SofEventBuffer()84*4882a593Smuzhiyun virtual ~SofEventBuffer() {}; 85*4882a593Smuzhiyun SmartPtr<SofEventData> get_data(); 86*4882a593Smuzhiyun private: 87*4882a593Smuzhiyun XCAM_DEAD_COPY(SofEventBuffer); 88*4882a593Smuzhiyun //SmartPtr<RkAiqSofInfoProxy> _sofParams; 89*4882a593Smuzhiyun //SmartPtr<RKAiqSofInfo_t> _sofInfo; 90*4882a593Smuzhiyun //SmartPtr<SofEventData> _event_data; 91*4882a593Smuzhiyun }; 92*4882a593Smuzhiyun } 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun #endif 95