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.

RTOS/TDA2PXEVM: Issue while using 4 inputs as composite buffer

Part Number: TDA2PXEVM


Tool/software: TI-RTOS

Hi,

I'm using TDA2PX with VisionSDK 3.5.

I have created usecase as follows: NetworkRx -> Decode -> Sync -> VPE -> Plugin -> Display

I'm sending 4 .avi videos through NetworkRx and I'm changing dataformat to SYSTEM_DF_RGB24_888 using VPE link as my plugin needs 4 inputs with RGB format. So I changed plugin to accept 4 inputs as composite buffer type and I also made changes for RGB.

But I'm getting following assertion :

[IPU1-0]     40.765479 s:  Assertion @ Line: 575 in utils_buf.c: (pBuffer->bufType == SYSTEM_BUFFER_TYPE_VIDEO_FRAME) || (pBuffer->bufType == S
YSTEM_BUFFER_TYPE_EGLPIXMAP_VIDEO_FRAME) : failed !!!
[IPU1-0]     40.766516 s:  Assertion @ Line: 575 in utils_buf.c: (pBuffer->bufType == SYSTEM_BUFFER_TYPE_VIDEO_FRAME) || (pBuffer->bufType == S
YSTEM_BUFFER_TYPE_EGLPIXMAP_VIDEO_FRAME) : failed !!!

Can you please help me in solving this ? Can you please suggest any existing usecase for reference?

 

  • Do we need to configure VPE link to output composite buffer?
    If yes then How?
  • Megha,

    First VPE does not support RGB as input, so so even if you add support for composite buffer in the VPE link, it will not work.
    You have to change the data format to yuv422 or yuv420.

    Rgds,
    Brijesh
  • Hi Brijesh,

    Input to VPE is in YUV format only. VPE is used here for converting YUV to RGB (as my plugin needs RGB data ) for all 4 input videos given using NetworkRx .

  • Megha,

    ok, composite frame is not supported in the current VPE link implementation. you need to add it. you could use sync link as the reference.. 

    Btw, for each frame in composite frame, does anything change, like size, format, pitch?  If there is no change, then you could use same driver handle to process all frames, you just need to change input/output buffer pointer.

    Rgds,

    Brijesh

  • Hi Brijesh,

    Thanks for the reply.

    For each frame in composite frame, all parameters like size, pitch, format are same. I referred Sync link, there is function named "SyncLink_makeCompositeBuffer" , do I need to use the same in VPE link for composite buffer or what all changes I need to do please suggest.

  • It really depends only what you want to output. If you want to output composite frame, when input is composite, then you require to allocate and make composite buffer. But in that case, the next link after VPE, should support composite buffer..

    Rgds,
    Brijesh
  • Hi Brijesh,

    Yes I want to output composite buffer when input is composite buffer in VPE link as my next plugin needs composite buffer as input.

    Regards,
    Megha
  • Hi Brijesh,
    I referred Sync link and changed following lines in VpeLink_createVpeOutChBufferQueue() API in vpeLink_drvCommon.c for composite buffer:
    System_VideoFrameBuffer *videoFrames; to System_VideoFrameCompositeBuffer *videoFrames;
    buffers->bufType = SYSTEM_BUFFER_TYPE_VIDEO_FRAME_CONTAINER;//SYSTEM_BUFFER_TYPE_VIDEO_FRAME;
    buffers->payloadSize = sizeof(System_VideoFrameCompositeBuffer);//sizeof(System_VideoFrameBuffer);
    for (planes = 0; planes < SYSTEM_MAX_PLANES; planes++)
    {
    videoFrames->bufAddr[planes][videoFrames->numFrames] = frames->addr[0][planes];//videoFrames->bufAddr[planes] = frames->addr[0][planes];
    }

    But I'm getting following assertion:
    [IPU1-0] 16.376990 s: Assertion @ Line: 575 in utils_buf.c: (pBuffer->bufType == SYSTEM_BUFFER_TYPE_VIDEO_FRAME) || (pBuffer->bufType == S
    YSTEM_BUFFER_TYPE_EGLPIXMAP_VIDEO_FRAME) : failed !!!
    [IPU1-0] 16.377874 s: Assertion @ Line: 575 in utils_buf.c: (pBuffer->bufType == SYSTEM_BUFFER_TYPE_VIDEO_FRAME) || (pBuffer->bufType == S
    YSTEM_BUFFER_TYPE_EGLPIXMAP_VIDEO_FRAME) : failed !!!

    Where i'm missing ? What other changes I need to do to output composite buffer for VPE link?

  • Hi Megha,

    it is not just the buffer type that requires to be changed.
    1, you need to allocate composite buffer type, and assign pointer of it in the system buffer
    2, for each composite buffer, you need to allocate buffer for storing video frame and assign them in composite buffer
    3, then in the process data, you need to run a loop to extract video frame from input composite buffer, dequeue a output composite buffer and make a pair of input and output frame and submit it the driver.
    4, once all frames in the composite buffer are processed, you need to put the system buffer for the corresponding composite buffer in the output queue and send a message to next link..


    Rgds,
    Brijesh
  • Hi Brijesh,

    If we don't configure VPE link for composite buffer for both input and output, and if we give four videos to VPE link via NetworkRx then how it will behave?  Will it give 4 buffers (of System_VideoFrameBuffer type) to next plugin or will give assertion?

  • It will give out system_videoframebuffer.
  • Thanks for the reply.
    Just a one query . Every frame for 4 input videos , will it give 4 buffers of system_videoframebuffer type to Next link?
  • Hi Megha,

    For the frames of 4 input videos, there will be separate input video frame buffer and so there will be separate independent output video frame buffer.
    This info is not known to the VPE link. it just processes video frame buffer as it comes and if channel matches..

    Regards,
    Brijesh