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开发--mpp业务分析_第1张图片


参看: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目录:
 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:
         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:
         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:
         0) vo cvbs output, default.
         1) vo BT1120 output.
         
5、 sample_region
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:
         0) vo cvbs output, default.
         1) vo BT1120 output.
         
./sample_vda
index:
         0) MD.(QVGA)

         1) OD.(QVGA)


你可能感兴趣的:(Hi3516A开发,Hi3516A开发)