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.

How to solve dataflow block in Mcfw usecase?

Hi everyone,

I'm using IPNC 8127 RDK ver3.5.

Now I've added my own alg in the ALGlink and replace VAlink in "tristream fullfeature" usecase with this ALGlink.In my usecase,before data frames are sent to ALGlink,they are sent to SCLRlink first.

Here is my log:

4135.8127 error.txt
 [host] 
********** FULL FEATURE USECASE ********

 [host] ********* Entered Tri Streaming usecase - H264 1080p @60fps + H264 D1 @30fps + MJPEG 1080p @5fps ********


 [host]  164: MCFW  : CPU Revision [ES2.1] !!! 

 [host]  165: MCFW  : Detected [UNKNOWN] Board !!! 

 [host]  165: MCFW  : Base Board Revision [REV A] !!! 
 [m3vpss ] VPS_DCTRL_INST_0
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_DVO2
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_HDMI
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_OUTPUT SYSTEM_DC_VENC_SD
 [m3vpss ] IOCTL_VPS_DCTRL_SET_VENC_CLK_SRC VPS_DC_VENC_HDMI | VPS_DC_VENC_DVO2
 [m3vpss ]  10350: CAMERA: Create in progress !!!
 [m3vpss ]  10351: CAMERA: VIP0 PortA camera mode is [ 8-bit, Non-mux Embedded Sync] !!! 
 [m3vpss ]  10361: CAMERA: VIP 0: VID DEC 268436736 (0x36): bebebebe:bebebebe:8bfd60d8, AUD_STATUS -1094795586
 [m3vpss ] Stream ID 0: chId = 0 VpsUtils_queCreate.
 [m3vpss ] Stream ID 1: chId = 0 VpsUtils_queCreate.
 [m3vpss ]  10570: CAMERA: Create Done !!!
ApproDrvInit: 3
queue id:131076
queue id:0
queue id:32769
 [m3vpss ]  10658: CAMERA: Detect video in progress !!!
 [m3vpss ]  10658: CAMERA: Detect video Done !!!
 [m3vpss ]  10658: VNF: 
 [m3vpss ] Create in progress ... !!!
 [m3vpss ]  10659: VNF: 
 [m3vpss ] Input Channel CH0 of 1952 x 1112, pitch = (1984, 1984) [0,0][PROGRESSIVE] [7] ... 
 [m3vpss ]  10910: VNF: 
 [m3vpss ] Create ... DONE !!!
 [m3vpss ]  11032: DUP   : Create Done !!!
 [m3vpss ]  11038: DUP   : Create Done !!!
 [m3vpss ]  11039: MERGE   : Create Done !!!
 [m3vpss ] DCC server task running 
 [m3vpss ] {SWOSD} edma3Handle->tccVal = 36 
 [m3vpss ] {SWOSD} edma3Handle->chId   = 36 
 [m3vpss ] {SWOSD} edma3Handle->tccVal = 37 
 [m3vpss ] {SWOSD} edma3Handle->chId   = 37 
 [m3vpss ] {SWOSD} edma3Handle->tccVal = 38 
 [m3vpss ] {SWOSD} edma3Handle->chId   = 38 
 [m3vpss ]  10988: SWOSD   : Create Done !!!
 [m3vpss ]  11110: DUP   : Create Done !!!
 [m3vpss ]  11110: SCLR: Create in progress !!!
 [c6xdsp ]  10940: IPC_FRAMES_IN   : Create in progress !!!
 [m3vpss ]  11118: SCLR    : Loading Up-scaling Co-effs ... 
 [c6xdsp ]  10941: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_23] ...
 [m3vpss ]  11118: SCLR    : Co-effs Loading ... DONE !!!
 [c6xdsp ]  10941: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_23] ...
 [c6xdsp ]  10942: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
 [m3vpss ] SCLR:HEAPID:0	USED:64
 [m3vpss ] SCLR:HEAPID:1	USED:5952
 [m3vpss ]  11118: SCLR: Create Done !!!
 [c6xdsp ] IPC_FRAMES_IN:HEAPID:0	USED:304
 [m3vpss ]  11119: IPC_FRAMES_OUT   : Create in progress !!!
 [c6xdsp ]  10944: IPC_FRAMES_IN   : Create Done !!!
 [c6xdsp ]  10944: ALG : Create in progress !!!
 [c6xdsp ]  10949 ALG : inQue Channel Num = 1
 [m3vpss ]  11121: IPC_FRAMES_OUT   : Create Done !!!
 [c6xdsp ]  10950: ALG GT : Create in progress !!!
 [c6xdsp ] Alloc Space Size is 22706992bytes
 [c6xdsp ] GT_TI_alloc finished
 [c6xdsp ] > GIAVALTRACKERALG: Initializing GiavalTracker Algorithm... 
 [c6xdsp ] memTab[0] address: 8ce03bd0
 [c6xdsp ] memTab[1] address: 8ce03bd8
 [c6xdsp ] memTab[2] address: 8ce6ff18
 [c6xdsp ] memTab[51] address: 8e21f708
 [c6xdsp ] 0x8fb00000 address value is 0
 [c6xdsp ] 0x8fb00004 address value is 0
 [c6xdsp ] 0x8fb00008 address value is 0
 [c6xdsp ] 0x8fb0000c address value is 0
 [c6xdsp ] 0x8fb00010 address value is 0
 [c6xdsp ] lightingNum original is 0
 [c6xdsp ] Error:detectorNum is 0,lightingNum is 0
 [c6xdsp ]        GTInitiate Error:-8
 [c6xdsp ]  11336: ALG GT : Create Done !!!
 [m3video]  11531: IPC_IN_M3   : Create in progress !!!
 [m3vpss ]  11529: IPC_OUT_M3   : Create in progress !!!
 [c6xdsp ]  11336: ALG : Create OutObj Begin!!!
 [m3video]  11531: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ...
 [m3vpss ]  11531: IPC_OUT_M3   : Create Done !!!
 [m3video]  11532: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ...
 [m3video]  11535: IPC_IN_M3   : Create Done !!!
 [c6xdsp ] ALGLINK:HEAPID:0	USED:22711088
 [m3video]  11535: ENCODE: Create in progress ... !!!
 [c6xdsp ]  11347: ALG : Create Done !!!
 [c6xdsp ]  Warning: Changing Tsk priority of ALG1    ALG Link 
 [m3video]  11599: ENCODE: Creating CH0 of 1920 x 1080, pitch = (1952, 1952) [PROGRESSIVE] [NON-TILED  ], bitrate = 8000 Kbps ... 
 [m3video] ENCLINK_H264:HEAPID:0	USED:13808
 [m3video]  11705: ENCODE: Creating CH1 of 720 x 480, pitch = (720, 720) [PROGRESSIVE] [NON-TILED  ], bitrate = 8000 Kbps ... 

 [host] IpcBitsInLink_tskMain:Entered
 [host]  1523: IPC_BITS_IN   : Create in progress !!!

 [host]  1523: IPC_BITS_IN   : ListMPOpen start !!!

 [host]  1523: SYSTEM: Opening ListMP [VIDEO-M3_IPC_OUT_28] ...

 [host]  1526: SYSTEM: Opening ListMP [VIDEO-M3_IPC_IN_28] ...

 [host]  1527: IPC_BITS_IN   : ListMPOpen done !!!

 [host]  1529: IPC_BITS_IN   : System_linkGetInfo done !!!

 [host]  1529: IPC_BITS_IN   : Create Done !!!
 [c6xdsp ]  11647: IPC_BITS_OUT   : Create in progress !!!
 [m3video] ENCLINK_H264:HEAPID:0	USED:11912
 [m3video]  11815: ENCODE: Creating CH2 of 1920 x 1080, pitch = (1952, 1952) [PROGRESSIVE] [NON-TILED  ], bitrate = 100 Kbps ... 

 [host] IpcBitsInLink_tskMain:Entered
 [host]  1531: IPC_BITS_IN   : Create in progress !!!

 [host]  1531: IPC_BITS_IN   : ListMPOpen start !!!

 [host]  1531: SYSTEM: Opening ListMP [DSP_IPC_OUT_28] ...

 [host]  1533: SYSTEM: Opening ListMP [DSP_IPC_IN_28] ...

 [host]  1534: IPC_BITS_IN   : ListMPOpen done !!!

 [host]  1535: IPC_BITS_IN   : System_linkGetInfo done !!!

 [host]  1535: IPC_BITS_IN   : Create Done !!!

 [host] USECASE SETUP DONE
 [m3vpss ]  11835: DISPLAY: Create in progress !!!
 [m3video] ENCLINK_JPEG:HEAPID:0	USED:4432
 [m3vpss ] DisplayId = 1,DataFormat = 7
 [c6xdsp ]  11649: IPC_BITS_OUT   : Create Done !!!
 [m3video]  11815: ENCODE: All CH Create ... DONE !!!
 [m3vpss ] SC2 displayInstId = 6
 [m3vpss ]  11836: DISPLAY: Create Done !!!
 [m3vpss ]  11837: DISPLAY: Create in progress !!!
 [m3video] ENCLINK:HEAPID:0	USED:30472
 [m3vpss ] DisplayId = 4,DataFormat = 7
 [m3video]  11818: ENCODE: Create ... DONE !!!
 [m3vpss ] SD displayInstId = 2
 [m3video]  11694: VSTAB   : Alg Create Done !!!
 [m3vpss ]  11838: DISPLAY: Create Done !!!
 [m3video]  11694: VSTAB   : Create Done !!!
 [m3vpss ]  11839: DISPLAY: Start in progress !!!
 [m3video]  11819: IPC_BITS_OUT   : Create in progress !!!
 [m3video]  11822: IPC_BITS_OUT   : Create Done !!!
 [m3vpss ]  11895: DISPLAY: Start Done !!!
 [m3vpss ]  11895: DISPLAY: AUX PATH: 35 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!! 
 [m3vpss ]  11895: DISPLAY: Start in progress !!!
 [m3vpss ]  11940: DISPLAY: Start Done !!!
 [m3vpss ]  11940: DISPLAY: SDDAC(SEC1): 22 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 255 / 0 ) !!! 
 [m3vpss ]  11826: CAMERA: Start in progress !!!
 [m3vpss ]  11826: CAMERA: Start Done !!!

 [host] 
Application Run Completed
 [m3vpss ]  11960: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)

 [host] ITT server task running !!!

 [host] 
 ITT ittServer_run

 [host] ITT Server Message initialization successful

 [host] 
 ITT capture task created

 [host] DCC server Message ques is open succefully

 [host] Setting cmd <1> in message <40381100>

 [host] Posting message <40381100> in QId <20002> 
 [m3vpss ] Command 1 recived from HOST A8 

 [host] Response from M3 is : 1
 [c6xdsp ]  12007: ALG : Process in progress!!!
 [m3vpss ] Command 2 recived from HOST A8 
 [c6xdsp ]  12007: ALG : FrameList Num = 1
 [m3vpss ] New DCC data of size <33603> 
 [c6xdsp ]  12007: ALG GT : Process in progress!!!
 [c6xdsp ]  12007: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12007: ALG GT : DSP ALG in progress!!!

 [host] Response from M3 is : 1

 [host] Default parameters were sent sucessfully 

 [host] Server Socket created with ID <22> 
 [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC 536870977
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame
 [c6xdsp ]  12029: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12029: ALG GT : outBuf Num = 1
 [c6xdsp ]  12029: ALG GT : Results BitBuf Put Success!!!
 [c6xdsp ]  12030: ALG : Process in progress!!!
 [c6xdsp ]  12030: ALG : FrameList Num = 1
 [c6xdsp ]  12030: ALG GT : Process in progress!!!
 [c6xdsp ]  12030: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12030: ALG GT : DSP ALG in progress!!!

 [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1..
 [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12053: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12053: ALG GT : outBuf Num = 1
 [c6xdsp ]  12053: ALG GT : Results BitBuf Put Success!!!
 [c6xdsp ]  12053: ALG : Process in progress!!!
 [c6xdsp ]  12054: ALG : FrameList Num = 1
 [c6xdsp ]  12054: ALG GT : Process in progress!!!
 [c6xdsp ]  12054: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12054: ALG GT : DSP ALG in progress!!!
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame
 [c6xdsp ]  12077: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12077: ALG GT : outBuf Num = 1
 [c6xdsp ]  12077: ALG GT : Results BitBuf Put Success!!!
 [c6xdsp ]  12077: ALG : Process in progress!!!
 [c6xdsp ]  12077: ALG : FrameList Num = 0

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12093: ALG : Process in progress!!!
 [c6xdsp ]  12093: ALG : FrameList Num = 0
 [c6xdsp ]  12098: ALG : Process in progress!!!
 [c6xdsp ]  12098: ALG : FrameList Num = 1
 [c6xdsp ]  12098: ALG GT : Process in progress!!!
 [c6xdsp ]  12098: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12098: ALG GT : DSP ALG in progress!!!
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame
 [c6xdsp ]  12121: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12121: ALG GT : outBuf Num = 1
 [c6xdsp ]  12121: ALG GT : Results BitBuf Put Success!!!

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12141: ALG : Process in progress!!!
 [c6xdsp ]  12141: ALG : FrameList Num = 0
 [c6xdsp ]  12164: ALG : Process in progress!!!
 [c6xdsp ]  12164: ALG : FrameList Num = 1
 [c6xdsp ]  12164: ALG GT : Process in progress!!!
 [c6xdsp ]  12164: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12164: ALG GT : DSP ALG in progress!!!
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame
 [c6xdsp ]  12187: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12188: ALG GT : outBuf Num = 1
 [c6xdsp ]  12188: ALG GT : Results BitBuf Put Success!!!

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12205: ALG : Process in progress!!!
 [c6xdsp ]  12205: ALG : FrameList Num = 0
 [c6xdsp ]  12232: ALG : Process in progress!!!
 [c6xdsp ]  12232: ALG : FrameList Num = 1
 [c6xdsp ]  12232: ALG GT : Process in progress!!!
 [c6xdsp ]  12233: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12233: ALG GT : DSP ALG in progress!!!
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12256: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12256: ALG GT : outBuf Num = 1
 [c6xdsp ]  12256: ALG GT : Results BitBuf Put Success!!!
 [c6xdsp ]  12269: ALG : Process in progress!!!
 [c6xdsp ]  12269: ALG : FrameList Num = 0
 [c6xdsp ]  12298: ALG : Process in progress!!!
 [c6xdsp ]  12298: ALG : FrameList Num = 1
 [c6xdsp ]  12298: ALG GT : Process in progress!!!
 [c6xdsp ]  12298: ALG GT : Active DSP ALG!!!
 [c6xdsp ]  12298: ALG GT : DSP ALG in progress!!!
 [c6xdsp ] Current Frame Cars Number:-1
 [c6xdsp ] GIAVALTRACKER: Process frame
 [c6xdsp ]  12321: ALG GT : Deactive DSP ALG!!!
 [c6xdsp ]  12321: ALG GT : outBuf Num = 1
 [c6xdsp ]  12321: ALG GT : Results BitBuf Put Success!!!

 [host] GT_ALG: BitBuf Received. BufList Num = 1..
 [host] GT ALG: Results No.0: Num of Cars = -1.. [c6xdsp ]  12333: ALG : Process in progress!!!
 [c6xdsp ]  12333: ALG : FrameList Num = 0
queue id:0
ApproDrvInit: 7
queue id:131076
TimeOut occure in boot_proc.
Program exit.
TimeOut occure in boot_proc.
Program exit.

 [host] 
Usecase is Active !!! 
ApproDrvExit: 7
Error: WaitStreamReady Fail.
Error: SemWait: Invalid Semaphore handler

 [host] 
Usecase is Active !!! 

 [host] 
Usecase is Active !!! 

This is what I think about the log:

In ALGlink,the consumed framelist is put back to SCLRlink after being processed,and now it seems my process in ALGlink takes too much time and when the SCLRlink want to put more full frame in the queue,it just can't find any available empty frame in the que.

I find in SCLRlink the max frame num in a channel is 6 and after my ALGlink receive more than 6 frames,it stucks.So I guess there is something wrong with my dataflow betweem SCLRlink and ALGlink.

So here is my question:If my slow process in ALGlink is the reason why my dataflow blocks,what should I do to solve it? Of course I should improve the efficiency of my alg,but is there any other suggestion since I'm not sure if I can improve the efficiency greatly.

Thank you for your patience.

Zhao

 

  • The main bottleneck point is your AlgLink. If it is taking more time then you have no option but to skip frames.

    One way to handle this problem is to operate AlgLink at lower FPS.Use a separate task to DMA input frame and copy into local AlgLink buffers. This way you wont clog the critical path.

    SCLRLink---->FrameCopyTask ----> AlgLink

         |                                     |

         |<-----FrameFree------|

  • Hi,Ritesh

     Thank you for your advice and please tell me if my understanding of your advice is right:

      When my Alglink is the bottleneck,the only way to solve the problem is to operate it at lower FPS,and there are two ways to lower FPS in Alglink:First is to skip some frames sent to Alglink;Second using a separate task to DMA input frame and copy into local AlgLink buffers.

      Actually I read the code how they operate VAlink and FDlink,before they process data there is a data copy procedure from the outbufque of former link to local outbufque using DMA, but I don't understand why the data copy procedure can lower FPS.

      Take my situation as an example,I create a separate task to DMA input frame and copy into local AlgLink buffers and yes the outbuf in outbufque of the former link can be freed right now and there shouldn't be any block here,then my Alglink get data from local buffers.But in fact my Alglink still do it work slowly and sooner or later there are more data sent to these buffers than can be handled by Alglink,finally the local buffers will overflow.

       So could you please explain why there is FrameFree between SCLRLink---->FrameCopyTask and why this design can lower FPS in Alglink?

       Thank you for your patience.

    regards,

    Zhao

      

     

  • Apart from points mentioned by Ritesh there is a bug in scaler link which causes it to get stuck if link after scaler link is not realtime. Below patch is for dvr_rdk scaler link.Not sure if patch will apply on ipnc rdk scaler link

    --- a/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_tsk.c
    +++ b/mcfw/src_bios6/links_m3vpss/sclr/sclrLink_tsk.c
    @@ -226,6 +226,34 @@ Int32 SclrLink_putEmptyFrames(Utils_TskHndl * pTsk, UInt16 queId,
                                   FVID2_FrameList * pFrameList)
     {
         SclrLink_Obj *pObj = (SclrLink_Obj *) pTsk->appData;
    +    SclrLink_ChObj *pChObj;
    +    Bool sendNotify = FALSE;
    +    UInt32 chId;
    +    Int32 status;
    +
    +    Utils_bufPutEmpty(&pObj->outObj.bufOutQue, pFrameList);
    +
    +    for (chId = 0; chId < pObj->inQueInfo.numCh; chId++)
    +    {
    +        pChObj = &pObj->chObj[chId];
    +        if( Utils_bufGetFullFrameCount(&pChObj->inQue))
    +        {
    +            sendNotify = TRUE;
    +            break;
    +        }
    +    }
    
    -    return Utils_bufPutEmpty(&pObj->outObj.bufOutQue, pFrameList);
    +    if(sendNotify == TRUE)
    +    {
    +      status = Utils_tskSendCmd(&pObj->tsk,
    +                       SYSTEM_CMD_NEW_DATA);
    +      if (UTILS_ISERROR(status))
    +         {
    +             UTILS_warn("SCLRLINK :[%s:%d]:"
    +                        "System_sendLinkCmd SYSTEM_CMD_NEW_DATA failed"
    +                        "errCode = %d", __FILE__, __LINE__, status);
    +         }
    +
    +    }
    +    return 0;
     }
    

    Data copy can enable operating at lower fps because copy will complete in realtime and prev link output buffer will be freed in realtime without causing frame skip.The actual dsp algorithm which is not realtime can operate in another lower priority thread and doesnt use the prev link output buffer but uses the copied buffer.

  • Hi, Badri

    Thank you for your reply.I'll try the patch and let you know if it works.

    About the data copy part,I know that copying databuf from realtime link to a settled local buf can give my Alglink more time to process because there is no hurry to free outbuf resources back to former link now.

    But my point is :

    Once the size of local buf is settled and my Alglink do run at a lower priority,if my Alglink still process data slowly,there will be more databuf copyed to local buf than handled by Alglink at the same time.And finally some databuf in local buf will be overwritten before being handled.

    So I guess if I want the local buf to work normally,I have to skip some frames before copying them from link to local buf,am I right?

    PS:In SCLR link createArgs there is outputFrameRate option,if I change this option from 30FPS to 4FPS,will this link work as I desired and drop some frames automaticly?

    regards,

    Zhao

  • Hi,Badri

    I think I need to provide more information about my Alg.

    My Alg is used to track cars in pictures captured by camera or sent through Internet,So I think it's some kind of realtime algorithm since for every second my alg has to provide some results.

    Using a local buf and don't skip frames will only provide a time delay but can't solve the framerate problem,so I think I have to drop some frames anyway,am I right?

    And will changing outFramerate option in SCLR link work?Or I have to change the outFramerate option in IpcOutVpss or IpcInDsp link?please let me know,Thank you.

    regard,

    Zhao

  • You are right about localBufCopy. If rate of processing doesnt match input frame rate you will have to drop frames and adding localBufCopy will not help. 

    LocalBufCopy is meant to be used in situations where you have a non-realtime algorithm that should run at lowest priority and will use whatever CPU processing is available (max possible throughput) after other higher priority real time algorithms are done with their processing. The algLink that copies input buffer to localBuffer will drop the input buffer if it finds output buffer is not free. LocalBufCopy only ensures input buffer is not held for long time.

    In your case skipping frames at scaler link is best option. Limit input fps to whatever processing rate the algorithm is capable. Changing outFrameRate of scaler link will work.