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.

Proper use of VFPC.IndTxSc (SC_M/SC_H?)

I currently have an OMX application working with this (extremely) simple pipeline of components: VFCC -> CMUX. I'm now trying to add the ability to scale the captured frames (1260x960 down to 704x240), and towards that end I think I've found the right component: OMX.TI.VPSSM3.VFPC.INDTXSCWB

Should it be possible to connect the output port of the VFCC directly to the input port of INDTXSCWB? Or is this functionality already part of the VFCC and I'm just missing it? I ask because using the following node edges, the VPSS M3 core emits an xdc runtime error in utils_mem.c once the INDTXSCWB reaches the executing stage and gets it's first frame from the VFCC:

        {      
                printf("Connecting VFCC->VFPCSC\n");
                omxILEdgeInfo      vfcc_sc_edge;
                OMX_HANDLETYPE     hVSRC = NULL;
               
                TIMM_OSAL_Memset (&vfcc_sc_edge, 0x0, sizeof(vfcc_sc_edge));
                vfcc_sc_edge.sNode1.hComp = &(pContext->hVFCC);
                vfcc_sc_edge.sNode1.bMultiHandleSinglePortConnect = OMX_FALSE;
                vfcc_sc_edge.sNode1.bEnablePort                   = g_EnablePort;
                vfcc_sc_edge.sNode1.bEnableNotify                 = OMX_FALSE;
                vfcc_sc_edge.sNode1.bUsePortIndexArrayList        = OMX_FALSE;
                vfcc_sc_edge.sNode1.nStartPortIndex               = OMX_VFCC_OUTPUT_PORT_START_INDEX;
                vfcc_sc_edge.sNode1.nNumPorts                     = 1;
                vfcc_sc_edge.sNode1.nPortIndexIncrement           = 1;
                vfcc_sc_edge.sNode1.nNumHandles                   = 1;
                vfcc_sc_edge.sNode1.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                vfcc_sc_edge.sNode1.pPortIndexList                = NULL;

                vfcc_sc_edge.sNode2.hComp                         = &(pContext->hVFPCSC);
                vfcc_sc_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
                vfcc_sc_edge.sNode2.bEnablePort                   = g_EnablePort;
                vfcc_sc_edge.sNode2.bEnableNotify                 = OMX_FALSE;
                vfcc_sc_edge.sNode2.bUsePortIndexArrayList        = OMX_FALSE;
                vfcc_sc_edge.sNode2.nStartPortIndex               = OMX_VFPC_INPUT_PORT_START_INDEX;
                vfcc_sc_edge.sNode2.nNumPorts                     = 1;
                vfcc_sc_edge.sNode2.nPortIndexIncrement           = 1;
                vfcc_sc_edge.sNode2.nNumHandles                   = 1;
                vfcc_sc_edge.sNode2.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                vfcc_sc_edge.sNode2.pPortIndexList                = NULL;
               
                vfcc_sc_edge.szEdgeName = "FQ_VFCCOUT";
                vfcc_sc_edge.bSetupTunnel = g_SetupTunnel;
                vfcc_sc_edge.bCreatePortGroup = OMX_FALSE;
                vfcc_sc_edge.bForceDisableTiler = OMX_FALSE;
                vfcc_sc_edge.bSetParameter = g_SetParameter;
                vfcc_sc_edge.szPortGroupName    = NULL;
                vfcc_sc_edge.eCompressionFormat = OMX_VIDEO_CodingUnused;
                vfcc_sc_edge.eColorFormat  = IL_CLIENT_VIDEOCAPTURE_INCOLORFORMAT;
                vfcc_sc_edge.nFrameWidth   = FRAME_WIDTH;
                vfcc_sc_edge.nFrameHeight  = FRAME_HEIGHT;
                eError = omx_ilclient_utl_connect_components (&vfcc_sc_edge);
                OMX_TEST_BAIL_IF_ERROR ( eError );
        }
        {
                printf("Connecting VFPCSC->CMUX\n");
                omxILEdgeInfo      sc_cmux_edge;

                TIMM_OSAL_Memset (&sc_cmux_edge, 0x0, sizeof(sc_cmux_edge));
                sc_cmux_edge.sNode1.hComp                         = &(pContext->hVFPCSC);
                sc_cmux_edge.sNode1.bMultiHandleSinglePortConnect = OMX_FALSE;
                sc_cmux_edge.sNode1.bEnablePort                   = g_EnablePort;
                sc_cmux_edge.sNode1.bEnableNotify                 = OMX_FALSE;
                sc_cmux_edge.sNode1.bUsePortIndexArrayList        = OMX_FALSE;
                sc_cmux_edge.sNode1.nStartPortIndex               = OMX_VFPC_OUTPUT_PORT_START_INDEX;
                sc_cmux_edge.sNode1.nNumPorts                     = 1;
                sc_cmux_edge.sNode1.nPortIndexIncrement           = 1;
                sc_cmux_edge.sNode1.nNumHandles                   = 1;
                sc_cmux_edge.sNode1.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                sc_cmux_edge.sNode1.pPortIndexList                    = NULL;

                sc_cmux_edge.sNode2.hComp                         = &(pContext->hCMUX);
                sc_cmux_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
                sc_cmux_edge.sNode2.bEnablePort                   = g_EnablePort;
                sc_cmux_edge.sNode2.bEnableNotify                 = OMX_TRUE;
                sc_cmux_edge.sNode2.bUsePortIndexArrayList        = OMX_FALSE;
                sc_cmux_edge.sNode2.nStartPortIndex               = OMX_CMUX_INPUT_PORT_START_INDEX;
                sc_cmux_edge.sNode2.nNumPorts                     = 1;
                sc_cmux_edge.sNode2.nPortIndexIncrement           = 1;
                sc_cmux_edge.sNode2.nNumHandles                   = 1;
                sc_cmux_edge.sNode2.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                sc_cmux_edge.sNode2.pPortIndexList                    = NULL;

                sc_cmux_edge.szEdgeName = "SCOUT";
                sc_cmux_edge.bSetupTunnel = g_SetupTunnel;
                sc_cmux_edge.bCreatePortGroup = OMX_FALSE;
                sc_cmux_edge.bForceDisableTiler = OMX_TRUE;
                sc_cmux_edge.bSetParameter = g_SetParameter;
                sc_cmux_edge.szPortGroupName    = NULL;
                sc_cmux_edge.eCompressionFormat = OMX_VIDEO_CodingUnused;
                sc_cmux_edge.eColorFormat  = IL_CLIENT_VIDEOCAPTURE_INCOLORFORMAT;
                sc_cmux_edge.nFrameWidth   = SCOUT_FRAME_WIDTH;
                sc_cmux_edge.nFrameHeight  = SCOUT_FRAME_HEIGHT;
                //sc_cmux_edge.nEdgeBufCnt   = 5;
                eError = omx_ilclient_utl_connect_components (&sc_cmux_edge);
                OMX_TEST_BAIL_IF_ERROR ( eError );
        }

 

 

  • Update: The initial assertion I was getting was from trying to use the Tiler, so I disabled that. Once I then turned on GT_TRACE, I'm now getting more specific errors about incorrect buffer dimension and such. Where is the documentation for this component?

  • Update: I've finally gotten the scalar to do something for me, and it appears to do it quite well, except for one glaring issue. I've gotten it to accept my input dimensions of 1280x960 and the output dimensions of 704x240, but the only way I've gotten it to work is by lying to it and telling it the frames in YUV420SemiPlanar. Technically, my frames are 12-bit grayscale, but in the interest of getting this to work they could be considered 8-bit Y with garbage/blank. U and V pixels. As a result of the scalar thinking that frames are Planar, I get a *very* scrambled image, as expected.

    What is necessary to get the scalar to operate on YUV (YU + YV) data?

  • Hi,

    Actually VIP supports inline scaling but In SDK 5.0.0.11 we are not supporting this feature inside VFCC, so you will not be able to scale within VFCC.  You have to use a separate scalar and you are doing correctly by picking VFPC-SC.

    Please let me know which SDK version you are being picked? And did you modify the memory map? If yes give the details, also send me the error log for further details

    At present, I think the issue is with tiled capture.  Can you please try with?

          vfcc_sc_edge.bForceDisableTiler = OMX_TRUE;


    Regards

    Shiju

     

  • Ah, I had noticed the scalar in the VIP diagrams and was wondering where it was represented in the OMX components. I guess that answers that answers that question. :-)

    I'm using SDK 5.0.0.11 currently. I'm not sure where one modifies the memory map, so I don't believe I've changed it. At the moment, I'm not concerned with getting tiled capture to work: Without the tiler I'm happily achieving 45 frames per second, which is the fastest I've been able to acquire from the VIP by itself using the CaptureVIP test.

    I've managed to get the VFPC-SC to function (by disabling the tiler and telling it the image format is planar), but the output is garbage, which is to be expected since it's interpreting my image as planar when it's not. (Again, my frames can currently be considered as YUYV or YUY2). This is my current configuration:

    
                    vfcc_sc_edge.sNode1.hComp = &(pContext->hVFCC[0]);
                    vfcc_sc_edge.sNode1.bMultiHandleSinglePortConnect = OMX_FALSE;
                    vfcc_sc_edge.sNode1.bEnablePort                   = g_EnablePort;
                    vfcc_sc_edge.sNode1.bEnableNotify                 = OMX_FALSE;
                    vfcc_sc_edge.sNode1.bUsePortIndexArrayList        = OMX_FALSE;
                    vfcc_sc_edge.sNode1.nStartPortIndex               = OMX_VFCC_OUTPUT_PORT_START_INDEX;
                    vfcc_sc_edge.sNode1.nNumPorts                     = 1;
                    vfcc_sc_edge.sNode1.nPortIndexIncrement           = 1;
                    vfcc_sc_edge.sNode1.nNumHandles                   = 1;
                    vfcc_sc_edge.sNode1.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                    vfcc_sc_edge.sNode1.pPortIndexList                = NULL;
    
                    vfcc_sc_edge.sNode2.hComp                         = &(pContext->hVFPCSC);
                    vfcc_sc_edge.sNode2.bMultiHandleSinglePortConnect = OMX_FALSE;
                    vfcc_sc_edge.sNode2.bEnablePort                   = g_EnablePort;
                    vfcc_sc_edge.sNode2.bEnableNotify                 = OMX_FALSE;
                    vfcc_sc_edge.sNode2.bUsePortIndexArrayList        = OMX_FALSE;
                    vfcc_sc_edge.sNode2.nStartPortIndex               = OMX_VFPC_INPUT_PORT_START_INDEX;
                    vfcc_sc_edge.sNode2.nNumPorts                     = 1;
                    vfcc_sc_edge.sNode2.nPortIndexIncrement           = 1;
                    vfcc_sc_edge.sNode2.nNumHandles                   = 1;
                    vfcc_sc_edge.sNode2.pPortConfigEventCompleteSemHandle = pContext->hPortConfigEvent;
                    vfcc_sc_edge.sNode2.pPortIndexList                = NULL;
    
                    vfcc_sc_edge.szEdgeName = "FQ_VFCCOUT_MONO";
                    vfcc_sc_edge.bSetupTunnel = g_SetupTunnel;
                    vfcc_sc_edge.bCreatePortGroup = OMX_FALSE;
                    vfcc_sc_edge.bForceDisableTiler = OMX_TRUE;
                    vfcc_sc_edge.bSetParameter = g_SetParameter;
                    vfcc_sc_edge.szPortGroupName    = NULL;
                    vfcc_sc_edge.eCompressionFormat = OMX_VIDEO_CodingUnused;
    #if 0
                    vfcc_sc_edge.eColorFormat  = IL_CLIENT_VIDEOCAPTURE_INCOLORFORMAT;
    #else
                    vfcc_sc_edge.eColorFormat  = OMX_COLOR_FormatYUV420SemiPlanar;
    #endif
                    vfcc_sc_edge.nFrameWidth   = FRAME_WIDTH; // 1280
                    vfcc_sc_edge.nFrameHeight  = FRAME_HEIGHT; // 960

     

  • Your configurations seems to be corrcet. Yes, I think the way you interpreting the ouput of VFPC-SC may wrong. VFPC SC output will be in YUYV format.

    regards

    shiju