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.

Better method to display multi stream as one channel?

Hi, Every one:

        I'm try to display severl channel of stream like 4 channel 720x480 as one picture in 1440x960, like DVR, so I have to copy the 4 channel stream data to a tmpbuf in right postion, and then put this buf to display buf, So, I have to use a temp buf? serverl days ago I heard TI has an PDF explain how to use an pointer and mmap to make it happen without a tmpbuf, so someone knows how to display serverl stream as one picture without an tmp buf  or know how could I get the PDF, please let me know

appreciate

  • Hi Eric,

    I am not sure which document are you talking about. But the straight forward way is listed in following steps:

    1. Allocate contiguous buffer of 1440x960 using CMEM module

    2. Open capture driver and use it in USERPTR mode instead of mmap mode. This means you are going to provide buffer for the capture driver instead of using internal kernel buffers.

    3. Pass the buffer allocated in step 1, as USERPTR to the capture driver for each input channel.

      - For example for CH1, pass the location (0,0) of the allocated buffer with line offset 1440

     - For CH2, pass the location (720,0) of the allocated buffer with the line offset 1440

     - Similarly do for CH3 and CH4

    4. Once all 4 streams are captured, pass that buffer to the display driver as USERPTR again.

    Is this what you are looking for or did i misunderstand your question? BTW, you need to be little careful to implement this mode as one can make mistake in line offset and starting position calculation for each channel buffer.

     

    Regards.

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi, Anshuman:

        Thank you for your reply,  I not familiar with the capture driver and I'm going to take a look at, but I have to tell you that all I want to do is decode 4 channel stream and display these in one picture, not capture 4 channel stream and display it, so, I can use this method too?  any data-sheet can help me to make this happened will be appriciate!

    Regards

    Eric

  • Hi Eric,

    It might be possible to do similar thing on decoder, although with decoder it is going to be tricky. I am assuming you want to do this with H.264 decoder on DM365. The reason is that the start position of display buffer from decoder can be different from the actual decoded buffer. Please refer to H.264 decoder user guide for details about display buffer.

    The idea in summary is that you pass the pointers to the decoder for the output buffer, which are at offsets like (0,0), (720,0) (0,480) and (720,480).

    Regards,

    Anshuman

    PS: Please mark the post as verified, if you think it has answered your question. Thanks.