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.

OMTB 720p capture script questions (modeled after 1080p).

Hello,

Has anybody tried or have had problems trying to do a 720p [@60] capture
using EZSDK 5.02 with OMTB scripts?

I can successfully run a [simplified] 1080p [@60] OMTB-based capture
and the "capture_encode" C-app specifying 1080p with no problems.

I can also successfully run the "capture_encode" C-app specifying 720p
with no problems.

I then tried to create a 720p OMTB script using the 1080p OMTB script as
an example (just for completeness) but all I get is a gray square on the
display.

I'm sure it's probably some bad math somewhere but I've checked that I've
specified 1280x720 everywhere I think I should and changed the buffer sizes
accordingly.

I don't recall seeing a 720p OMTB-script example. Hopefully I didn't just
miss it.

I'm attaching the script I'm using. Any thoughts?

#omx omtb_dbg_lvl 0x00
#omx omtb_dbg_lvl 0x04
#omx omtb_dbg_lvl 0x08
#omx omtb_dbg_lvl 0x10
#omx omtb_dbg_lvl 0x80
omx api init
omx setp 0 vfcc compname OMX.TI.VPSSM3.VFCC 
omx setp 0 tvp compname OMX.TI.VPSSM3.CTRL.TVP
omx setp 0 dc insmod_hdmi disable
#I/P Port or O/P Port Params for VFCC
omx setp 0 vfcc numoutbuf 6
omx setp 0 vfcc frame_width 1280
omx setp 0 vfcc frame_height 720
omx setp 0 vfcc op_chromat_format 420SP
omx setp 0 vfcc outbufalign 0
omx setp 0 vfcc outbuf_contig disable
omx setp 0 vfcc outbufsize 1382400
omx setp 0 vfcc data_opmode driver
omx setp 0 vfcc outbuf allocate
omx setp 0 vfcc outbufsize_flag disable
omx setp 0 vfcc numoutbuf 6
omx setp 0 vfcc outbuf_contig disable
omx setp 0 dei frame_width 1280
omx setp 0 dei frame_height 720
omx setp 0 dei op_chromat_format 420SP
omx setp 0 dei ip_chromat_format 420SP
omx setp 0 dei numinbuf 6 
omx setp 0 dei inbufalign 0 
omx setp 0 dei inbuf_contig disable
omx setp 0 dei inbufsize_flag disable
omx setp 0 dei inbufsize 1382400
omx setp 0 dei numoutbuf 8
omx setp 0 dei outbufalign 0
omx setp 0 dei outbuf_contig disable
omx setp 0 dei outbufsize_flag enable
omx setp 0 dei outbufsize 1843200 
omx setp 0 dei data_opmode driver
omx setp 0 dei inbuf use
omx setp 0 dei outbuf allocate
omx setp 0 h264venc numinbuf 8
omx setp 0 h264venc frame_width 1280
omx setp 0 h264venc frame_height 720
omx setp 0 h264venc inbufsize 1382400
omx setp 0 h264venc numoutbuf 4
omx setp 0 h264venc outbufsize_flag enable
omx setp 0 h264venc outbufsize 1382400
omx setp 0 h264venc data_opmode driver
#To enable write to SD card change mode to file
#omx setp 0 h264venc data_opmode file
omx setp 0 h264venc outfile /etc/misc/output.264
omx setp 0 vfdc frame_width 1280
omx setp 0 vfdc frame_height 720
omx setp 0 vfdc ip_chromat_format 422YUYV
omx setp 0 vfdc numinbuf 8 
omx setp 0 vfdc inbufalign 0
omx setp 0 vfdc inbuf_contig disable
omx setp 0 vfdc inbufsize 1843200 
omx setp 0 vfdc inbuf use
omx setp 0 vfdc graphics_flag disable
#omx setp 0 vfdc vcdemo_flag enable
omx setp 0 vfdc mosaic_window_config vs
omx setp 0 dc insmod_hdmi disable
omx api gethandle tvp 0 0
omx api gethandle vfcc 0 0
omx api gethandle dei 0 0
omx api gethandle h264venc 0 0
omx api gethandle vfdc 0 0
omx api gethandle dc 0 0
#SET ALL THE PARAMS FOR TVP
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortID eHwPortId vip1_porta
omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortID
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eCaptMode sc_non_mux
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eVifMode 16_bit
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eInColorFormat 422YUYV
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eScanType progressive
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxWidth 1280
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxHeight 720
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxChnlsPerHwPort 1
omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortProperties
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoStandard 720P60
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoDecoderId tvp7002
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoSystemId auto_detect
omx api setparam tvp 0 0 0 OMX_TI_IndexParamCTRLVidDecInfo
#************************************************************
#SET ALL THE PARAMS FOR VFCC
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortID eHwPortId vip1_porta
omx api setparam vfcc 0 0 0 OMX_TI_IndexParamVFCCHwPortID
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eCaptMode sc_non_mux
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eVifMode 16_bit
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eInColorFormat 422YUYV
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eScanType progressive
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxWidth 1280
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxHeight 720 
omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxChnlsPerHwPort 1
omx api setparam vfcc 0 0 0 OMX_TI_IndexParamVFCCHwPortProperties
omx setp 0 vfcc OMX_TI_IndexParamBuffMemType eBufMemoryType default
omx api setparam  vfcc 0 0 0  OMX_TI_IndexParamBuffMemType
omx setp 0 vfcc OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
#omx api setparam  vfcc 0 0 0  OMX_IndexParamCompBufferSupplier
omx setp 0 vfcc OMX_TI_IndexConfigVFCCFrameSkip frameSkipMask 0
#omx api setconfig  vfcc 0 0 0  OMX_TI_IndexConfigVFCCFrameSkip
omx setp 0 vfcc OMX_IndexParamVideoInit nPorts 16
omx setp 0 vfcc OMX_IndexParamVideoInit nStartPortNumber 0
#omx api setparam  vfcc 0 0 0  OMX_IndexParamVideoInit
omx setp 0 dei OMX_TI_IndexParamVFPCNumChPerHandle nNumChannelsPerHandle 1
omx api setparam dei 0 0 0 OMX_TI_IndexParamVFPCNumChPerHandle
omx setp 0 dei OMX_TI_IndexConfigAlgEnable bAlgBypass enable
omx setp 0 dei OMX_TI_IndexConfigAlgEnable nChId 0
omx api setconfig dei 0 0 0 OMX_TI_IndexConfigAlgEnable
omx setp 0 dei OMX_TI_IndexConfigSubSamplingFactor nSubSamplingFactor 1
omx api setconfig dei 0 0 0 OMX_TI_IndexConfigSubSamplingFactor
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Width  1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 720
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch  1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Width  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Height 0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Pitch  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartX  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartY  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropWidth 1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 720
omx setp 0 dei OMX_TI_IndexConfigVidChResolution eDir input
omx setp 0 dei OMX_TI_IndexConfigVidChResolution nChId 0
omx api setconfig dei 0 0 0  OMX_TI_IndexConfigVidChResolution
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Width  1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 720
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch  2560
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Width  1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Height 720
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Pitch  1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartX  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartY  0
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropWidth 1280
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 720
omx setp 0 dei OMX_TI_IndexConfigVidChResolution eDir output
omx setp 0 dei OMX_TI_IndexConfigVidChResolution nChId 0
omx api setconfig dei 0 0 16  OMX_TI_IndexConfigVidChResolution
omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
omx api setparam  dei  0 0 0  OMX_TI_IndexParamBuffMemType
omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
omx api setparam  dei 0 0 16  OMX_TI_IndexParamBuffMemType
omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
omx api setparam  dei 0 0 17  OMX_TI_IndexParamBuffMemType
omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
#omx api setparam  dei  0 0 0  OMX_TI_IndexParamCompPortNotifyType
omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
#omx api setparam  dei  0 0 16  OMX_TI_IndexParamCompPortNotifyType
omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
#omx api setparam dei 0 0 17   OMX_TI_IndexParamCompPortNotifyType
omx setp 0 dei OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
omx setp 0 dei  OMX_TI_IndexParamVFPCNumChPerHandle nNumChannelsPerHandle 1
omx setp 0 dei OMX_IndexParamVideoInit nPorts 3
omx setp 0 dei OMX_IndexParamVideoInit nStartPortNumber 0
omx api getparam  dei 0 0 0 OMX_IndexParamPortDefinition
omx setp 0 dei OMX_IndexParamPortDefinition video.nStride 1280
omx api setparam  dei 0 0 0 OMX_IndexParamPortDefinition
omx api getparam  h264venc 0 0 0 OMX_IndexParamPortDefinition
omx setp 0 h264venc OMX_IndexParamPortDefinition video.nStride 1280
omx api setparam  h264venc 0 0 0 OMX_IndexParamPortDefinition
omx setp 0 vfdc OMX_TI_IndexParamVFDCDriverInstId nDrvInstID 0
omx setp 0 vfdc OMX_TI_IndexParamVFDCDriverInstId eDispVencMode 720p60
omx api setparam  vfdc 0 0 0 OMX_TI_IndexParamVFDCDriverInstId
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winStartX 0
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winStartY 0
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winWidth 1280
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winHeight 720
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_INT_ADDR_IDX 2560
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_SP_Y_ADDR_IDX 2560
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_SP_CBCR_ADDR_IDX 2560
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout dataFormat 422I_YUYV
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout bpp bits16
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout priority 0
omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout nLayoutId 0
omx setp 0 vfdc mosaicNumRows 1
omx setp 0 vfdc mosaicNumCols 1
omx setp 0 vfdc mosaicDispWindowWidth 1280
omx setp 0 vfdc mosaicDispWindowHeight 720
omx api setparam  vfdc 0 0 0 OMX_TI_IndexParamVFDCCreateMosaicLayout
omx setp 0 vfdc OMX_TI_IndexConfigVFDCMosaicPort2WinMap nLayoutId 0
omx api setconfig vfdc 0 0 0 OMX_TI_IndexConfigVFDCMosaicPort2WinMap 1 0 
omx setp 0 vfdc OMX_TI_IndexParamBuffMemType eBufMemoryType default
omx setp 0 vfdc OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
omx setp 0 vfdc OMX_IndexParamVideoInit nPorts 1
omx setp 0 vfdc OMX_IndexParamVideoInit nStartPortNumber 0
omx api getparam  vfdc 0 0 0 OMX_IndexParamPortDefinition
omx setp 0 vfdc OMX_IndexParamPortDefinition video.nStride 2560
omx api setparam  vfdc 0 0 0 OMX_IndexParamPortDefinition
#************************************************************
#SET ALL THE PARAMS FOR DC#0
omx setp 0 dc OMX_TI_IndexParamVFDCDriverInstId nDrvInstID 0
omx setp 0 dc OMX_TI_IndexParamVFDCDriverInstId eDispVencMode 720p60
omx api setparam  dc 0 0 0 OMX_TI_IndexParamVFDCDriverInstId
omx api sendcommand port vfcc 0 enable 0
omx api sendcommand port vfcc 0 waitforsem 0
omx api sendcommand port dei 0 enable 0
omx api sendcommand port dei 0 waitforsem 0
omx api sendcommand port dei 0 enable 16
omx api sendcommand port dei 0 waitforsem 16
omx api sendcommand port dei 0 enable 17
omx api sendcommand port dei 0 waitforsem 17
omx api sendcommand port vfdc 0 enable 0
omx api sendcommand port vfdc 0 waitforsem 0
omx api sendcommand port h264venc 0 enable 0
omx api sendcommand port h264venc 0 waitforsem 0
omx api sendcommand port h264venc 0 enable 1
omx api sendcommand port h264venc 0 waitforsem 1
omx api connect vfcc 0 0 dei 0 0
omx api connect dei 0 16 vfdc 0 0
omx api connect dei 0 17 h264venc 0 0
omx api sendcommand state vfcc 0 idle
omx api sendcommand state vfcc 0 waitforsem
omx api sendcommand state tvp 0 idle
omx api sendcommand state tvp 0 waitforsem
omx api sendcommand state dei 0 idle
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state dc 0 idle
omx api sendcommand state dc 0 waitforsem
omx api sendcommand state vfdc 0 idle
omx api sendcommand state vfdc 0 waitforsem
omx api sendcommand state h264venc 0 idle
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state dc 0 exec
omx api sendcommand state dc 0 waitforsem
omx api sendcommand state vfdc 0 exec
omx api sendcommand state vfdc 0 waitforsem
omx api sendcommand state vfcc 0 exec
omx api sendcommand state vfcc 0 waitforsem
omx api sendcommand state dei 0 exec
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state h264venc 0 exec
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state tvp 0 exec
omx api sendcommand state tvp 0 waitforsem
sleep 60000
omx api sendcommand state h264venc 0 idle
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state vfcc 0 idle
omx api sendcommand state vfcc 0 waitforsem
omx api sendcommand state tvp 0 idle
omx api sendcommand state tvp 0 waitforsem
omx api sendcommand state dei 0 idle
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state dc 0 idle
omx api sendcommand state dc 0 waitforsem
omx api sendcommand state vfdc 0 idle
omx api sendcommand state vfdc 0 waitforsem
omx api sendcommand state h264venc 0 loaded
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state vfcc 0 loaded
omx api sendcommand state vfcc 0 waitforsem
omx api sendcommand state tvp 0 loaded
omx api sendcommand state tvp 0 waitforsem
omx api sendcommand state dei 0 loaded
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state dc 0 loaded
omx api sendcommand state dc 0 waitforsem
omx api sendcommand state vfdc 0 loaded
omx api sendcommand state vfdc 0 waitforsem
omx api freehandle vfcc 0
omx api freehandle tvp 0
omx api freehandle dei 0
omx api freehandle dc 0
omx api freehandle vfdc 0
omx api freehandle h264venc 0
omx api uninit


Thanks.


Juan Solis

  •  

    I think you need to explicity set the input port width and height for the display component for 1280x720. What seems to be happening in your case is that because of the mismatch between window size ( which I see you have configured for 1280x720) and the input port Width and Height, the frames are just being sent back instead of being displayed.

    You can confirm this hypothesis by running the uiaLogger utility:
    #/usr/share/ti/ti-uia/loggerSMDump.out 0x9E40000 vpss.

    You should see a continous stream of error messages indicating mismatch between window sizes and port width/height.

    Changes required in script:
    omx api getparam  vfdc 0 0 0 OMX_IndexParamPortDefinition
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nStride 2560
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nFrameWidth 1280
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nFrameHeight 720

    omx api setparam  vfdc 0 0 0 OMX_IndexParamPortDefinition

     

     

    Archith

  • Please find the attached omtb script, contains the changes mentioned in Archith's post.

    One minor modification/fix has to be done in the omtb code for 720p capture, highlighed below in red

    1) Goto $EZSDK/example-applications/omtb_01_00_01_05/packages/ti/sdo/omtb/core/common/src/omtbSetpIndex.c

    /* Entry for Set Selecting Video Decoder Standards */
    PRIVATE MX_DBG_CMD_ENTRY_T cmdEntryVPSSTvpVideoDecoderStd =
    {
      "videoStandard",
      MX_DBG_CMD_TYPE_VAR_UINT32,
      MX_DBG_CMD_OPT_INST_CUR     |
      MX_DBG_CMD_OPT_ENUM         |
      MX_DBG_CMD_OPT_VALID_PTR,
      FIELDOFFSET(OMX_PARAM_CTRL_VIDDECODER_INFO,videoStandard),
      FIELDOFFSET(OMX_PARAM_CTRL_VIDDECODER_INFO,nSize) -
      FIELDOFFSET(OMX_PARAM_CTRL_VIDDECODER_INFO,videoStandard),
      0,
      OMX_VIDEO_DECODER_STD_Unused,
      OMX_VIDEO_DECODER_STD_720P_60,
      OMX_VIDEO_DECODER_STD_MUX_4CH_D1,
      &enumTblVPSSTvpVideoDecoderStd,
      XdbgCmdVarFunc,
      "TVP video decoder standards...................",
      "",
      "",
      ""
    };

    2) Rebuild omtb using  "make omtb" command from toplevel directory.

    3) Copy the binary from $EZSDK/example-applications/omtb_01_00_01_05/bin/dm816xbm/bin/ti816x-evm to targetfs/usr/share/ti/ti-omtb

    #omx omtb_dbg_lvl 0x00
    #omx omtb_dbg_lvl 0x04
    #omx omtb_dbg_lvl 0x08
    #omx omtb_dbg_lvl 0x10
    #omx omtb_dbg_lvl 0x80
    omx api init
    omx setp 0 vfcc compname OMX.TI.VPSSM3.VFCC 
    omx setp 0 tvp compname OMX.TI.VPSSM3.CTRL.TVP
    omx setp 0 dc insmod_hdmi disable
    #I/P Port or O/P Port Params for VFCC
    omx setp 0 vfcc numoutbuf 6
    omx setp 0 vfcc frame_width 1280
    omx setp 0 vfcc frame_height 720
    omx setp 0 vfcc op_chromat_format 420SP
    omx setp 0 vfcc outbufalign 0
    omx setp 0 vfcc outbuf_contig disable
    omx setp 0 vfcc outbufsize 1382400
    omx setp 0 vfcc data_opmode driver
    omx setp 0 vfcc outbuf allocate
    omx setp 0 vfcc outbufsize_flag disable
    omx setp 0 vfcc numoutbuf 6
    omx setp 0 vfcc outbuf_contig disable
    omx setp 0 dei frame_width 1280
    omx setp 0 dei frame_height 720
    omx setp 0 dei op_chromat_format 420SP
    omx setp 0 dei ip_chromat_format 420SP
    omx setp 0 dei numinbuf 6 
    omx setp 0 dei inbufalign 0 
    omx setp 0 dei inbuf_contig disable
    omx setp 0 dei inbufsize_flag disable
    omx setp 0 dei inbufsize 1382400
    omx setp 0 dei numoutbuf 8
    omx setp 0 dei outbufalign 0
    omx setp 0 dei outbuf_contig disable
    omx setp 0 dei outbufsize_flag enable
    omx setp 0 dei outbufsize 1843200 
    omx setp 0 dei data_opmode driver
    omx setp 0 dei inbuf use
    omx setp 0 dei outbuf allocate
    omx setp 0 h264venc numinbuf 8
    omx setp 0 h264venc frame_width 1280
    omx setp 0 h264venc frame_height 720
    omx setp 0 h264venc inbufsize 1843200
    omx setp 0 h264venc numoutbuf 4
    omx setp 0 h264venc outbufsize_flag enable
    omx setp 0 h264venc outbufsize 1382400
    omx setp 0 h264venc data_opmode driver
    #To enable write to SD card change mode to file
    #omx setp 0 h264venc data_opmode file
    omx setp 0 h264venc outfile /etc/misc/output.264
    omx setp 0 vfdc frame_width 1280
    omx setp 0 vfdc frame_height 720
    omx setp 0 vfdc ip_chromat_format 422YUYV
    omx setp 0 vfdc numinbuf 8 
    omx setp 0 vfdc inbufalign 0
    omx setp 0 vfdc inbuf_contig disable
    omx setp 0 vfdc inbufsize 1843200 
    omx setp 0 vfdc inbuf use
    omx setp 0 vfdc graphics_flag disable
    #omx setp 0 vfdc vcdemo_flag enable
    omx setp 0 vfdc mosaic_window_config vs
    omx setp 0 dc insmod_hdmi disable
    omx api gethandle tvp 0 0
    omx api gethandle vfcc 0 0
    omx api gethandle dei 0 0
    omx api gethandle h264venc 0 0
    omx api gethandle vfdc 0 0
    omx api gethandle dc 0 0
    #SET ALL THE PARAMS FOR TVP
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortID eHwPortId vip1_porta
    omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortID
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eCaptMode sc_non_mux
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eVifMode 16_bit
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eInColorFormat 422YUYV
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eScanType progressive
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxWidth 1280
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxHeight 720
    omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxChnlsPerHwPort 1
    omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortProperties
    omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoStandard 720P60
    omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoDecoderId tvp7002
    omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoSystemId auto_detect
    omx api setparam tvp 0 0 0 OMX_TI_IndexParamCTRLVidDecInfo
    #************************************************************
    #SET ALL THE PARAMS FOR VFCC
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortID eHwPortId vip1_porta
    omx api setparam vfcc 0 0 0 OMX_TI_IndexParamVFCCHwPortID
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eCaptMode sc_non_mux
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eVifMode 16_bit
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eInColorFormat 422YUYV
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties eScanType progressive
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxWidth 1280
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxHeight 720 
    omx setp 0 vfcc OMX_TI_IndexParamVFCCHwPortProperties nMaxChnlsPerHwPort 1
    omx api setparam vfcc 0 0 0 OMX_TI_IndexParamVFCCHwPortProperties
    omx setp 0 vfcc OMX_TI_IndexParamBuffMemType eBufMemoryType default
    omx api setparam  vfcc 0 0 0  OMX_TI_IndexParamBuffMemType
    omx setp 0 vfcc OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
    #omx api setparam  vfcc 0 0 0  OMX_IndexParamCompBufferSupplier
    omx setp 0 vfcc OMX_TI_IndexConfigVFCCFrameSkip frameSkipMask 0
    #omx api setconfig  vfcc 0 0 0  OMX_TI_IndexConfigVFCCFrameSkip
    omx setp 0 vfcc OMX_IndexParamVideoInit nPorts 16
    omx setp 0 vfcc OMX_IndexParamVideoInit nStartPortNumber 0
    #omx api setparam  vfcc 0 0 0  OMX_IndexParamVideoInit
    omx setp 0 dei OMX_TI_IndexParamVFPCNumChPerHandle nNumChannelsPerHandle 1
    omx api setparam dei 0 0 0 OMX_TI_IndexParamVFPCNumChPerHandle
    omx setp 0 dei OMX_TI_IndexConfigAlgEnable bAlgBypass enable
    omx setp 0 dei OMX_TI_IndexConfigAlgEnable nChId 0
    omx api setconfig dei 0 0 0 OMX_TI_IndexConfigAlgEnable
    omx setp 0 dei OMX_TI_IndexConfigSubSamplingFactor nSubSamplingFactor 1
    omx api setconfig dei 0 0 0 OMX_TI_IndexConfigSubSamplingFactor
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Width  1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 720
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch  1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Width  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Height 0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Pitch  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartX  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartY  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropWidth 1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 720
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution eDir input
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution nChId 0
    omx api setconfig dei 0 0 0  OMX_TI_IndexConfigVidChResolution
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Width  1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 720
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch  2560
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Width  1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Height 720
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Pitch  1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartX  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmStartY  0
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropWidth 1280
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 720
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution eDir output
    omx setp 0 dei OMX_TI_IndexConfigVidChResolution nChId 0
    omx api setconfig dei 0 0 16  OMX_TI_IndexConfigVidChResolution
    omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
    omx api setparam  dei  0 0 0  OMX_TI_IndexParamBuffMemType
    omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
    omx api setparam  dei 0 0 16  OMX_TI_IndexParamBuffMemType
    omx setp 0 dei OMX_TI_IndexParamBuffMemType eBufMemoryType default
    omx api setparam  dei 0 0 17  OMX_TI_IndexParamBuffMemType
    omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
    #omx api setparam  dei  0 0 0  OMX_TI_IndexParamCompPortNotifyType
    omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
    #omx api setparam  dei  0 0 16  OMX_TI_IndexParamCompPortNotifyType
    omx setp 0 dei OMX_TI_IndexParamCompPortNotifyType eNotifyType always
    #omx api setparam dei 0 0 17   OMX_TI_IndexParamCompPortNotifyType
    omx setp 0 dei OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
    omx setp 0 dei  OMX_TI_IndexParamVFPCNumChPerHandle nNumChannelsPerHandle 1
    omx setp 0 dei OMX_IndexParamVideoInit nPorts 3
    omx setp 0 dei OMX_IndexParamVideoInit nStartPortNumber 0
    omx api getparam  dei 0 0 0 OMX_IndexParamPortDefinition
    omx setp 0 dei OMX_IndexParamPortDefinition video.nStride 1280
    omx api setparam  dei 0 0 0 OMX_IndexParamPortDefinition
    omx api getparam  h264venc 0 0 0 OMX_IndexParamPortDefinition
    omx setp 0 h264venc OMX_IndexParamPortDefinition video.nStride 1280
    omx api setparam  h264venc 0 0 0 OMX_IndexParamPortDefinition
    omx setp 0 vfdc OMX_TI_IndexParamVFDCDriverInstId nDrvInstID 0
    omx setp 0 vfdc OMX_TI_IndexParamVFDCDriverInstId eDispVencMode 720p60
    omx api setparam  vfdc 0 0 0 OMX_TI_IndexParamVFDCDriverInstId
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winStartX 0
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winStartY 0
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winWidth 1280
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout winHeight 720
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_INT_ADDR_IDX 2560
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_SP_Y_ADDR_IDX 2560
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout pitch.VFDC_YUV_SP_CBCR_ADDR_IDX 2560
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout dataFormat 422I_YUYV
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout bpp bits16
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout priority 0
    omx setp 0 vfdc OMX_TI_IndexParamVFDCCreateMosaicLayout nLayoutId 0
    omx setp 0 vfdc mosaicNumRows 1
    omx setp 0 vfdc mosaicNumCols 1
    omx setp 0 vfdc mosaicDispWindowWidth 1280
    omx setp 0 vfdc mosaicDispWindowHeight 720
    omx api setparam  vfdc 0 0 0 OMX_TI_IndexParamVFDCCreateMosaicLayout
    omx setp 0 vfdc OMX_TI_IndexConfigVFDCMosaicPort2WinMap nLayoutId 0
    omx api setconfig vfdc 0 0 0 OMX_TI_IndexConfigVFDCMosaicPort2WinMap 1 0 
    omx setp 0 vfdc OMX_TI_IndexParamBuffMemType eBufMemoryType default
    omx setp 0 vfdc OMX_IndexParamCompBufferSupplier eBufferSupplier unspecified
    omx setp 0 vfdc OMX_IndexParamVideoInit nPorts 1
    omx setp 0 vfdc OMX_IndexParamVideoInit nStartPortNumber 0
    omx api getparam  vfdc 0 0 0 OMX_IndexParamPortDefinition
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nStride 2560
    omx setp 0 vfdc OMX_IndexParamPortDefinition nBufferSize 1843200
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nFrameWidth 1280
    omx setp 0 vfdc OMX_IndexParamPortDefinition video.nFrameHeight 720
    omx api setparam  vfdc 0 0 0 OMX_IndexParamPortDefinition
    #************************************************************
    #SET ALL THE PARAMS FOR DC#0
    omx setp 0 dc OMX_TI_IndexParamVFDCDriverInstId nDrvInstID 0
    omx setp 0 dc OMX_TI_IndexParamVFDCDriverInstId eDispVencMode 720p60
    omx api setparam  dc 0 0 0 OMX_TI_IndexParamVFDCDriverInstId
    omx api sendcommand port vfcc 0 enable 0
    omx api sendcommand port vfcc 0 waitforsem 0
    omx api sendcommand port dei 0 enable 0
    omx api sendcommand port dei 0 waitforsem 0
    omx api sendcommand port dei 0 enable 16
    omx api sendcommand port dei 0 waitforsem 16
    omx api sendcommand port dei 0 enable 17
    omx api sendcommand port dei 0 waitforsem 17
    omx api sendcommand port vfdc 0 enable 0
    omx api sendcommand port vfdc 0 waitforsem 0
    omx api sendcommand port h264venc 0 enable 0
    omx api sendcommand port h264venc 0 waitforsem 0
    omx api sendcommand port h264venc 0 enable 1
    omx api sendcommand port h264venc 0 waitforsem 1
    omx api connect vfcc 0 0 dei 0 0
    omx api connect dei 0 16 vfdc 0 0
    omx api connect dei 0 17 h264venc 0 0
    omx api sendcommand state vfcc 0 idle
    omx api sendcommand state vfcc 0 waitforsem
    omx api sendcommand state tvp 0 idle
    omx api sendcommand state tvp 0 waitforsem
    omx api sendcommand state dei 0 idle
    omx api sendcommand state dei 0 waitforsem
    omx api sendcommand state dc 0 idle
    omx api sendcommand state dc 0 waitforsem
    omx api sendcommand state vfdc 0 idle
    omx api sendcommand state vfdc 0 waitforsem
    omx api sendcommand state h264venc 0 idle
    omx api sendcommand state h264venc 0 waitforsem
    omx api sendcommand state dc 0 exec
    omx api sendcommand state dc 0 waitforsem
    omx api sendcommand state vfdc 0 exec
    omx api sendcommand state vfdc 0 waitforsem
    omx api sendcommand state vfcc 0 exec
    omx api sendcommand state vfcc 0 waitforsem
    omx api sendcommand state dei 0 exec
    omx api sendcommand state dei 0 waitforsem
    omx api sendcommand state h264venc 0 exec
    omx api sendcommand state h264venc 0 waitforsem
    omx api sendcommand state tvp 0 exec
    omx api sendcommand state tvp 0 waitforsem
    sleep 60000
    omx api sendcommand state h264venc 0 idle
    omx api sendcommand state h264venc 0 waitforsem
    omx api sendcommand state vfcc 0 idle
    omx api sendcommand state vfcc 0 waitforsem
    omx api sendcommand state tvp 0 idle
    omx api sendcommand state tvp 0 waitforsem
    omx api sendcommand state dei 0 idle
    omx api sendcommand state dei 0 waitforsem
    omx api sendcommand state dc 0 idle
    omx api sendcommand state dc 0 waitforsem
    omx api sendcommand state vfdc 0 idle
    omx api sendcommand state vfdc 0 waitforsem
    omx api sendcommand state h264venc 0 loaded
    omx api sendcommand state h264venc 0 waitforsem
    omx api sendcommand state vfcc 0 loaded
    omx api sendcommand state vfcc 0 waitforsem
    omx api sendcommand state tvp 0 loaded
    omx api sendcommand state tvp 0 waitforsem
    omx api sendcommand state dei 0 loaded
    omx api sendcommand state dei 0 waitforsem
    omx api sendcommand state dc 0 loaded
    omx api sendcommand state dc 0 waitforsem
    omx api sendcommand state vfdc 0 loaded
    omx api sendcommand state vfdc 0 waitforsem
    omx api freehandle vfcc 0
    omx api freehandle tvp 0
    omx api freehandle dei 0
    omx api freehandle dc 0
    omx api freehandle vfdc 0
    omx api freehandle h264venc 0
    omx api uninit
    
    

    Thanks,

    Srinivas

     


  • Thanks!

    The script changes worked well even before the OMTB executable recompilation
    but it would complain about the 720P60 standard on the console trace. The
    video still displayed.

    After the changes, it continues to work well and now the new OMTB executable
    doesn't complain about the setting of the new standard.

    One question though.

    I noticed that the H264VENC inbufsize is being specified as 1843200.
    In mine, I have it set to 1382400 because the DEI is configured to output
    420SP and I come up with (1280 x 720 x 1.5) == 1382400.
    The 1.5 factor is for the Semi-Planar. It seems to work fine with 1382400.

    Am I missing something? I suppose it doesn't hurt for the buffers to be bigger
    than needed but I just want to make sure I understand the WHY of the matter.

    I've also noticed that while the DEI is configured to output 420SP, the
    VFDC is configured to accept 422YUYV, yet everything seems to work regardless !?

    Any thoughts or insights?

    Thanks again to both you and to Archith.

    Juan Solis

     

  • Juan Solis said:
    I noticed that the H264VENC inbufsize is being specified as 1843200.
    In mine, I have it set to 1382400 because the DEI is configured to output
    420SP and I come up with (1280 x 720 x 1.5) == 1382400.
    The 1.5 factor is for the Semi-Planar. It seems to work fine with 1382400.

     

    What you said here is correct. What this omtb command does is (Srinivas, please correct me here if  I am wrong)

    omx setp 0 dei outbufsize 1843200 
    that it populates the nBufferSize field for in an OMTB template structure which is then applied to all output ports in DEI, both the one having 420SP and 422YcbYcr. 
    You can rectify the buffer size for the one with 420SP format via this command:
    
    

    omx api getparam  dei 0 0 17 OMX_IndexParamPortDefinition
    omx setp 0 vfdc OMX_IndexParamPortDefinition nBufferSize 1382400
    omx api setparam  dei 0 0 17 OMX_IndexParamPortDefinition
    
    
    Similar explanation for the colorformat.
    
    
    Archith