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.

Problem with simple OpenMAX application

Other Parts Discussed in Thread: TVP5158

Hello.

 

Basing on VS2 demo I am trying to write simple "Hello World" OMX application, however I am unable to get it working

due to the following assertion.

------------------------------------------------------------------------------------

 CAPTUREAPP: VIP 0: VID DEC 0400 (0x58): 5158:0002:0000
 CAPTUREAPP: Detect video in progress for inst 0 !!!
 TVP5158: 0x58: Downloading patch ...
 TVP5158: 0x58: Downloading patch ... DONE !!!
 TVP5158: 0x58: 5158:0002:0143
 CAPTUREAPP: Detected video at CH0 (720x288@720Hz, 50)!!!
Display Controller Path configured for 0!!
Display Driver Opened!!
Assertion failed, (nOutMsgCount > 0), file src/omx_vfcc_drvif.c, line 1852
------------------------------------------------------------------------------------

At the end of this post I have attached source code of my test application.

I will be grateful if someone help me solve the problem.

 

Regards.

Piotr Zięcik.

 

Source code:

#define OMX_INIT_STRUCT(_s_, _name_) do {                \
    memset(&(_s_), 0x0, sizeof(_name_));                \
    (_s_).nSize                = sizeof(_name_);        \
    (_s_).nVersion.s.nVersionMajor    = OMX_UTL_COMP_VERSION_MAJOR;    \
    (_s_).nVersion.s.nVersionMinor    = OMX_UTL_COMP_VERSION_MINOR;    \
    (_s_).nVersion.s.nRevision        = OMX_UTL_COMP_VERSION_REVISION;\
    (_s_).nVersion.s.nStep        = OMX_UTL_COMP_VERSION_STEP;    \
} while (0)

#define OMX_TRACE(_function_) do {                    \
    OMX_ERRORTYPE e = _function_;                    \
    System_printf("%s = %i\n", #_function_, e);            \
} while (0)

OMX_CALLBACKTYPE TestCallbacks;

OMX_HANDLETYPE VFCC;
OMX_HANDLETYPE CTRLTVP;

OMX_HANDLETYPE VFDC;
OMX_HANDLETYPE CTRLDC;

OMX_ERRORTYPE TestEventHandler(OMX_IN OMX_HANDLETYPE hComponent,
                OMX_IN OMX_PTR pAppData,
                    OMX_IN OMX_EVENTTYPE eEvent,
                OMX_IN OMX_U32 nData1,
                OMX_IN OMX_U32 nData2,
                OMX_IN OMX_PTR pEventData)

{
    System_printf("%s(): ENTER.\n", __FUNCTION__);
    System_printf("%s(): LEAVE.\n", __FUNCTION__);
    return OMX_ErrorNone;
}

OMX_ERRORTYPE TestEmptyBufferDone(OMX_IN OMX_HANDLETYPE hComponent,
                OMX_IN OMX_PTR pAppData,
                                OMX_IN OMX_BUFFERHEADERTYPE *pBuffer)
{
    System_printf("%s(): ENTER.\n", __FUNCTION__);
    System_printf("%s(): LEAVE.\n", __FUNCTION__);
    return OMX_ErrorNone;
}

OMX_ERRORTYPE TestFillBufferDone(OMX_OUT OMX_HANDLETYPE hComponent,
                OMX_OUT OMX_PTR pAppData,
                OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
{
    System_printf("%s(): ENTER.\n", __FUNCTION__);
    System_printf("%s(): LEAVE.\n", __FUNCTION__);
    return OMX_ErrorNone;
}

void test(void) {
    OMX_PARAM_VFCC_HWPORT_ID VFCC_HwPortID;
    OMX_PARAM_VFCC_HWPORT_PROPERTIES VFCC_HwPortProperties;
    OMX_PARAM_VFDC_DRIVERINSTID VFDC_DriverInstID;
    OMX_PARAM_VFDC_CREATEMOSAICLAYOUT VFDC_MosaicLayout;
    OMX_CONFIG_VFDC_MOSAICLAYOUT_PORT2WINMAP VFDC_Port2WinMap;
    OMX_PARAM_CTRL_VIDDECODER_INFO CTRLTVP_VidDecoderInfo;
    OMX_PARAM_BUFFER_MEMORYTYPE BufferMemory;
    OMX_PARAM_PORTDEFINITIONTYPE PortDefinition;

    System_printf("%s(): ENTER.\n", __FUNCTION__);

    TestCallbacks.EventHandler    = TestEventHandler;
    TestCallbacks.EmptyBufferDone    = TestEmptyBufferDone;
    TestCallbacks.FillBufferDone    = TestFillBufferDone;

    /*
     * OMX.TI.VPSSM3.VFCC
     */
    System_printf("\n%s(): Creating OMX.TI.VPSSM3.VFCC component ...\n", __FUNCTION__);
    OMX_TRACE(OMX_GetHandle(&VFCC, "OMX.TI.VPSSM3.VFCC", &VFCC, &TestCallbacks));

    System_printf("%s(): Setting OMX_TI_IndexParamVFCCHwPortID ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(VFCC_HwPortID, OMX_PARAM_VFCC_HWPORT_ID);
    VFCC_HwPortID.eHwPortId = OMX_VIDEO_CaptureHWPortVIP1_PORTA;
    OMX_TRACE(OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortID, (OMX_PTR)&VFCC_HwPortID));

    System_printf("%s(): Setting OMX_TI_IndexParamVFCCHwPortProperties ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(VFCC_HwPortProperties, OMX_PARAM_VFCC_HWPORT_PROPERTIES);
    VFCC_HwPortProperties.eCaptMode            = OMX_VIDEO_CaptureModeSC_NON_MUX;
    VFCC_HwPortProperties.eVifMode            = OMX_VIDEO_CaptureVifMode_08BIT;
    VFCC_HwPortProperties.eInColorFormat        = OMX_COLOR_FormatYCbYCr;
    VFCC_HwPortProperties.eScanType            = OMX_VIDEO_CaptureScanTypeInterlaced;
    VFCC_HwPortProperties.nMaxWidth            = 720;
    VFCC_HwPortProperties.nMaxHeight        = 576;
    VFCC_HwPortProperties.nMaxChnlsPerHwPort    = 1;
    OMX_TRACE(OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortProperties, (OMX_PTR)&VFCC_HwPortProperties));

    System_printf("%s(): Setting OMX_TI_IndexParamBuffMemType on the first port ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(BufferMemory, OMX_PARAM_BUFFER_MEMORYTYPE);
    BufferMemory.nPortIndex                = OMX_VFCC_OUTPUT_PORT_START_INDEX;
    BufferMemory.eBufMemoryType            = OMX_BUFFER_MEMORY_DEFAULT;
    OMX_TRACE(OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamBuffMemType, (OMX_PTR)&BufferMemory));

    System_printf("%s(): Setting OMX_IndexParamPortDefinition on the first port ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(PortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
    PortDefinition.nPortIndex            = OMX_VFCC_OUTPUT_PORT_START_INDEX;
    OMX_TRACE(OMX_GetParameter(VFCC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition));
    PortDefinition.format.video.eCompressionFormat    = OMX_VIDEO_CodingUnused;
    PortDefinition.format.video.eColorFormat    = OMX_COLOR_FormatYCbYCr;
    PortDefinition.format.video.nFrameWidth        = 720;
    PortDefinition.format.video.nFrameHeight    = 576 / 2;
    PortDefinition.format.video.nStride        = 2 * 720;
    PortDefinition.nBufferCountActual        = 4;
    OMX_TRACE(OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition));

    /*
     * OMX.TI.VPSSM3.CTRL.TVP
     */
    System_printf("\n%s(): Creating OMX.TI.VPSSM3.CTRL.TVP component ...\n", __FUNCTION__);
    OMX_TRACE(OMX_GetHandle(&CTRLTVP, "OMX.TI.VPSSM3.CTRL.TVP", &CTRLTVP, &TestCallbacks));

    System_printf("%s(): Setting OMX_TI_IndexParamVFCCHwPortID ...\n", __FUNCTION__);
    OMX_TRACE(OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortID, (OMX_PTR)&VFCC_HwPortID));

    System_printf("%s(): Setting OMX_TI_IndexParamVFCCHwPortProperties ...\n", __FUNCTION__);
    OMX_TRACE(OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortProperties, (OMX_PTR)&VFCC_HwPortProperties));

    System_printf("%s(): Setting OMX_TI_IndexParamCTRLVidDecInfo ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(CTRLTVP_VidDecoderInfo, OMX_PARAM_CTRL_VIDDECODER_INFO);
    CTRLTVP_VidDecoderInfo.videoStandard        = OMX_VIDEO_DECODER_STD_AUTO_DETECT;
    CTRLTVP_VidDecoderInfo.videoDecoderId        = OMX_VID_DEC_TVP5158_DRV;
    CTRLTVP_VidDecoderInfo.videoSystemId        = OMX_VIDEO_DECODER_VIDEO_SYSTEM_PAL;
    OMX_TRACE(OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamCTRLVidDecInfo, (OMX_PTR)&CTRLTVP_VidDecoderInfo));

    /*
     * OMX.TI.VPSSM3.VFDC
     */
    System_printf("\n%s(): Creating OMX.TI.VPSSM3.VFDC component ...\n", __FUNCTION__);
    OMX_TRACE(OMX_GetHandle(&VFDC, "OMX.TI.VPSSM3.VFDC", &VFDC, &TestCallbacks));

    System_printf("%s(): Setting OMX_TI_IndexParamVFDCDriverInstId ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(VFDC_DriverInstID, OMX_PARAM_VFDC_DRIVERINSTID);
    VFDC_DriverInstID.nDrvInstID            = OMX_VIDEO_DISPLAY_ID_HD0;
    VFDC_DriverInstID.eDispVencMode            = OMX_DC_MODE_1080I_60;
    OMX_TRACE(OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCDriverInstId, (OMX_PTR)&VFDC_DriverInstID));

    System_printf("%s(): Setting OMX_TI_IndexParamVFDCCreateMosaicLayout ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(VFDC_MosaicLayout, OMX_PARAM_VFDC_CREATEMOSAICLAYOUT);
    VFDC_MosaicLayout.nDisChannelNum        = 0;
    VFDC_MosaicLayout.nNumWindows            = 1;
    VFDC_MosaicLayout.sMosaicWinFmt[0].winStartX    = 0;
    VFDC_MosaicLayout.sMosaicWinFmt[0].winStartY    = 0;
    VFDC_MosaicLayout.sMosaicWinFmt[0].winWidth    = 720;
    VFDC_MosaicLayout.sMosaicWinFmt[0].winHeight    = 576;
    VFDC_MosaicLayout.sMosaicWinFmt[0].pitch[VFDC_YUV_SP_Y_ADDR_IDX]    = 2 * 720;
    VFDC_MosaicLayout.sMosaicWinFmt[0].pitch[VFDC_YUV_SP_CBCR_ADDR_IDX]    = 2 * 720;
    VFDC_MosaicLayout.sMosaicWinFmt[0].dataFormat    = VFDC_DF_YUV422I_YUYV;
    VFDC_MosaicLayout.sMosaicWinFmt[0].bpp        = VFDC_BPP_BITS16;
    OMX_TRACE(OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCCreateMosaicLayout, (OMX_PTR)&VFDC_MosaicLayout));

    System_printf("%s(): Setting OMX_TI_IndexConfigVFDCMosaicPort2WinMap ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(VFDC_Port2WinMap, OMX_CONFIG_VFDC_MOSAICLAYOUT_PORT2WINMAP);
    VFDC_Port2WinMap.numWindows = 1;
    OMX_TRACE(OMX_SetConfig (VFDC, (OMX_INDEXTYPE)OMX_TI_IndexConfigVFDCMosaicPort2WinMap, (OMX_PTR)&VFDC_Port2WinMap));

    System_printf("%s(): Setting OMX_TI_IndexParamBuffMemType on first port ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(BufferMemory, OMX_PARAM_BUFFER_MEMORYTYPE);
    BufferMemory.nPortIndex                = OMX_VFDC_INPUT_PORT_START_INDEX;
    BufferMemory.eBufMemoryType            = OMX_BUFFER_MEMORY_DEFAULT;
    OMX_TRACE(OMX_SetParameter (VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamBuffMemType, (OMX_PTR)&BufferMemory));

    System_printf("%s(): Setting OMX_IndexParamPortDefinition on the first port ...\n", __FUNCTION__);
    OMX_INIT_STRUCT(PortDefinition, OMX_PARAM_PORTDEFINITIONTYPE);
    PortDefinition.nPortIndex            = OMX_VFDC_INPUT_PORT_START_INDEX;
    OMX_TRACE(OMX_GetParameter(VFDC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition));
    PortDefinition.format.video.eCompressionFormat    = OMX_VIDEO_CodingUnused;
    PortDefinition.format.video.eColorFormat    = OMX_COLOR_FormatYCbYCr;
    PortDefinition.format.video.nFrameWidth        = 720;
    PortDefinition.format.video.nFrameHeight    = 576 / 2;
    PortDefinition.format.video.nStride        = 2 * 720;
    PortDefinition.nBufferCountActual        = 4;
    OMX_TRACE(OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition));

    /*
     * OMX.TI.VPSSM3.CTRL.DC
     */
    System_printf("\n%s(): Creating OMX.TI.VPSSM3.CTRL.DC component ...\n", __FUNCTION__);
    OMX_TRACE(OMX_GetHandle(&CTRLDC, "OMX.TI.VPSSM3.CTRL.DC", &CTRLDC, &TestCallbacks));

    System_printf("%s(): Setting OMX_TI_IndexParamVFDCDriverInstId ...\n", __FUNCTION__);
    OMX_TRACE(OMX_SetParameter(CTRLDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCDriverInstId, (OMX_PTR)&VFDC_DriverInstID));

    /*
     * VFCC -> VFDC
     */
    System_printf("\nCreating Tunnel VFCC => VFDC ...\n");
    OMX_TRACE(OMX_SetupTunnel(VFCC, OMX_VFCC_OUTPUT_PORT_START_INDEX, VFDC, OMX_VFDC_INPUT_PORT_START_INDEX));
    OMX_TRACE(OMX_SendCommand(VFCC, OMX_CommandPortEnable, OMX_VFCC_OUTPUT_PORT_START_INDEX, NULL));
    OMX_TRACE(OMX_SendCommand(VFDC, OMX_CommandPortEnable, OMX_VFDC_INPUT_PORT_START_INDEX, NULL));

    /*
     * Going to IDLE ...
     */
    System_printf("Going to IDLE State ...\n");
    OMX_TRACE(OMX_SendCommand(CTRLTVP, OMX_CommandStateSet, OMX_StateIdle, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(VFCC, OMX_CommandStateSet, OMX_StateIdle, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(CTRLDC, OMX_CommandStateSet, OMX_StateIdle, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(VFDC, OMX_CommandStateSet, OMX_StateIdle, NULL));
      TIMM_OSAL_SleepTask(1000);

    /*
     * Going to EXECUTING ...
     */
    System_printf("Going to EXECUTING State ...\n");
    OMX_TRACE(OMX_SendCommand(CTRLTVP, OMX_CommandStateSet, OMX_StateExecuting, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(VFCC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(CTRLDC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
      TIMM_OSAL_SleepTask(1000);
    OMX_TRACE(OMX_SendCommand(VFDC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
      TIMM_OSAL_SleepTask(1000);

    System_printf("Sleeping ...\n");

    while (1)
        TIMM_OSAL_SleepTask(1000);

    System_printf("%s(): LEAVE.\n", __FUNCTION__);
}

 

Execution log:

test(): ENTER.

test(): Creating OMX.TI.VPSSM3.VFCC component ...
OMX_GetHandle(&VFCC, "OMX.TI.VPSSM3.VFCC", &VFCC, &TestCallbacks) = 0
test(): Setting OMX_TI_IndexParamVFCCHwPortID ...
OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortID, (OMX_PTR)&VFCC_HwPortID) = 0
test(): Setting OMX_TI_IndexParamVFCCHwPortProperties ...
OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortProperties, (OMX_PTR)&VFCC_HwPortProperties) = 0
test(): Setting OMX_TI_IndexParamBuffMemType on the first port ...
OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_TI_IndexParamBuffMemType, (OMX_PTR)&BufferMemory) = 0
test(): Setting OMX_IndexParamPortDefinition on the first port ...
OMX_GetParameter(VFCC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition) = 0
OMX_SetParameter(VFCC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition) = 0

test(): Creating OMX.TI.VPSSM3.CTRL.TVP component ...
OMX_GetHandle(&CTRLTVP, "OMX.TI.VPSSM3.CTRL.TVP", &CTRLTVP, &TestCallbacks) = 0
test(): Setting OMX_TI_IndexParamVFCCHwPortID ...
OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortID, (OMX_PTR)&VFCC_HwPortID) = 0
test(): Setting OMX_TI_IndexParamVFCCHwPortProperties ...
OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamVFCCHwPortProperties, (OMX_PTR)&VFCC_HwPortProperties) = 0
test(): Setting OMX_TI_IndexParamCTRLVidDecInfo ...
OMX_SetParameter(CTRLTVP, (OMX_INDEXTYPE)OMX_TI_IndexParamCTRLVidDecInfo, (OMX_PTR)&CTRLTVP_VidDecoderInfo) = 0

test(): Creating OMX.TI.VPSSM3.VFDC component ...
OMX_GetHandle(&VFDC, "OMX.TI.VPSSM3.VFDC", &VFDC, &TestCallbacks) = 0
test(): Setting OMX_TI_IndexParamVFDCDriverInstId ...
OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCDriverInstId, (OMX_PTR)&VFDC_DriverInstID) = 0
test(): Setting OMX_TI_IndexParamVFDCCreateMosaicLayout ...
OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCCreateMosaicLayout, (OMX_PTR)&VFDC_MosaicLayout) = 0
test(): Setting OMX_TI_IndexConfigVFDCMosaicPort2WinMap ...
OMX_SetConfig (VFDC, (OMX_INDEXTYPE)OMX_TI_IndexConfigVFDCMosaicPort2WinMap, (OMX_PTR)&VFDC_Port2WinMap) = 0
test(): Setting OMX_TI_IndexParamBuffMemType on first port ...
OMX_SetParameter (VFDC, (OMX_INDEXTYPE)OMX_TI_IndexParamBuffMemType, (OMX_PTR)&BufferMemory) = 0
test(): Setting OMX_IndexParamPortDefinition on the first port ...
OMX_GetParameter(VFDC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition) = 0
OMX_SetParameter(VFDC, (OMX_INDEXTYPE)OMX_IndexParamPortDefinition, (OMX_PTR)&PortDefinition) = 0

test(): Creating OMX.TI.VPSSM3.CTRL.DC component ...
OMX_GetHandle(&CTRLDC, "OMX.TI.VPSSM3.CTRL.DC", &CTRLDC, &TestCallbacks) = 0
test(): Setting OMX_TI_IndexParamVFDCDriverInstId ...
OMX_SetParameter(CTRLDC, (OMX_INDEXTYPE)OMX_TI_IndexParamVFDCDriverInstId, (OMX_PTR)&VFDC_DriverInstID) = 0

Creating Tunnel VFCC => VFDC ...
OMX_SetupTunnel(VFCC, OMX_VFCC_OUTPUT_PORT_START_INDEX, VFDC, OMX_VFDC_INPUT_PORT_START_INDEX) = 0
OMX_SendCommand(VFCC, OMX_CommandPortEnable, OMX_VFCC_OUTPUT_PORT_START_INDEX, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
OMX_SendCommand(VFDC, OMX_CommandPortEnable, OMX_VFDC_INPUT_PORT_START_INDEX, NULL) = 0
Going to IDLE State ...
OMX_SendCommand(CTRLTVP, OMX_CommandStateSet, OMX_StateIdle, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
OMX_SendCommand(VFCC, OMX_CommandStateSet, OMX_StateIdle, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
OMX_SendCommand(CTRLDC, OMX_CommandStateSet, OMX_StateIdle, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
OMX_SendCommand(VFDC, OMX_CommandStateSet, OMX_StateIdle, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
Going to EXECUTING State ...
OMX_SendCommand(CTRLTVP, OMX_CommandStateSet, OMX_StateExecuting, NULL) = 0
TestEventHandler(): ENTER.
TestEventHandler(): LEAVE.
OMX_SendCommand(VFCC, OMX_CommandStateSet, OMX_StateExecuting, NULL) = 0
OMX_SendCommand(CTRLDC, OMX_CommandStateSet, OMX_StateExecuting, NULL) = 0
OMX_SendCommand(VFDC, OMX_CommandStateSet, OMX_StateExecuting, NULL) = 0
Sleeping ...

  • Sorry for missing this thread. Few pointers are noted below

    1. Which version of the SDK are you on? Also, as a first step, can you try with NTSC resolution since the vs2 has been verified for NTSC.

    2. Since you are using VS daughter card, can you try setting the VFCC H/W properties as given in the vs2 demo. You could connect 15 unused channels of vfcc to a vsnk. So the chain would look like

    vfcc->vfdc (1 port)

           ->vsnk (15 ports)

    This way you could use the code from vs2 demo il-client.

    3. Can you make the order of the executing state transition as follows? This is because, VFDC being the receiver of Data, should be in the executing state before the sender so that no buffers are dropped.

        OMX_TRACE(OMX_SendCommand(CTRLDC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
          TIMM_OSAL_SleepTask(1000);
        OMX_TRACE(OMX_SendCommand(VFDC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
          TIMM_OSAL_SleepTask(1000);

       OMX_TRACE(OMX_SendCommand(CTRLTVP, OMX_CommandStateSet, OMX_StateExecuting, NULL));
          TIMM_OSAL_SleepTask(1000);
        OMX_TRACE(OMX_SendCommand(VFCC, OMX_CommandStateSet, OMX_StateExecuting, NULL));
          TIMM_OSAL_SleepTask(1000);

    regards

    Tarakesh.

  • Hello.

     

    Thank you for your answer.

    I am using EZSDK 5_00_00_56, and I have tried NTSC without success. However changing state transition order as you suggested solves the problem.

    As result am able to get picture in field resolution (720x288) on HDMI. If I understand correctly I have to use DEI to get full frame resolution (720x576) on output.

    I have tried to simply insert DEI between VFCC and VFDC, however it doesn't work, so could you provide me a bit more information about DEI:

     

    1. DEI component have two outputs per one input. Can I use just one? If yes, which one I should connect to VFDC?

    2. In examples DEI output is always configured to YUV420SP, however it is connected to VFDC with input configured for 422YUYV. Can I configure

    DEI output to 422YUYV?

     

    Best regards,

    Piotr Zięcik.

  • Hi Piotr,

    I am very interested in your code experiment. You mentioned that the code is based on VS2 demo. Where is this "VS2 demo" code located at the SDK code tree? I only find a vs2_demo_usecase.oms file which is an OMTB script under /sdk/omtb_01_00_00_02 directory. Have you written all the C code by yourself ?  Anywhere I have just got your posted code compiled. You didn't post any header files, it took me a while to figure it out. But when I executed the app, I got a segment fault right at OMX_GetHandle(&VFCC,...). Do you have any trick to share with us?

    Does the application works for you now after you adjusted the order of the executing state transition as  suggested ?

    I am also waiting TI's response to your De-interlacing part of the question.  I also felt the documentation for OpenMax API programming shipped with SDK is not good enough for customer to use it to build a product yet. Hopefully TI's engineering team can provide some help in this forum.

    -Perry

     


  • Hello Perry.

    My test code is based on vs2 demo C code from EZSDK 05_00_00_11. The same demo is presented using OMTB in script which you mentioned. My code posted here

    is not complete - only shows configuration of each component and order of OMX commands. Everything other, including OMX core initialization is not shown here.

    The application has worked after I had adjusted state transition order. I also get deinterlacer working (all its outputs must be connected to sinks).

     

    If you have any further questions do not hesitate to contact me.

     

    Regards,

    Piotr Zięcik.