DM8168 algorithm Integration--integrated SCD (can be further motion detection, motion tracking, etc.)

Source: Internet
Author: User

Introduction:Original address: http://blog.csdn.net/guo8113/article/details/41693289

The SCD algorithm is run in the DVRRDK DSP, provided with the DVRRDK. And in more than 3.0 of the version in the Mcfw_demo to achieve similar target tracking and other advanced features. SCD uses Dmval library, so the core algorithm source code is not given. The intergration documentation for SCD has a description of its relevant parameters. However, DVRRDK did not implement SCD in Link_api_demos. So it achieves 1080p processing in DOUBLES_DOUBLECHCAPSCENCSEND.C:

steps:

1. Add the relevant link to the chains:

Currently Scdlink is located after Dup0, because the DUP can have 3 output queues, and 1 give enclink,1 to display,1 to SCD.

UInt32 Sclrid;

UInt32 nsfId2;

UInt32 ipcFramesOutVpssId2;

UInt32 ipcFramesInDspId2;

UInt32 Scdid;

UInt32 ipcBitsOutDspId2;

UInt32 ipcBitsInHostId2;

It is important to note that SCD input supports only 420 formats, which in the documentation says support 422/420 is wrong. 422 There will be an error format not supported:


It is also important to note the order of link create, which must be created in the reverse order of the data flow, or the following similar error will occur.



Also, depending on the link's structure, if the link consumes buffer, then it must need to get the empty buffer from the Nextlink, so the next link must be there when debugging (you can use NULL link debugging), For example, there is no outdsplink after the link, at run time will prompt: 0x9 is a null pointer error (described in Dmval's documentation).


2. Read the status of SCD:

You can proactively get its status by sending a message:

System_linkcontrol (

Scdid, Alg_link_scd_cmd_get_all_channel_frame_status,

& (Scdallchframestatus),

sizeof (Scdallchframestatus),

TRUE

);

The good way is to learn from DEMO_SCD_BITS_WR.C for bits, to hostA8, so porting demo_scd_bits_wr.c, Demo_scd_bits_wr.h, in chains only need to call:

Scd_bitswritecreate (0,IPCBITSINHOSTID2); Init SCD ' s ipcbitsinhost by:guo8113

Create a related thread

Chains_ipcbitsinitcreateparams_bitsinhlosvcap (&IPCBITSINHOSTPRM2);

Registering a callback function for Ipcbitsinhostlink

You can do this in the chains_scd_bits_wr.c void*scd_bitswritemain (void *PPRM) function. Specific content, refer to chains_scd_bits_wr.c. (Customized according to DEMO_SCD_BITS_WR.C)

Problems you may encounter: the callback thread for link only runs N (6 or finite number of times) issues:

Ipcbitslink need to get the empty buffer from the host A8, and to Ipcbitsinhost can continue to take data generated full buffer, reference DEMO_SCD_BITS_WR.C implementation

Scd_getalgresultbuffer, Scd_releasealgresultbuffer and other functions.

===========================================================================================

Should not be described in detail, only provide reference ideas, there are questions can leave a message, exchange.

Reprint Please specify: http://blog.csdn.net/guo8113/article/details/41693289

===========================================================================================

DM8168 algorithm Integration--integrated SCD (can be further motion detection, motion tracking, etc.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.