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:
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.
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:
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
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.)