Hi,
I want to configure the OMX in discrete sync , can just setting up OMX_VIDEO_CaptureModeSC_DISCRETESYNC this should work ?
Also is YCbYCr same as YUV422 ?
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.
Hello,
mike A said:
Just setting up this on the evm & testing should be ok on the EVM ? as tvp7002 is 16 bit why do we need 24bit ?
I am sorry my mistake my point was that you shall set sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_DISCRETESYNC; and to set the remaining variables accordingly per the use case.
Best Regards,
Margarita
Hi Margarita,
I have the vip0 connected to fpga which is capturing from the sensor, I have used the patch at [1] + I have changed to separate sync (OMX_VIDEO_CaptureModeSC_DISCRETESYNC)
Any pointers on debugging this ?
And I am trying the capture encode application (I dont get any video out), following is the log of it:
output file: sample.h264
bit_rate: 1000000
frame_rate: 60
num_frames: 1000
mode: 1080p
display_id: 0
Capture-Encode example
===============================
OMX_Init completed
UIAClient is ready to send a UIA configuration command
UIAClient received UIA_CONFIGURE_ACK
UIAClient is done sending requests
UIAClient is ready to send a UIA configuration command
UIAClient received UIA_CONFIGURE_ACK
UIAClient is done sending requests
openeing file
capture compoenent is created
Buffer Size computed: 3110400
set input port params (width = 1920, height = 1080)enable capture output port
got eventEnable/Disable Event
dei compoenent is created
set input port params (width = 1920, height = 1080)
set output port params (width = 1920, height = 1080)set output port params (width = 1920, height = 1080)set number of channelsset input resolutionset out
put resolutionenable dei input port
got eventEnable/Disable Event
enable dei output port 0
got eventEnable/Disable Event
enable dei output port 1
got eventEnable/Disable Event
encoder compoenent is created
found handle 0x133cc8 for component OMX.TI.VPSSM3.VFDC
got display handle
found handle 0x137cd0 for component OMX.TI.VPSSM3.CTRL.DC
Buffer Size computed: 4147200
set input port params (width = 1920, height = 1080)setting input and output memory type to defaultenable input port
got eventEnable/Disable Event
connect call for capture-Dei
connect call for dei- encoder
connect call for dei-display
Capture outport buffers allocated
got eventState changed to: OMX_StateIdle
Capture is in IDLE state
Dei input port use buffer done
DEI outport buffers allocated
got eventState changed to: OMX_StateIdle
DEI is in IDLE state
encoder input port use buffer done
encoder outport buffers allocated
got eventState changed to: OMX_StateIdle
Encoder state IDLE
got eventState changed to: OMX_StateIdle
ctrl-dc state IDLE
display buffers allocated
waiting for IDLEgot eventState changed to: OMX_StateIdle
display state IDLE
got eventState changed to: OMX_StateExecuting
display control state execute
got eventState changed to: OMX_StateExecuting
display state execute
got eventState changed to: OMX_StateExecuting
encoder state execute
got eventState changed to: OMX_StateExecuting
dei state execute
got eventState changed to: OMX_StateExecuting
capture state execute
file write thread created
encode connect thread created
dei connect thread created
capture connect thread created
display connect thread created
executing the application now!!
[1]
Index: ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.c
===================================================================
--- ezsdk-5_05_02_00.orig/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.c 2012-12-20 09:11:19.000000000 -0600
+++ ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.c 2013-06-14 14:32:54.983722649 -0600
@@ -723,6 +723,7 @@
pAppData->capILComp->handle = pAppData->pCapHandle;
+#if USE_TVP
/* This is control component, without ports. It is implemented as OMX
component */
eError =
@@ -738,6 +739,7 @@
IL_ClientErrorToStr (eError));
goto EXIT;
}
+#endif
/* Configute the capture componet */
/* calling OMX_Setparam in this function */
@@ -908,13 +910,13 @@
OMX_VFPC_OUTPUT_PORT_START_INDEX,
pAppData->disILComp,
OMX_VFDC_INPUT_PORT_START_INDEX);
-
+ printf("HERE 1\n");
/******************************************************************************/
/* OMX_SendCommand expecting OMX_StateIdle, after this command component will
wait for all buffers to be allocated as per omx buffers are created during
loaded to Idle transition IF ports are enabled ) */
-
+#if USE_TVP
eError =
OMX_SendCommand (pAppData->pTvpHandle, OMX_CommandStateSet,
OMX_StateIdle, NULL);
@@ -926,10 +928,12 @@
}
semp_pend (pAppData->capILComp->done_sem);
-
+#endif
+ printf("HERE 2\n");
eError =
OMX_SendCommand (pAppData->pCapHandle, OMX_CommandStateSet,
OMX_StateIdle, NULL);
+ printf("HERE 3\n");
if (eError != OMX_ErrorNone)
{
printf ("Error in SendCommand()-OMX_StateIdle State set : %s \n",
@@ -1221,7 +1225,7 @@
semp_pend (pAppData->capILComp->done_sem);
printf (" capture state execute \n ");
-
+#if USE_TVP
eError =
OMX_SendCommand (pAppData->pTvpHandle, OMX_CommandStateSet,
OMX_StateExecuting, NULL);
@@ -1232,10 +1236,11 @@
goto EXIT;
}
+
semp_pend (pAppData->capILComp->done_sem);
printf (" capture control ( TVP ) state execute \n ");
-
+#endif
/******************************************************************************/
/* Create thread for writing bitstream and passing the buffers to encoder
@@ -1347,6 +1352,7 @@
semp_pend (pAppData->capILComp->done_sem);
printf (" capture state idle \n ");
+#if USE_TVP
/* change state to idle so that buffers processing would stop */
eError =
OMX_SendCommand(pAppData->pTvpHandle, OMX_CommandStateSet,
@@ -1357,10 +1363,10 @@
IL_ClientErrorToStr(eError));
goto EXIT;
}
-
+
semp_pend(pAppData->capILComp->done_sem);
printf(" control tvp state idle \n ");
-
+#endif
/* change state to idle so that buffers processing can stop */
eError =
@@ -1584,6 +1590,7 @@
printf (" capture state loaded \n ");
+#if USE_TVP
/* ctrl tvp component does not alloc/free any data buffers, It's interface
is though as it is omx componenet */
eError =
@@ -1595,10 +1602,11 @@
IL_ClientErrorToStr(eError));
goto EXIT;
}
-
+
semp_pend(pAppData->capILComp->done_sem);
printf(" ctrl-tvp state loaded \n ");
+#endif
/******************************************************************************/
@@ -1613,6 +1621,7 @@
}
printf (" capture free handle \n");
+#if USE_TVP
eError = OMX_FreeHandle(pAppData->pTvpHandle);
if ((eError != OMX_ErrorNone))
{
@@ -1622,6 +1631,7 @@
}
printf(" ctrl-tvp free handle \n");
+#endif
eError = OMX_FreeHandle (pAppData->pEncHandle);
if ((eError != OMX_ErrorNone))
Index: ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.h
===================================================================
--- ezsdk-5_05_02_00.orig/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.h 2012-12-20 09:11:19.000000000 -0600
+++ ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient.h 2013-06-14 13:49:37.983712681 -0600
@@ -53,7 +53,7 @@
extern "C"
{ /* be compiled by a C++ compiler */
#endif
-
+#define USE_TVP 0
#define IL_CLIENT_MAX_NUM_IN_BUFS 16
#define IL_CLIENT_MAX_NUM_OUT_BUFS 16
@@ -188,8 +188,13 @@
/* ========================================================================== */
typedef struct IL_Client
{
+#if USE_TVP
OMX_HANDLETYPE pCapHandle, pDeiHandle, pDisHandle, pctrlHandle, pTvpHandle,
pEncHandle;
+#else
+ OMX_HANDLETYPE pCapHandle, pDeiHandle, pDisHandle, pctrlHandle,
+ pEncHandle;
+#endif
OMX_COMPONENTTYPE *pComponent;
OMX_CALLBACKTYPE pCb;
OMX_STATETYPE eState;
Index: ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient_utils.c
===================================================================
--- ezsdk-5_05_02_00.orig/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient_utils.c 2012-12-20 09:11:19.000000000 -0600
+++ ezsdk-5_05_02_00/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode/src/ilclient_utils.c 2013-06-14 13:39:16.643710296 -0600
@@ -63,6 +63,7 @@
#include <OMX_TI_Index.h>
/*---------------------- function prototypes ---------------------------------*/
/* None */
+#define USE_TVP 0
void usage (IL_ARGS *argsp)
{
@@ -1017,15 +1018,15 @@
(OMX_INDEXTYPE) OMX_TI_IndexConfigVFCCFrameSkip,
(OMX_PTR) & sCapSkipFrames);
}
-
+#if USE_TVP
/* Set parameters for TVP controller */
-
OMX_INIT_PARAM (&sHwPortId);
/* capture on EIO card is component input at VIP1 port */
sHwPortId.eHwPortId = OMX_VIDEO_CaptureHWPortVIP1_PORTA;
eError = OMX_SetParameter (pAppData->pTvpHandle,
(OMX_INDEXTYPE) OMX_TI_IndexParamVFCCHwPortID,
(OMX_PTR) & sHwPortId);
+
OMX_INIT_PARAM (&sHwPortParam);
sHwPortParam.eCaptMode = OMX_VIDEO_CaptureModeSC_NON_MUX;
sHwPortParam.eVifMode = OMX_VIDEO_CaptureVifMode_16BIT;
@@ -1047,7 +1048,7 @@
(OMX_INDEXTYPE)
OMX_TI_IndexParamVFCCHwPortProperties,
(OMX_PTR) & sHwPortParam);
-
+
OMX_INIT_PARAM (&sVidDecParam);
/* set the mode based on capture/display device */
@@ -1076,6 +1077,7 @@
(OMX_PTR) & sVidDecParam);
if (eError != OMX_ErrorNone)
ERROR ("failed to set Ctrl Vid dec info \n");
+#endif
return (eError);
}
Thanks And Regards,
Mike