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.

about AlgLink_OsdChWinParams in DVRRDK3.0



Hi,

/**
\brief OSD channel - window parameters

Specifies OSD parameters that can be changed dynamically
on a per channel basis

See structure/field details for restrictions applicable for DM810x platform.
*/
typedef struct AlgLink_OsdChWinParams
{
UInt32 chId;
/**< OSD channel number.
Valid values: 0 .. \ref ALG_LINK_OSD_MAX_CH-1
*/

UInt32 numWindows;
/**< Number of OSD windows for this channel.
Valid values: 0.. \ref ALG_LINK_OSD_MAX_WINDOWS
*/

AlgLink_OsdWindowPrm winPrm[ALG_LINK_OSD_MAX_WINDOWS];
/**< OSD window parameters */

UInt32 colorKey[3];
/**< Color key for Y, U, V.
This is used when AlgLink_OsdWindowPrm.transperencyEnable = TRUE

colorKey[0] = Y,
colorKey[1] = U,
colorKey[2] = V,
*/

} AlgLink_OsdChWinParams;

Firstly,  I am using DVRRDK3.0 with DM8168EVM.

At my usecase, it only has one video channel encode and i want to set two osd windows at this video channel before encoding.(Note: osd use yuv420sp)

With different from OSD Demo Usecase, i didn't use two wins parameters to achieve two osd windows, such as "chId = 0; win[0], win[1];" and i want to use two chId to achieve two osd windows, such as "chId = 0, win[0]; chId = 1, win[0]".
However, one can overlay sucessfully,the other is not useful. Following is OSD parameters of the detailed information:

the first osd parameter

==>0.chId[0]
==>0.numWindows[1]
==>0.color[255, 255, 255]
==>1.startX[20]
==>2.startY[20]
==>3.width[512]
==>4.height[256]
==>5.lineOffset[512]
==>6.globalAlpha[128]
==>7.transperencyEnable[1]
==>8.enableWin[1]

the second osd parameter

==>0.chId[1]
==>0.numWindows[1]
==>0.color[255, 255, 255]
==>1.startX[20]
==>2.startY[384]
==>3.width[1024]
==>4.height[128]
==>5.lineOffset[1024]
==>6.globalAlpha[128]
==>7.transperencyEnable[1]
==>8.enableWin[1]

So,
Why?Is it something wrong?
What does chId mean? doest it mean that one Osd channel equal to one video channel?

  • If you have one encode channel you can use only chId = 0 and you have to use 2 windows for that channel. Using one window and two channels is not meaningful and will not work. Channel corresponds to a video stream. You can configure number of OSD windows to be applied on that channel.

  • Thanks for your reply, Badri.
    I see what you say, and it's consistent with my prediction. But I have some question here.

    Question 1:There is a doubt about how the Channel corresponds to a video stream.
    example:
    With two video channel(channel[0] is 1080p, channel[1] is 720p), chId[0] means channel[0] or channel[1]?
    How to distinguish it?

    Question 2:
    In addition, i have another question with the followings parameters(maxWidth, maxHeight):
    if(enableOsdAlgLink)
    {
    int chId;
    dspAlgPrm[0].enableOSDAlg = TRUE;
    dspAlgPrm[0].enableSCDAlg = FALSE;
    dspAlgPrm[0].outQueParams[ALG_LINK_SCD_OUT_QUE].nextLink = SYSTEM_LINK_ID_INVALID;
    for(chId = 0; chId < ALG_LINK_OSD_MAX_CH; chId++)
    {
    AlgLink_OsdChWinParams * chWinPrm = &dspAlgPrm[0].osdChCreateParams[chId].chDefaultParams;

    /* set osd window max width and height */
    With 1920x1080 video resolution, it's wrong when i set maxWidth=1024 and maxHeight=1024, and it's right when i set maxWidth=512 and maxHeight=512.
    As with 1920x1080 video resolution, i think it(maxWidth, maxHeight) can be set to the maximum value (1920, 1080).therefore, why and how to set it?
    dspAlgPrm[0].osdChCreateParams[chId].maxWidth = EXAMPLE_OSD_WIN_MAX_WIDTH;//Is this parameter
    dspAlgPrm[0].osdChCreateParams[chId].maxHeight = EXAMPLE_OSD_WIN_MAX_HEIGHT;

    chWinPrm->chId = chId;
    chWinPrm->numWindows = 0;
    }
    }

  • arvin arvin said:
    Question 1:There is a doubt about how the Channel corresponds to a video stream.

    - It depends on your usecase dataflow. Share your usecase data flow diagram and I can provide info on how capture channel maps to OSD channel.

    arvin arvin said:
    In addition, i have another question with the followings parameters(maxWidth, maxHeight):

    WHat is the error you are getting. ? OSD MAX_WIDTH + startX should be less than frame width.

  • "It depends on your usecase dataflow. Share your usecase data flow diagram and I can provide info on how capture channel maps to OSD channel."

    1. What if i suppose my usecase is: Capture--[chn0~chn3, yuv422]--> DEI --[chn0~chn3,yuv420sp]--> ipcFrameOutVpss --[chn0~chn3,yuv420sp]--> ENC

                                                                                                                                                                                                   |

                                                                                                                                                                                            ipcFrameInDsp <--[chn0~chn3, yuv420sp]--> DSP

    "WHat is the error you are getting. ? OSD MAX_WIDTH + startX should be less than frame width"

    2.I see, I will check it right now, and can i think that  OSD MAX_WIDTH + startY should be set less than frame height also?

  • Your channel number assignment is correct.

    Yes OSD should be fully inside the video window.