1 /* 2 * Isp20StatsBuffer.h - isp20 stats buffer 3 * 4 * Copyright (c) 2019 Rockchip Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 */ 19 20 #ifndef ISP20_STATS_BUFFER_H 21 #define ISP20_STATS_BUFFER_H 22 23 #include "rk_aiq_pool.h" 24 #include "v4l2_buffer_proxy.h" 25 #include "ICamHw.h" 26 #include "SensorHw.h" 27 28 using namespace XCam; 29 30 namespace RkCam { 31 32 class Isp20StatsBuffer 33 : public V4l2BufferProxy { 34 public: 35 explicit Isp20StatsBuffer(SmartPtr<V4l2Buffer> buf, 36 SmartPtr<V4l2Device> &device, 37 SmartPtr<BaseSensorHw> sensor, 38 ICamHw *camHw, 39 SmartPtr<RkAiqAfInfoProxy> AfParams, 40 SmartPtr<RkAiqIrisParamsProxy> IrisParams); ~Isp20StatsBuffer()41 virtual ~Isp20StatsBuffer() {}; 42 getEffectiveExpParams(uint32_t frameId,SmartPtr<RkAiqSensorExpParamsProxy> & expParams)43 XCamReturn getEffectiveExpParams (uint32_t frameId, SmartPtr<RkAiqSensorExpParamsProxy>& expParams) { 44 XCAM_ASSERT (mSensor.ptr ()); 45 return mSensor->getEffectiveExpParams(expParams, frameId); 46 } 47 getEffectiveIspParams(uint32_t frameId,rkisp_effect_params_v20 & ispParams)48 XCamReturn getEffectiveIspParams(uint32_t frameId, rkisp_effect_params_v20& ispParams) { 49 XCAM_ASSERT (mCamHw); 50 return mCamHw->getEffectiveIspParams(ispParams, frameId); 51 } 52 get_af_params()53 SmartPtr<RkAiqAfInfoProxy>& get_af_params () { 54 return _afParams; 55 } 56 get_iris_params()57 SmartPtr<RkAiqIrisParamsProxy>& get_iris_params () { 58 return _irisParams; 59 } 60 private: 61 XCAM_DEAD_COPY(Isp20StatsBuffer); 62 SmartPtr<BaseSensorHw> mSensor; 63 ICamHw *mCamHw; 64 SmartPtr<RkAiqAfInfoProxy> _afParams; 65 SmartPtr<RkAiqIrisParamsProxy> _irisParams; 66 }; 67 68 class SofEventData : public BufferData 69 { 70 public: SofEventData()71 explicit SofEventData () {} ~SofEventData()72 ~SofEventData() {} map()73 virtual uint8_t *map () {return NULL;} unmap()74 virtual bool unmap () {return false;} 75 int64_t _timestamp; 76 uint32_t _frameid; 77 }; 78 79 class SofEventBuffer 80 : public BufferProxy { 81 public: 82 explicit SofEventBuffer(SmartPtr<SofEventData> &buf, 83 SmartPtr<V4l2Device> &device); ~SofEventBuffer()84 virtual ~SofEventBuffer() {}; 85 SmartPtr<SofEventData> get_data(); 86 private: 87 XCAM_DEAD_COPY(SofEventBuffer); 88 //SmartPtr<RkAiqSofInfoProxy> _sofParams; 89 //SmartPtr<RKAiqSofInfo_t> _sofInfo; 90 //SmartPtr<SofEventData> _event_data; 91 }; 92 } 93 94 #endif 95