MTK CAMERA ISP6S SFP

1,mtkcam3/pipeline/pipeline/PipelineContextImpl.cpp launchOneNode()
2.mtkcam3/pipeline/pipeline/NodeActorImpl.cpp init() -->onInit()
3.mtkcam3/pipeline/hwnode/p2/P2_StreamingNode.cpp init()
4.mtkcam3/pipeline/hwnode/p2/P2_Processor.h init()
5.mtkcam3/pipeline/hwnode/p2/P2_DispatchProcessor.cpp onInit()
6.mtkcam3/pipeline/hwnode/p2/P2_Processor.h init()
7.mtkcam3/pipeline/hwnode/p2/P2_StreamingProcessor.cpp onInit()
8.mtkcam3/pipeline/hwnode/p2/P2_StreamingProcessor.cpp initFeaturePipe()
9.mtkcam3/feature/core/featurePipe/streaming/StreamingFeaturePipe.cpp init()
10.mtkcam3/feature/core/featurePipe/streaming/StreamingFeaturePipe.cpp initTPIGroup()
11.mtkcam3/feature/core/featurePipe/streaming/tpi/TPIMgr_PluginWrapper.cpp createSession
12.mtkcam3/feature/core/featurePipe/streaming/tpi/TPIMgr_PluginWrapper.cpp createPluginSession

2.调用NodeActorImpl::init(),继续调用onInit(),virtual auto    onInit() -> int     { return (mpNodeOps->getNode()!=nullptr) ? mpNodeOps->getNode()->init(mInitParam) : -1; },这里会获取所有需要的node进行Init(),mInitParam包含node id/name等信息。
eNODEID_P2CaptureNode   = 0x14,
eNODEID_P2StreamNode    = 0x15,
eNODEID_FDNode_BEGIN    = 0x16,
eNODEID_FDNode          = eNODEID_FDNode_BEGIN,
eNODEID_JpegNode        = 0x23,
eNODEID_P2YuvIspTuningDataPackNode  = 0x41, //IspTuningDataPackNode after P2CaptureNode for Yuv

3.这里继续分析p2s的init
ret = parseInitParam(sensorLog, initParam) && mDispatcher.init(P2InitParam(P2Info(mP2Info, sensorLog, mP2Info->mConfigInfo.mMainSensorID)));
parseInitParam()将initParam转化成p2的param信息
mDispatcher.init()调用到P2_Processor.h的init()

4.Processor<Init_T, Config_T, Enque_T>::init()继续调用this->onInit(param);

5.ret = ret&& mBasicProcessor.init(param)&& mStreamingProcessor.init(param);
BasicProcessor用于处理慢动作何一些debug信息
StreamingProcessor则处理正常的streaming

6.processor<Init_T, Config_T, Enque_T>::init()继续调用this->onInit(param);
同4一样,P2_Processor.h中Processor类似于一个父类,用于管理各Processor,4的this就是DispatchProcessor,而这里是StreamingProcessor。所以下一步调用的就是StreamingProcessor的onInit()

7.ret = initFeaturePipe(mP2Info.getConfigInfo()) && init3A();
调用initFeaturePipe()进行p2s中feature的配置。另外此函数中有几个setprop项用于在出图上画线
// draw line
mDrawType = ::property_get_int32("vendor.debug.camera.draw.type", 0); // can set 15(10) = 1111(2) : draw running vertical line on input buffer
mDrawDefaultPosition = ::property_get_int32("vendor.debug.camera.draw.position", 50);   // 0 ~ 100 (%)
mDrawMoveSpeed = ::property_get_int32("vendor.debug.camera.draw.move.speed", 2);
mDrawLineWidth = ::property_get_int32("vendor.debug.camera.draw.line.width", 10);   // 10 ~ 100 (%)
mDrawValue = ::property_get_int32("vendor.debug.camera.draw.value", 255);

8.mPipeUsageHint = getFeatureUsageHint(config);
根据config信息确定pipeUsage的信息
mFeaturePipe = IStreamingFeaturePipe::createInstance(mP2Info.getConfigInfo().mMainSensorID, mPipeUsageHint);
根据上面的pipeUsage获取FeaturePipe实例

ret = mFeaturePipe->init(getName());
进行StreamingFeaturePipe的初始化

9.initTPIGroup(); 三方算法init
initP2AGroup();
initNodes(); 添加sfp中各node
mNodes.push_back(&mRootNode);
mNodes.push_back(&mDepth);
mNodes.push_back(&mBokeh);
    if( mPipeUsage.supportTPI(TPIOEntry::YUV) )
    {
        MUINT32 count = mPipeUsage.getTPINodeCount(TPIOEntry::YUV);
        mTPIs.clear();
        mTPIs.reserve(count);
        char name[32];
        TPIUsage tpiUsage = mPipeUsage.getTPIUsage();
        for( MUINT32 i = 0; i < count; ++i )
        {
            TPI_NodeInfo nodeInfo = tpiUsage.getTPIO(TPIOEntry::YUV, i).mNodeInfo;
            int res = snprintf(name, sizeof(name), "fpipe.tpi.%d.%s.%d", i, nodeInfo.mName.c_str(), nodeInfo.mNodeID);
            MY_LOGE_IF((res < 0), "create TPI snprintf FAIL!");
            TPINode *tpi = new TPINode(name, i);
            tpi->setTPIMgr(mTPIMgr);
            mTPIs.push_back(tpi);
            mNodes.push_back(tpi);
        }
}

mTPIMgr = TPIMgr::createInstance(); 获取TPIMgr实例,实际就是new了一个TPIMgr_PluginWrapper供下一步createSession

11.会传入masks等参数,masks就是FeatureSettingPolicy中updateStreamConfiguration时的feature combination

12.mPluginPool = T_PluginType::getInstance(mainSensorID); 获取PluginPool 
auto &plugin : mPluginPool->getProviders(masks) 遍历所有masks包含的plugin
T_Property prop = plugin->property();
plugin->negotiate(*sel);
mPluginMap[id] = PluginInfo(plugin, prop, sel); 将需要run的算法加入mPluginMap
加入feature时如果没走通,需要注意这里

1.mtkcam3/pipeline/hwnode/p2/P2_StreamingProcessor.cpp onEnque()
2.mtkcam3/pipeline/hwnode/p2/P2_StreamingProcessor.cpp processP2()
3.mtkcam3/feature/core/featurePipe/streaming/StreamingFeaturePipe.cpp enque()
4.mtkcam3/feature/core/featurePipe/streaming/tpi/TPIMgr_PluginWrapper.cpp genFrame()
5.mtkcam3/3rdparty/customer/s_wuhao/wuhao.cpp negotiate()

4.genframe()中会遍历之前保存的mPluginMap,调用到算法的negotiate()决定每一帧是否run,将frame加入到对应的域中(eJoinEntry_S_YUV)

1.mtkcam3/feature/core/featurePipe/streaming/TPINode.cpp onThreadLoop()
2.mtkcam3/feature/core/featurePipe/streaming/TPINode.cpp process()
3.mtkcam3/feature/core/featurePipe/streaming/tpi/TPIMgr_PluginWrapper.cpp enqueNode()
4.mtkcam3/3rdparty/customer/s_wuhao/wuhao.cpp process()

1.request进入TPINode是通过onData(),会进行一个入队操作mData.enque(data);onThreadLoop()在一直轮询,当拿到数据时会进行deque操作mData.deque(data);然后将data和JoinPulgin内部的request进行绑定,送入process

 

 

每个算法的FeatureIndex都依次1左移
TP_FEATURE_EIS          = 1ULL << 34  0000 0000 0000 0000 0000 0000 0000 0100 0000 0000 0000 0000 0000 0000 0000 0000
TP_FEATURE_FB           = 1ULL << 35  0000 0000 0000 0000 0000 0000 0000 1000 0000 0000 0000 0000 0000 0000 0000 0000
而在feature combination中,所有算法的合集mask是|操作,所以实际上是将各位都置为1.
 0000 0000 0000 0000 0000 0000 0000 1100 0000 0000 0000 0000 0000 0000 0000 0000
在进行算法的加载时,会将该算法的index与mask进行&操作,如果该算法已被加入到这个feature combination中,&肯定为1

 

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
一、 手机CAMERA的物理结构: ........................................................................................ - 4 - 二、 CAMERA的成像原理: ................................................................................................. - 4 - 三、 CAMERA常见的数据输出格式:.................................................................................. - 5 - 四、 阅读CAMERA的规格书(以TRULY模组OV5647_RAW为例): ........................... - 6 - 五、 CAMERA的硬件原理图及引脚 ..................................................................................... - 7 - 1、 电源部分:.................................................................................................................... - 7 - 2、 SENSOR INPUT部分: ................................................................................................... - 7 - 3、 SENSOR OUTPUT部分: ............................................................................................... - 7 - 4、 I2C部分:SCL,I2C时钟信号线和SDA,I2C数据信号线。 .................................. - 7 - 六、 MTK平台CAMERA驱动架构: .................................................................................. - 8 - 七、 MTK平台CAMERA相关代码文件(以下代码均为MTK6575平台): .................... - 9 - 1、 CAMERASENSOR驱动相关文件 .................................................................................... - 9 - 2、 SENSOR ID 和一些枚举类型的定义 ............................................................................. - 9 - 3、 SENSOR供电 .................................................................................................................. - 9 - 4、 KERNEL SPACE的SENSORLIST,IMGSENSOR模块注册 ............................................... - 9 - 5、 USER SPACE的SENSORLIST,向用户空间提供支持的SENSORLIST ......................... - 10 - 6、 SENSOR 效果调整的接口 ............................................................................................ - 10 - 八、 CAMERA模块驱动、设备与总线结构: ..................................................................... - 11 - A) 驱动的注册: .................................................................................................................. - 11 - B) 设备的注册: .................................................................................................................. - 11 - C) 总线的匹配: .................................................................................................................. - 12 - 九、 CAMERA驱动工作流程: ............................................................................................- 13 - 十、 CAMERA驱动添加、调试流程:.......
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值