TI中文支持网
TI专业的中文技术问题搜集分享网站

TDA2SX: 想了解怎么使用 sw mosaic link

Part Number:TDA2SX

在使用tda2sx 时,想建立一个链路,其中有五路摄像头输入,一路输出,会转换成h.264视频文件并保存,想使用TI 实现的 AlgorithmLink_DmaSwMs link,但不大清楚怎么使用,比如,把五路输入通道号配置好,并且截取对应的图像数据,拷贝到输入的内存缓冲区里面去;

不清楚有没有这方面的例程可以参考,期望能够获得一个比较完整的例程,谢谢。

Cherry Zhou:

您好我们已经收到您的问题并反馈,预计将于24小时内给您答复。谢谢!

,

henry o:

好的,谢谢。另外也说一下今天的进展:尝试在原有的链路上,添加了algorithm_DmaSwMs 这个link,参数设置等,参考了

vsdk/apps/src/hlos/adas/src/usecases/src_calibration 里面的代码,编译可以通过,但运行的时候报错:

ASSERT (chains_tidlOD_xxx_APA_priv.c|chains_tidlOD_xxx_APA_Create|339)
[HOST] [IPU2  ]    363.067223 s:  ALG: ERROR: No alg create function specified  (algId = 0) !!!

其中,line 338 和 line339是这样的:

       status = System_linkCreate(pObj->Alg_DmaSwMsLinkID, &pObj->Alg_DmaSwMsPrm, sizeof(pObj->Alg_DmaSwMsPrm));       UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);

所以,是在link创建的时候出错了,想了解一下,在参数配置的时候,是否也有一些需要注意的地方,谢谢。

,

Cherry Zhou:

好的,感谢您提供的信息,已跟进给工程师。如有答复将尽快回复您。

,

henry o:

好的,谢谢

,

henry o:

Hello, Cherry,

请问你们的工程师同事有没有评论和建议呢,谢了先

,

Cherry Zhou:

henry o 说:status = System_linkCreate(pObj->Alg_DmaSwMsLinkID, &pObj->Alg_DmaSwMsPrm, sizeof(pObj->Alg_DmaSwMsPrm));       UTILS_assert(status == SYSTEM_LINK_STATUS_SOK);

我们认为这应该是配置问题,您能否分享SW 马赛克输入参数?

此外我们建议您可以在 VISION SDK \APPS\src\RTOS\ALG_plugins\dmaSwms\dmaSwMsLink_algPlugin.c 文件中引用 API AlgorithmLink_dmaSwMsCreate 来寻找创建失败的原因。

,

henry o:

好的,我先检查一下配置,请问有没有完整的例程可以参考呢?谢谢了

,

Cherry Zhou:

您的问题我已跟进给工程师,如有答复将尽快回复您。

,

henry o:

不清楚dmaswms 输入参数的含义,配置是按照另外一个文件中函数写的,略微做了些改动:

也想了解一下,有没有介绍 DmaSwMS Link使用的文档可以参考呢,谢谢了;static Void desay_APA_SetAlgDmaSwMsPrm(                    AlgorithmLink_DmaSwMsCreateParams *pPrm1,                    //AlgorithmLink_DmaSwMsCreateParams *pPrm2,                    UInt32 numLvdsCh,                    UInt32 displayWidth,                    UInt32 displayHeight                   ){    printf("enter %s, func %s, line %d \r\n",__FILE__, __FUNCTION__, __LINE__);    UInt32 winId;    AlgorithmLink_DmaSwMsLayoutWinInfo *pWinInfo;    UInt32 widthFactor, heightFactor;    //pPrm2->maxOutBufWidth     = displayWidth;    //pPrm2->maxOutBufHeight    = displayHeight * 2;    //pPrm2->numOutBuf          = 4;    //pPrm2->useLocalEdma       = FALSE;    pPrm1->maxOutBufWidth     = displayWidth;    pPrm1->maxOutBufHeight    = displayHeight * 2;    pPrm1->numOutBuf          = 4;    pPrm1->useLocalEdma       = FALSE;    //pPrm2->initLayoutParams.numWin = numLvdsCh / 2;    //pPrm2->initLayoutParams.outBufWidth  = pPrm2->maxOutBufWidth;    //pPrm2->initLayoutParams.outBufHeight = pPrm2->maxOutBufHeight;    pPrm1->initLayoutParams.numWin =  numLvdsCh / 2;// – pPrm2->initLayoutParams.numWin;    pPrm1->initLayoutParams.outBufWidth  = pPrm1->maxOutBufWidth;    pPrm1->initLayoutParams.outBufHeight = pPrm1->maxOutBufHeight;    switch (numLvdsCh)    {        case 1:            widthFactor  = 1;            heightFactor = 1;            pPrm1->initLayoutParams.numWin = 1;           // pPrm2->initLayoutParams.numWin = 0;            break;        case 2:            widthFactor  = 1;            heightFactor = 1;            pPrm1->initLayoutParams.numWin = 1;           // pPrm2->initLayoutParams.numWin = 1;            break;        case 3:            widthFactor  = 1;            heightFactor = 2;            pPrm1->initLayoutParams.numWin = 2;         //   pPrm2->initLayoutParams.numWin = 1;            break;        case 4:            widthFactor  = 1;            heightFactor = 2;            pPrm1->initLayoutParams.numWin = 2;         //   pPrm2->initLayoutParams.numWin = 2;            break;        default:            widthFactor  = 1;            heightFactor = 2;            pPrm1->initLayoutParams.numWin = 2;         //   pPrm2->initLayoutParams.numWin = 2;            break;    }    /* assuming 4Ch LVDS and 2×2 layout */    for(winId=0; winId<pPrm1->initLayoutParams.numWin; winId++)    {        pWinInfo = &pPrm1->initLayoutParams.winInfo[winId];        pWinInfo->chId = winId;        pWinInfo->inStartX = 0;        pWinInfo->inStartY = 0;        pWinInfo->width     =            SystemUtils_floor(pPrm1->initLayoutParams.outBufWidth/widthFactor, 16);        pWinInfo->height    =            pPrm1->initLayoutParams.outBufHeight/heightFactor;        /* winId == 0 */        pWinInfo->outStartX = 0;        pWinInfo->outStartY = 0;        if(winId==1)        {            pWinInfo->outStartX = 0;            pWinInfo->outStartY = pWinInfo->height;        }    }#if 0    for(winId=0; winId<pPrm2->initLayoutParams.numWin; winId++)    {        pWinInfo = &pPrm2->initLayoutParams.winInfo[winId];        pWinInfo->chId = winId;        pWinInfo->inStartX = 0;        pWinInfo->inStartY = 0;        pWinInfo->width     =            SystemUtils_floor(pPrm2->initLayoutParams.outBufWidth/widthFactor, 16);        pWinInfo->height    =            pPrm2->initLayoutParams.outBufHeight/heightFactor;        /* winId == 0 */        pWinInfo->outStartX = 0;        pWinInfo->outStartY = 0;        if(winId==1)        {            pWinInfo->outStartX = 0;            pWinInfo->outStartY = pWinInfo->height;        }    }#endif}

,

Cherry Zhou:

好的收到,已帮您跟进给工程师,如有答复将尽快回复您。

,

henry o:

好的,谢谢我的邮箱是: qiang.he@aitronx.com ,电话 139 2371 2371 ,如果你们的工程师方便的话,也欢迎他/她 通过电邮或者电话和我沟通,这样沟通效果可能更好一些,谢谢了。

,

Cherry Zhou:

您好目前我们是帮您把问题升级到e2e英文论坛中,所以由于时差以及语言问题,目前不太好实现直接与您交流。敬请谅解。

,

henry o:

好的,有劳你们帮我翻译了,那后续我用english来描述问题,这样可以让大家都轻松一些。另外,之前我也尝试过登录 english forum,但不知道怎么总是无法登录,不知道是设置哪里出了问题。

,

Cherry Zhou:

好的非常感谢,英文论坛可能是由于网络或其他限制导致您无法登录。

,

Cherry Zhou:

DMA 参数主要描述将不同图像放置在最终输出缓冲区中的方式和位置,如大小、位置等信息。

henry o 说:有没有介绍 DmaSwMS Link使用的文档可以参考呢,

目前不太确定是否有文档可供参考,我们建议您先参阅用户指南以及数据表。

以及关于创建失败位置,您是否有任何新的进展?

,

henry o:

Hello, Cherry,

thanks for your kindly support.

acturally, this week I tried severy times to call algorithm_dmaSwMs link in HLOS side but failed. and the log printed in screen is: ALG: ERROR: No alg create function specified (algId = 0, max:28) !!!after browsing the source code, I found that the function AlgorithmLink_DmaSwMs_initPlugin() hasn't been called. and the caller is AlgorithmLink_initAlgPlugins() function which located in " links_fw/src/hlos/links_a15/algorithm/algorithmLink_cfg.c ".and I try to call the AlgorithmLink_DmaSwMs_initPlugin() in AlgorithmLink_initAlgPlugins() but failed again, the compiler told me that :

" algorithmLink_cfg.c:(.text+0x36): undefined reference to `AlgorithmLink_DmaSwMs_initPlugin' "and after checking the source code, the header file included is .. apps_xxx/include/alglink_api/algorithmLink_dmaSwMs.hafter that, I found this QA in TI website:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/870149/compiler-tda2pxevm-linux-assertion-while-creating-new-plugin-in-linux

and in this page, the TI engineer wrote:

"
Please refer below alg plugin
vision_sdk\apps\src\hlos\adas\src\alg_plugins\framecopy
You are getting undefined reference that means you have not defined AlgorithmLink_SurroundView3d_initPlugin function in correct file.
"
it seems that  when algorithm link used in hlos side, the coder should put source into vision_sdk\apps\src\hlos\adas\src\alg_plugins path. my question is: if I create a new algorithm link and use it in hlos side, I will put this link in above file path, but, if an exsisting algorithm link of rtos is called, should I put its source code to above file path too? it seems that we need more files to add into the source code. could you provide some advice on this situation? thanks a log.
regards.
ohenry

,

henry o:

Hello, Cherry,

the above question could be summaried  briefly as : how to use the algorithm_dmaSwMs link in HLOS size?thanks a lot.

best rgds

ohenry

,

Cherry Zhou:

Hi, thanks for your info, I will feedback to the engineer and if there is any updates I will reach out you asap.

Thanks!

,

Cherry Zhou:

Hi,

There used to be a common header file (we think some system_cfg.h), which included defines macros for all algorithms. Can you please search for ALG_dmaSwMs and see if it is defined somewhere? If this is not defined, then DMA SW Ms will not be included in the build.

,

henry o:

Hello, Cherry,

thanks for your kindly support, i would check this solution later.

BR

,

henry o:

Hello, Cherry,

I've tried to re-edit the system_cfg.h file, but it seems that this file is auto genergated by shell script, i.e. it would like turn back to original file after I edited and saved it.  and I found a little difficult to find the shell script which generated this system_cfg.h file. could you kindly point out the shell script file or something else to auto edit the system_cfg.h file? thanks in advance.

best rgds!

ohenry

,

Cherry Zhou:

Hi dear, thanks for your feedback, I will update to the engineer. If there is anything new I will reach you asap.

,

henry o:

Dear Cherry,actually I've solve this issue by making a new dma mosaic link and putting it in … links_fw/src/rtos/links_common path , now it works and produces the mosaiced images already. this link take reference on algorithm_dmaSwMS link develped by your colleagues.and currently I wanna use the algorithm_dmaSwMS link in my project, since I guess it would run more fluently on the board. anyway, thanks in advance and have a good time.

BR.

ohenry

,

Cherry Zhou:

Got it, I will reach to you if there is anything new. Wish you a good time too, thanks.

,

Cherry Zhou:

henry o 说:I've tried to re-edit the system_cfg.h file, but it seems that this file is auto genergated by shell script, i.e. it would like turn back to original file after I edited and saved it.  and I found a little difficult to find the shell script which generated this system_cfg.h file. could you kindly point out the shell script file or something else to auto edit the system_cfg.h file?

Actually this file is auto-generated depending on the algorithms selected for the usecase configuration.. What is the MAKECONFIG and MAKEAPPNAME you are using? Depending on the ALG_LIST, it generates this config header file. Can you please check if ALG_dmaSwMs is included in the ALG_LIST?

,

henry o:

thanks for your kinldy advice.

,

henry o:

Dear Cherry,currently this issue is solved, now ALG_dmaSwMs could run at ipu and dsp1 core now, and mosaic several images to one image. Thanks for your kindly help and support and that make me feel I'm not fighting alone.below is some tips for using rtos algorithm links in hlos side:1,$(APPNAME)/configs/$(MAKECONFIG)/cfg.mk      set BUILD_ALGORITHMS=yes2, $(APPNAME)/src/rtos/alg_plugins/Makefile     add : include $($(MAKEAPPNAME)_PATH)/src/rtos/alg_plugins/dmaSwMs/SRC_FILES.MK3, build/Makefile     add: $(MAKE) -fMAKEFILE.MK -C$($(MAKEAPPNAME)_PATH)/src/rtos/alg_plugins $(TARGET)

then system_cfg.h would include "#define ALG_dmaSwMs"thanks again and have a good night.

ohenry

 

 

赞(0)
未经允许不得转载:TI中文支持网 » TDA2SX: 想了解怎么使用 sw mosaic link
分享到: 更多 (0)