8.2.8. sample_vot 使用说明

8.2.8.1. 程序功能

sample_vot程序完成VOT模块的初始化,实现从当前目录读取一帧nv12的图片数据送到VOT的bt1120输出显示功能

8.2.8.2. 程序开发

源码结构

源码位于:/app/multimedia_samples/sample_vot

.
├── 1280_720yuv8.yuv			# 回灌使用720P的NV12格式文件
├── 1920_1080yuv8.yuv			# 回灌使用1080P的NV12格式文件
├── Makefile					# 编译makefile
├── Readme.md					# 程序说明
└── vot.c						# 主程序

编译

当前代码通过一个Makefile文件配置编译

进入源码目录,执行以下命令进行编译生成sample_vot

cd /app/multimedia_samples/sample_vot
$ make clean # 清理源码,保持干净的代码环境
$ make
... ... # 一大段编译打印
$ ls
1280_720yuv8.yuv  1920_1080yuv8.yuv  Makefile  Readme.md  sample_vot  vot.c  vot.o

8.2.8.3. 功能使用

程序部署

按照上面的编译流程生成出sample_vot

执行程序 ./sample_vot 1080P30

chmod +x sample_vot
root@x3sdbx3-samsung2G-3200:/userdata# ./sample_vot 1080P60
[   26.051955] channel id is 0, enable is 0, reg value is 0x4ef00f.
[   26.052744] channel id is 1, enable is 0, reg value is 0x4ef00f.
[   26.053520] channel id is 2, enable is 0, reg value is 0x4ef00f.
[   26.054339] channel id is 3, enable is 0, reg value is 0x4ef00f.
stLayer width:1920[   26.055263] channel id is 0, enable is 1, reg value is 0x14ef00f.
stLayer height:1080
libiar: hb_disp_set_timing done!
stChnAttr priority :2
stChnAttr src width :1920
stChnAttr src height :1080
stChnAttr s32X :0
stChnAttr s32Y :0
stChnAttr u32DstWidth :1920
stChnAttr u32DstHeight :1080
[   26.056165] iar_output_stream.
stCrop width :1920
stCrop height :1080
[   26.059304] channel id is 0, enable is 1, reg value is 0x14ef00f.
framesize:3110400

(注意如果是X3 SDB生态板子,那么带的参数只支持1080P60/1080P30,如果是客户自己使用的sil902x的bt1120转换hdmi芯片,那么参数可以是如下:
	1080P60
	1080P59.94
	1080P50
	1080P30
	1080P29.97
	1080P25
	1080I60
	1080I59.94
	1080I50
	720P60
	720P59.94
	720P50
	720P29.97)

运行效果说明

程序通过把1920_1080yuv8.yuv读到内存,并通过接口把数据送到VOT模块的bt1120接口,然后通过hdmi转换芯片输出hdmi效果到显示设备如下图

../../_images/20220520-163716.jpg