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.

why can't execute encode and decode module simultaneously in omx????

Other Parts Discussed in Thread: TEST2

      In the omx program, I can execute encoder and decoder module independently. However, when I execute encoder and decoder module simultaneously, the program will hang and no video data can't be read from encoder componet output after serveral minutes. I try to make MC_HDVPSS_INT_HEAP_CACHED and MC_HDVICP2_INT_HEAP_CACHED larger, and I find thar the time of executing encoder and decoder will be longer such as half an hour, but the program also hang. I don't know the reason. who can help me??

     Thank you very much!

  • Hi Yue,

    If you are using EZSDK based OMX applications for encoding and decoding from different threads, it won't work.

    It is a known issue that OMX components don't work in multi-process environment.

    Ram

  • HI,Ramprasad , thank you for your reply very much!

    Maybe you misunderstand my issue.

    My omx program is omx progam with a single process. All capture,dei, encode, decode and display components are builded and used in the single process. I create two pthreads in the single process, one for processing encoder ,another for processing decoder. when the two pthreads work simultaneously, the omx program will hang after a piece of time, such as serveral minutes or half an hour. the time is related with  MC_HDVPSS_INT_HEAP_CACHED and MC_HDVICP2_INT_HEAP_CACHED. I don't know why the omx program will hang after some time! 

  • Hi xiongzhi yue,

          Actually the limitation is that you can't run two independent process using OMX since both will try to run OMX_Init so there will be conflicts with syslink, etc.

          If you are using both, the encoder and decoder from the same process you shouldn't have the problem, actually I just run the test using gstreamer and it runs without problems

    1. Create .h264 video

    gst-launch -e videotestsrc num-buffers=200 ! queue ! capsfilter caps="video/x-raw-yuv,format=\(fourcc\)NV12,width=320,height=240,framerate=10/1,color-matrix=sdtv,chroma-site=mpeg2" ! omx_h264enc ! gstperf ! filesink location=test.h264

    2. Then decode the video and at the same time create another to demonstrate both working at the same time:


    gst-launch videotestsrc num-buffers=200 ! queue ! capsfilter caps="video/x-raw-yuv,format=\(fourcc\)NV12,width=320,height=240,framerate=10/1,color-matrix=sdtv,chroma-site=mpeg2" ! omx_h264enc ! gstperf ! filesink location=test2.h264 filesrc location= test.h264 ! capsfilter caps="video/x-h264,width=320,height=240,framerate=10/1,stream-format=byte-stream,alignment=au" ! omx_h264dec ! fakesink -v

    It shouldn't show any problem, even if you add threads (queue elements).

    -David

  • Hello xiongzhi,

    You could find application VFCC->DEI->VENC->VDEC->VFPC-SC->VFDC here :

    http://processors.wiki.ti.com/index.php/Latency_Measurement_on_Capture_Encode_Decode_Display_Demo

    Could you verify is with this application are you will observe same problem?

    Best Regards,

    Margarita