当前位置:网站首页>Hisilicon 3559 sample parsing: Venc
Hisilicon 3559 sample parsing: Venc
2022-06-30 12:17:00 【Run! The bug is coming】
Preface :
Analysis finished vio After the routine, I was full of confidence , Confidently go to the boss and ask for assignment ,“ A simple ” Several steps , Draw a ladle according to the gourd , Adjust parameters , Analyze and modify the corresponding position , Beautiful and bright “ Main road ” Clear and bright !
Young people ,too young too naive Ah, if it were so simple , Use chip cannons to shoot mosquitoes ?
But it seems very simple , Properties are configured one by one , One binding , Balabala
What if you don't bind ? You need to modify the algorithm yourself ? How to get images , How to output ? If you want to do personal face recognition ?
Do you feel that the simpler the process, the less free it seems , Many are out of control , I want to modify more as required , Naturally, it is not so easy
Cover your swollen face and learn from it , Be sure to take apart the specific steps
One sample If it's not enough, let's see a little more complicated !
sample_venc
With previous experience , The overall process is still a little x Count , You don't have to jump around every time , Take a look at the code framework directly
main The main function
SAMPLE_VENC_4K60 Video capture function
SAMPLE_COMM_SYS_GetPicSize obtain w.h Parameters
SAMPLE_COMM_VI_GetSensorInfo
SAMPLE_VENC_CheckSensor
SAMPLE_COMM_VI_GetSizeBySensor obtain sensor Related parameters of , obtain mmp Some parameters required by the system
SAMPLE_COMM_SYS_GetPicSize Get the size of the picture
SAMPLE_VENC_VI_Init
SAMPLE_VENC_SYS_Init Coding system initialization
SAMPLE_COMM_VI_GetSizeBySensor obtain sensor Related parameters of , obtain mmp Some parameters required by the system
SAMPLE_COMM_SYS_GetPicSize Get the size of the picture
COMMON_GetPicBufferSize Get the size of the cache block
SAMPLE_COMM_SYS_Init MMP System initialization
HI_MPI_SYS_Exit(); To initialize MPP System .
HI_MPI_VB_Exit(); To initialize MPP Video buffer pool
HI_MPI_VB_SetConfig Set up MPP Video cache pool properties
HI_MPI_VB_Init initialization MPP Video buffer pool
HI_MPI_SYS_Init initialization MPP System .
SAMPLE_COMM_VI_GetFrameRateBySensor
HI_MPI_ISP_GetCtrlParam obtain ISP Control parameter .
HI_MPI_ISP_SetCtrlParam Set up ISP Control parameter .
SAMPLE_COMM_VI_StartVi
SAMPLE_COMM_VI_StartMIPI initialization mipi : Set up mipi The pattern of .. Can make mipi The clock .mipi Reset . Can make sensor The clock .sensor Reset . Set up mipi Properties of .mipi De reset ..sensor De reset
SAMPLE_COMM_VI_SetParam obtain VI,VPSS Working mode of . Set up VI,VPSS Working mode
SAMPLE_COMM_VI_CreateVi Set up VI Equipment and Physics PIPE Binding relationship of . establish vi pipe. Set up VI passageway ch attribute , Enable VI passageway ch
SAMPLE_COMM_VI_CreateIsp Reference resources HiISP Development reference
SAMPLE_VENC_VPSS_Init
SAMPLE_COMM_VI_GetSizeBySensor obtain sensor Related parameters of , obtain mmp Some parameters required by the system
SAMPLE_COMM_SYS_GetPicSize Get the size of the picture
SAMPLE_COMM_VPSS_Start establish vpss group Configure channel properties Enable channel Enable vpss group
SAMPLE_COMM_VI_Bind_VPSS Include data sources 3 Parameter recipients 3 Parameters , Namely vi and vpss, Call the data source to data receiver binding interface
HI_MPI_SYS_Bind
/ start stream venc /
SAMPLE_VENC_GetRcMode obtain rc Pattern ( rate control )
SAMPLE_VENC_GetGopMode gop Mode selection
SAMPLE_COMM_VENC_GetGopAttr according to gop Mode configuration related properties
/***encode h.265 **/
SAMPLE_COMM_VENC_Start Start coding stream Pattern
SAMPLE_COMM_VENC_Creat establish venc channel according to enType Choose the encoding format
HI_MPI_VENC_StartRecvFrame Open the encoding channel to receive the input image . Allows you to specify the number of frames received , Automatically stop receiving images when the specified number of frames is exceeded
SAMPLE_COMM_VPSS_Bind_VENC Data source to data receiver binding interface .
HI_MPI_SYS_Bind Data source to data receiver binding interface .
/***encode h.264 **/
SAMPLE_COMM_VENC_Start
SAMPLE_COMM_VENC_Creat establish venc channel according to enType Choose the encoding format
HI_MPI_VENC_StartRecvFrame Open the encoding channel to receive the input image . Allows you to specify the number of frames received , Automatically stop receiving images when the specified number of frames is exceeded
SAMPLE_COMM_VPSS_Bind_VENC
HI_MPI_SYS_Bind Data source to data receiver binding interface .
/*stream save process*/
SAMPLE_COMM_VENC_StartGetStream Create a thread to start the code stream
SAMPLE_COMM_VENC_GetVencStreamProc
step 1: Check and prepare to save files and venc fd
/* Determine the video stream file name , And open the file to save the video stream */
/* Set up Venc Fd. */
step 2: Start getting video streams for each channel
step 2.1 : Query how many packets are in each frame stream .
step 2.2 : It is recommended to check at the same time u32CurPacks and u32LeftStreamFramese
step 2.3 : malloc The number of corresponding package nodes .
step 2.4 : call mpi Get a frame stream
step 2.5 : Save the frame to a file
step 2.6 : Release video stream
step 2.7 : Release the package node
step 3 : Close save file
SAMPLE_COMM_VENC_StopGetStream pthread_join Threads
It looks much clearer , Then let's take this as the basis , Let's start building our own platform !
边栏推荐
- What is the principle of spectral confocal displacement sensor? Which fields can be applied?
- redis在项目中的使用
- 【LeetCode】15、三数之和
- List collection
- 服务器常用的一些硬件信息(不断更新)
- 品达通用权限系统(Day 7~Day 8)
- Parallel interface 8255A
- R语言ggplot2可视化:使用ggplot2可视化散点图、使用scale_size函数配置数据点的大小的(size)度量调整的范围
- R language ggplot2 visualization: gganimate package is based on Transition_ Time function to create dynamic scatter animation (GIF)
- Redis - SDS simple dynamic string
猜你喜欢
随机推荐
Openmldb meetup No.4 meeting minutes
1175. 质数排列 : 乘法原理运用题
When building the second website with pagoda, the website always reports an error: no input file specified
通过EF Core框架根据SQL Server数据库表生成实体类
[cf] 803 div2 A. XOR Mixup
List collection
NoSQL——Redis的配置与优化
海思3559萬能平臺搭建:獲取數據幀修改後編碼
90.(cesium篇)cesium高度监听事件
爱可可AI前沿推介(6.30)
Multiparty cardinality testing for threshold private set-2021: Interpretation
R语言ggplot2可视化分面图(facet):gganimate包基于transition_time函数创建动态散点图动画(gif)、使用labs函数为动画图添加动态时间标题
R语言ggplot2可视化:使用ggplot2可视化散点图、使用scale_size函数配置数据点的大小的(size)度量调整的范围
90.(cesium篇)cesium高度监听事件
用宝塔建第2个网站时网站总是报错:No input file specified.
R语言ggplot2可视化:gganimate包基于transition_time函数创建动态散点图动画(gif)、使用labs函数为动画图添加动态时间标题(抽取frame_time信息)
Another miserable day by kotlin grammar
实现多方数据安全共享,解决普惠金融信息不对称难题
构造函数、类成员、析构函数调用顺序
Shutter start from zero 006 radio switches and checkboxes









