Learning feature2 by simple model
zhaocheng1
Agenda
•Diagram of FeatureGraph.
•CHITargetBufferManager
•Key functions of process.
•RealTime, RTBay2YUV, RTMFSRYUV.
2
FeatureGraph and FeatureNode
•Camx: pipeline 在xml 中定义, sensor, ife, ipe 是pipeline 的node, 通过DRQ 管理pipeline 中的node.•Feature2: FeatureGraph 是pipeline, Feature 是FeatureGraph 的node.
•FeatureGraph 是FeatureNode 的管理者, 跨FeatureNode 的处理在FeatureGraph 中执行.•FeatureNode: 描述pipeline(camx), Stage, FeatureInternalLink 信息.
•Stage 描述被使用的pipeline 的input, output, dependency(被使用的input port)信息.•Stage 使用多条pipeline 时,用FeatureInternalLink 将pipeline link 起来.
•FeatureGraph: 描述当前Graph 中有哪些FeatureNode,FeatureNode 间的GraphLink 信息.
•GraphLink 信息保存在全局的m_linkData 中, 通过m_linkData 来实现对FeatureNode 的visit.•三种类型Link: ExtSrcLinks, ExtSinkLinks , InternalLinks(upstream, downstream visit).•Link 状态: 初始为NotVisited, 没有被使用到Disabled, 被使用到OutputPending.
down SrcGraphNode 2
ExtSinkLink->pSrcGraphNode
SrcGraphNode->portToOutputLinkIndexMap
SinkTarget
ExtSinkLink SrcTarget 1
ExtSrcLink->pSinkGraphNode
SinkGraphNode->portToInputLinkIndexMap
SinkGraphNode
ExtSrcLink SrcGraphNode 3
InternalLink->pSrcGraphNode SrcGraphNode->portToOutputLinkIndexMap SinkGraphNode
InternalLink InternalLink->SinkGraphNode SinkGraphNode->portToInputLinkIndexMap
up up down up down down up
Simple model of FeatureGraph.
•Chi-cdk作用
nodeselector•Request: 获取FeatureNode的input, output ports的buffer, Submit到camx对应的pipeline去处理.
•Output buffer: a. SinkPort buffer 来自上层传入. b. NonSinkPort buffer, 在chi中申请.
•Input buffer: a. RealTimeNode输出数据, 不需要input buffer. b. upstream node的output buffer.
c. 来自SrcTarget的输入(算法上移).
•Result: SinkPort: 将处理后得到的output buffer返回给上层, release input buffer.
•执行过程:
•从SinkLink开始扫描, 先确定link的状态, 判断FeatureNode是否为ready状态.
•Ready: 所有output port都被访问到,其中至少有一个处于工作状态(link为OutputPending状态).
•确定FeatureNode有几个request, 每个request有几个output port输出.
•执行request的Sequence(-1)阶段, 设置node的dependency, 从上行Node get dependency.
•Dependency被满足后,执行request的Sequence(0)阶段, 将input, output buffer给camx.
FN:Bayer2Yuv
FN:RealTime Display_Out
Raw_Out Meta_Out
RDI_In
Meta_In Meta_Out
YUV_Out yuv
metadata Preview
FG:RTBayer2YUV
Process of RTBayer2YUV.
InputResourcePending
B2Y(ready)
1个request, 2个output port RT(not ready)
1个request, 1个output port WalkAllExtSinkLinks Sequence(-1)PopulateDependency
Getdependency()
B2Y: processRequest
Sequence(-1)PopulateDependency
Getdependency()RT:processRequest Sequence(0)
PopulatePortConfiguration
SubmitRequest()
OutputResourcePending
ProcessMetadataCallback(meta)ProcessResultMessage RT:processResult B2Y: ProcessGetInputDependency RT(ready) : 1个request, 3个output port
OutputResourcePending
Sequence(0)
PopulatePortConfiguration
SubmitRequest()
B2Y: processRequest ProcessBufferCallback(RDI)ProcessResultMessage ProcessBufferCallback(Preview)
ProcessResultMessage
ProcessMetadataCallback()ProcessResultMessage B2Y:processResult ProcessBufferCallback(yuv)
ProcessReleaseInputDependencyMessagge
1
2
3
Executing SetBufferInfo(B2Y)SetBufferInfo(B2Y)Process_result(preview)
Process_result(metadata)
Process_result(yuv)
Diagram of FeatureGraph.
•FeatureNode 的全部output 都没有被使用到: 设置全部output, input link 为Disable 状态.•FeartureNode 的部分output, input port 被使用.
•使用到的input 为dependency port. 使用到的output 为Selected port.
•request: 从SinkLink 开始上行访问Node, FeatureNode2到FeatureNode1,深度优先搜索.•result: output buffer 返回, 从FeatureNode1到Feature2Node2.
FN1
stage1
SinkTarget
Disabled FN2
ExtSinkLink
InternalLink InternalLink OutputPending Disabled SrcTarget
ExtSrcLink
OutputPending
FNInternalLink
stage2
in
in
out
out
out
Upstream
Downstream
FN4
out
in
ExtSinkLink
Disabled
InternalLink OutputPending in
out
out FN3
in
in InternalLink OutputPending
out InternalLink
OutputPending
SinkTarget
ExtSinkLink OutputPending
out ExtSinkLink Disabled
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论