Hi all,
I'm trying to figure out how to get the characters and rectangles in the OSD to be specific colors. Any help with this would be appreciated.
In my research I came across the DM812X_DRAW_line function (in ipnc_rdk\ipnc_mcfw\mcfw\src_bios6\links_m3vpss\alg\common\ti_draw.c) which is called 4 times when drawing a rectangle in the video frame to the specific color requested. The DRAW_line function calls DM81XX_EDMA3_memset to color the lines in the video frame.
The first line is drawn after the following statements:
lineInfo.thickness = pRectInfo->thickness; lineInfo.colorY = pRectInfo->colorY; lineInfo.colorC = pRectInfo->colorC; lineInfo.startX = pRectInfo->startX; lineInfo.startY = pRectInfo->startY; lineInfo.length = pRectInfo->width; lineInfo.vertLine = FALSE; DM812X_DRAW_line(pInFrameInfo, &lineInfo);
In the DM812X_DRAW_line function, when setting the color before calling EDMA:
if ((pInFrameInfo->videoDataFormat == FVID2_DF_YUV420SP_VU) || (pInFrameInfo->videoDataFormat == FVID2_DF_YUV420SP_UV)) { incAddr = pInFrameInfo->videoOffsetH; startAddr = pInFrameInfo->videoInOutAddrY + pLineInfo->startY * incAddr + pLineInfo->startX; color = (pLineInfo->colorY << 24) + (pLineInfo->colorY << 16) + (pLineInfo->colorY << 8) + pLineInfo->colorY; }
Only the Y component is copied, not the C. In the YUV420 color scheme, there is YYYYCbCr. From what I understand here, only the black/grey component is used. Is this a bug or just an oversight?
How do I color the rectangles red or blue? Will I need another EDMA transfer with the color component?
Thanks,
Mechi