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.

DM3730 decoders have low fps on 720p video

Other Parts Discussed in Thread: DM3730

I tested mpeg2/4 and h264 720p video on DM3730 with GStreamer. I found all of them have 20 or lower fps most time although their DSP usage is only around 50% in terms of performance. Is there any approach to improve frame rate up to 30fps as specified in their documents?

Kind Regards

Kai

  • I think problem is somehwere else. The bottleneck is not codec as you see the DSP load is less. Though the rated performance for codec is 720P@24fps

    You can try putting the post in http://gstreamer.ti.com/ . 

    regards

    Yashwant

  • Hi Kaijun,

    Could you share your gstreamer pipeline and a CE_DEBUG=3 log for 3 frames (ticapturesrc num-buffers = 3 ) to see where is your problem and if it's the codec in cause.

    for your log please try something like that :

    CE_DEBUG=3 gst-launch -v ticapturesrc (or videotestsrc) num-buffers=3  ! ........ ! .........! fakesink silent=false > /path/to/your/log.txt

  • Hi Mike,

    I work on decoder. How can I use ticapturesrc? Thank you for your tips. I captured a piece of CE log by the following pipeline.

    CE_DEBUG=3 gst-launch-0.10 -v filesrc location=bbb.h264 ! TIViddec2 codecName=h264dec engineName=codecServer !fakesink silent=false > log.txt

    @6,579,934us: [+0 T:0x41f38470 S:0x41f372b4] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x90200, inBufs=0x41f37404, outBufs=0x41f373f8, inArgs=0x41f37c68, outArgs=0x41f374c8)
    @6,579,965us: [+4 T:0x41f38470 S:0x41f3722c] CV - VISA_getMaxMsgSize(0x90200): returning 0x1000
    @6,579,995us: [+5 T:0x41f38470 S:0x41f37234] CV - VISA_allocMsg> Allocating message for messageId=0x000200d6
    @6,580,056us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x4284415c, size=921600)
    @6,580,148us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x4284415c, size=921600)
    @6,580,178us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> found in cb(Sc=0x427b9000, Ec=0x42acc800, Ss=0x4284415c, Es=0x4292515c, PSc=0x8d2d9000)
    @6,580,209us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> returning physAddr=0x8d36415c
    @6,580,239us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> return (0x8d36415c)
    @6,580,270us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x42de0000, size=1843200)
    @6,580,270us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x42de0000, size=1843200)
    @6,580,300us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> found in cb(Sc=0x42de0000, Ec=0x42fa2000, Ss=0x42de0000, Es=0x42fa2000, PSc=0x8d117000)
    @6,580,331us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> returning physAddr=0x8d117000
    @6,580,361us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> return (0x8d117000)
    @6,580,392us: [+0 T:0x41f38470 S:0x41f37254] CV - VISA_call(visa=0x90200, msg=0x42749880): messageId=0x000200d6, command=0x0
    @6,580,422us: [+0 T:0x41f38470 S:0x41f3721c] OC - Comm_put> Enter(queue=0x2, msg=0x42749880)
    @6,580,483us: [+0 T:0x41f38470 S:0x41f3721c] OC - Comm_put> return (0)
    @6,580,514us: [+0 T:0x41f38470 S:0x41f37214] OC - Comm_get> Enter(queue=0x10001, msg=0x41f372cc, timeout=-1)
    @6,601,907us: [+0 T:0x41f38470 S:0x41f37214] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @6,601,968us: [+0 T:0x41f38470 S:0x41f371a4] OC - Comm_put> Enter(queue=0x0, msg=0x42748880)
    @6,602,029us: [+0 T:0x41f38470 S:0x41f371a4] OC - Comm_put> return (0)
    @6,602,059us: [+0 T:0x41f38470 S:0x41f3719c] OC - Comm_get> Enter(queue=0x10000, msg=0x41f3723c, timeout=-1)
    @6,602,304us: [+0 T:0x41f38470 S:0x41f3719c] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    [DSP] @17,521,872tk: [+5 T:0x8fbc407c S:0x8fbca044] CN - NODE> 0x8fbc3a30(h264dec#0) call(algHandle=0x8fbc3af8, msg=0x8d905880); messageId=0x000200d6
    [DSP] @17,521,970tk: [+0 T:0x8fbc407c S:0x8fbc9edc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x8fbc3af8, inBufs=0x8fbc9f84, outBufs=0x8fbca048, inArgs=0x8d9059f8, outArgs=0x8d905a04)
    [DSP] @17,522,084tk: [+5 T:0x8fbc407c S:0x8fbc9ebc] CV - VISA_enter(visa=0x8fbc3af8): algHandle = 0x8fbc3b30
    [DSP] @17,522,150tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x8fbc3b30)
    [DSP] @17,522,219tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Exit
    [DSP] @17,587,725tk: [+5 T:0x8fbc407c S:0x8fbc9ebc] CV - VISA_exit(visa=0x8fbc3af8): algHandle = 0x8fbc3b30
    [DSP] @17,587,839tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x8fbc3b30)
    [DSP] @17,587,912tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
    [DSP] @17,587,971tk: [+0 T:0x8fbc407c S:0x8fbc9edc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Exit (handle=0x8fbc3af8, retVal=0x0)
    [DSP] @17,588,054tk: [+5 T:0x8fbc407c S:0x8fbca044] CN - NODE> returned from call(algHandle=0x8fbc3af8, msg=0x8d905880); messageId=0x000200d6
    [DSP] @17,589,247tk: [+0 T:0x8fbbef74 S:0x8fbc2f34] CR - processRmsCmd(0x8d9048a8, 4056): cmd = 5
    [DSP] @17,589,306tk: [+0 T:0x8fbbef74 S:0x8fbc2f34] CR - remote time = 0x0, trace buffer size = 4032
    @6,603,219us: [+0 T:0x41f38470 S:0x41f371d4] CE - Engine_fwriteTrace> returning count [1491]
    @6,603,250us: [+0 T:0x41f38470 S:0x41f37254] CV - VISA_call Completed: messageId=0x000200d6, command=0x0, return(status=0)
    @6,603,311us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> Enter(physAddr=0x8d117000, size=1843200)
    @6,603,341us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> Enter(physAddr=0x8d117000, size=1843200)
    @6,603,372us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> found in cb(Sc=0x8d117000, Ec=0x8d2d9000, Ss=0x8d117000, Es=0x8d2d9000)
    @6,603,402us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> returning virtAddr=0x42de0000
    @6,603,433us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> return (0x42de0000)
    @6,603,463us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> Enter(physAddr=0x8d117000, size=1843200)
    @6,603,494us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> Enter(physAddr=0x8d117000, size=1843200)
    @6,603,524us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> found in cb(Sc=0x8d117000, Ec=0x8d2d9000, Ss=0x8d117000, Es=0x8d2d9000)
    @6,603,555us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> returning virtAddr=0x42de0000
    @6,603,585us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> return (0x42de0000)
    @6,603,646us: [+5 T:0x41f38470 S:0x41f3722c] CV - VISA_freeMsg(0x90200, 0x42749880): Freeing message with messageId=0x000200d6
    @6,603,677us: [+0 T:0x41f38470 S:0x41f372b4] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Exit (handle=0x90200, retVal=0x0)
    @6,603,707us: [+2 T:0x41f38470 S:0x41f37304] ti.sdo.dmai - [Vdec2] VIDDEC2_process() ret 0 inId 0 inUse 0 consumed 4092
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (1843200 bytes, timestamp: 0:00:05.805799884, duration: 0:00:00.033366666, offset: -1, offset_end: -1, flags: 0 ) 0x924f0"
    @6,604,348us: [+0 T:0x41f38470 S:0x41f37bd4] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x42845158, size=4)
    @6,604,409us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x42845158, size=4)
    @6,604,440us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> found in cb(Sc=0x427b9000, Ec=0x42acc800, Ss=0x42845158, Es=0x4284515c, PSc=0x8d2d9000)
    @6,604,470us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> returning physAddr=0x8d365158
    @6,604,501us: [+0 T:0x41f38470 S:0x41f37bd4] OM - Memory_getBufferPhysicalAddress> return (0x8d365158)
    @6,604,531us: [+2 T:0x41f38470 S:0x41f37c0c] ti.sdo.dmai - [Buffer] Set user pointer 0x42845158 (physical 0x8d365158)
    @6,604,562us: [+0 T:0x41f38470 S:0x41f372b4] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x90200, inBufs=0x41f37404, outBufs=0x41f373f8, inArgs=0x41f37c68, outArgs=0x41f374c8)
    @6,604,623us: [+4 T:0x41f38470 S:0x41f3722c] CV - VISA_getMaxMsgSize(0x90200): returning 0x1000
    @6,604,653us: [+5 T:0x41f38470 S:0x41f37234] CV - VISA_allocMsg> Allocating message for messageId=0x000200d7
    @6,604,714us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x42845158, size=921600)
    @6,604,745us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x42845158, size=921600)
    @6,604,775us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> found in cb(Sc=0x427b9000, Ec=0x42acc800, Ss=0x42845158, Es=0x42926158, PSc=0x8d2d9000)
    @6,604,775us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> returning physAddr=0x8d365158
    @6,604,806us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> return (0x8d365158)
    @6,604,837us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x42fa2000, size=1843200)
    @6,604,867us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x42fa2000, size=1843200)
    @6,604,959us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> found in cb(Sc=0x42fa2000, Ec=0x43164000, Ss=0x42fa2000, Es=0x43164000, PSc=0x8cf55000)
    @6,604,989us: [+1 T:0x41f38470 S:0x41f37204] OM - Memory__getPhysicalAddress> returning physAddr=0x8cf55000
    @6,605,020us: [+0 T:0x41f38470 S:0x41f37204] OM - Memory_getBufferPhysicalAddress> return (0x8cf55000)
    @6,605,050us: [+0 T:0x41f38470 S:0x41f37254] CV - VISA_call(visa=0x90200, msg=0x42749880): messageId=0x000200d7, command=0x0
    @6,605,081us: [+0 T:0x41f38470 S:0x41f3721c] OC - Comm_put> Enter(queue=0x2, msg=0x42749880)
    @6,605,142us: [+0 T:0x41f38470 S:0x41f3721c] OC - Comm_put> return (0)
    @6,605,172us: [+0 T:0x41f38470 S:0x41f37214] OC - Comm_get> Enter(queue=0x10001, msg=0x41f372cc, timeout=-1)
    @6,630,258us: [+0 T:0x41f38470 S:0x41f37214] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @6,630,319us: [+0 T:0x41f38470 S:0x41f371a4] OC - Comm_put> Enter(queue=0x0, msg=0x42748880)
    @6,630,349us: [+0 T:0x41f38470 S:0x41f371a4] OC - Comm_put> return (0)
    @6,630,380us: [+0 T:0x41f38470 S:0x41f3719c] OC - Comm_get> Enter(queue=0x10000, msg=0x41f3723c, timeout=-1)
    @6,630,654us: [+0 T:0x41f38470 S:0x41f3719c] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    [DSP] @17,598,932tk: [+5 T:0x8fbc407c S:0x8fbca044] CN - NODE> 0x8fbc3a30(h264dec#0) call(algHandle=0x8fbc3af8, msg=0x8d905880); messageId=0x000200d7
    [DSP] @17,599,028tk: [+0 T:0x8fbc407c S:0x8fbc9edc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x8fbc3af8, inBufs=0x8fbc9f84, outBufs=0x8fbca048, inArgs=0x8d9059f8, outArgs=0x8d905a04)
    [DSP] @17,599,144tk: [+5 T:0x8fbc407c S:0x8fbc9ebc] CV - VISA_enter(visa=0x8fbc3af8): algHandle = 0x8fbc3b30
    [DSP] @17,599,208tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0x8fbc3b30)
    [DSP] @17,599,279tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Exit
    [DSP] @17,676,309tk: [+5 T:0x8fbc407c S:0x8fbc9ebc] CV - VISA_exit(visa=0x8fbc3af8): algHandle = 0x8fbc3b30
    [DSP] @17,676,423tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0x8fbc3b30)
    [DSP] @17,676,495tk: [+0 T:0x8fbc407c S:0x8fbc9e9c] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
    [DSP] @17,676,554tk: [+0 T:0x8fbc407c S:0x8fbc9edc] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Exit (handle=0x8fbc3af8, retVal=0x0)
    [DSP] @17,676,639tk: [+5 T:0x8fbc407c S:0x8fbca044] CN - NODE> returned from call(algHandle=0x8fbc3af8, msg=0x8d905880); messageId=0x000200d7
    [DSP] @17,677,843tk: [+0 T:0x8fbbef74 S:0x8fbc2f34] CR - processRmsCmd(0x8d9048a8, 4056): cmd = 5
    [DSP] @17,677,901tk: [+0 T:0x8fbbef74 S:0x8fbc2f34] CR - remote time = 0x0, trace buffer size = 4032
    @6,631,509us: [+0 T:0x41f38470 S:0x41f371d4] CE - Engine_fwriteTrace> returning count [1491]
    @6,631,539us: [+0 T:0x41f38470 S:0x41f37254] CV - VISA_call Completed: messageId=0x000200d7, command=0x0, return(status=0)
    @6,631,600us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> Enter(physAddr=0x8cf55000, size=1843200)
    @6,631,631us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> Enter(physAddr=0x8cf55000, size=1843200)
    @6,631,661us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> found in cb(Sc=0x8cf55000, Ec=0x8d117000, Ss=0x8cf55000, Es=0x8d117000)
    @6,631,692us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> returning virtAddr=0x42fa2000
    @6,631,723us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> return (0x42fa2000)
    @6,631,753us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> Enter(physAddr=0x8cf55000, size=1843200)
    @6,631,784us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> Enter(physAddr=0x8cf55000, size=1843200)
    @6,631,814us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> found in cb(Sc=0x8cf55000, Ec=0x8d117000, Ss=0x8cf55000, Es=0x8d117000)
    @6,631,814us: [+1 T:0x41f38470 S:0x41f3721c] OM - Memory__getVirtualAddress> returning virtAddr=0x42fa2000
    @6,631,906us: [+0 T:0x41f38470 S:0x41f3721c] OM - Memory_getBufferVirtualAddress> return (0x42fa2000)
    @6,631,936us: [+5 T:0x41f38470 S:0x41f3722c] CV - VISA_freeMsg(0x90200, 0x42749880): Freeing message with messageId=0x000200d7
    @6,631,967us: [+0 T:0x41f38470 S:0x41f372b4] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Exit (handle=0x90200, retVal=0x0)
    @6,631,997us: [+2 T:0x41f38470 S:0x41f37304] ti.sdo.dmai - [Vdec2] VIDDEC2_process() ret 0 inId 1 inUse 0 consumed 41091
    /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain   ******* < (1843200 bytes, timestamp: 0:00:05.839166550, duration: 0:00:00.033366666, offset: -1, offset_end: -1, flags: 0 ) 0x92420"
    @6,632,638us: [+0 T:0x41f38470 S:0x41f37bd4] OM - Memory_getBufferPhysicalAddress> Enter(virtAddr=0x4284f1db, size=4)
    @6,632,699us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> Enter(virtAddr=0x4284f1db, size=4)
    @6,632,730us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> found in cb(Sc=0x427b9000, Ec=0x42acc800, Ss=0x4284f1db, Es=0x4284f1df, PSc=0x8d2d9000)
    @6,632,760us: [+1 T:0x41f38470 S:0x41f37bd4] OM - Memory__getPhysicalAddress> returning physAddr=0x8d36f1db
    @6,632,791us: [+0 T:0x41f38470 S:0x41f37bd4] OM - Memory_getBufferPhysicalAddress> return (0x8d36f1db)
    @6,632,821us: [+2 T:0x41f38470 S:0x41f37c0c] ti.sdo.dmai - [Buffer] Set user pointer 0x4284f1db (physical 0x8d36f1db)
    @6,632,852us: [+0 T:0x41f38470 S:0x41f372b4] ti.sdo.ce.video2.VIDDEC2 - VIDDEC2_process> Enter (handle=0x90200, inBufs=0x41f37404, outBufs=0x41f373f8,

  • Hi Kaijun,

    From your Log, we can see between viddec_process enter and process exit a during decoding process about 24ms. 25fps let you 1/25 = 40ms to capture, decode and display.

    So it's not your decoder who takes too much time.

    You must have a dmaiperf pluggin with print-arm-load=true option you can see the FPS of your pipeline.

    So, try filesrc .... ! dmaiperf print-arm-load=true ! fakesink to see if you don't lost frame.

    After if this respect the fps from you file, try filesrc ..... ! queue ! TIViddec ..... ! dmaiperf print-arm-load=true ! fakesink

    Look at the queue element to understand how it works...

    If you still have bad FPS try to see where about the 25FPS/40ms you are losting your time !

    A good thing to try it's to modify the filesrc to put directly your frame in a DMAI Buffer !?

    For your ticapturesrc question, it's to capture a video from a camera so it's not for using with filesrc. Try gst-inspect or / gst-inspect-0.10 ticapturesrc to get info.

    Hope it will help you. And please share your perf result ?

    Mika