HI3518E SAMPLE_VENC 函数图谱

main
SAMPLE_VENC_1080P_CLASSIC
SAMPLE_COMM_VI_GetSizeBySensor //step 1: init sys variable
SAMPLE_COMM_SYS_CalcPicVbBlkSize
SAMPLE_COMM_SYS_GetPicSize

SAMPLE_COMM_SYS_Init //step 2: mpp system init. 
    HI_MPI_SYS_Exit();
    HI_MPI_VB_Exit();
    HI_MPI_VB_SetConf
    HI_MPI_VB_Init
    HI_MPI_SYS_SetConf
    HI_MPI_SYS_Init

SAMPLE_COMM_VI_StartVi //step 3: start vi dev & chn to capture
    IsSensorInput (判断是否传统还是现在的sensor)
    SAMPLE_COMM_VI_StartIspAndVi ()
        SAMPLE_COMM_VI_StartMIPI (step 1: mipi configure)
            SAMPLE_COMM_VI_SetMipiAttr   操作sensor,对sensor做必要的初始化
                open("/dev/hi_mipi", O_RDWR)
                ioctl(fd, HI_MIPI_SET_DEV_ATTR, pstcomboDevAttr)
            SAMPLE_COMM_ISP_Init (step 2:)  ISP:对图像(自动曝光之类)处理,一般外面加了处理芯片,所以一般不用3518E内部的ISP,所以一般关闭
                sensor_register_callback  在Sensor驱动里面能找到,注册sensor的回调
                HI_MPI_AE_Register 海思的API,注册ISP单元AE,用来自动曝光
                HI_MPI_AWB_Register 自动白平衡
                HI_MPI_AF_Register 自动对焦
                HI_MPI_ISP_MemInit 对ISP分配必要的内存
                HI_MPI_ISP_SetWDRMode 设置宽动态模式
                HI_MPI_ISP_SetPubAttr 写入ISP单元内部,将来ISP会根据设的参数处理图像
                HI_MPI_ISP_Init ISP系统初始化
            SAMPLE_COMM_ISP_Run (step 3: run isp thread )ISP跑起来,HI3518E内部的ISP单元隶属于VI模块的
                pthread_create(&gs_IspPid, &attr, (void* (*)(void*))Test_ISP_Run, NULL)
                    Test_ISP_Run
                        HI_MPI_ISP_Run
            SAMPLE_COMM_VI_StartDev (step 4 : config & start vicap dev)
                HI_MPI_VI_SetDevAttr 真正写入硬件单元生效
                HI_MPI_ISP_GetWDRMode
                HI_MPI_VI_SetWDRAttr
                HI_MPI_VI_Ena bleDev Dev打开
                SAMPLE_COMM_VI_StartChn (Step 5: config & start vicap chn (max 1))
                HI_MPI_VI_SetChnAttr 设置Chn通道
                HI_MPI_VI_SetRotate
                HI_MPI_VI_EnableChn
                SAMPLE_COMM_ISP_Stop
                HI_MPI_ISP_Exit
                HI_MPI_AF_UnRegister
                HI_MPI_AWB_UnRegister
                HI_MPI_AE_UnRegister
                sensor_unregister_callback

SAMPLE_COMM_SYS_GetPicSize //step 4: start vpss and vi bind vpss
    HI_MPI_VPSS_CreateGrp
    HI_MPI_VPSS_GetNRParam
    HI_MPI_VPSS_SetNRParam
    HI_MPI_VPSS_StartGrp
SAMPLE_COMM_VPSS_StartGroup
SAMPLE_COMM_VI_BindVpss
    SAMPLE_COMM_VI_Mode2Param
    HI_MPI_SYS_Bind
SAMPLE_COMM_VPSS_EnableChn
    HI_MPI_VPSS_SetChnAttr
    HI_MPI_VPSS_SetExtChnAttr
    HI_MPI_VPSS_SetChnMode
    HI_MPI_VPSS_EnableChn
SAMPLE_COMM_VENC_Start  //step 5: start stream venc
SAMPLE_COMM_VENC_BindVpss
SAMPLE_COMM_VENC_StartGetStream  //step 6: stream venc process -- get stream, then save it to file. 
SAMPLE_COMM_VENC_StopGetStream  //step 7: exit process
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
获取USB摄像头的1080p的JPEG格式的图片20180608_1806.7z 电脑上的系统:ubuntu14.04 // http://www.linuxidc.com/Linux/2011-03/33020.htm // V4L2摄像头获取单幅图片测试程序(MMAP模式) // [日期:2011-03-06] 来源:Linux社区 作者:aokikyon [字体:大 中 小] // // #加了点注释 // // #Rockie Cheng // printf #include #include // memset #include #include #include #include // close write usleep read #include #include #include #include #include #include // mmap #include #include #include #include // pthread_create pthread_join #include #define CLEAR(x) memset (&(x), 0, sizeof (x)) #define REQ_COUNT 6 #define uchar unsigned char struct buffer { void * start; size_t length; }; static char * dev_name = "/dev/video0";//摄像头设备名 static int fd = -1; struct buffer * buffers = NULL; // static unsigned int n_buffers = 0; // 2012-7-13 11:33 camera flag // static int iFlagCamera = 0; volatile int iFlagCamera = 0; // 函数名称:thread1 // 函数功能:用于接受键盘的输入,之后通知thread2抓图 // 参数列表: // 返回值 : void thread1(void) { char ch; printf("\n !!!!Warning!!!!\n Max 1000 color bmp\n Input the char: \n"); printf("\n !!!!press o an capture 1 frame picture! \n"); printf("\n !!!!press t an capture 10 frame picture! \n"); printf("\n !!!!press h an capture 100 frame picture! \n"); while(1) { while((ch=getchar()) != '\n') { printf("%c\n", ch); if('o'==ch) { iFlagCamera = 1; printf("thread1=%d\n", iFlagCamera); } else if('t'==ch) { iFlagCamera = 10; printf("thread1=%d\n", iFlagCamera); } else if('h'==ch) { iFlagCamera = 101; printf("thread1=%d\n", iFlagCamera); } else if('q'==ch) { iFlagCamera = 10001; printf("thread1=%d\n", iFlagCamera
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值