This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM8127 camera and isp link

Other Parts Discussed in Thread: TVP5158

I want to complete the data flow ISIF->RESIZER->DDR. The codes are as follows:

  CameraLink_CreateParams_Init(&cameraPrm);
  cameraPrm.captureMode = CAMERA_LINK_CAPMODE_ISIF;
  cameraPrm.outQueParams[0].nextLink = ispId;
  cameraPrm.ispLinkId = ispId;

  /* This is for TVP5158 Audio Channels - Change it to 16 if there are 16
   * audio channels connected in cascade */
  cameraPrm.numAudioChannels = 0;
  cameraPrm.numVipInst = 1;
  cameraPrm.tilerEnable = TRUE;

  pCameraInstPrm = &cameraPrm.vipInst[0];
  pCameraInstPrm->vipInstId = SYSTEM_CAMERA_INST_VP_CSI2;
  pCameraInstPrm->videoDecoderId = MultiCh_getSensorId(gUI_mcfw_config.sensorId);
  pCameraInstPrm->inDataFormat = SYSTEM_DF_YUV420SP_UV;
  pCameraInstPrm->sensorOutWidth  = 1920;
  pCameraInstPrm->sensorOutHeight = 1080;
   pCameraInstPrm->standard = SYSTEM_STD_1080P_30;
  pCameraInstPrm->numOutput = 1;
  pCameraOutPrm = &pCameraInstPrm->outParams[0]; 
  pCameraOutPrm->dataFormat = SYSTEM_DF_YUV420SP_UV; 
  pCameraOutPrm->scEnable = FALSE;
  pCameraOutPrm->scOutWidth = 1920;
  pCameraOutPrm->scOutHeight = 1080;
  pCameraOutPrm->outQueId = 0;
  /* 2A config */
  cameraPrm.t2aConfig.n2A_vendor = gUI_mcfw_config.n2A_vendor;
  cameraPrm.t2aConfig.n2A_mode = gUI_mcfw_config.n2A_mode;
  cameraPrm.vnfFullResolution = FALSE;

 /* isp link params */
 ispPrm.inQueParams.prevLinkId    = gVcamModuleContext.cameraId;
 ispPrm.inQueParams.prevLinkQueId = 0;
 ispPrm.numOutQueue               = 3;
 ispPrm.outQueInfo[0].nextLink    = mergeId;
 ispPrm.outQueInfo[1].nextLink    = mergeId;
 ispPrm.outQueInfo[2].nextLink    = dupId;
 ispPrm.clkDivM    = 10;
 ispPrm.clkDivN          = 20;
 ispPrm.vsEnable = gUI_mcfw_config.vsEnable;
 ispPrm.outQueuePrm[0].dataFormat = SYSTEM_DF_YUV420SP_VU;
 ispPrm.outQueuePrm[0].width      = 1920;
 ispPrm.outQueuePrm[0].height     = 1080;
 ispPrm.outQueuePrm[1].dataFormat = SYSTEM_DF_YUV420SP_VU;
 ispPrm.outQueuePrm[1].width      = 720;
 ispPrm.outQueuePrm[1].height     = 576;
 ispPrm.outQueuePrm[2].dataFormat = SYSTEM_DF_YUV420SP_VU;
 ispPrm.outQueuePrm[2].width      = 1920;
 ispPrm.outQueuePrm[2].height     = 1080;
 ispPrm.vnfFullResolution         = FALSE;

The running result is:
 TimeOut occure in boot_proc.
Program exit.

But if I modified the cameraPrm.captureMode to CAMERA_LINK_CAPMODE_DDR and the output data format to SYSTEM_DF_BAYER_RAW, which means the data flow is DDR->RESIZER->DDR, it runs OK.
What's the reason for the errors of the data flow ISIF->RESIZER->DDR? are there the configurations some errors?

  • Hi,

     

    Why are you setting your camera next link to isp? This is not possible in ISIF->RSZ->DDR mode, since isp will used in the on-the-fly mode.

     

    Regards,

    Brijesh

  • Because I want to use FPGA to implement our own alg such as H3A, WDR, and etc. then FPGA feeds the yuv data to DM8127, I do not need the glbce and noise filter.

    1. you said:"This is not possible in ISIF->RSZ->DDR mode."  but how could I implement the YUV resizing?

    2. If “ ISIF->DDR->RSZ->DDR mode” is possible, How could I do for it?

    3. When the capture mode is one shot mode, the frames that need to be encoded sometimes are skipped. What's the reason for it? Moreover, in continuous capture mode, the skpped frames are less.

  • Hi,

     

    You could still do resizing in the on-the-fly mode, but once you use resizer in on-the-fly mode, you cannot use it in mem2mem mode. ISP link uses resizer in mem2mem mode. When you use on-the-fly mode, you should connect camera link to the link where you want to use resized output, not to the isp link.

     

    regards,

    Brijesh

  • But there is another problem coming out---I need four channel different resolution YUV streams.

    The camera link only can output two channels. So how could  other  two channels YUV be generated?

  • Hi,

     

    Not possible from hardware, resizer can output only two streams. But you could duplicate them in your code and have 4 streams.

     

    Rgds,

    Brijesh

  • There are only two RESIZER in hardware, so resizer can output only two streams, But with software, I have completed three YUV streams(1080P(H.264), D1(H.264), and 1920* 1536(JPEG)), But it is only generated in one-shot mode. So what's the reason?

     If I use  duplicate link, and then use the scalar link, could I get four different resolution YUV?

    Moreover, I find there is also a problem---the memory would overflow. Is it correct?

      

  • Hi,

     

    Even in one-shot mode, i think JPEG input is generated by duplicating the 1080p output, so from resizer, there are only two output streams. Even in on-the-fly mode, you could have same mechanism, you could duplicate one of the resizer output and get JPEG stream.

    Yes, if you duplicate the input stream and then resize it, you could get the four different scaled output. But please note that you are using same resizer, so performance will be limited.

     

    Regards,

    Brijesh

  • Hi, Brijesh. Thanks for your timely replying!

    I do not understand that you said "Even in one-shot mode, i think JPEG input is generated by duplicating the 1080p output, so from resizer, there are only two output streams." The three stream are not used dup link before isp link, and not used scaler link for the next operation. They are all generated by isp link in different size. The codes are as follows:

    CameraLink_CreateParams_Init(&cameraPrm);
      cameraPrm.captureMode =  CAMERA_LINK_CAPMODE_DDR;
      cameraPrm.outQueParams[0].nextLink = ispId;
      cameraPrm.ispLinkId = ispId;

      /* This is for TVP5158 Audio Channels - Change it to 16 if there are 16
       * audio channels connected in cascade */
      cameraPrm.numAudioChannels = 0;
      cameraPrm.numVipInst = 1;
      cameraPrm.tilerEnable = TRUE;

      pCameraInstPrm = &cameraPrm.vipInst[0];
      pCameraInstPrm->vipInstId = SYSTEM_CAMERA_INST_VP_CSI2;
      pCameraInstPrm->videoDecoderId = MultiCh_getSensorId(gUI_mcfw_config.sensorId);
      pCameraInstPrm->inDataFormat = SYSTEM_DF_YUV420SP_UV;
      pCameraInstPrm->sensorOutWidth  = 1920;
      pCameraInstPrm->sensorOutHeight = 1080;
       pCameraInstPrm->standard = SYSTEM_STD_1080P_30;
      pCameraInstPrm->numOutput = 1;
      pCameraOutPrm = &pCameraInstPrm->outParams[0]; 
      pCameraOutPrm->dataFormat = SYSTEM_DF_BAYER_RAW; 
      pCameraOutPrm->scEnable = FALSE;
      pCameraOutPrm->scOutWidth = 1920;
      pCameraOutPrm->scOutHeight = 1080;
      pCameraOutPrm->outQueId = 0;
      /* 2A config */
      cameraPrm.t2aConfig.n2A_vendor = gUI_mcfw_config.n2A_vendor;
      cameraPrm.t2aConfig.n2A_mode = gUI_mcfw_config.n2A_mode;
      cameraPrm.vnfFullResolution = FALSE;

     /* isp link params */
     ispPrm.inQueParams.prevLinkId    = gVcamModuleContext.cameraId;
     ispPrm.inQueParams.prevLinkQueId = 0;
     ispPrm.numOutQueue               = 3;
     ispPrm.outQueInfo[0].nextLink    = mergeId;
     ispPrm.outQueInfo[1].nextLink    = mergeId;
     ispPrm.outQueInfo[2].nextLink    = dupId;
     ispPrm.clkDivM    = 10;
     ispPrm.clkDivN          = 20;
     ispPrm.vsEnable = gUI_mcfw_config.vsEnable;
     ispPrm.outQueuePrm[0].dataFormat = SYSTEM_DF_YUV420SP_VU;
     ispPrm.outQueuePrm[0].width      = 1920;
     ispPrm.outQueuePrm[0].height     = 1080;
     ispPrm.outQueuePrm[1].dataFormat = SYSTEM_DF_YUV420SP_VU;
     ispPrm.outQueuePrm[1].width      = 720;
     ispPrm.outQueuePrm[1].height     = 576;
     ispPrm.outQueuePrm[2].dataFormat = SYSTEM_DF_YUV420SP_VU;
     ispPrm.outQueuePrm[2].width      = 1920;
     ispPrm.outQueuePrm[2].height     = 1536;
     ispPrm.vnfFullResolution         = FALSE;

    The result is OK, and also I could get two H.264 stream and one JPEG(1920*1536) stream.

    As you said, the performance is limited.  There are many frames skipped in the stream, especially when there are some motions in the scene.

    I have ever tried to increase the output number of camera at continuous mode, but there are some errors of time out.

    If I use  duplicate link and then  scalar link(not resize link), would the performance of scaler be limited? Because I have to use two scaler utilizations at least.

  • Hi,

     

    In the current code, ISP Link can generate 4 output streams, it does this by processing the same frame multiple times in resizer hardware. so you could use the same isp link to generate 4 output streams, but please note that, the performace will be limited since it uses same hardware.

    So if you use isplink , or if you use duplicate link + scalar link  to generate four streams, it will use same hardware, so performance will be limited.

     

    Regards,

    Brijesh

  • Thanks for your help.

    But if I want to use camera link for 4 output stream at continuous mode, What should I modify?

    I have only implement it at one-shot mode. As I have said previously that I tried to increase the output number of camera at continuous mode, but there were some errors of time out.

  • Hi,

     

    In Continuous mode, it is not possible to get 4 streams with the different resolution. You could get 2 streams and then duplicate them to get the 4 streams.

    If you are ok, you could use hdvpss scalar to get 2 more resized output. Please refer to the scalar link to get more info.

     

    Regards,

    Brijesh

  • Thanks for your useful help.

    Which is better for the image capturing in processing  efficiency,   Continuous mode or one shot mode?

    In our demo, The stream generated from Continuous mode plays more fluently than  that  generated from one shot mode. Does one shot mode support  processing 1080P YUV@60fps  in  real time?

  • Hi,

     

    in terms of processing frequency, both are exactly same, but you could save memory bandwidth in case of on-the-fly processing.

     

    Regards,

    Brijesh