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.

Can't get the YUV frames from buffer when use the DEC and ipcframesinHost...

Attached below is my Link api app, I can use the "bitsout_putfull"  to send the jpeg successfully, but can't get the yuv frames.

Does anyone can help me, if so, I will thank you very much.

 

printf Debug info:

Thread <ipc_jpeg_in_func>: ret_status = 0
Thread <ipc_jpeg_in_func>: emptyBufList.numBufs = 1
Thread <ipc_jpeg_in_func>: emptyBufList.bufs[bufi]->bufSize = 1920000
Thread <ipc_jpeg_in_func>: ret_status = 0...

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.
Thread <ipc_jpeg_out_func>: ret_status = 0.
Thread <ipc_jpeg_out_func>: bufList.numFrames = 0.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.

  • Below ode lines are wrong:

    ipcFramesOutVideoPrm.baseCreateParams.notifyPrevLink = FALSE

    should be TRUE

    ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = TRUE;

    should be FALSE.

    Refer this thread where fileRead->decode->fileWrite is implemented correctly

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/291937/1020114.aspx#1020114

     

  • Hi Badri,

     Thank you for your reply, I will verify your suggestion soon...

  • Hi Badri,

     I have modified the souce code,and I have go through the "fileRead->decode->fileWrite" .

    but I can't not get any frame infomation via the function "IpcFramesInLink_getFullVideoFrames",

    Now ,I have 3 questions below:

    1: Do I need to change my thread2(receive thread) to callback function to receive decoded frames?

    2: I look through the "Chains_ipcFramesSendRecvFxn()" "Vdec_requestBitstreamBuffer()" "Vdec_putBitstreamBuffer()" , and I think the main methods for send and receive bits or frames are the same to my methods, Must  I  invoke the avove functions ? if not, what's my fault of my operition flow?

    3: When i debug the "file-dec-file" Link source code, how could know the dec link( hdvicp2) has received and has decoded the bits data?  (Has the decoder worked?) why did not receive any printed console infomation from Video M3?

    Thank you in advance.

     

  • Both your ipc_jpeg_in_func and ipc_yuv_out_func are wrongly implemented.

    Refer the other post I shared or refer dvr rdk demo for correct usage of APIs.

    There are too many issues to list but some basic things are:

    1.Both threads don't block anywhere.

    2. ipc_jpeg_in_func doesn't correctly handle no bitBuffer condition

    3. ipc_jpeg_in_func doesn't populate parameters in bitBuffer correctly like filledLength

    4. Bitbuffer should be chunked to frames and fed one  frame at a time. You are reading entire file and passing it in one call.

     

  • Hi Badri,

     

    I add the 3rd question in my before reply. Is there any method to know video M3 has works?

  • Hi Badri,

    I am very thank you for your detailed reply.

    1.Both threads don't block anywhere.  

    (Because of there is nothing to get from "IpcFramesInLink_getFullVideoFrames()", so I let the ipc_jpeg_in_func() to send the jpeg data continuously in case losing or missing the Frames form outbuf.)

    2. ipc_jpeg_in_func doesn't correctly handle no bitBuffer condition

    (Because the project is very ungent, so in the beginning of development I didn't make some error or abnormal condition.)

    3. ipc_jpeg_in_func doesn't populate parameters in bitBuffer correctly like filledLength

    (How can  get  the right parameters of bitBuffer? to calculate with the width and height?)

    4. Bitbuffer should be chunked to frames and fed one frame at a time. You are reading entire file and passing it in one call.

    (How should I to cut the jpeg bits flow  and fed that to link? is there any documentation or some Demos?)

  • You can print statistics and check the logs to see how many frames are processed on M3. Check the following stats

    IPCBITSOUT Print BUFFER Statistics,Print BUFFER Statistics,Print Statistics,Print IVA-HD Statistics

     

  • Hi Badri,

     I'm sorry for reply so late, under your  suggestion and code guide, I have done my dec code works,

    Thank you for your before untiring help.  

    :)