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