How to write Dsplink under the dm8127/8148

Source: Internet
Author: User
Tags ranges

Example: Read from the A8 1080p yuv420sp data to Dsplink, build a link in the DSP (do some image processing work), and then send the YUV420SP data to videoM3 do JPEG encoding, and then passed to A8;


Steps:

1) First refer to the following link DSP, a new DSP algorithm link;
2) Modify the/mcfw/src_bios6/links_c6xdsp/src_files. MK file, add the new DSP algorithm to the. c file of link, which is mainly called at compile time
3) mcfw/interfaces/link_api/Add a DSP link header file, convenient for other places to call, mainly in the A8 to establish link, need to call the DSP algorithm link data structure, and the DSP link initialization function and the inverse initialization function, Called in System (MCFW/SRC_BIOS6/LINKS_C6XDSP/SYSTEM/SYSTEM_C6XDSP.C);
3.4) Establish link in A8, register the callback function of JPEG stream; link process: A8->ipcframeoutlink (A8)->IPCFRAMEINDSP (DSP)->DSP algorithm link-> IPCFRAMEOUTDSP (DSP)->ipcframesinvideom3 (videoM3)->jpeg enc->ipcbitsoutvideom3 (videoM3)->ipcbitsin ( A8);


Conclusion:

Received the encoded JPEG image correctly from A8;


You can also refer to this article to write Dsplink, the following transfer from this blog, the copyright belongs to the blogger;TI8168 DSP algorithm development process http://blog.csdn.net/jiawenquan/article/details/20529581

first, DM8168 and the introduction of this article2010, TI launched the latest media processor tms320dm8168 as a multi-channel high-definition SOC system chip, integrated with the 1GHZ frequency cortex-a8 arm core and Lghz c674x DSP core, and integrates 3 new versions of the HDVICP subsystem, as well as the next generation of VPSS. It can also provide 3-channel 1080P resolution, 60 frames per second of HD video encoding. The new version of HDVICP supports HD-resolution, H, MPEG-4, VC1 encoding, and AVS and Svc encodings, providing more powerful hardware and software support for the development of HD video "references".     The previous article introduced the Heterogeneous multicore architecture of DM8168, which is intended to show how to add a custom algorithm to its DSP . This paper is based on the architecture of Da Vinci, which is already familiar with codecengine and the development process of DSP composite XDM standard algorithm. (As for the Da Vinci Architecture and DSP algorithm standards will be added in the next article). In other words, this paper only introduces the integration of DSP algorithm, that is, how to add the DSP algorithm to the DM8168 MCFW software framework . second, the system environmentDevelopment Board for ETV-HDV8168-HDMI (avoid advertising, not), PC for virtual machine centos6.3 Three, IntroductionIn this paper, "HelloWorld" algorithm for example, corresponding to the "HelloWorld" link (in the MCFW framework link is often referred to as the "thread" synonymous). Suppose you have got the algorithm of DSP algorithm engineer, here is HelloWorld, the file is as follows: Code download: http://download.csdn.net/detail/guo8113/6977345 HELLOWORLD algorithm file is described below:

The helloworldalg_ti_ialg.c– provides the top-level calling interface for creating an algorithm instance, and the process call interface when processing input and output frames, and the parameter setting of the run-time call interface.
The private Data structures of the helloworldalg_ti_priv.h– algorithm, macros and function call declaration.
HelloWorldAlg.h-Creation of algorithm instances visible to ' Hello World ' link and data structures for process call (processing calls), macros and function called declaration
Src_files.mk–makefile to build the ' Hello World ' algorithm.

' HelloWorld ' link file introductionhelloworldlink_tsk.c – This file contains ' HelloWorld ' Link:task created,' Hello World ' link receives commands from other links, receives and releases buffers from other links in the definition of the callback function. (thisfile have function definition for creation the ' HelloWorld ' link task, receiving commands from other links an D callbacks that other links call for receiving and freeing buffers of ' Hello World ' link.) helloworldlink_priv.c–This file have all private functions for creation of the link and algorithm instance and processing upon frames.helloworldlink_priv.h–This file has macros, data structure and function call declaration private to the ' HelloWorld ' Link.

helloWorldLink.h –this file has macros, data structure and function call declaration of ' HelloWorld ' Link seen by Other links. This file have to is placed under Mcfw\interfaces\link_api folder. the calling interface for other links .

steps: 1. Place the files under Interface/link_api/helloworldlink.h and Src_bios6/alg and the files under the links_c6xdsp/under the MCFW corresponding folder; 2. in Mcfw\src_bios6\makefile

Add HelloWorld to the list of include_exernal_interfaces

include_exernal_interfaces= BIOS xdc IPC syslink ISS HDVPSS IPNC_RDK FC Xdais h264enc h264dec swosd HelloWorld Edma3lld Mpeg4enc
Add ' Makefile ' files and include directory:
Incdir + = $ (module_src_base_path)/alg/helloworldalg
Include $ (module_src_base_path)/alg/helloworldalg/src_files.mk

3. in \mcfw\src_bios6\links_c6xdsp\system\system_c6xdsp.c

The Add Helloworldlink header file contains

#include <mcfw/interfaces/link_api/helloWorldLink.h>

in the the System_initlinks () function adds helloworldlink_init (), system_deinitlinks () add helloworldlink_deinit ()

4. in

Ipnc_rdk\ipnc_mcfw\mcfw\interfaces\link_api\system_linkid.h

Define link IDs for HelloWorld link at the Dspcore end

#defineSYSTEM_LINK_ID_HELLOWORLD_0 dsp_link (system_link_common_links_max_id+4) ( Due to hints PROCID < system_proc_max:failed!!!)

#defineSYSTEM_LINK_ID_HELLOWORLD_START (SYSTEM_LINK_ID_HELLOWORLD_0)

#defineSYSTEM_LINK_ID_HELLOWORLD_END (SYSTEM_LINK_ID_HELLOWORLD_0)

#defineSYSTEM_LINK_ID_HELLOWORLD_COUNT (System_link_id_alg_end-\

System_link_id_alg_start) + 1

5 in Ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_common\system\system_priv_common.h

Define task priority and stack size

#defineHELLOWORLD_LINK_TSK_PRI (2)

#defineHELLOWORLD_LINK_TSK_STACK_SIZE (System_default_tsk_stack_size)

6 in ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\ti_vsys_priv.h

Include header file

All Headers Filesunder Interface folder needs to is included in the this file. Include Thehelloworldlink header file here

#include <mcfw/interfaces/link_api/helloWorldLink.h>

7 in ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_c6xdsp\src_files.mk

Add the helloworlddirectory to the list of Srcdir


Srcdir +=links_c6xdsp/system links_c6xdsp/utils/src \

Links_c6xdsp/alg_linklinks_c6xdsp/alg_link/swosd LINKS_C6XDSP/ALG_LINK/SCD \

Links_c6xdsp/va Links_c6xdsp/helloworld

Srcs_helloworld =helloworldlink_tsk.c helloworldlink_priv.c

srcs_c6xdsp +=$ (SRCS_SYSTEMDSP) $ (srcs_utils) $ (srcs_alglink) $ (srcs_osdlink) $ (srcs_scdlink) $ (srcs_valink) $ (srcs_helloworld)

8. Modify the Memory:

Mcfw\src_bios6\cfg\ti81xx\config_2g.bld. (file name corresponds to memory size)

Locate the following code snippet, and linux_size the size of the lower part to dsp_code_size, Dsp_data_size

/* First 512MB */
Linux_size = 128*MB;
Sr1_size = 336.5*MB;
Sr3_intraducati_ipc_size = 124*KB;
Video_m3_code_size = 2.5*MB;
Video_m3_data_size = 12*MB;
Dss_m3_code_size = 1.5*MB;
Dss_m3_data_size = 17*MB;
Dsp_code_size = 900*KB;
Dsp_data_size = 13.5*MB;

Errors that may be encountered in the compilation:

1.

"/home/dm8168/dvr_rdk/. /dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/dvr_rdk_configuro/linker_mod.cmd ", line 242:error:

Placement fails for object ". Switch", size 0x32a (PAGE0). Available

Ranges

DDR3_DSP size:0xd80000 unused:0xc Max hole:0x4

"/home/dm8168/dvr_rdk/. /dvr_rdk/build/dvr_rdk/obj/ti816x-evm/c6xdsp/debug/dvr_rdk_configuro/linker_mod.cmd ", line 230:error:

Placement fails for object "Group_1", size 0x13c (PAGE0). Available

Ranges

DDR3_DSP size:0xd80000 unused:0xc Max hole:0x4

Warning:entry-point symbol other than "_c_int00" specified:

"Ti_sysbios_family_c64p_hwi0"

Error:errors encountered during linking;

"/home/dm8168/dvr_rdk/. /dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp

_debug.xe674 "Not built

MAKE[2]: ***[/home/dm8168/dvr_rdk/. /dvr_rdk/build/dvr_rdk/bin/ti816x-evm/dvr_rdk_c6xdsp_debug.xe674]error 1

MAKE[1]: * * [Apps] Error 2

Make: * * * [DVR_RDK_BIOS6] Error 2

####

# # # # # [DM816X_ETV] Platform build [] ERROR!!!

Insufficient memory to modify memory.

TOP level memory requirement for DSPS code and data size is done in mcfw\src_bios6\cfg\ti81xx\config_<ddrsize>m.bld. Refer to Appnote on Memorymap for further details on changing the size of these sections as per your DSP algorithms Requirement.

2.


The kernel needs to be compiled first

3.


References:DSP Algorithm Integration Guide in IPNC/DVR RDKstatement: This article refers to the above information, the document is really a pit dad, some details will have a problem, but fortunately the general direction is correct, before a colleague has been compiled without finishing, I started from scratch, after a week finally solved the problem, the following article will introduce chains and how to use the ALG algorithm in chains.

CCS: Download Link:

Http://www.ti.com.cn/tool/cn/ccstudio

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

How to write Dsplink under the dm8127/8148

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.