zero copy architecture of my video process application on TI 8168 using C6runLib

1 my design using c6runlib

    Following is  my design based on TI c6runlib compiler. Core structure is a "working item line", which contains a queue made of pointers pointing to buffers allocated from heap, and a lock used whenever the queue need to be modified. All accessing to the queue would be limited to functions where locking, dequeueing are implemented. What the design want is, locking the queue instead of locking the buffers, so a buffer need to be processed, lock the structure, dequeue the buffer and then unlock the structure, so this would reduce conflict chances between threads.

    There are 3 threads running: thread Capture running on ARM with "working item line" resCap, thread VideoProcess running on ARM and DSP, thread PostProcess running on ARM with resPost.

                      graph 1: static model


    At runtime, the queue in resCap running as a ring buffer, the Capture thread would using the oldest buffer to do video capture, and then put it to the head of the list, so the head is always the latest frame. The VideoProcess thread would dequeue the latest frame from resCap, and then look at the time stamp on it to see if it need to be processed. If it is, process it, and then put it to queue resPost. The PostProcess thread do further works such as saving, sending, and it pulls working item on queue resPost. When work is done it will put the buffer back to resCap, which belongs to thread Capture.


graph 2, runtime model


     The design is based on following conditions: thread VideoProcess is much slower than other threads, so the input and output queue of VideoProcess are saved.  The total speed depends on the slowest one thread: VideoProcess, but this design have saved frame copy and some queue accessing with locking.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值