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.

change in AlgLink_OsdalgProcessFrame()

hi ,

i want to change the the pixel value in OSD demo , i make a change in AlgLink_OsdalgProcessFrame() function with red color as follow

 

    for(winId=0; winId<pChObj->numWindows; winId++)
    {
        if(!pChObj->osdWinObj[winId].enableWin)
            continue;
        Vps_printf("$$$$$$$$$$$$$$$$$$$$$  enableWin  $$$$$$$$$$$$$$$$$$$$$\n");
        /* YUV422i or YUV420SP - Y-plane processing */

        int i=0,j=0;
        UInt8 *pBufferStart = pFrame->addr[0][0];

        UInt8 *pBuffer;

         for (i= 0; i < pFrameInfo->rtChInfo.height;i++)

        {

         pBuffer =pBufferStart + (i * pFrameInfo->rtChInfo.width);    

                 for (j = 0; j< pFrameInfo->rtChInfo.width/2; j++)  

                         {     

                          *(pBuffer + 0)=0;     

                          *(pBuffer + 1)=0;     

                          *(pBuffer + 2)=0;     

                          *(pBuffer + 3)=0;     

                           pBuffer  += 4;  

                        }

        }
         pSwOsdObj->videoWindowAddr = pFrame->addr[0][0];

................

}

but there is no change in display ? what should i do ?

  • pFrameInfo->rtChInfo.height, widht might not be valid for all frames. Try to print these values for every frame and see.

    Store width & height when it becomes valid only when pFrameInfo->rtChInfoUpdate = TRUE and use it later. Existing code uses this flag already.

  • hi

    Is the display from the output of osd? if yes, how did you make sure?

  • hi ,thanks

    i have printed the message

     [c6xdsp ] $$$$$$$$ pFrameInfo->rtChInfoUpdate is enable $$$$$$$$$
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrameInfo->rtChInfo.height=1080 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrameInfo->rtChInfo.width=1920 &&&&&&&&&&&&&

     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b0c75c80 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b106a480 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b145ec80 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b1853480 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b1c47c80 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b203c480 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b2430c80 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b2825480 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b2c19c80 &&&&&&&&&&&&&
     [c6xdsp ] &&&&&&&&&&&&&&&& pFrame->addr[0][0]=b3402c80 &&&&&&&&&&&&&

    is there any question ??

  • i use link_api ,and the link is :

                   capture--->ipcframesoutvpss------(processlink)---->ipcframesinDsp----->osd

                                       ipcframesoutvpss------(nextlink)---------->display

     

    so the display comes from OSD

  • AlgLink_OsdalgProcessFrame() gets called for every frame. You need to check if pFrameInfo->rtChInfo.height=1080 & pFrameInfo->rtChInfo.width=1920 is valid for every frame.


    From the prints, it looks like pFrameInfo->rtChInfo.height / width has correct value for only first frame. After that, they remain 0 and your processing loop is not entered for successive frames.

    Can you store the width & height in some global variable when rtChInfoUpdate is TRUE and use the global varilable in your processing for loop.

     

  • Which RDK release are you using ? The issue of rtChannelInfo update was fixed a long time ago.

    Pls print buffer address content of first byte in dspAlgLink and also in display link and confirm the address you are seeing in display link is the same as the address you are seeing in dspAlgLink.

     

    Are you seeing the display frozen or do you actually see the screen getting updated with captured frames ?