Hi3516A开发--mpp业务分析
Hi3516A/Hi3516D SDK 安裝以及升級使用說明里有一項運行MPP業務:
1、vi /etc/exports 添加
/opt/mpp *(subtree_check,rw,no_root_squash,async)
$sudo /etc/init.d/nfs-kernel-server restart?
$sudo exportfs -a (最好每修改過/etc/exports后需要執行一次)
2、掛載mpp :
mount -t nfs -o nolock -o tcp -o rsize=32768,wsize=32768 192.168.2.155:/opt/mpp /mnt/mpp
自動掛載:
在/etc/init.d/rcS文件最后添加:
mount -t nfs -o nolock -o tcp -o rsize=32768,wsize=32768 192.168.2.155:/opt/mpp /mnt/mpp
3、卸載mpp:
umount /mnt/mpp
4、在單板linux系統下,進入mpp/ko目錄,加載KO
? ? cd mpp/ko? ? # default online
? ? ./load3516a -a -sensor mn34220 -osmem 64
? ? # vi_vpss offline
? ? ./load3516a -a -sensor mn34220 -osmem 64 -offline
5、進入各sample目錄下執行相應樣例程序(sample需要先在服務器上成功編譯過)
? ? cd mpp/sample/vio
? ? ./sample_vio 0 1
6、說明:
Running Descriptions of Sample Programs
? ?1) Sample program running depends on the media driver. Before running a sample demo program, execute the load3518 script in the mpp/ko_hi3518 to load a specified module.
? ?
? ?2) Note that the corresponding sensor library must be selected. The default sensor is Aptina AR0130. If you want to select other sensors, modify the Makefile.param file. For example, if you select Sony IMX104, you should modify the Makefile.param file as follows:
? ? #SENSOR_TYPE ?= SONY_IMX185_MIPI_1080P_30FPS
SENSOR_TYPE ?= PANASONIC_MN34220_SUBLVDS_1080P_30FPS
修改senor:
參看:hi3516a 中 online 與 offline 有什么區別 ?
VI 和VPSS 的協作模式分為以下2 種(模式切換由load 腳本參數控制,對應sys 模塊參數vi_vpss_online):
VI/VPSS 離線模式是指VI 進行時序解析后將圖像數據寫出到DDR,VPSS 從DDR 中載入VI 采集的數據進行圖像處理,是傳統Hi3518/Hi3520D 等芯片的VI/VPSS 的協作模式。
VI/VPSS 在線模式是指VI 進行時序解析后直接在芯片內部將數據傳遞到VPSS,中間無DDR 寫出的過程。在線模式可以省一定的帶寬和內存,降低端到端的延0時。需要注意的是,在線模式時,因為VI 不寫出數據到DDR,無法進行CoverEx、OverlayEx、Rotate、LDC 等操作,需要在VPSS 各通道寫出后再進行Rotate/LDC 等處理,而且有些功能只在離線下能支持,比如DIS.
?sample ? ? ? ? ? ?# MPP sample program
? ? |-- common ? ? ? # Common function used by the sample program
? ? |-- vio ? ? ? ? ?# Video input/output implementation demo
? ? |-- venc ? ? ? ? # Video encoding implementation demo
? ? |-- region ? ? ? # Region implementation demo
? ? |-- vda ? ? ? ? ?# Video detection analysis (VDA) implementation demo
? ? |-- audio ? ? ? ?# Audio implementation demo
? ? |-- hifb ? ? ? ? # Frame buffer (FB) implementation demo
? ? |-- tde ? ? ? ? ?# TDE implementation demo
? ? |-- ...... ? ?
二、mpp/ko目錄
ls mpp/ko/
acodec.ko ? ? ? ? ?hi3516a_adec.ko ?hi3516a_base.ko ? hi3516a_ive.ko ? ??
hi3516a_sys.ko ? hi3516a_viu.ko ? hi_mipi.ko ? ?load3516d
clkcfg_hi3516a.sh ?hi3516a_aenc.ko ?hi3516a_chnl.ko ? hi3516a_jpege.ko ??
hi3516a_tde.ko ? hi3516a_vou.ko ? hi_rtc.ko ? ? mmz.ko
clkcfg_hi3516d.sh ?hi3516a_ai.ko ? ?hi3516a_h264e.ko ?hi3516a_pm.ko ? ? ?
hi3516a_vda.ko ? hi3516a_vpss.ko ?hiuser.ko ? ? pinmux_hi3516a.sh
demo_config.sh ? ? hi3516a_aio.ko ? hi3516a_h265e.ko ?hi3516a_rc.ko ? ? ?
hi3516a_venc.ko ?hifb.ko ? ? ? ? ?hn_config.sh ?sysctl_hi3516a.sh
extdrv ? ? ? ? ? ? hi3516a_ao.ko ? ?hi3516a_isp.ko ? ?hi3516a_region.ko ?
hi3516a_vgs.ko ? hi_media.ko ? ? ?load3516a
1、 load3516a [-option] [sensor_name]
options:
? ? -i ? ? ? ? ? ? ? ? ? ? ? insert modules
? ? -r ? ? ? ? ? ? ? ? ? ? ? remove modules
? ? -a ? ? ? ? ? ? ? ? ? ? ? remove modules first, then insert modules
? ? -sensor sensor_name ? ? ?config sensor type [default: ar0130]
? ? -osmem os_mem_size ? ? ? config os mem size [unit: M, default: 64]
? ? -offline ? ? ? ? ? ? ? ? vi/vpss offline
? ? -h ? ? ? ? ? ? ? ? ? ? ? help information
Available sensors: imx178, imx185, mn34220, etc
notes: osmem option can't be used when mmz zone partition is enable
for example ?online: ? ./load3516a -a -sensor imx178 -osmem 64
? ? ? ? ? ? ? ? ? ? ?offline: ?./load3516a -a -sensor imx178 -osmem 64 -offline
sensor type:
imx178 mn34220 imx185 ar0330 ov4689 ov5658 ar0230 imx117 ar0237
2、 sample_venc
Usage : ./sample_venc <index>index:
? ? ? ? ?0) 1*1080p H264 + 1*1080p H265 + 1*D1 H264 encode.
? ? ? ? ?1) 1*1080p MJPEG encode + 1*1080p jpeg.
? ? ? ? ?2) low delay encode.
? ? ? ? ?3) roi background framerate.
? ? ? ? ?4) svc-t H264
? ? ? ? ?5) H264 intra refresh. ??
? ? ? ? ?
3、 sample_vio <index> <intf>
index:
? ? ? ? ?0)online mode VI/VPSS,1080P; VO(0:SD0(CVBS), 1:BT1120). Embeded isp, phychn channel preview.
? ? ? ? ?1)online mode VI(WDR)/VPSS,1080P); VO(0:SD0(CVBS), 1:BT1120).Embeded isp,phychn channel preview.
? ? ? ? ?2)online mode VI(FPN)/VPSS,1080P; VO(0:SD0(CVBS), 1:BT1120).frame mode FPN,Embeded isp,phychn channel preview.
? ? ? ? ?3)online mode VI/VPSS(LDC),1080P; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, online LDC, phychn channel preview.
? ? ? ? ?4)online mode VI/VPSS(ROTATE),1080P; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, online, rotate, phychn channel preview.
? ? ? ? ?5)offline mode VI(ROTATE),1080P; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, offline, rotate, phychn channel preview.
? ? ? ? ?6)offline mode VI(LDC),1080P; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, offline, LDC, phychn channel preview.
? ? ? ? ?7)offline mode VI(DIS),1080P; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, offline, DIS, phychn channel preview.
? ? ? ? ?8)offline mode VI: BT1120; VO(0:SD0(CVBS), 1:BT1120).Isp bypass, phychn channel preview.
? ? ? ? ?9)offline mode VI; VO(0:SD0(CVBS), 1:BT1120).Embeded isp, resolution switch.
intf:
? ? ? ? ?0) vo cvbs output, default.
? ? ? ? ?1) vo BT1120 output. ? ? ? ? ? ? ? ?
? ? ? ? ? ??
4、 sample_hifb
Usage : ./sample_hifb <intf>
intf:
? ? ? ? ?0) vo cvbs output, default.
? ? ? ? ?1) vo BT1120 output.
? ? ? ? ?
5、 sample_region <intf>
intf:
? ? ? ? ?0) vo cvbs output, default.
? ? ? ? ?1) vo BT1120 output.
? ? ? ? ?
6、 sample_scene
/***************************************************************/
usage: ./sample_scene ini_path.
for example: ./sample_scene ini/IPC/sceneauto_178.ini
/***************************************************************/
cat readme.txt?
1. This scene sample can only be run when vi-isp-vpss-venc is running;
2. Different sensors have different configuration file in ini dir;
7、 sample_tde
Usage : ./sample_tde <intf>
intf:
? ? ? ? ?0) vo cvbs output, default.
? ? ? ? ?1) vo BT1120 output.
? ? ? ? ?
./sample_vda <index>
index:
? ? ? ? ?0) MD.(QVGA)
? ? ? ? ?1) OD.(QVGA)
總結
以上是生活随笔為你收集整理的Hi3516A开发--mpp业务分析的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CentOS7 如何关闭防火墙
- 下一篇: C++发送邮件