camelo4

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4  发布于  2013-12-19 12:22:52
采纳率 0%
9个问答
9915

【求助】HI3520编码超时问题

 
海思3520 sample里面编码超时。./sample_venc 0,每次都会在编码大概10多分钟后出现 get venc stream timeout。必须重启程序才能进行下一次编码处理了。
发现是在sample_venc_common.c 这个文件select函数超时的。 论坛有说是AD没初始化,但是我用示波器测过,发现AD没有毛病。我屏蔽掉编码的那段代码,直接采集显示就没问题。
我来回答
回答14个
时间排序
认可量排序

wwuupp

0个粉丝

3

问答

0

专栏

0

资料

wwuupp 2013-12-20 12:27:00
认可0
一开始是因为IIC没正确配置AD 出过这个问题。帮顶

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2013-12-20 14:27:57
认可0
帮我看下,我现在一编码几分钟后就出现下面问题,如果不编码直接采集显示就没有问题。
有编码
cat  /dev/log
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x101, IntRawStatus = 0x101
<7>[    vi] [Func]:ViuDrvSetCcIntErr [Line]:448 [Info]:<7>[    vi] vichn(0) CcInt Err!
<6>[    vi] [Func]:ViuDrvProcSendFrm [Line]:2736 [Info]:<6>[    vi] vi phychn 0 lost bottom field int!
<4>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2926 [Info]:<4>[    vi] s32PhyChn 0 VIU_DATATHROW_INT

直接采集显示
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuUfReceivePic [Line]:497 [Info]:<7>[    vi] vi chn0 's frame depth is 0!
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003
<7>[    vi] [Func]:ViuDrvInterruptRoute [Line]:2908 [Info]:<7>[    vi] s32PhyChn 0 intstatus = 0x1, IntRawStatus = 0x10003

wwuupp

0个粉丝

3

问答

0

专栏

0

资料

wwuupp 2013-12-20 15:30:22
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=5728&ptid=2854]camelo4 发表于 2013-12-20 14:27[/url]
帮我看下,我现在一编码几分钟后就出现下面问题,如果不编码直接采集显示就没有问题。
有编码
cat  /dev/ ...[/quote]

cat /proc/umap/vi

把这个打印出来看看。

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2013-12-20 16:07:50
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=5729&ptid=2854]wwuupp 发表于 2013-12-20 15:30[/url]
cat /proc/umap/vi

把这个打印出来看看。[/quote]

[SAMPLE_COMM_VENC_GetVencStreamProc]-1067: get venc stream time out, exit thread
[SAMPLE_COMM_VENC_GetVencStreamProc]-1067: get venc stream time out, exit thread
[SAMPLE_COMM_VENC_GetVencStreamProc]-1067: get venc stream time out, exit thread

编码超时时候打印的:
cat /proc/umap/vi
[VIU] Version: [Hi3520A_MPP_V1.0.0.0 Debug], Build Time: [Jul 13 2012, 16:36:55]
-----MODULE PARAM--------------------------------------------------------------
detect_err_frame
               n
-----VI DEV ATTR---------------------------------------------------------------
Dev   IntfM  WkM  ComMsk0  ComMsk1 ScanM AD0 AD1 AD2 AD3   Seq
   0   BT656 4Mux ff000000        0     I  -1  -1  -1  -1  UYVY
-----VI HIGH DEV ATTR---------------------------------------------------------------
Dev  InputM  WkM  ComMsk0  ComMsk1 ScanM AD0 AD1 AD2 AD3   Seq CombM CompM ClkM  Fix FldP
-----VI PHYCHN ATTR------------------------------------------------------------
PhyChn CapX CapY  CapW  CapH  DstW  DstH CapSel Mirror   Filp PixFom SrcRat DstRat
      0    0    0   720   576   720   576   both      N      N  sp420     -1     -1
-----VI PHYCHN MINOR ATTR------------------------------------------------------------
PhyChn CapX CapY  CapW  CapH  DstW  DstH CapSel Mirror   Filp PixFom MixCap DwScal
-----VI PHYCHN STATUS 1----------------------------------------------------------
PhyChn  Dev  IntCnt  VbFail  LosInt  TopLos  BotLos BufCnt  IntT  SendT  Field  Stride
      0    0   10479       0       1       0       1      1    64     55   intl     720
-----VI PHYCHN STATUS 2---------------------------------------------------------
PhyChn  ccErrN    IntRat
      0       1        24
-----VI CHN STATUS-------------------------------------------------------------
ViChn   bEnUsrP   FrmTime   FrmRate   SendCnt    SwLost
     0         N     40000        25     10478         0

# cat /proc/umap/h264e
[H264E] Version: [Hi3520A_MPP_V1.0.0.0 Debug], Build Time[Jul 13 2012, 16:36:53]
-----CHN ATTR------------------------------------------------------------------
     ID     Width    Height   profile   MainStr   RefMode   BufSize   ByFrame   MaxStrCnt
      0       720       576      base       Yes        1X    829440       Yes         200
-----PICTURE INFO--------------------------------------------------------------
     ID     EncdStart   EncdSucceed        Lost        Disc        Skip     BufLeak      Recode      RlsStr     UnrdStr
      0         10477         10477           0           0           0           0           0       10477           0
-----STREAM BUFFER-------------------------------------------------------------
     ID     Base        RdTail      RdHead      WrTail      WrHead      DataLen     BufFree   
     0      0xcb700000  0x7c40      0x7c40      0x7c40      0x7c40      0           829376     
-----ROI INFO------------------------------------------------------------------
     ID     index    bAbsQp    Qp     width    height    startx    starty
-----Syntax INFO---------------------------------------------------------------
     ID   slcsplt   slcmode   slcsize
      0       No        N/A       N/A
-----Inter & Intra prediction INFO---------------------------------------------
     ID   profile  HWsize  VWsize  P16x16   P16x8   P8x16    P8x8   MvExt  I16x16    Inxn    Ipcm
      0      base       5       2     Yes     Yes     Yes     Yes     Yes     Yes     Yes     Yes
-----Syntax INFO--------------------------------------------------------------
     ID   profile   EntrpyI   EntrpyP  Itrans  ptrans QMatrix   POC   DblkIdc   alpha    beta
      0      base     cavlc     cavlc     4x4     4x4     No      2         0       5       5

# cat /proc/umap/venc
[VENC] Version: [Hi3520A_MPP_V1.0.0.0 Debug], Build Time[Jul 13 2012, 16:36:54]
-----VENC CHN ATTR-------------------------------------------------------------
     NO.   Width  Height  Type Field VIField StreamType  ByFrame   BlockFlag    Sequence  Registered   LeftBytes     LeftFrm   CurPacks
       0     720     576    96     0       0          1        1           0       10477           1           0           0         1
-----VENC STREAM STATE------------------------------------------------------------
     NO.     FreeCnt     BusyCnt     UserCnt     UserGet     UserRls    GetTimes    Interval   FrameRate
       0           8           0           0       11737       11737       10477           5          24

wwuupp

0个粉丝

3

问答

0

专栏

0

资料

wwuupp 2013-12-20 17:36:28
认可0
1,刚看了下select应该是返回0了, 你把超时放长点。
2,检查下venc的select的文件是不是被篡改了。

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2013-12-23 10:30:04
认可0
sample里面是2s,我改长了还是不行。cat /proc/umap/vi IntRat参数是不是25才对?
                                       

wwuupp

0个粉丝

3

问答

0

专栏

0

资料

wwuupp 2013-12-23 11:07:08
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=5745&ptid=2854]camelo4 发表于 2013-12-23 10:30[/url]
sample里面是2s,我改长了还是不行。cat /proc/umap/vi IntRat参数是不是25才对?
                         ...[/quote]

24和25都可以。一般都是有参照的。你把select 文件的值打印出来,看10分钟的时候 是不是被篡改了。

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2013-12-23 14:19:02
认可0
这是我里面编码的部分sample,正常的时候是1,超时的时候,select是返回的0.不知道为什么超时
while (HI_TRUE == pstPara->bThreadStart)
    {
     
        FD_ZERO(&read_fds);
        for (i = 0; i < s32ChnTotal; i++)
        {
            FD_SET(VencFd, &read_fds);
        }
   
     
      
         TimeoutVal.tv_sec  = 2;
         TimeoutVal.tv_usec = 0;
         s32Ret = select(maxfd + 1, &read_fds, NULL, NULL, &TimeoutVal);
        if (s32Ret < 0)
        {
            SAMPLE_PRT("select failed!\n");
            break;
        }
       else if (s32Ret == 0)
        {
            SAMPLE_PRT("get venc stream time out, exit thread\n");         
            continue;
        }
        else
        {
            for (i = 0; i < s32ChnTotal; i++)
            {
                if (FD_ISSET(VencFd, &read_fds))
                {
                  
    memset(&stStream, 0, sizeof(stStream));
                    s32Ret = HI_MPI_VENC_Query(i, &stStat);//query stream state
                    if (HI_SUCCESS != s32Ret)
                    {
                        SAMPLE_PRT("HI_MPI_VENC_Query chn[%d] failed with %#x!\n", i, s32Ret);
                        break;
                    }
                    /*******************************************************
                     step 2.2 : malloc corresponding number of pack nodes.
                    *******************************************************/
                    stStream.pstPack = (VENC_PACK_S*)malloc(sizeof(VENC_PACK_S) * stStat.u32CurPacks);
                    if (NULL == stStream.pstPack)
                    {
                        SAMPLE_PRT("malloc stream pack failed!\n");
                        break;
                    }
                  
                    /*******************************************************
                     step 2.3 : call mpi to get one-frame stream
                    *******************************************************/
                    stStream.u32PackCount = stStat.u32CurPacks;
                    s32Ret = HI_MPI_VENC_GetStream(i, &stStream, HI_TRUE);
                    if (HI_SUCCESS != s32Ret)
                    {
                        free(stStream.pstPack);
                        stStream.pstPack = NULL;
                        SAMPLE_PRT("HI_MPI_VENC_GetStream failed with %#x!\n", \
                               s32Ret);
                        break;
                    }


*******************************************************
                     step 2.4 : save frame to file   *******************************************************/

                    s32Ret = SAMPLE_COMM_VENC_SaveStream(enPayLoadType, pFile, &stStream);
                    if (HI_SUCCESS != s32Ret)
                    {
                        free(stStream.pstPack);
                        stStream.pstPack = NULL;
                        SAMPLE_PRT("save stream failed!\n");
                        break;
                    }

                   /*******************************************************
                     step 2.5 : release stream
                    *******************************************************/
                    s32Ret = HI_MPI_VENC_ReleaseStream(i, &stStream);
                    if (HI_SUCCESS != s32Ret)
                    {
                        free(stStream.pstPack);
                        stStream.pstPack = NULL;
                        break;
                    }
                    /*******************************************************
                     step 2.6 : free pack nodes
                    *******************************************************/
                    free(stStream.pstPack);
                    stStream.pstPack = NULL;
                }
            }
        }
    }

wwuupp

0个粉丝

3

问答

0

专栏

0

资料

wwuupp 2013-12-23 14:35:37
认可0
VencFd  把这个打印出来 看看吧。

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2013-12-23 16:05:35
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=5748&ptid=2854]wwuupp 发表于 2013-12-23 14:35[/url]
VencFd  把这个打印出来 看看吧。[/quote]

1路编码的时候vencfd是14,4路的时候句柄是35,38,40,42. select文件返回0的时候vencfd【i]的值没有改变。

polo__2009

0个粉丝

0

问答

0

专栏

0

资料

polo__2009 2014-04-10 16:05:05
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=5749&ptid=2854]camelo4 发表于 2013-12-23 16:05[/url]
1路编码的时候vencfd是14,4路的时候句柄是35,38,40,42. select文件返回0的时候vencfd【i]的值没有改变。[/quote]

我用的是HI3520D,有时也出现“get venc stream timeout”。
请问您的问题解决了吗?怎么解决的?

camelo4

0个粉丝

9

问答

0

专栏

0

资料

camelo4 2014-04-11 10:17:15
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=6631&ptid=2854]polo__2009 发表于 2014-4-10 16:05[/url]
我用的是HI3520D,有时也出现“get venc stream timeout”。
请问您的问题解决了吗?怎么解决的?[/quote]

没有,你AD芯片用的是?

ryw8500

1个粉丝

6

问答

0

专栏

0

资料

ryw8500 2014-11-26 20:34:48
认可0
我用的是NVP1914,单独运行I2C_READ程序,发现无法读取NVP1914寄存器的数据,返回一直是0XFF,这个是怎么回事

jxncsunny

0个粉丝

1

问答

0

专栏

0

资料

jxncsunny 2017-01-02 23:15:13
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=9710&ptid=2854]ryw8500 发表于 2014-11-26 20:34[/url]
我用的是NVP1914,单独运行I2C_READ程序,发现无法读取NVP1914寄存器的数据,返回一直是0XFF,这个是怎么回 ...[/quote]

有管脚复用
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区