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.

dm8148 rdk v3.5 3 h264 streams

Expert 1840 points

Dear,

I am working with dm8148 and rdk v3.5 usecase triple full features. I want to modify it to support 3 channels h264 instead of 2 h264 and 1 mjpeg.

\ipnc_rdk\ipnc_app\sys_server\src\stream_env_ctrl.c:

//fSetStreamConfig(2, 1920, 1080, codec_tpye[2], MJPEG_PORTNUM);
fSetStreamConfig(2, 1920, 1080, codec_tpye[0], MJPEG_PORTNUM);

\ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\ti_venc.c:

Void Venc_params_init(VENC_PARAMS_S * pContext)
{

...

// Bioz
#if 0
if( chId >= VENC_PRIMARY_CHANNELS)
{
/* secondary channels have different defaults */
pDynPrm->targetBitRate = 2 * 1000 * 1000;
}
#endif
// ~Bioz

}

\ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\ti_venc_priv.h:

typedef struct
{
UInt32 encId;
UInt32 ipcBitsInHLOSId;
UInt32 ipcBitsOutRTOSId;
UInt32 ipcM3InId;
UInt32 ipcM3OutId;

VENC_CALLBACK_S callbackFxn;
Ptr callbackArg;
VENC_PARAMS_S vencConfig;
// Bioz
//UInt32 encFormat[VENC_PRIMARY_CHANNELS];
UInt32 encFormat[VENC_PRIMARY_CHANNELS+1];
// ~Bioz
}VENC_MODULE_CONTEXT_S;

\ipnc_rdk\ipnc_mcfw\mcfw\src_linux\mcfw_api\usecases\multich_tristream_fullfeature.c:

/* Video Encoder Link params */
MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm);
{
EncLink_ChCreateParams *pLinkChPrm;
EncLink_ChDynamicParams *pLinkDynPrm;
VENC_CHN_DYNAMIC_PARAM_S *pDynPrm;
VENC_CHN_PARAMS_S *pChPrm;
// Bioz
//for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)
for (i = 0; i < (VENC_CHN_MAX - 1); i++)
// ~Bioz
{
pLinkChPrm = &encPrm.chCreateParams[i];
pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

..

..

// Bioz
/*
for (i = VENC_PRIMARY_CHANNELS; i < (VENC_CHN_MAX - 1); i++)
{
encPrm.chCreateParams[i].format = IVIDEO_MJPEG;
encPrm.chCreateParams[i].profile = 0;
encPrm.chCreateParams[i].dataLayout = IVIDEO_PROGRESSIVE;
encPrm.chCreateParams[i].fieldMergeEncodeEnable = FALSE;
encPrm.chCreateParams[i].defaultDynamicParams.intraFrameInterval = 0;
encPrm.chCreateParams[i].encodingPreset = 0;
encPrm.chCreateParams[i].enableAnalyticinfo = 0;
encPrm.chCreateParams[i].enableWaterMarking = 0;
encPrm.chCreateParams[i].defaultDynamicParams.inputFrameRate = 60;
encPrm.chCreateParams[i].rateControlPreset = 0;
encPrm.chCreateParams[i].defaultDynamicParams.targetBitRate = 100 * 1000;
encPrm.chCreateParams[i].defaultDynamicParams.interFrameInterval = 0;
encPrm.chCreateParams[i].defaultDynamicParams.mvAccuracy = 0;
}
*/
// ~Bioz

from the debug mess  I got the error as below:

[m3video] ENCLINK:ERROR in Enclink_h264EncodeFrameBatch.Status[-1] for IVAHD_0
[m3video] 21437:WARN
[m3video] ENC : IVAHDID : 0 ENCLINK:ERROR in EncLink_SubmitBatch.Status[-1]
[m3video] Extended error 20c080 for reqObjIndex 0
[m3video] 21637:WARN

the stream 1 and 2 worked nomally, the stream 3 just show the black.

Please help me to figure out my mistakes. Thanks

  • Hello,

    IN this case , you need to modify the codec type mentioned at the interface of the MCFW usecases to be of H264 and also, the check if the create time, dynamic param are running fine at codec level.

    After this, you can check if bitsream are getting genetrated and getting written to streaming buffer.

    ONce the above stepa re working fine at your end, please check the boa GUI are set fine in stream_env_ctrl.c

    Regards,

    Raghu