当前位置:网站首页>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 !
边栏推荐
- Another miserable day by kotlin grammar
- [cf] 803 div2 A. XOR Mixup
- R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ x_ The log10 function configures the value range of the X axis to be logarithmic coordinates
- [cloud native | kubernetes] in depth understanding of deployment (VIII)
- Yolov5 export the pit encountered by onnx
- What is the principle of spectral confocal displacement sensor? Which fields can be applied?
- Ensemble de cartes
- Embedded SIG | 多 OS 混合部署框架
- R language ggplot2 visualization: use ggplot2 to visualize the scatter diagram and use scale_ The size function configures the measurement adjustment range of the size of the data point
- 不同类型的变量与零究竟是如何比较
猜你喜欢
Map collection
A high precision positioning approach for category support components with multiscale difference reading notes
立创 EDA #学习笔记10# | 常用连接器元器件识别 和 无源蜂鸣器驱动电路
What is the principle of spectral confocal displacement sensor? Which fields can be applied?
ZABBIX monitors the number of TCP connections
Set集合
Embedded SIG | 多 OS 混合部署框架
How to detect 3D line spectral confocal sensors in semiconductors
治数如治水,数据治理和数据创新难在哪?
Hannaiping of Qilin software: the construction of Digital China needs its own open source root community
随机推荐
又被 Kotlin 语法糖坑惨的一天
Multiparty cardinality testing for threshold private set-2021: Interpretation
Lvgl widget styles
A review of quantum neural networks 2022 for generating learning tasks
21、wpf之绑定使用小记
用于生成学习任务的量子神经网络2022最新综述
解决服务器重装无法通过ssh连接的问题
各厂家rtsp地址格式如下:
90.(cesium篇)cesium高度监听事件
【LeetCode】15、三数之和
Biological network analysis using deep learning
Parallel interface 8255A
Analysis of KOA - onion model
R语言ggplot2可视化:使用ggplot2可视化散点图、使用scale_size函数配置数据点的大小的(size)度量调整的范围
Paper interpretation (AGC) attributed graph clustering via adaptive graph revolution
Shutter start from zero 006 radio switches and checkboxes
Set集合
Global Capital Market 101:国内高净值人群最好的投资标的之一BREIT
200. number of islands
DMA控制器8237A