I am trying to add window masking (a rectangular portion of the video is always masked) feature to IPNC ( v1.5 ) in addition to face masking feature. My logic is this - Apply window masking before face detection logic runs.
To this end, I added a 'DRV_frameCopy' function call to the function 'VIDEO_fdTskRun' in the file 'videoFaceDetectThr.c ' . I am using the virtual address provided to the variable 'pBufInfo' in the function 'VIDEO_fdTskRun' by 'OSA_bufGetFull' function . But when I use the virtual address as argument to 'DRV_frameCopy' , video is garbled.
1. My function call - VIDEO_windowMasking(pBufInfo);
2. Assigning the Virtual address to be used in -DRV_frameCopy' -> frameCopy.dstVirtAddr = pBufInfo->virtAddr + VIDEO_BUF_HEADER_SIZE;
3. Calling 'DRV_frameCopy' function - DRV_frameCopy(NULL,&frameCopy);
Can you please tell me what I am doing wrong?
Logically, your code seems to be correct. I would recommend that you refer to alg_swosd.c file in the source tree (framework\alg\src). If you look for "(privacyMask==TRUE)" condition, you will be able to see the code which is used to draw the privacy masked rectangles. You can call the same API "ALG_swosdDrawRect()" from your application code with the correct set of parameters and it will draw the masked rectangle.
PS: Please mark this post as verified, if you think it has answered your question. Thanks.
Thank you very much for your reply. But as I have explained, I am using the same function (kind of) 'DRV_frameCopy' which is used inside 'ALG_swosdDrawRect' function. I created an instance of 'DRV_FrameCopyPrm' and filled in all the parameters. But when I use the virtual address supplied by ''OSA_bufGetFull'' function, the video is getting garbled. Is there any difference with the address returned by 'OSA_bufGetFull' and what is inside 'ALG_SwosdRunPrm *bufInfo' ?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.