IPNC RDK

文件版本 2.10

多通道框架(MCFW)

软件用户指南

TABLE OF CONTENTS

1  介绍.. 3

1.1  概述.. 3

1.2 关键首字母缩略词和词汇.. 3

2  安装和构建.. 4

2.1 从属包.. 4

2.2  安装 IPNC RDK. 5

2.3  构建 the IPNC RDK. 5

2.4  运行 the IPNC RDK. 5

3  顶层设计.. 5

3.1  软件层.. 5

3.2     McFW API10

3.3     Link API12

3.4  链.. 21

4  目录结构.. 31

4.1  接口文件.. 31

4.2  模板示例代码.. 33

4.3  库.. 33

5  额外细节.. 34

5.1    内部处理器通信详细信息.. 34

5.2    内存映射详细信息.. 34

5.3   显示控制器和显示功能详细信息.. 34

5.4  IPNC 应用程序配置.. 35

5.5  智能/视频分析.. 43

5.6  视频帧缓冲接口.. 43

1  介绍

1.1  概述

IPNC RDK是用于TIDM8127和DM385 SOC平台的多处理器软件开发框架,针对监控IPNC,混合IPNC和视频分析等应用进行了优化。

IPNC RDK中的软件框架允许用户创建涉及传感器视频捕获,ISP处理,分辨率缩放,视频噪声滤波器,视频显示(SC,噪声滤波和编码)和视频流等的不同多通道数据流。

1.2 关键首字母缩略词和词汇

术语

描述

IPNC

IP网络摄像机-图像传感器输入网络流,ISP将它转换为YUV其转换为数字编码的比特流和网络流。

IPNC RDK

IPNC参考设计工具包- 包括多通道软件框架,硬件平台。

ISS

成像子系统-两个硬件模块的文件所涉及软件驱动包

HDVPSS

高清晰度视频处理子系统- 简称为硬件模块文件中涉及软件驱动程序包

HDVICP

高清晰度视频和图像协处理器-文档中涉到的主要为软件编解码器包和硬件IP区块

Ducati

双核M3处理器控制HDVPSS和HDVICP硬件引擎

Video M3

ARM Cortex    M3核(内嵌Ducati

子系统) 控制HDVICP 编解码器。

VPSS M3 / DSS M3 / ISS M3

ARM Cortex    M3核(内嵌Ducati

子系统) 控制 HDVPSS和ISS 驱动

NF

噪声滤波器 - 参考文档中的硬件噪声滤波器模块以及支持它的软件组件

SC

标量 - 参考文档中的硬件标量块以及软件

组件支持它

McFW

多通道架构-多通道应用IPNC开发的软件框架。

Links

最小的软件组件控制功能单元(如捕获,DEI,显示器) -具有输入队列和输出队列

IPC

处理器间通信

ListMP

共享区域-具有跨处理器共享存储SYSLINK组件

SR

共享区域-具有跨处理器共享存储SYSLINK组件

VA

视频分析

2  安装和构建

2.1 从属包

IPNC RDK依赖于以下附加软件包。

Please referto the Release Notes for exact package version required for the current releaseof IPNC RDK有关当前版本的IPNCRDK所需的精确软件包版本,请参阅发行说明

包名称

软件包版本

A8 Linux - Code Sorcery Code Generation tools

有关软件包版本,请参阅发行说明

ARM M3代码生成工具

DSP c6x代码生成工具*

Linux PSP

XDC

BIOS

Syslink

IPC

XDIAS

Framework components

IVAHD HDVICP2 API

H264 encoder

HDVPSS drivers

ISS drivers

2.2  安装 IPNC RDK

有关安装IPNC RDK的说明,请参阅随发行的软件包提供的安装指南。

2.3  构建 the IPNC RDK

有关安装IPNC RDK的说明,请参阅随发行的软件包提供的安装指南。

2.4  运行 the IPNC RDK

有关执行IPNC RDK提供的默认应用程序的说明,请参阅随发行的软件包提供的安装指南。

3  顶层设计

3.1  软件层

软件使用不同的层实现,如下所示。

分层的量基于模块性(更多抽象/层)和易用性(更少层数)之间的平衡来完成。

HOST A8

VPSS M3

Video M3

C64x DSP

下面描述软件的不同层,

Processor 

Applicable

Description

TI SW Package

Linux

HOST A8

Linux操作系统,包括文件系统,SATA,以太网,USB等IO驱动程序

Linux PSP

BIOS6

VPSS M3

Video M3

DSP

BIOS RTOS用作操作系统

Video-M3, VPSS-M3, DSP. 视频-M3,VPSS-M3,DSP。 Provides features like threads, semaphores, interrupts. 提供线程,信号量,中断等功能。

BIOS

XDC(用于BIOS和其他配置)

Layer

Processor 

Applicable

Description

TI SW Package

队列和链路之间的消息传递使用BIOS信号量实现。

Syslink / IPC

HOST A8

VPSS M3

Video M3

DSP

用于处理器之间通信的软件api。提供诸如处理器加载和引导,多堆栈,多链表(ListMP)功能,消息队列,通知等

Syslink

IPC

HDVPSS

Drivers

VPSS M3

HDVPSS驱动器,如采集,显示, 去隔行,缩放基于FVID2界面上控制和配置

HDVPSS硬件

HDVPSS

ISS Drivers

VPSS M3

ISS驱动程序,如捕获,传感器配置,基于FVID2接口的缩放,以控制和配置ISS硬件

ISS

Video Encode

Video M3

基于XDM / XDIAS接口的视频编码API。Uses framework components for用于框架组件

资源分配

XDIAS

Framework components

IVAHD HDVICP2 API

MJPEG encoder

H264 encoder

ALG

VPSS M3

用于视频处理和高级功能的高级算法。例如-视频稳定,AWB,AE,闪烁检测等

ISS

Face Detect

VPSS M3

面部检测引擎驱动程序可以做到高达32张人脸的实时检测

ISS

Links

HOST A8

VPSS M3

Video M3

DSP

实施单个链接。一些链路是特定于处理器的,而一些链路在处理器之间是公共的

IPNC RDK

Link API

HOST A8

链接API允许用户创建,连接和HOSTA8控制环节,VPSS M3,M3的视频和DSP。

McFW

Layer

Processor 

Applicable

Description

TI SW Package

Link API用于创建链接链,形成用户定义的用例。

连接到彼此的链接是平台相关的。

McFW API

HOST A8

多通道应用程序特定API,允许用户使用单个简化的API接口为IPNC,NVR设置和控制预定义的应用程序特定链。

这使得用户可以直接使用的链接,而无需了解详细的链路API。

该McFW API是平台独立的,相同的API将在DM812x工作,DM385

McFW

RTSP Stack

HOST A8

开源的的C ++库,用于多媒体流,采用开放的标准协议开源包(RTP / RTCP,RTSP,SIP)

Open source

User

Application

HOST A8

通常GUI和其他应用程序特定组件,如文件读/写,网络流。

User application can use the McFW API for pre-defined usecases 用户应用可以利用预先定义的用例的McFW API

OR 要么

User application can use the link API and create their own custom chains. 用户应用可以利用链接API,并创建自己的定制链。

NOTE: User application NEED NOT create “links” of their own for say file write. 注意:用户应用程序不需要创建自己的“链接”用于说文件写入。 Users can write their own custom implementation of processing steps outside of the link API. 用户可以在链接API之外编写自己的自定义实现的处理步骤。

IPNC RDK provides three kinds of demos

IPNC RDK提供了三种类型demos 。 “chains” demo, this uses the“链”demos,这里使用

Customer specific

Layer

Processor 

Applicable

Description

TI SW Package

link API

. “McFW” demo, this uses the

McFW API

-

3.2      McFWAPI

McFW API基于以下原则

多通道视频系统由以下四个子系统组成

1.摄像/捕捉 –这个子系统实现了视频拍摄。摄像机组件通过并行输入视频端口从bayer传感器捕获,并可选地提供两个缩放输出。 The capture link captures multi-channels from input video ports(VIP).捕获链路从输入视频端口(VIP)捕获多通道。

2.显示 - 这将从捕获和解码子系统接收作为输入,并通过不同的用户定义的镶嵌图案组成并通过多个通道呈现在多个显示设备上。

3.编码 - 这将由包括“子码流”编码的捕获和编码视频作为输入,并且给用户提供编码比特流

4.视频处理 - 这将由捕获/摄像机和处理视频作为输入,取决于配置的引擎,如噪声过滤器,mjpeg编码。

视频分析 - 这将输入作为QVGA输入从标量和运行DMVA算法

API隐藏平台级别详细信息,如YUV格式转换,要使用的标量,要使用的视频噪声过滤器,并允许用户专注于广泛级子系统,而不是低级硬件资源和约束。

The hardware blocks (noise filter, scaler,isp) used inside a sub-system depend on the top level system configuration doneby the user depending on their use-case.在子系统内部使用的硬件块(噪声滤波器,缩放器,isp)取决于用户根据其使用情况完成的顶级系统配置。

User will see the same block diagram for alluse-cases on all platforms.用户将在所有平台上看到所有用例的相同框图。 Thedetailed blocks inside the sub-system will depend on the system levelconfiguration selected by the user.子系统内的详细块将取决于用户选择的系统级配置。 The blocks inside the subsystem will also depend on the platformlike DM812x or DM385.子系统内部的块也将取决于平台,如DM812x或DM385。

Thus McFW API allows user to use the same APIfor different products across different platforms, thus allowing user to keeptheir GUI and other applications portable to different product lines andplatforms. 因此,McFW API允许用户针对不同平台的不同产品使用相同的API,从而允许用户保持其GUI和其他应用程序可移植到不同的产品线和平台。

3.2.1  McFW API 系统框架图                                                      Primary stream, Secondary stream,

示例,三流IPNC用例的简单流程图如下所示。

3.3      LinkAPI

注:大多数用户并不需要知道内部软件架构的底层细节,但有必要了解软件如何才能最有效地运行在系统内部。

A link is the basic processing step in avideo data flow.链接是视频数据流中的基本处理单元。 A link consists of aBIOS6/Linux thread coupled with a message box (implemented using OSsemaphores).链接由BIOS6 / Linux线程和消息框(使用OS信号量实现)组成。 Since each link runs as aseparate thread, links can run in parallel to each other.由于每个链接作为单独的线程运行,链接可以彼此并行地运行。 The message box associated with a link allows user application aswell as other links to talk to that link.与链接相关联的消息框允许用户应用程序以及其他链接与该链接对话。 The link implements a specific interface which allows other linksto exchange video frames and/or bit streams with the link.链路实现特定接口,其允许其他链路与链路交换视频帧和/或比特流。

Link API allows user to create,control and connect the links. Link API允许用户创建,控制和连接链接。

McFW API uses Link API to make achain depending on the top level system configuration provided by the user.McFW API使用Link API根据用户提供的顶级系统配置制作一个链。

Alternatively user's can use the link APIdirectly to make custom use-cases not supported by the McFW API.或者,用户可以直接使用链接API来创建McFW API不支持的自定义用例。

3.3.1  “链接”的内部软件体系结构

在McFW内部使用的SW架构基于以下原则,

视频处理工作加载在不同处理器之间划分,如下所示

Processor

OS

Used for

HOST A8

Linux

系统设置和控制,GUI,IO外设控制如SATA,以太网,USB,音频

VPSS M3

BIOS6

HDVPSS控制视频采集,视频显示,缩放,视频噪声滤波

Video M3

BIOS6

HDVICP2视频压缩(H264编码,MJPEG编码)

DSP

BIOS6

SW OSD,自定义视频处理算法

在每个处理器中,每个处理步骤如捕获或显示将在其自己的独立线程中运行。这种独立的执行线程在这个框架中被称为“link”。

Example links include, capture, display,DEI, Noise Filter, encode, decode示例链接包括,捕获,显示,DEI,噪声滤波器,编码,解码

Eachthread or link is capable of handling processing of video frames from multiplechannels, each having different properties like width, height, data format etc.每个线程或link能够处理来自多个通道的视频帧,每个通道具有诸如宽度,高度,数据格式等不同的属性。

A link will“connect” to other links to make a chain or a data flow.链接将“连接”到其他链接以形成链或数据流。This connection and control canbe done by the user from the HOST A8 side.这种连接和控制可以由用户从HOST A8侧完成。

Once a chain is setupand started, each link in the chain will exchange frames will its next link,using a well defined interface, to make the video processing data flow.一旦链建立和启动,链中的每个link将交换帧,其下一个链路,使用良好定义的接口,使视频处理数据流。

The frameworkallows links on different processors to exchange frames directly with eachother without any intervention of the HOST A8.该框架允许不同处理器上的链路直接彼此交换帧,而不需要HOST A8的任何干预。

Once a chain isrunning, user can send control commands to individual links to control theirrun-time behavior.一旦链运行,用户可以向单个link发送控制命令以控制其运行时行为。Example, changing encode Qp, frame rate control etc.例如,改变编码Qp,帧速率控制等。

An example chain is shown below, in thischain multiple channels of video are captured, encoded via HDVICP encode linkand then stream out on the network示例链如下所示,在该链中,多通道的视频由捕获,通过HDVICP编码link编码,然后在网络上流出

3CH 1080p + D1 YUV420 + 1080p @ 60fps

Encode支持:

HDVICP H.264

H.264 1080p 60fps

H.264 D1 30fps

MJPEG 1080p 5fps

3.3.2  link接口

link接口包括

Link API – whichis used by chains or user applications for configuring and controlling the link Link API - 链或用户应用程序用于配置和控制link

Inter Link API –which is used by other links for exchanging frames between two links Inter Link API - 由其他链路用于在两个link之间交换帧

Link OutputQueue – is the queue which is used by another link (via the inter link API) toexchange frames with that linklink输出队列 - 是另一个link(通过link间link API)用来与该link交换帧的队列

3.3.3  将消息传递到链接

每个链接由系统级唯一的32位链接ID(如“system_linkId.h”中定义)标识。

The link ID determines on which processor the link runs as shownbelow.链路ID确定链路在哪个处理器上运行,如下所示。

描述

0..27

链接ID

28..31

此链接运行的处理器ID

0: DSP (C64x)

1: Video M3

2: VPSS M3

3: HOST A8

每个link API在向link发送消息时需要链接ID作为参数。

When amessage is sent to a link by the user, based on the link ID the functioninternally knows whether this is a local link, in which case it sends themessage using normal BIOS/Linux APIs, else it will use Syslink MessageQ to sendthe message to the appropriate processor.当用户发送消息到链接时,基于链接ID,函数内部知道这是否是本地链接,在这种情况下,它使用正常的BIOS / LinuxAPI发送消息,否则它将使用Syslink MessageQ发送消息发送到适当的处理器。Once the MessageQ message reachesthe target processor, it invokes the local BIOS APIs to forward the message tothe intended link.一旦MessageQ消息到达目标处理器,它调用本地BIOS API将消息转发到目标链路。This allows user to control the links on VPSS M3, Video M3 and DSPfrom HOST A8.这允许用户控制来自HOSTA8的VPSS M3,视频M3和DSP上的链路。The user need not directly know about the processor and mechanism(Syslink message Q) that is used for this message passing.用户不需要直接了解用于该消息传递的处理器和机制(Syslink消息Q)。

3.3.4     link API

此API允许link由用户或链控制。

The followingAPIs are part of the link API.以下API link接API的一部分。

The API arguments are typically specific to the link implementation. API参数通常特定于链接实现。

API

Description

System_linkCreate

创建链接 - 分配驱动程序,编解码器,内存资源。

System_linkGetInfo

获取有关通道数量,每个通道的属性等link的信息。MUST be called after System_linkCreate() for a link System_linkCreate()中的链接后,必须调用

System_linkStart

启动link - 启动驱动程序或编解码器

System_linkControl

发送带有可选参数的link特定控制命令

System_linkStop

停止链接 - 停止驱动程序或编解码器

System_linkDelete

删除一个link- 释放驱动程序,编解码器,内存资源

3.3.5     Inter Link API

此API由link用于相互交换帧。Users of a link typically neednot be aware of this API.link的用户通常不需要知道这个API。

Each link needs to implement a few functions and register thefunction pointers with the system frame work along with its link ID.每个link需要实现一些功能,并注册与系统框架一起工作的函数指针及link ID。This registration is done once during system init.此注册在系统初始化期间执行一次。

API

Description

System_GetLinkInfoCb

返回关于link的信息的功能,如通道数,每个通道的属性

System_LinkGetOutputFramesCb

将捕获或生成或输出帧返回给调用者的函数(另一个链接)

System_LinkPutEmptyFramesCb

将消费的帧释放回原始链接以便重用的功能

System_LinkGetOutputBitBufsCb

返回生成的函数或输出比特流帧到调用者(另一链接) -

仅对Encode Link有效

System_LinkPutEmptyBitBufsCb

函数来释放所消耗的位流的帧回原始链路重用-有效仅用于编码链接

任何想从另一个link获取帧的link将使用系统API“System_getLinksFullFrames()”从上一个link获取帧。This internally will index into thesystem wide link information table and invoke the link specificSystem_LinkGetOutputFramesCb() function callback.这将在内部索引到系统范围的kink信息表,并调用特定于链接的System_LinkGetOutputFramesCb()函数回调。

Similarlywhen a link wants to release the frames back to the original link after theframes have been consumed, it will call the API “System_putLinksEmptyFrames()”.类似地,当链路想要在帧被消耗之后将帧释放回原始链路时,它将调用API“System_putLinksEmptyFrames()”。Thisinternally will index into the system wide link information table and invokethe link specific System_ LinkPutEmptyFramesCb () function callback.这在内部将索引到系统范围的链接信息表,并调用链接特定的System_LinkPutEmptyFramesCb()函数回调。

This way alink need not exactly know which link it is exchanging frames with.这样,链路不需要精确地知道它正在与哪个链路交换帧。All it needs is a link ID of theprevious link in the data flow.它所需要的是数据流中上一个链接的链接ID。Thisallows user to user the same link in many different data flows withoutmodifying the link implementation.这允许用户在许多不同的数据流中使用相同的链路,而不修改link的实现。

3.3.6  链路输出队列

链接将具有一个或多个输出队列,其将把捕获或生成的帧放入其中。 A link owns it output queue and takescare of memory allocation for the frames that will go into its output queue.链接拥有它的输出队列,并负责处理将进入其输出队列的帧的内存分配。

Most linkshave only one output queue, but some links have multiple output queue's.大多数链接只有一个输出队列,但有些链接有多个输出队列。These multiple output queue's allowthat link to be used in different data flows without changing the linkimplementation.这些多个输出队列允许该链路在不改变链路实现的情况下在不同的数据流中使用。

Example,Noise filter link can be configured to output its channel frames over twooutput queues, such that 8CH of 16CH goto one output queue and other 8CH go toother output queue.示例,噪声滤波器链路可以被配置为在两个输出队列上输出其信道帧,使得16CH到8个输出队列中的8CH和其他8CH到另一个输出队列。This allows noise filter to feed to two different DEI links in somedata flows.这允许噪声滤波器馈送到一些数据流中的两个不同的DEI链路。

An outputqueue can hold frames from multiple channels of multiples sizes and differentdata formats.输出队列可以保存来自多个大小和不同数据格式的多个通道的帧。ie it's a hetrogeous queue.即它是一个hetrogeous队列。

Theinformation of the content in the queue can be known by using the System_linkGetInfo()API.通过使用System_linkGetInfo()API可以知道队列中的内容的信息。This internally will call the link specific System_GetLinkInfoCb()function callback.这在内部将调用特定于链接的System_GetLinkInfoCb()函数回调。

The datastructure FIVD2_Frame, used by VPSS driver, is used for exchanging frameinformation between links. VPSS驱动程序使用的数据结构FIVD2_Frame用于在链路之间交换帧信息。This allows frame information toflow between links without any additional translation.这允许帧信息在链路之间流动而不需要任何额外的翻译。Among other information it has a“channelNum” field which allows a link to indentify the channel with the framedata.在其他信息中,它具有“channelNum”字段,其允许链路用帧数据来标识信道。

A link willtypically call the System_getLinksFullFrames() with the link ID and que ID ofthe previous link when it wants to process the input frames.当链接想要处理输入帧时,链接通常会调用具有前一链接的链接ID和队列ID的System_getLinksFullFrames()。

A link whenit has generated output frames for consumption by the next link will send amessage “SYSTEM_CMD_NEW_DATA” to the next link.当链路生成输出帧供下一链路使用时,链路将向下一链路发送消息“SYSTEM_CMD_NEW_DATA”。

When a link receives “SYSTEM_CMD_NEW_DATA” it will call当链接接收到“SYSTEM_CMD_NEW_DATA”时,它将调用

System_getLinksFullFrames(). System_getLinksFullFrames()。After processing the input frames itwill release the input frames using System_putLinksEmptyFrames()在处理输入帧之后,它将使用System_putLinksEmptyFrames()释放输入帧,

Thus a linkneeds to know因此链路需要知道

Previous link ID and Previous Link QueID to get input frames上一个链接ID和上一个链接Que ID以获取输入帧

And Next Link ID, in order to informthe next link when new frames are generated.和下一链路ID,以便在生成新帧时通知下一链路。

Thisinformation of previous link ID and next link ID is passed to a link using theSystem_linkCreate() API.使用System_linkCreate()API将上一个链接ID和下一个链接ID的信息传递到链接。

Thus previouslink ID and next link ID is what “connects” one link to another link.因此,先前链路ID和下一链路ID是将一个链路“连接”到另一链路。

3.3.7     IPC Link

称为IPC(处理器间通信)链路的特殊链路用于跨越处理器交换帧。

Example, A local processor link likecapture will exchange frames with the IPC Link and the IPC Link will turn makeuse of use of appropriate Syslink/IPC APIs to send the received frames acrossprocessors.例如,像捕获的本地处理器链路将与IPC链路交换帧,并且IPC链路将利用适当的Syslink / IPC API来发送在处理器之间接收的帧。

Thus a capture link can be implemented asif it will only talk to a link on the same processor.因此,捕获链路可以被实现为好像它将仅与相同处理器上的链路通话。 This will keep the implementation of the capture link simple andefficient.这将保持捕获链路的实现简单和有效。

The special IPC link will handle thecomplexity of sending frames between processors and it will take care of anycache operations or other such inter processor synchronization functions.特殊的IPC链接将处理在处理器之间发送帧的复杂性,并且它将负责任何高速缓存操作或其它这样的处理器间同步功能。

The inter link frame exchange mechanismsthat are used, depend on where the links are located in order to reduce interlink frame exchange overheads.所使用的链路帧交换机制取决于链路所在的位置,以便减少链路帧间交换开销。

The following three inter link frameexchange mechanisms are used使用以下三个链路帧交换机制

Intra-processor links 帧内处理器links

o Example, from capture to noise filterwhich run on the same processor.实例,从捕捉到噪声滤波器在相同的处理器上运行。

Simple and efficient array based queue'sare used for frame exchange.简单和高效的基于阵列的队列用于帧交换。

Inter M3 (Video / VPSS) links 内部M3(视频/ VPSS)link

o Example from NF to encode (via IPC M3OUT/IN Link) which run on VPSS M3 and Video M3 (sharing a uni-cache).例如从NF到编码(通过IPC M3 OUT / IN连接),这对VPSS M3和M3视频(共用一个单缓存)上运行。

IPC ListMP with Notify is used with frameinformation pointer (FVID2_Frame) being passed directly without any cacheoperations and address translation since both M3 share the same uni-cache.具有Notify的IPC ListMP与帧信息指针(FVID2_Frame)一起被直接传递而没有任何高速缓存操作和地址转换,因为两个M3共享相同的单一高速缓存。

Inter processor (M3 to A8 or DSP) 内部处理器(M3至A8或DSP)

o Example from encode to Bitstream IN (viaIPC OUT/IN Link) which run on Video M3 and Host A8. 例如,从编码到比特流(通过IPC OUT / IN连接),这对视频M3和主机A8运行。

IPC ListMP with Notify is used with frameinformation being passed with address and information translation includingcache operations, if applicable带有通知的IPC ListMP用于通过地址和信息转换传递的帧信息,包括高速缓存操作(如果适用)

3.3.8  框架结构

Linksexchange frames.链接交换帧。 The frame buffers (video data) can be sent across processors forprocessing using these frames.可以在处理器之间发送帧缓冲器(视频数据)以便使用这些帧进行处理。

TheFVID2 header has sufficient information that can be used to in transportationof frame buffers. FVID2头具有足够的信息,可用于帧缓冲区的传输。

FVID2header has many parameters but as an application writer its important to understandfollowing ones FVID2头有许多参数,但作为应用程序编写者,了解以下的重要

channelNum- Identifies channel channelNum - 标识通道

Addr[][]- Pointer to the frame buffer Addr [] [] - 指向帧缓冲区的指针

perFrameCfg- Information about frame configuration perFrameCfg - 有关帧配置的信息

AppData -Application data can be plugged in here, currently it has systemInformation AppData - 应用程序数据可以在这里插入,目前它有systemInformation

3.4  链

NOTE:Most users don’t need to know lowlevel details of how to make chains since McFW API hides this detail from theuser, but its useful to know how the software operates internally in order toget the most out of the system.

注:大多数用户并不需要知道如何自McFW API隐藏从用户这一细节做出链底层的细节,但其有用知道软件如何才能最有效地系统的内部操作。

A chain is connection of links in alogical order to make a video processing data flow.链是以逻辑顺序连接链路以产生视频处理数据流。A chain is constructed using Link APIs.链使用Link API构建。

Differentchains can be constructed for different applications.可以为不同的应用构建不同的链。Chains can be “destroyed” and then reconstructed in a different wayswithout needing a reboot.链可以“销毁”,然后以不同的方式重建,而不需要重新启动。

McFW API根据用户传递的顶层系统配置构造一些预定义的链。

3.4.1  链执行顺序

链执行按以下顺序执行。

A chain createsthe links using System_linkCreate() API.链使用System_linkCreate()API创建链接。Links MUST be created in the order ofsource link to sink link.链路必须按源链路到宿链路的顺序创建。

A source is a link which has no previous link.源是没有先前链接的链接。Example, Capture示例,捕获

A sink is a link which has no next link.宿是没有下一个链路的链路。Example, Display示例,显示

The order ofcreating a link is important since when a link is created it queries itsprevious link to get information about the expected number of channels andchannel properties, based on a which a link will configure itself.创建链接的顺序很重要,因为当链接被创建时,它基于链接将对其自身进行配置来查询其先前的链接以获得关于预期的信道数量和信道属性的信息。Hence a “previous” link needs tocreated before the “next” link因此,需要在“下一个”链接之前创建“先前”链接

Next the chainis started by calling System_linkStart() for each link in the chain.接下来,通过为链中的每个链接调用System_linkStart()来启动链。The links are started in theorder of sink link to source link.链路按照宿链路到源链路的顺序开始。This is not a hard requirementbut is usually desired in the application, since this allows all links to getready to receive input before the source link itself is started.这不是硬要求,但通常在应用程序中是需要的,因为这允许所有链路在源链路本身启动之前准备好接收输入。

Once a chain isrunning control commands can be sent to individual links to control the dataflow.一旦链运行,控制命令可以发送到各个链路以控制数据流。System_linkControl() API is used tosend control commands.System_linkControl()API用于发送控制命令。Example, command to SW Mosaic Link tochang Mosaic layout at run-time.示例,SW图案镶嵌的命令链接到运行时的图案镶嵌布局。

The control commands that aresupported depend on the type of link.支持的控制命令取决于链路的类型。

NOTE,depending on the link System_linkControl() can be called even before callingSystem_linkCreate().注意,根据链接,System_linkControl()甚至可以在调用System_linkCreate()之前调用。

After the useris done with a chain he can stop it by calling System_linkStop() API for eachlink of the chain.在用户完成链后,他可以通过为链的每个链接调用System_linkStop()API来停止它。A chains MUST be stopped in the orderof source to sink.一个链必须按源到sink的顺序停止。

A link can wait on a output buffer which could be held by the nextlink.链路可以等待可以由下一链路保持的输出缓冲器。If the next link is stopped before aprevious link is stopped, then the previous could wait for ever on a bufferwhich never arrives since the next link is no longer active.如果下一链接在前一链接停止之前停止,则先前可以在从未到达的缓冲器上等待,因为下一链接不再活动。Hence a previous link MUST be stoppedbefore stopping the next link.因此,在停止下一链路之前必须停止先前的链路。

Finally after achain is stopped, it can be destroyed by calling最后一个链停止后,它可以通过调用销毁

System_linkDelete()API on each link in the chain.在链中的每个链接上的System_linkDelete()API。Link delete can be called in any orderon the links.链接删除可以在链接上以任何顺序调用。

删除链后,可以使用相同的序列创建和启动新链。

3.4.2  链示例代码

多通道捕获到SW嵌合体到显示链的示例代码如下所示。Some details are left out for clarity.为了清楚起见,省略了一些细节。

数据流

16CH 720x240 YUV422I 60fps

1CH 1920x1080 YUV422I 60fps (1080p60)

4x4 Mosaic Layout

链接包含文件

#include <ti/vsi/interfaces/system.h>

#include <ti/vsi/interfaces/captureLink.h>

#include <ti/vsi/interfaces/displayLink.h>

#include <ti/vsi/interfaces/swMsLink.h>

#include <ti/vsi/interfaces/systemLink_m3vpss.h>

链接创建参数结构

CaptureLink_CreateParams    capturePrm;

SwMsLink_CreateParams       swMsPrm;

DisplayLink_CreateParams    displayPrm;

Setup Capture link parameters

capturePrm.tilerEnable = FALSE; // 不使用 tiler内存输出

capturePrm.numVipInst = 4; // 使用4个视频端口

// 捕获链接后的下一个链接是SW Mosaic DEI 链接

capturePrm.outQueParams[0].nextLink = SYSTEM_LINK_ID_SW_MS_DEI_0;

// 为每个视频捕获端口配置

for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++) {    // 设置捕获端口 ID

capturePrm.vipInst[vipInstId].vipInstId =

SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId;

// 设置捕获外部设备 ID

capturePrm.vipInst[vipInstId].videoDecoderId     =

SYSTEM_DEVICE_VID_DEC_TVP5158_DRV;

//设置输入数据格式为16-bit YUV422    capturePrm.vipInst[vipInstId].inDataFormat =

SYSTEM_DF_YUV422P;

// 设置捕获视频标准为4路D1 multiplxed 捕获 (每端口)     capturePrm.vipInst[vipInstId].standard =

SYSTEM_STD_MUX_4CH_D1;

// 每通道输出端口数量为一

capturePrm.vipInst[vipInstId].numOutput =  1;

//输出数据格式是YUV422I      capturePrm.vipInst[vipInstId].outParams[0].dataFormat =                   SYSTEM_DF_YUV422I_YUYV

// inline scaling disabled since this is multi-channel capture       capturePrm.vipInst[vipInstId].outParams[0].scEnable = FALSE;

// 所有通道映射到输出队列 ID = 0

capturePrm.vipInst[vipInstId].outParams[0].outQueId = 0; }

设置 SW Mosaic 链接参数

// 一个链接是捕捉, 一个链接 que ID = 0

swMsPrm.inQueParams.prevLinkId = SYSTEM_LINK_ID_CAPTURE; swMsPrm.inQueParams.prevLinkQueId = 0;

// 下一个链接是显示

swMsPrm.outQueParams.nextLink     = SYSTEM_LINK_ID_DISPLAY_1;

// SW Mosaic 调用周期是 16ms or 60fps

swMsPrm.timerPeriod               = 16;

// 初始布局是,显示贞大小为 1080p60

swMsPrm.layoutPrm.outLayoutMode = SYSTEM_LAYOUT_MODE_16CH; swMsPrm.layoutPrm.outRes = SYSTEM_DISPLAY_RES_1080P60;

// CHx mapped to WINx. 最大 16 windows possible in 4x4 layout.

for(winId=0; winId<16; winId++)

swMsPrm.layoutPrm.win2ChMap[winId] = winId;

设置显示链接参数

// 一个链接是 SW Mosaic 链接, 一个链接 que ID = 0

displayPrm.inQueParams.prevLinkId    = SYSTEM_LINK_ID_SW_MS_DEI_0; displayPrm.inQueParams.prevLinkQueId = 0;

// display resolution is same as SW Mosaic link output frame size, 1080p60 displayPrm.displayRes                = swMsPrm.layoutPrm.outRes;

初始化显示控制器 –这是必需的,以便使显示。There is no separate display controller link. 没有单独的显示控制器链接。Instead a command is sent to the generic VPSS Link which in turn calls the display controller API on the VPSS M3 processor. 相反,命令被发送到通用VPSS链路,其又调用VPSS M3处理器上的显示控制器API。

SystemVpss_DisplayCtrlInitParam prm;

// 显示控制器分辨率和显示器链接一样

prm.hdDisplayRes = displayPrm.displayRes;

//发送命令到VPSS M3 link 来初始化显示控制器

System_linkControl(

SYSTEM_LINK_ID_M3VPSS,

SYSTEM_M3VPSS_CMD_GET_DISPLAYCTRL_INIT,

&prm,            sizeof(prm),

TRUE

);

创建链接

// 按照源的顺序创建sink

System_linkCreate (SYSTEM_LINK_ID_CAPTURE, &capturePrm, sizeof(capturePrm));

System_linkCreate(SYSTEM_LINK_ID_SW_MS_DEI_0, &swMsPrm, sizeof(swMsPrm));

System_linkCreate(SYSTEM_LINK_ID_DISPLAY_1, &displayPrm, sizeof(displayPrm));

启动链接

// start in the order of sink to source

System_linkStart(SYSTEM_LINK_ID_DISPLAY_1);

System_linkStart(SYSTEM_LINK_ID_SW_MS_DEI_0);

System_linkStart(SYSTEM_LINK_ID_CAPTURE);

运行时控制链接

while(1)

{

//   sleep few seconds     sleep(10);

//  改变mosaic 布局, 保持其他布局参数和初始化时刻的一样

swMsPrm.layoutPrm.outLayoutMode = SYSTEM_LAYOUT_MODE_7CH_PLUS_1CH;    System_linkControl(

SYSTEM_LINK_ID_SW_MS_DEI_0,

SYSTEM_SW_MS_LINK_CMD_SWITCH_LAYOUT,

&swMsPrm.layoutPrm,               sizeof(swMsPrm.layoutPrm),

TRUE

);

// 检查链是否按照用户输入的做

if(userIsDone())        break;

}

停止链接

// 按源到sink的顺序停止

System_linkStop(SYSTEM_LINK_ID_CAPTURE);

System_linkStop(SYSTEM_LINK_ID_SW_MS_DEI_0);

System_linkStop(SYSTEM_LINK_ID_DISPLAY_1);

删除链接

// 任何顺序都可以

System_linkDelete(SYSTEM_LINK_ID_CAPTURE);

System_linkDelete(SYSTEM_LINK_ID_SW_MS_DEI_0);

System_linkDelete(SYSTEM_LINK_ID_DISPLAY_1);

销毁显示器控制

//发送命令到VPSS M3链接以初始化显示控制器。No parameters are passed for de-init没有传递参数用于de-init

System_linkControl(

SYSTEM_LINK_ID_M3VPSS,

SYSTEM_M3VPSS_CMD_GET_DISPLAYCTRL_DEINIT,

NULL,

0,

TRUE

);

4  目录结构

4.1  接口文件

McFW的接口文件可以在以下位置找到。所有的接口API都可以从Host A8端调用。

Interface files base path

ipnc_rdk\mcfw\interfaces

McFW API - Interface files ipnc_rdk\mcfw\interfaces

ti_vcap.h

视频捕捉子系统接口

ti_vcam.h

摄像机 (ISP) 子系统接口

ti_vdec.h

视频解码子系统接口

ti_vdis.h

视频显示子系统接口

ti_vdis_timings.h

视频显示子系统接口

(timings)

ti_venc.h

视频编码子系统接口

ti_mjpeg.h

基于SIMCOP的视频编码(MJPEG)

子系统接口

ti_vsys.h

系统配置接口

ti_media_common_def.h

公共数据结构定义

ti_media_error_def.h

错误定义

ti_media_std.h

数据类型

Link API - Interface files

ipnc_rdk\mcfw\interfaces\link_api

system.h

Common Link APIs and 数据结构

system_common.h

系统级const,数据结构,所有处理器共用的函数。 User does not use the const 's, function's, data structure defined in this file directly用户不使用常量的,函数,数据结构,在这个文件中定义的直接

system_const.h

常见的全系统的常量和枚举的。用户可以使用const,在链接API中的此文件中定义

system_debug.h

定义的控制调试信息的打印。如果修改这需要重建BIOS和linux端代码以使更改生效。

system_linkId.h

32位链接ID,proc ID和其他实用程序宏来操作链接ID

system_tiler.h

APIs to allocate memory from Tiler region

systemLink_common.h

系统链接API,它在所有从处理器的常见

(VPSS M4, Video M3, DSP) (VPSS M4,Video M3,DSP)

systemLink_m3video.h

System Link API specific to Video M3 processor

systemLink_m3vpss.h

System Link API specific to VPSS M3 processor

systemLink_c6xdsp.h

System Link API specific to C64x processor

captureLink.h

视频捕获 Link API

sclrLink.h

HDVPSS Scalar Link API

ispLink.h

ISP Memory to memory Link API

glbceLink.h

GLBCE Link API

avsync.h

音频视频同步 Link API

algLink.h

算法 Link API

cameraLink.h

图像捕获 (ISS) API Link

decLink.h

视频解码 (H264) Link API

deiLink.h

Deinterlacer Link API

displayLink.h

显示 Link API

dupLink.h

帧复制器 Link API

encLink.h

视频编码 (H264) Link API

grpxLink.h

图形 Link API

ipcLink.h

IPC (内部处理器间的通信) Link API

mergeLink.h

框架合并 Link API

vaLink.h

视频分析 (C64x) Link API

swosdLink.h

软件 OSD Link API

swMsLink.h

软件 mosaic Link API

mjpegLink.h

MJPEG 编码 (SIMCOP) API Link

nsfLink.h

噪声滤波器 Link API

vnfLink.h

视频噪声滤波器 (SIMCOP) API Link

fdLink.h

面部检测引擎 Link

osdLink.h

OSD link

nullLink.h

Dummy / Null sink Link API

nullSrcLink.h

Dummy / Null source Link API

swMsLink.h

Software Mosaic Link API

vidbitstream.h

视频比特流的数据结构.不被用户直接使用.

4.2  模板示例代码

McFW API Examples

ipnc_rdk\ipnc_mcfw\demos\mcfw_api_demos

多demos展示McFW APIs的用法

ipnc_rdk\ipnc_mcfw\demos\ mcfw_api_demos\stream

连接到RTSP流栈和音频/视频流服务器的链路

ipnc_rdk\ipnc_mcfw\demos\ mcfw_api_demos\itt

图像调整工具服务器线程. 此线程侦听TCP端口上的ITT连接,并协调客户端CMD/DATA发送和接收

ipnc_rdk\ipnc_mcfw\demos\audio_sample

视频捕捉 / 回放示例代码

4.3  库

McFW API Examples

ipnc_rdk\demos\mcfw_api_demos

多demos展示McFW APIs的用法

5  额外细节

5.1    内部处理器通信详细信息

5.2    内存映射详细信息

请参阅随发行版提供的IPNC_RDK_MemoryMapAnalysis.pdf

The memorymap of the complete IPNC RDK software is controlled in the following files:完整的IPNC RDK软件的存储器映射在以下文件中进行控制:

ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\cfg\config_512M.bld ipnc_rdk \ ipnc_mcfw \ mcfw \ src_bios6 \cfg \ config_512M.bld

To modify thememory map, user needs to modify the above mentioned files, but the followingkey considerations are required:要修改内存映射,用户需要修改上述文件,但需要以下关键注意事项:

§  Code section of Video and VPSS M3 has to lie in the top256MB of the available memory map视频和VPSS M3的代码段必须位于可用内存映射的顶部256MB

§  A section of minimum 2MB need to be reserved forSyslink-Notify support in linux kernel.在Linux内核中,需要为Syslink-Notify支持保留一个最小2MB的段。 Linux kernel uses this memory to communicate with VPSS M3 in IPNCRDK. Linux内核使用此内存与IPNC RDK中的VPSS M3通信。 Any change in address for this section requires an update ofbootargs for “ notifyk.vpssm3_sva ” boot parameter在地址段中的任何改变都需要bootargs的更新“notifyk.vpssm3_sva”启动参数

§  A section of minimum 2MB is required to be reserved forFBDev buffer for IPNC RDK.对于IPNC RDK,需要为FBDev缓冲区保留最小2MB的段。 Any change in the buffer base address need to be updated in thefollowing line in ipnc_rdk \ ipnc_mcfw \bin\ load.sh o insmod./kermod/vpss.ko omx=1 sbufaddr= 0xbfb00000在缓冲区基址需要的任何变化在以下行ipnc_rdk\ ipnc_mcfw\ BIN \ load.sh

§  Insmod./kermod/vpss.ko OMX = 1 sbufaddr = 0xbfb00000更新

§  A section of 1MB is required for remote debug prints tobe shared across all cores.要在所有内核之间共享远程调试打印,需要1MB的部分。 In current system, A8 utility continuously reads the shared memoryand dumps the debug messages on A8.在当前系统中,A8实用程序连续读取共享内存,并在A8上转储调试消息。 Any change to this address need a change in the following line in对此地址的任何更改都需要更改以下行

ipnc_rdk\ipnc_mcfw\bin\scripts\wait_cmd.sh,ipnc_rdk\ipnc_mcfw\bin\scripts\send_cmd.sh and ipnc_rdk\ipnc_mcfw\bin\scripts\send_str.sh

o../bin/remote_debug_client.out0xbff00000 --waitch $1 $2

5.3   显示控制器和显示功能详细信息

5.3.1  静态改变显示分辨率

MCFW支持在静态时改变VGA显示的显示分辨率。Following VESA resolutions aretested on display VGA, ON-chip HDMI, OFF-chip HDMI.以下VESA分辨率在显示VGA,片上HDMI,关闭芯片HDMI上测试。

1080P60 (1920 * 1080) 1080P60(1920 * 1080)

720P (1280 * 720) 720P(1280* 720)

XGA (1024 * 768) XGA(1024* 768)

SXGA (1280 * 1024) SXGA(1280* 1024)

By default, for ti812x HDMIand DVO2 are tied together .默认情况下,ti812x HDMI和DVO2捆绑在一起 。Itmeans when these VENCs are configured same resolution must be passed to DVO2and HDCOMP.这意味着当这些VENC配置相同时,必须将分辨率传递给DVO2和HDCOMP。Also, same content will be displayed onboth outputs.此外,相同的内容将显示在两个输出上。Regarding clocks, VENC 'D' clock drivesHDMI (on chip HDMI) and VENC 'A' clock drives DVO2 and HDCOMP.关于时钟,VENC'D'时钟驱动HDMI(片上HDMI),VENC'A'时钟驱动DVO2和HDCOMP。Thereis no change regarding SD VENC and SD VENC clock.关于SD VENC和SD VENC时钟没有变化。

If DisplayController configuration needs to be changed it can be done by modifying defaultconfiguration set for gSystem_dctrlTriDisplayConfig in system_dctrl_ti814x.c Tounderstand the mesh of components in display controller please referHDVPSS_UserGuide.pdf in hdvpss package, UserGuideHdvpssDisplayDriver section.如果显示控制器配置需要改变它可以通过在system_dctrl_ti814x.c修改默认配置集为gSystem_dctrlTriDisplayConfig要理解部件的网眼中显示控制器请参照hdvpss包,UserGuideHdvpssDisplayDriver部 HDVPSS_UserGuide.pdf来完成

5.4  IPNC 应用程序配置

IPNC RDK适用于DM8127和DM385 soc平台。主要有四种用例配置可供用户选择,如下所示:

1.   Tri-stream 低功耗模式

2.   Tri-stream 全功能模式

3.   捕获显示模式

除了上述四个选项之外,还向用户提供了用于选择诸如TILER模式的一些高级选项的灵活性。In this section we discussdetails of the above configurability options and the steps for configuration.在本节中,我们将讨论上述可配置性选项的详细信息和配置步骤。

还请注意,DM38x不支持C64x,并且具有比DM812x更低的DDR带宽。From usecaseperspective the VA and C64x related data flows will not apply to DM38x versionof RDK.从使用者角度来看,VA和C64x相关数据流将不适用于DM38x版本的RDK。

5.4.1  平台选择

用户需要在编译IPNC RDK之前定义目标平台。 Currently supported options are:当前支持的选项有:

IPNC_DEVICE:= DM385, DM388 or DMVA3 IPNC_DEVICE:= DM385,DM388或DMVA3

IPNC_DEVICE:= DM812x IPNC_DEVICE:= DM812x

Pleasecomment off the platform which is not targeted. 请注释掉没有定位的平台。

5.4.2  三流低功率

IPNC三流低功耗应用程序已配置为演示具有最低功耗配置的三流配置(1080p 60fps + D1 30fps + MJPEG 5fps)。实现低功耗DSS和DSP已关闭。这意味着功能,如额外的标量; dsp框架,hd-vpss视频噪声过滤器,hdmi视频输出等将不可用。

For selecting low power configurationfollow the following steps:对于选择低功耗配置,请按照以下步骤操作:

OpenRules.makefile and make the following changeRules.make中打开文件,并进行以下更改

IPNC_CONFIG := LOW_POWERIPNC_CONFIG:= LOW_POWER

Run'make all'command to regenerate the binaries运行“make all”命令来重新生成二进制文件

5.4.3  三流全功能

IPNC三流全功能应用在标准低功耗配置中增加了视频噪声滤波器和面部检测功能。 HDMI & SD Display are also available in full featureconfiguration mode. HDMI和SD显示也可在全功能配置模式下使用。

To enable full-feature configuration usermust follow the following procedure:要启用全功能配置,用户必须遵循以下过程:

OpenRules.makefile and make IPNC_CONFIG := FULL_FEATURERules.make中打开文件并进行IPNC_CONFIG:=FULL_FEATURE

Run'make all'command to regenerate the binaries运行“make all”命令来重新生成二进制文件

5.4.4   全功能NF 选择

IPNC三流全功能应用程序实现两个噪声滤波器路径。 First path uses the 3D noise filter from the DSS subsystem and thesecond path uses the ISS NSF2+TNF implementation in the SIMCOP.第一路径使用来自DSS子系统的3D噪声滤波器,第二路径使用SIMCOP中的ISS NSF2 + TNF实现。 The user can do the noise filter selection using the followingcompile time switch:用户可以使用以下编译时开关进行噪声滤波器选择:

Select'VNF MODE'menu item from Camera Page.选择摄像机Page“VNF MODE”菜单项。

HIGH SPEED will choose DSS VNF and HIGHQUALITY will choose ISS VNF.HIGH SPEED将选择DSS VNF,HIGH QUALITY将选择ISS VNF。If DM388, HIGH QUALITY willchoose MCTNF如果DM388,HIGH QUALITY将选择MCTNF

5.4.5  智能分析或视频分析模式

IPNC三流完整功能usecase实现Smart Analytics示例。 To enable Smart Analyticsexample user must follow the following procedure:要启用SmartAnalytics示例用户,必须遵循以下过程:

1.Select'SMART ANALYTICS'menu item from Example drop down menus.从实例“智能分析”菜单项下拉菜单。

2.Once the application is restartedSmart Analytics links appears on left side panel.应用程序重新启动后,Smart Analytics链接将显示在左侧面板上。

 

5.4.6  捕获显示模式

IPNC用户程序集实现一个例子,只做传感器捕获,YUV转换和显示。 This is an important examplebecause it allows users to use a simple application for testing image qualitybefore encode and also helps during sensor bringups.这是一个重要的例子,因为它允许用户使用一个简单的应用程序在编码之前测试图像质量,也有助于在传感器提出。

To switch on capture-display example chain,user must follow the following steps:要打开capture-display示例链,用户必须按照以下步骤操作:

1.OpenRules.makefile and make CAPTURE_DISPLAY_MODE_ON := YESRules.make中打开文件并进行CAPTURE_DISPLAY_MODE_ON:= YES

2.Run'make all'command to regenerate the binaries运行“make all”命令来重新生成二进制文件

5.4.7  将RAW或YUV发送到A8

在捕获显示模式下,用户还可以选择将在ISS中捕获的RAW或YUV帧发送到A8,这允许在A8上运行的应用程序将图像帧保存在文件系统中或通过网络发送它们,以进行任何调试和调整目的。 It also shows an example of IPCcommunications between M3 and A8 for sharing frame buffers.它还示出了用于共享帧缓冲器的M3和A8之间的IPC通信的示例。

Toconfigure this option in Rules.make:要在Rules.make中配置此选项:

1.SetFRAMES_TO_A8 to YUV, YUV frames of the secondary stream will do a round tripM3-A8-M3 to reach the SD display.将FRAMES_TO_A8设置为YUV,辅助流的YUV帧将进行往返M3-A8-M3以到达SD显示。

2.SetFRAMES_TO_A8 to RAW, RAW frames will be sent to A8 and then back to M3 beforegetting converted to YUV.将FRAMES_TO_A8设置为RAW,RAW帧将发送到A8,然后返回到M3,然后再转换为YUV。

3.SetFRAMES_TO_A8 to NO, which is the default option, will disable the above IPCframe exchange.将FRAMES_TO_A8设置为NO(默认选项)将禁用上述IPC帧交换。

Thisoption only applies in the capture display mode.此选项仅适用于捕获显示模式。 When YUV or RAW frames exchange isswitched on, the sensor output frame rate is configured to 30fps.当YUV或RAW帧交换打开时,传感器输出帧速率配置为30fps

5.4.8        256MB 内存映射

IPNC RDK还支持256MB内存映射作为缩减内存示例:

Open Rules.make file andmake MEMORY_CONFIG := 256MB 1.Rules.make中打开文件并进行MEMORY_CONFIG:=256MB

Run ' make all 'command to regenerate the binaries 2.运行“make all”命令来重新生成二进制文件

5.4.9     TILER 模式

IPNC RDK支持TILER模式,用户可以评估TILER模式功能以及DDR使用效率的相关改进。 Currently TILER mode is limited to Low Power configuration only.当前TILER模式仅限于低功率配置。 For selecting the TILERmode:选择TILER模式:

1.OpenRules.makefile and make IPNC_TILER_ENABLE := YESRules.make中打开文件并进行IPNC_TILER_ENABLE:= YES

CAMERA_TILER_ENABLE := YESCAMERA_TILER_ENABLE:= YES

BTE_ENABLE := YESBTE_ENABLE:= YES

2.Run'make all'command to regenerate the binaries Note: 运行“make all”命令来重新生成二进制文件注意:

In this release TILER mode is enabled onlyfor low power mode.在此版本中,TILER模式仅在低功耗模式下使能。

IPNC LowPower Demo Tristream1080p60fps + D1@30fps +MJPEG@5fps

IPNC FullFeature Demo 1080p60fps + D1@30fps + MJPEG@5fps +ISS/DSSVNF + FD(face-detect) +VA

IPNC FullFeature Demo 1080p60fps+ D1@30fps + MJPEG@5fps +

MCTNF + FD(face-detect) +VA

IPNC CaptureDisplay Demo

5.5  智能/视频分析

智能/视频分析(VA)算法检测和跟踪视频流中的对象。支持的基本VA算法是Trip Zone,摄像机篡改检测和对象计数。VA算法在C647 DSP上运行。当VA事件发生时,事件是SWOS显示的,并且还由Web GUI指示。

5.6  视频帧缓冲接口

IPNC RDK还提供访问视频帧缓冲区的接口,可以是RAW或YUV帧。

McFWprovides the following APIs for interacting with video frame buffers McFW提供以下API用于与视频帧缓冲区交互

Receivingframe buffers:接收帧缓冲区:

Vcam_getFullVideoFrames Vcam_getFullVideoFrames API to get captured RAW/YUV frames from the front end (camera) - API来获得拍摄的RAW / YUV从前端帧(相机)

Vcam_putEmptyVideoFrames Vcam_putEmptyVideoFrames– - - API to free RAW/YUV frame buffers consumed bythe application API来释放应用程序所消耗的RAW / YUV帧缓冲区

Sendingframe buffers:发送帧缓冲区:

Vdis_putFullVideoFrames Vdis_putFullVideoFrames API to send RAW/YUV frames to the back end -API发送RAW / YUV帧发送到后端

(display) (显示)

Vdis_getEmptyVideoFrames Vdis_getEmptyVideoFrames– - - API to take back RAW/YUV frame buffersconsumed by McFW API以收回McFW使用的RAW / YUV帧缓冲区

The keydata structure having the frame buffer info is:具有帧缓冲区信息的关键数据结构是:

VIDEO_FRAMEBUF_LIST_S . VIDEO_FRAMEBUF_LIST_S。

Definedin ipnc_rdk/mcfw/interfaces/ti_media_common_def.h as typedef struct {在ipnc_rdk / mcfw / interfaces / ti_media_common_def.h中定义为typedef struct {

UInt32 numFrames; UInt32 numFrames;

VIDEO_FRAMEBUF_S frames[VIDEO_FRAMEBUF_MAX]; VIDEO_FRAMEBUF_S frames[VIDEO_FRAMEBUF_MAX];

} VIDEO_ FRAMEBUF_LIST_S; } VIDEO_ FRAMEBUF_LIST_S;

TheVIDEO_ FRAMEBUF_LIST_S structure has the following members: VIDEO_ FRAMEBUF_LIST_S结构具有以下成员:

numBufs :Indicates the number of valid entries in the frames array (details follow) numBufs:表示frames数组中的有效条目数(详细信息如下)

Thisnumber should be <= VIDEO_FRAMEBUF_MAX此数字应为<=VIDEO_FRAMEBUF_MAX

frames:Array of VIDEO_FRAMEBUF_S structures frames:VIDEO_FRAMEBUF_S结构的数组

Eachelement in this array represents _one_ RAW/YUV frame from aparticular channel此数组中的每个元素都代表一个特定的频道_one_ RAW / YUV框架

TheVIDEO_FRAMEBUF_S has the following members:VIDEO_FRAMEBUF_S具有以下成员:

addr:Buffer start address for each field/plan of the frame buffer. addr:帧缓冲区的每个字段/计划的缓冲区起始地址。This is the user space virtual address.这是用户空间虚拟地址。The application should use this address if it wants to access theframe buffer via CPU (eg: memcpy)如果应用程序想要通过CPU访问帧缓冲区(例如:memcpy),则应使用此地址。

phyAddr:Physical address of start for each field/plan of the frame buffer. phyAddr:帧缓冲区的每个字段/计划的开始的物理地址。Can be used for EDMA APIs可用于EDMA API

channelNum:Channel ID. channelNum:通道ID。Should be from 0 to VCAM_STRM_MAX-1应该从0到VCAM_STRM_MAX-1

timestamp:Timestamp associated with the frame. timestamp:与帧相关联的时间戳。

fid:Indentifies whether this is a top field/bottom field/frame. fid:标识这是顶场还是底场/帧。

0: Evenfield or Frame based, 1: Odd Field – frameWidth: Width of the frame in pixels. 0:偶场或基于帧,1:奇数场- frameWidth:以像素为单位帧的宽度。

frameHeight:Height of the frame in lines. frameHeight:行的高度。

framePitch:Stride for each plan of the frame. framePitch:帧的每个计划的步幅。

Frame Receive Operation帧接收操作

In orderto receive notifications about available RAW/YUV frames on the Linux side, theuser application needs to call the below function:为了在Linux端接收关于可用RAW / YUV帧的通知,用户应用程序需要调用以下函数:

Int32 Vcam_ registerCallback(VCAM_CALLBACK_S * callback, Ptr arg) – Create time API toregister application callback. INT32 Vcam_ registerCallback(VCAM_CALLBACK_S *回调,PTR ARG) -创建时间API来注册应用程序的回调。

The callback will be invoked each time whennew frame buffers are available.每当新的帧缓冲区可用时,将调用回调。

The application can use the callback tosynchronize invocation of the Vcam_getFullVideoFrames应用程序可以使用回调同步Vcam_getFullVideoFrames的调用API. API。

The usageof above functions is demonstrated in the capture display use case withFRAMES_TO_A8 option enabled.在启用FRAMES_TO_A8选项的捕获显示用例中演示了上述函数的用法。 One taskis created and waits for the notification from VCAM of the available RAW/YUVframes, then it takes these buffers from VCAM and eventually send them to VDISfor consummation.创建一个任务,并等待来自VCAM的可用RAW / YUV帧的通知,然后从VCAM获取这些缓冲区,并最终将它们发送到VDIS以完成。 At the same time it takes consumedframes from VDIS and releases them back to VCAM.同时,它从VDIS消耗帧并将其释放回VCAM。

Pleaserefer to the source code in ti_mcfw_ipcframes.c for more implementationdetails.有关更多实现详细信息,请参阅ti_mcfw_ipcframes.c中的源代码。

IPNC_RDK_McFW_UserGuide相关推荐

  1. Delaunay三角剖分----OpenCV

    转自:https://blog.csdn.net/newthinker_wei/article/details/45598769 相关文章:OpenCV三角剖分的遍历和纹理映射:http://blog ...

  2. 图像识别DM8127开发攻略 ——RDK软件架构浅析及编译

    上上一篇文章<图像识别DM8127开发攻略--开发环境搭建>介绍了DM8127的开发环境搭建,那么本篇开始描述整个IPNC RDK的架构,如果这个IPNC RDK都不熟悉,后面的移植工作基 ...

  3. OpenCV——Delaunay三角剖分(C++实现)

    最近做三角剖分发现了一篇很好的博客,其中的代码都可以实现,特在此分享给大家,希望可以一起学习,有问题共同探讨. ---------转载源--------- ---------------------- ...

  4. OpenCV——Delaunay三角剖分

    转载请注明:http://blog.csdn.net/raby_gyl/article/details/17409717 相关文章:OpenCV三角剖分的遍历和纹理映射:http://blog.csd ...

  5. OpenCV——Delaunay三角剖分 [转载]

    本博客转载自 http://blog.csdn.net/raby_gyl/article/details/17409717 请其他同学转载时注明原始文章的出处! Delaunay三角剖分是1934年发 ...

  6. 三角剖分与Delaunay三角剖分

    本博客转载自 http://blog.csdn.net/raby_gyl/article/details/17409717 请其他同学转载时注明原始文章的出处! Delaunay三角剖分是1934年发 ...

  7. Delaunay三角化

    点集的三角剖分(Triangulation),对数值分析(比如有限元分析)以及图形学来说,都是极为重要的一项预处理技术. 尤其是Delaunay三角剖分,由于其独特性,关于点集的很多种几何图都和Del ...

最新文章

  1. WebSocket在容器化管理平台的应用
  2. 获取屏幕的宽和高-Display中getHeight()和getWidth() 官方废弃
  3. python网络通信协议_Python网络概述:协议与体系结构的运用
  4. 从一个帖子看部分大学生的学习心态
  5. BZOJ2240 完全平方数
  6. 【渝粤题库】陕西师范大学202012 刑事诉讼法专论 作业
  7. DjangoORM字段介绍
  8. SharePoint 2013的REST编程基础
  9. UI设计不能忽略的字体设计素材
  10. MapReduce:Simplified Data Processing on Large Clusters(中文翻译2)
  11. 免费题库CISP,NISP,SCSA,SCSP,CISA,CISSP,CISP-PTE
  12. 网站短信验证码接口收费标准
  13. 【EDA】Mutisim基于Multisim的带通滤波器仿真设计实验
  14. 服务器配置Python环境全过程
  15. Hive性能调优实战 总结一
  16. 创新抗生素获FDA优先审评资格 治疗社区获得性肺炎
  17. IDEA SpringBoot引入外部jar并打包
  18. 通过UEFI禁用 BD PROCHOT
  19. Gym Atari环境预处理Wrapper解读
  20. python图像拼接_python实现两张图片拼接为一张图片并保存

热门文章

  1. 虚拟机创建Liunx分配了60G但在虚拟机只用了20G
  2. elisa标准曲线怎么做_ELISA标准曲线的绘制方法
  3. (三十一)unity shader之——————透明和半透明材质
  4. c语言模板类,C++类模板(Class Template)
  5. 随手一写就是一个侧滑关闭activity
  6. SpringBoot-心跳机制+redis实现网站实时在线人数统计
  7. CSS3地图动态实例(圆圈向外扩散)
  8. 视频内容转文字怎么转,让你学会3个简单方法
  9. Android--LayoutAnimation介绍
  10. matlab 正轴测图,正二轴测图的画法.ppt