News:

Re-organized the forum to more cleanly delineate the development section, as the end user support side appears to have taken a life of its own!

Author Topic: Hi3512 + OV7725 Wansview Camera  (Read 8830 times)

June 02, 2012, 10:58:19 pm
Hi,

I have a Wansview camera with Hi3512 and OV7725.
I have downloaded the SDK at http://www.openipcam.com/files/ARM9/HiVision/ and built the sample in mpp/sample directory. The issue is that those sample are for tw2815 sensor. I have tried to modify one sample (venc) for ov7725 and it can open the driver, but failed to create a "Channel" in function SampleEnableEncode, the function HI_MPI_VENC_CreateChn returns a meaningless error code:

Quote
HI_MPI_VENC_CreateChn err 0xa006800d

Since HI_MPI_VENC_CreateChn is part of the binary libraries provided by HiSilicon, I'm not sure where to go from here. Thanks.


  • No avatar
  • *****
June 03, 2012, 12:29:26 am
I have added the binary libraries, and some sample code in the folder.
What do you have for your HI_MPI_VENC_SetParamSet configuration?

Let me know if you need additional assistance.

Alternately email support@hisilicon.com


  • No avatar
  • *****
June 03, 2012, 12:40:27 am
Relevant sample code use for HiVision chipset bits in sample folder (as there is a lot of snarfed stuff in there!)

/files/ARM9/HiVision/Sample_Codeezbox-read-only/pool/packages/3rd-party/hisilicon

/files/ARM9/HiVision/Sample_Code/loho-read-only/tzl

/files/ARM9/HiVision/Sample_Code/smartmind-read-only/code

You'll need to make appropriate changes to MakeFiles to link to your locations for libraries etc, but should compile.


June 04, 2012, 02:40:16 am
I have added the binary libraries, and some sample code in the folder.
What do you have for your HI_MPI_VENC_SetParamSet configuration?

Let me know if you need additional assistance.

Alternately email support@hisilicon.com

Thanks for your answer. I'm using the sample code mpp/samples/venc/sample_venc.c

I don't see they used HI_MPI_VENC_SetParamSet, but the parameters passed to HI_MPI_VENC_CreateChn  (VENC_CHN_ATTR_S) are as follows:

stH264Attr.u32PicWidth  = 352;
    stH264Attr.u32PicHeight = 288;
    stH264Attr.bMainStream  = HI_TRUE;
    stH264Attr.bByFrame     = HI_TRUE;
    stH264Attr.bCBR         = HI_TRUE;
    stH264Attr.bField       = HI_FALSE;
    stH264Attr.bVIField     = HI_FALSE;
    stH264Attr.u32Bitrate   = 512;
    stH264Attr.u32ViFramerate     = 25;
    stH264Attr.u32TargetFramerate = 25;
    stH264Attr.u32BufSize  = 352*288*2;
    stH264Attr.u32Gop      = 20;
    stH264Attr.u32MaxDelay = 10;
    stH264Attr.u32PicLevel = 3;

memset(&stAttr[0], 0 ,sizeof(VENC_CHN_ATTR_S));
    stAttr[0].enType = PT_H264;
    stAttr[0].pValue = (HI_VOID *)&stH264Attr;

Finally I think that it's not a problem related to ov7725, but just because I run out of memory. I have 51 MB Linux memory out of 64 MB in total, but the buffer requirements above seem tiny, so I don't understand why it would be unable to allocate memory.


June 04, 2012, 05:08:15 am
I could go a bit further by reducing the size of the video, but now I will get a timeout when trying to access VENC in SampleGet1D1Mjpeg1CifH264Stream (still in sample_ven.c) :             

                s32ret = select(maxfd + 1,&read_fds,NULL,NULL,&TimeoutVal);
      if(s32ret < 0)
      {
         printf("select err\n");
         return NULL;
      }
      else if(s32ret == 0)
      {
         printf("time out\n");
         return NULL;
      }
That's probably because I get no data from the video encoder, but I've changed very little in sample_venc.c. Any ideas what could cause this ?

Now I have all the documentation in Chinese, would you have the developer documentation in English ?