Hi all,
I am using RDK4.0.
I want to display the video at the foreground and a picture at the background so that when I reduce the resolution of the video , I can see the picture .
How could I manage it ?
Thanks !
Best regards!
Strachey chen
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
I am using RDK4.0.
I want to display the video at the foreground and a picture at the background so that when I reduce the resolution of the video , I can see the picture .
How could I manage it ?
Thanks !
Best regards!
Strachey chen
I checked with Brijesh who is the HDVPSS expert and it is possible to set graphics layer to have lower priority that video so that video is displayed and when size of video is reduced graphics will be displayed.
Changes are not trivial and we have not tried it so you have to debug it to get it functional,
Use the display controller IOCTL_VPS_DCTRL_GET_COMP_RTCONFIG get the default configuration.
Then set struct Vps_DcCompRtConfig.isGlobalReorderEnable = TRUE and set the layer ordering in
struct Vps_DcCompRtConfig.displayOrder
You will have to set the SwMs background fill color to transparency key color so that swms background doesn't show when video window size is reduced.
Hi Badri,
Thanks for your reply !
I have done the first step. Could you give me some advices about how to set the swms background fill color to transparency ?
Best regards!
Below is the code to set video at higher priority than graphics:
Add below code to /dvr_rdk/mcfw/src_bios6/links_m3vpss/system/system_dctrl.c
Void System_displayCtrlSetVideoLayerPriority
{ Vps_DcCompRtConfig compRtConfig; Vps_DcCigRtConfig cigRtConfig; compRtConfig.nodeId = VPS_DC_HDMI_BLEND; retVal = FVID2_control( gSystem_objVpss.fvidDisplayCtrl, IOCTL_VPS_DCTRL_GET_COMP_RTCONFIG, &compRtConfig, NULL); UTILS_assert(retVal == FVID2_SOK); compRtConfig.nodeId = VPS_DC_HDMI_BLEND; compRtConfig.isGlobalReorderEnable = TRUE; compRtConfig.displayOrder[VPS_DC_COMP_DISPLAY_VID_ORDER] = 0x3; compRtConfig.displayOrder[VPS_DC_COMP_DISPLAY_G0_ORDER] = 0x0; compRtConfig.displayOrder[VPS_DC_COMP_DISPLAY_G1_ORDER] = 0x1; compRtConfig.displayOrder[VPS_DC_COMP_DISPLAY_G2_ORDER] = 0x2; retVal = FVID2_control( gSystem_objVpss.fvidDisplayCtrl, IOCTL_VPS_DCTRL_SET_COMP_RTCONFIG, &compRtConfig, NULL); UTILS_assert(retVal == FVID2_SOK); Vps_printf("DCRTL:Reorder of video and grpx"); cigRtConfig.nodeId = VPS_DC_CIG_NON_CONSTRAINED_OUTPUT; retVal = FVID2_control( gSystem_objVpss.fvidDisplayCtrl, IOCTL_VPS_DCTRL_GET_CIG_RTCONFIG, &cigRtConfig, NULL); UTILS_assert(retVal == FVID2_SOK); cigRtConfig.nodeId = VPS_DC_CIG_NON_CONSTRAINED_OUTPUT; cigRtConfig.transparency = TRUE; cigRtConfig.mask = VPS_DC_CIG_TM_MASK_3_LSB; cigRtConfig.transColor.r = 0x0; cigRtConfig.transColor.g = 0x0; cigRtConfig.transColor.b = 0x0; cigRtConfig.alphaBlending = TRUE; cigRtConfig.alphaValue = 0xFF; retVal = FVID2_control( gSystem_objVpss.fvidDisplayCtrl, IOCTL_VPS_DCTRL_SET_CIG_RTCONFIG, &cigRtConfig, NULL); UTILS_assert(retVal == FVID2_SOK); Vps_printf("DCRTL:Setting of transparency pixel"); }
Invoke this function when you want to set video to highest layer priority. The transparency pixel is set to RGB 0,0,0.
To make SwMs background color to RGB 0,0,0 modify:
/dvr_rdk/mcfw/src_bios6/utils/src/utils_dma.c
Int32 Utils_dmaInit() { EDMA3_DRV_Result edma3Result = EDMA3_DRV_SOK; memset(&gUtils_dmaObj, 0, sizeof(gUtils_dmaObj)); gUtils_dmaObj.hEdma = Utils_edma3init(gUtils_dmaObj.edma3InstanceId, &edma3Result); if (!gUtils_dmaObj.hEdma) { Vps_printf( " UTILS: DMA: Utils_dmaInit() ... FAILED (%d) \n", edma3Result ); } Utils_dmaFastFillSetColor(UTILS_DMA_FAST_FILL_COLOR_BLACK, UTILS_DMA_GENERATE_FILL_PATTERN(0x00, 0x80, 0x80));
With above we have verified graphics is displayed when video window size is reduced.