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.

Can H264 decoder connect to DEI for resizing on OMXTB ?

Hi All,

I'm working on OMTB to check out DEI component. what I'm actually aiming at is a kind of transcode like reading H264, decoding, resizing(down scale, e.g. 1/4 ratio), re-encoding and writing back to file. I merged two scripts - decode_scale_display.oms and capture_dei_encode.oms as the attachment. When I ran the omtb_dm81xxbm_a8host.xv5T, I got errors related to DEI as following. I have changed order of each component but no luck. It is really hard to know which causes the issue without detail document.  What I'm suspicious of is "DEI port interface" because the DEI has a connection with vfcc on sample script. 

In addition, Dm8148 TRM reads like "The HDVPSS is able to accept the HDVICP2 Video Decoder output formats" in P1478, http://www.ti.com/lit/ug/sprugz8/sprugz8.pdf.

Thank you for an advice in advance.

Target board : DM8148

EZSDK : 5.03.01.15

....
OMTB> omx api sendcommand state h264venc 0 waitforsem
OMTB-In OMTB_ClientEventHandler: OMX_EventCmdComplete - OMX_CommandStateSet
OMTB-OMX_StateIdle
OK

OMTB> #************************************************************

OMTB> omx api sendcommand state h264venc 0 exec
OMTB-OMX_ErrorNone
OK

OMTB> omx api sendcommand state h264venc 0 waitforsem
OMTB-In OMTB_ClientEventHandler: OMX_EventCmdComplete - OMX_CommandStateSet
OMTB-OMX_StateExecuting
OMTB-Create OMTB_ClientApiTsk
OK

OMTB> omx api sendcommand state dei 0 exec
OMTB-Entering <Thread , instance #> : <OMTB_ClientApiTsk , 0>
OMTB-FAIL: OMX_ErrorIncorrectStateTransition

OMTB> omx api sendcommand state dei 0 waitforsem
OMTB-Entering <Thread , instance #> : <OMTB_Client_ConnIn_ConnOut_Tsk>
OMTB-Entering <Thread , instance #> : <OMTB_OutputDataWrite , 0>
OMTB-Entering <Thread , instance #> : <OMTB_FileWrite , 0>
OMTB-FAIL: OMX_ErrorBadParameter
OMTB-FAIL: OMX_ErrorBadParameter
OMTB-Error in Buffer release for i/p port
OMTB-FAIL: OMX_ErrorBadParameter
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-In OMTB_ClientEventHandler: OMX_EventError - 8000101c
OMTB-FAIL: OMX_ErrorPortUnpopulated
OMTB-Error in Buffer allocation for i/p port
OMTB-FAIL: OMX_ErrorBadParameter
OK

OMTB> omx api sendcommand state h264vdec 0 exec
OMTB-OMX_ErrorNone
OK

OMTB> omx api sendcommand state h264vdec 0 waitforsem
OMTB-In OMTB_ClientEventHandler: OMX_EventCmdComplete - OMX_CommandStateSet
OMTB-OMX_StateExecuting
OMTB-Create OMTB_ClientApiTsk
OK
Best Regards,
SK.

ATTACHMENT:





omx api init
omx setp 0 h264vdec frame_width 1920
omx setp 0 h264vdec frame_height 1080
omx setp 0 h264vdec inbuf allocate
omx setp 0 h264vdec outbuf allocate
omx setp 0 h264vdec inbufsize_flag enable
omx setp 0 h264vdec outbufsize_flag enable
omx setp 0 h264vdec inbufsize 2088960
omx setp 0 h264vdec outbufsize 3612672
omx setp 0 h264vdec infile /usr/share/ti/data/videos/dm816x_1080p_demo.264
omx setp 0 h264vdec data_opmode driver
omx setp 0 h264vdec numinbuf 6
omx setp 0 h264vdec numoutbuf 8
omx setp 0 h264vdec framerate 60
#************************************************************
omx setp 0 dei frame_width 1920
omx setp 0 dei frame_height 1080
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 3110400
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 4147200
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 1920
omx setp 0 h264venc frame_height 1080
omx setp 0 h264venc inbufsize 4147200
omx setp 0 h264venc numoutbuf 4
omx setp 0 h264venc outbufsize_flag enable
omx setp 0 h264venc outbufsize 3110400
omx setp 0 h264venc data_ipmode driver
#To enable write to SD card change mode to file
#omx setp 0 h264venc data_opmode file
omx setp 0 h264venc outfile /usr/share/ti/data/videos/dm816x_1080p60_encode.264
#************************************************************
omx api gethandle h264vdec 0 0
omx api gethandle dei 0 0
omx api gethandle h264venc 0 0
#************************************************************
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 1920
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 1080
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch 1920
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 1920
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 1080
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 1920
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Height 1080
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm0Pitch 3840
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Width 1920
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Height 1080
omx setp 0 dei OMX_TI_IndexConfigVidChResolution Frm1Pitch 1920
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 1920
omx setp 0 dei OMX_TI_IndexConfigVidChResolution FrmCropHeight 1080
omx setp 0 dei OMX_TI_IndexConfigVidChResolution eDir output
omx setp 0 dei OMX_TI_IndexConfigVidChResolution nChId 0
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_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 1920
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 1920
omx api setparam h264venc 0 0 0 OMX_IndexParamPortDefinition
#************************************************************
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 h264vdec 0 enable 0
omx api sendcommand port h264vdec 0 waitforsem 0
omx api sendcommand port h264venc 0 enable 0
omx api sendcommand port h264venc 0 waitforsem 0
omx api sendcommand port h264vdec 0 enable 1
omx api sendcommand port h264vdec 0 waitforsem 1
omx api connect h264vdec 0 1 dei 0 0
omx api connect dei 0 16 h264venc 0 0
#************************************************************
omx api sendcommand port h264vdec 0 enable 0
omx api sendcommand port h264vdec 0 waitforsem 0
omx api sendcommand state h264vdec 0 idle
omx api sendcommand state h264vdec 0 waitforsem
omx api sendcommand state dei 0 idle
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state h264venc 0 idle
omx api sendcommand state h264venc 0 waitforsem
#************************************************************
omx api sendcommand state h264venc 0 exec
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state dei 0 exec
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state h264vdec 0 exec
omx api sendcommand state h264vdec 0 waitforsem
sleep 60000
omx api sendcommand state h264vdec 0 idle
omx api sendcommand state h264vdec 0 waitforsem
omx api sendcommand state dei 0 idle
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state h264venc 0 idle
omx api sendcommand state h264venc 0 waitforsem
omx api sendcommand state h264vdec 0 loaded
omx api sendcommand state h264vdec 0 waitforsem
omx api sendcommand state dei 0 loaded
omx api sendcommand state dei 0 waitforsem
omx api sendcommand state h264venc 0 loaded
omx api sendcommand state h264venc 0 waitforsem
omx api freehandle h264vdec 0
omx api freehandle dei 0
omx api freehandle h264venc 0
omx api uninit
  • HI,

    It seems you have not connected second port of DEI to anything. It is mandatory to connect something at both the output ports. I would suggest, you can use IL Cleint examples capture-encode and decode-display also to write your own IL client and try.

    Regards

    Vimal