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.

TDA2PXEVM: questions about inputBufList.numBuf in a algorithm link

Part Number: TDA2PXEVM

Hi,

In a xx_algPlugin.c, a AlgorithmLink_xxProcess function receives 'inputBufList' as a input parameter.

A value of inputBufList.numBuf means a number of buffers.

For example, in my case, this value comes to 4.

How can I change this value to 2 and which part of source code involved for that?

I set a input channel number to 2 for dual camera capture actually.

So, 4 buffers are filled with channel index [0],[1],[0] and [1].

Does it means that a first index[0] buffer and second index[0] buffer is sequencial?

I need only one frame per each channel.

How can I get this?

Thank you.

  • Hi,

    The number of buffer parameter is user defined which will be defined in usecase and by defaults it will have a value of 4.

    How can I change this value to 2 and which part of source code involved for that?
    change the numBuf variable to 2 of the previous link of alg link.

    Does it means that a first index[0] buffer and second index[0] buffer is sequencial?
    Yes, interms of processing from the prev link.

    Regards,
    Anuj
  • Hi Anuj,

    Thank you for your comment.
    In my case, a IssCapture link is linked in front of my algorithm link.
    Then, should I modify a source code of IssCapture link?

    Thank you.

    Regards,
    Jeon
  • Jeon,

    You might get numBufs in the frames list to be 4, but they could be coming from difference camera. could you please first check if channels id/number are different or same? If they are different, they are coming from different camera.

    Rgds,
    Brijesh
  • Thank you very much.
  • Hi Brijesh,

    I attached Select link between IssM2MIsp and Display link.
    So, I can see 2 channels of camera through HDMI output.
    Four buffers filled with images from 2 cameras.
    I want to generate a depth map with my own algorithm by new algorithm link.
    So, I should receive 1 frames of image from each cameras and generate depth map.
    Overall, I want to make new algorithm link that has 2 input buffers and 1 output buffer.

    Brief chain is like this:
    IssCapture -> Algo_bayer2bgr -> Algo_newdepth -> Display

    Algo_bayer2bgr link convers 2 12bit-bayer format input buffer to 2 bgr24-888 format output buffer.
    Algo_newdepth link should generate depthmap from 2 bgr24-888 buffer input to 1 bgr24-888 output buffer.

    So, I will try modify a output buffer number of IssCapture link from 4 to 2.
    And, will write Algo_newdepth link to feed only 1 buffer to Display link.

    How about my plan? Is it resonable?
    Andm in order to get 2 images from camera, should I use Sync link?
    Thank you.

    Regards,
    Jeon
  • Hi Anuj,

    I'm trying to find a 'numBuf' realated variables in the files under '~/links_fw/src/rtos/links_ipu/iss_capature' directory.
    But, I couldn,t find anything.
    Could you give me more information to modify number of out frames in IssCapture?
    Thank you.

    Regards,
    Jeon
  • Jeon,

    How many cameras you have connected to ISS capture? Depending on that, you can change the number of channels/stream in the ISS capture create parameters. Please note that numOutBuf is different from number of channels/camera. You need to change number of channels/streams in order to get buffers from two camera..
    Finally you could add sync link before your depthmap algorithm to get synchronous frame in your algo in composite buffer. You could process them and output one buffer, which can be connected to the display..

    Rgds,
    Brijesh
  • Hi Brijesh,
    I have connected 2 cameras to ISS capture.
    So, I can get images from these 2 cameras with chID 0 and 1.
    But, in a Algo_bayer2bgr link as I mentioned above, I got 4 buffers.
    I want to that ISS capture send 2 buffers at once to Algo_bayer2bgr link not 4 buffers, maybe it depends on numOutBuf.
    Unfortunatly, I couldn't find yet which part of code in ISS capture related on reducing numOutBuf.

    Thank you.

    Regards,
    Jeon
  • Jeon,

    As i said, this is not dependent on the number of out buffers.
    Capture link just puts the buffers in its output queue as it gets from the sensor. Now if your algorithm gets scheduled delayed, you might see multiple buffers in the input queue. Lets say if your camera is outputting at 30fps, the algorithm should get scheduled at almost every 33ms, if it gets delayed slightly, you will get two frames in the input queue.
    Are both of your algorithm running on IPU? can you check at what rate your algorithm gets scheduled? Also does your algorithm take more than 33ms? Please include the profiling in the algorithm and check..

    Rgds,
    Brijesh