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.

FileRd->Dec->FileWr

Hi,

I was able to run the McFW test FileRd+Decode+Display test.

For our usecase we need the output in a separate file.

So I modified the McFW test to dump the decoded output to file.  I modified the link setup in such a way and the below code shows my modifications.

=====

Void VdecDump_start2()
{
VSYS_PARAMS_S vsysParams;
VDEC_PARAMS_S vdecParams;
VDIS_PARAMS_S vdisParams;
VDIS_MOSAIC_S sVdMosaicParam;

UInt32 i,status;
Bool forceLowCostScale = FALSE;
UInt32 startChID;
UInt64 wallTimeBase;

VdecVdis_bitsRdInit();
ipcBitsOutInitRawFileHandles();

gDemo_info.maxVcapChannels = 0;
gDemo_info.maxVdisChannels = gVdecVdis_config.fileNum;
gDemo_info.maxVencChannels = 0;
gDemo_info.maxVdecChannels = gVdecVdis_config.fileNum;

vdecParams.numChn = gVdecVdis_config.fileNum;
vdisParams.numChannels = gVdecVdis_config.fileNum;

Vsys_params_init(&vsysParams);
vsysParams.systemUseCase = VSYS_USECASE_MULTICHN_VDEC_VDIS;
vsysParams.enableCapture = FALSE;
vsysParams.enableNsf = FALSE;
vsysParams.enableEncode = FALSE;
vsysParams.enableDecode = TRUE;
vsysParams.enableNullSrc = FALSE;
vsysParams.enableAVsync = TRUE;
vsysParams.numDeis = 0;

vsysParams.numSwMs = 2;
vsysParams.numDisplays = 2;


printf ("--------------- CHANNEL DETAILS-------------\n");
printf ("Dec Channels => %d\n", vdecParams.numChn);
printf ("Disp Channels => %d\n", vdisParams.numChannels);
printf ("-------------------------------------------\n");

/* Override the context here as needed */
Vsys_init(&vsysParams);

Vdec_params_init(&vdecParams);
/* Override the context here as needed */

vdecParams.numChn = gVdecVdis_config.fileNum;
vdecParams.forceUseDecChannelParams = TRUE;

OSA_assert( vdecParams.numChn <= VDEC_CHN_MAX );

for (i=0; i < vdecParams.numChn; i++) {

vdecParams.decChannelParams[i].dynamicParam.frameRate = 30; // NOT USED
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000; // NOT USED
if (gVdecVdis_config.fileInfo[i].width != 0 && gVdecVdis_config.fileInfo[i].height != 0)
{
vdecParams.decChannelParams[i].maxVideoWidth = gVdecVdis_config.fileInfo[i].width;
vdecParams.decChannelParams[i].maxVideoHeight = gVdecVdis_config.fileInfo[i].height;
}
else
{
printf(" ERROR: Invalid Decoder width x height !!!\n");
OSA_assert(0);
}

/*If the codec type is missing, by default choose h264*/
if(strlen(gVdecVdis_config.fileInfo[i].codec) == 0)
strcpy(gVdecVdis_config.fileInfo[i].codec,"h264");

if(strcmp(gVdecVdis_config.fileInfo[i].codec,"h264") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_H264;
printf("ch[%d], h264\n",i);
}
else if(strcmp(gVdecVdis_config.fileInfo[i].codec,"mpeg4") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_MPEG4;
vdecParams.decChannelParams[i].dynamicParam.frameRate = 30;
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000;

printf("ch[%d], mpeg4\n",i);
}
else if(strcmp(gVdecVdis_config.fileInfo[i].codec,"mjpeg") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_MJPEG;
vdecParams.decChannelParams[i].dynamicParam.frameRate = 1;
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000;
printf("ch[%d], jpeg\n",i);

}

vdecParams.decChannelParams[i].displayDelay = gVdecVdis_config.fileInfo[i].displaydelay;
vdecParams.decChannelParams[i].numBufPerCh = gVdecVdis_config.fileInfo[i].numbuf;

}

Vdec_init(&vdecParams);

MyMultiCh_createdecdump2();


Uint32 ipcFramesOutVideoId,ipcFramesInHostId;
ipcFramesOutVideoId = SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0;
ipcFramesInHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0;

System_linkStart(ipcFramesInHostId);
System_linkStart(ipcFramesOutVideoId);

Vdec_start();



VdecVdis_bitsRdStart();
}

Void MyMultiCh_createdecdump2()
{
IpcBitsOutLinkHLOS_CreateParams ipcBitsOutHostPrm;
IpcBitsInLinkRTOS_CreateParams ipcBitsInVideoPrm;
DecLink_CreateParams decPrm;
UInt32 i;
UInt32 enableGrpx;
Bool tilerEnable;
Bool enableVideoFrameExport;


IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVideoPrm;
IpcFramesInLinkHLOS_CreateParams ipcFramesInHostPrm;


UInt32 ipcFramesOutVideoId,ipcFramesInHostId;

MULTICH_INIT_STRUCT(IpcBitsOutLinkHLOS_CreateParams,ipcBitsOutHostPrm);
MULTICH_INIT_STRUCT(IpcBitsInLinkRTOS_CreateParams,ipcBitsInVideoPrm);
MULTICH_INIT_STRUCT(DecLink_CreateParams, decPrm);
MULTICH_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams,ipcFramesOutVideoPrm);
MULTICH_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams,ipcFramesInHostPrm);


MultiCh_detectBoard();

System_linkControl(
SYSTEM_LINK_ID_M3VPSS,
SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
NULL,
0,
TRUE
);

System_linkControl(
SYSTEM_LINK_ID_M3VIDEO,
SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
&systemVid_encDecIvaChMapTbl,
sizeof(SystemVideo_Ivahd2ChMap_Tbl),
TRUE
);


#if ENABLE_STATIC_CHANNELS_IN_TILED_MODE
tilerEnable = TRUE;
#else
tilerEnable = FALSE;
#endif


if (tilerEnable == FALSE)
{
/* Disable tiler allocator for this usecase
* for that tiler memory can be reused for
* non-tiled allocation
*/
SystemTiler_disableAllocator();
}

enableVideoFrameExport = FALSE;


/*gVdecModuleContext.ipcBitsOutHLOSId ->gVdecModuleContext.ipcBitsInRTOSId->gVdecModuleContext.decId->ipcFramesOutVideoId->ipcFramesInHostId

SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0->SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0->SYSTEM_LINK_ID_VDEC_0->SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0------------------------------------->SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0

*/


gVdecModuleContext.ipcBitsOutHLOSId = SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0;
gVdecModuleContext.ipcBitsInRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0;
gVdecModuleContext.decId = SYSTEM_LINK_ID_VDEC_0;
ipcFramesOutVideoId = SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0;
ipcFramesInHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0;

ipcBitsOutHostPrm.baseCreateParams.outQueParams[0].nextLink= gVdecModuleContext.ipcBitsInRTOSId;
ipcBitsOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
ipcBitsOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcBitsOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
ipcBitsOutHostPrm.baseCreateParams.numOutQue = 1;
ipcBitsOutHostPrm.inQueInfo.numCh = gVdecModuleContext.vdecConfig.numChn;
ipcBitsOutHostPrm.bufPoolPerCh = TRUE;

for (i=0; i<ipcBitsOutHostPrm.inQueInfo.numCh; i++)
{
ipcBitsOutHostPrm.inQueInfo.chInfo[i].width =
gVdecModuleContext.vdecConfig.decChannelParams[i].maxVideoWidth;

ipcBitsOutHostPrm.inQueInfo.chInfo[i].height =
gVdecModuleContext.vdecConfig.decChannelParams[i].maxVideoHeight;

ipcBitsOutHostPrm.inQueInfo.chInfo[i].scanFormat =
SYSTEM_SF_PROGRESSIVE;

ipcBitsOutHostPrm.inQueInfo.chInfo[i].bufType = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].codingformat = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].dataFormat = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].memType = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].startX = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].startY = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].pitch[0] = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].pitch[1] = 0; // NOT USED
ipcBitsOutHostPrm.inQueInfo.chInfo[i].pitch[2] = 0; // NOT USED
ipcBitsOutHostPrm.numBufPerCh[i] = 6;
}

ipcBitsInVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVdecModuleContext.ipcBitsOutHLOSId;
ipcBitsInVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcBitsInVideoPrm.baseCreateParams.outQueParams[0].nextLink = gVdecModuleContext.decId;
ipcBitsInVideoPrm.baseCreateParams.noNotifyMode = TRUE;
ipcBitsInVideoPrm.baseCreateParams.notifyNextLink = TRUE;
ipcBitsInVideoPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcBitsInVideoPrm.baseCreateParams.numOutQue = 1;

for (i=0; i<ipcBitsOutHostPrm.inQueInfo.numCh; i++)
{
if(gVdecModuleContext.vdecConfig.decChannelParams[i].isCodec == VDEC_CHN_H264)
decPrm.chCreateParams[i].format = IVIDEO_H264HP;
else if(gVdecModuleContext.vdecConfig.decChannelParams[i].isCodec == VDEC_CHN_MPEG4)
decPrm.chCreateParams[i].format = IVIDEO_MPEG4ASP;
else if(gVdecModuleContext.vdecConfig.decChannelParams[i].isCodec == VDEC_CHN_MJPEG)
decPrm.chCreateParams[i].format = IVIDEO_MJPEG;

decPrm.chCreateParams[i].numBufPerCh
= gVdecModuleContext.vdecConfig.decChannelParams[i].numBufPerCh;
decPrm.chCreateParams[i].profile = IH264VDEC_PROFILE_ANY;
decPrm.chCreateParams[i].displayDelay
= gVdecModuleContext.vdecConfig.decChannelParams[i].displayDelay;
decPrm.chCreateParams[i].dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;
decPrm.chCreateParams[i].processCallLevel = VDEC_FRAMELEVELPROCESSCALL;
//decPrm.chCreateParams[i].processCallLevel = VDEC_FIELDLEVELPROCESSCALL;

decPrm.chCreateParams[i].targetMaxWidth =
ipcBitsOutHostPrm.inQueInfo.chInfo[i].width;

decPrm.chCreateParams[i].targetMaxHeight =
ipcBitsOutHostPrm.inQueInfo.chInfo[i].height;

decPrm.chCreateParams[i].defaultDynamicParams.targetFrameRate =
gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.frameRate;

decPrm.chCreateParams[i].defaultDynamicParams.targetBitRate =
gVdecModuleContext.vdecConfig.decChannelParams[i].dynamicParam.targetBitRate;
decPrm.chCreateParams[i].tilerEnable = tilerEnable;

#if ENABLE_STATIC_CHANNELS_IN_TILED_MODE
if (i >= NUM_STATIC_CHANNELS)
decPrm.chCreateParams[i].tilerEnable = FALSE;
#endif
}

decPrm.inQueParams.prevLinkId = gVdecModuleContext.ipcBitsInRTOSId;
decPrm.inQueParams.prevLinkQueId = 0;
decPrm.outQueParams.nextLink = ipcFramesOutVideoId;

ipcFramesOutVideoPrm.baseCreateParams.noNotifyMode = TRUE;
ipcFramesOutVideoPrm.baseCreateParams.notifyNextLink = FALSE;
ipcFramesOutVideoPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesOutVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVdecModuleContext.decId;
ipcFramesOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;

ipcFramesOutVideoPrm.baseCreateParams.numOutQue =1;
ipcFramesOutVideoPrm.baseCreateParams.outQueParams[0].nextLink= ipcFramesInHostId;


/*IPC Frame vpss out to Host IN*/

ipcFramesInHostPrm.baseCreateParams.noNotifyMode = TRUE ;
ipcFramesInHostPrm.baseCreateParams.notifyNextLink = FALSE;
ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkId = ipcFramesOutVideoId;
ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesInHostPrm.baseCreateParams.outQueParams[0].nextLink = SYSTEM_LINK_ID_INVALID;



/*gVdecModuleContext.ipcBitsOutHLOSId ->gVdecModuleContext.ipcBitsInRTOSId->gVdecModuleContext.decId->ipcFramesOutVideoId->ipcFramesInHostId

SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0->SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0->SYSTEM_LINK_ID_VDEC_0->SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0------------------------------------->SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0

*/

System_linkCreate(gVdecModuleContext.ipcBitsOutHLOSId,&ipcBitsOutHostPrm,sizeof(ipcBitsOutHostPrm));
System_linkCreate(gVdecModuleContext.ipcBitsInRTOSId,&ipcBitsInVideoPrm,sizeof(ipcBitsInVideoPrm));
System_linkCreate(gVdecModuleContext.decId, &decPrm, sizeof(decPrm));


System_linkCreate(ipcFramesOutVideoId, &ipcFramesOutVideoPrm , sizeof(ipcFramesOutVideoPrm));
System_linkCreate(ipcFramesInHostId, &ipcFramesInHostPrm , sizeof(ipcFramesInHostPrm));

MultiCh_memPrintHeapStatus();
gMultiCh_VdecVdisObj.enableVideoFrameExport = enableVideoFrameExport;
{
MultiCh_setDec2DispMap(VDIS_DEV_HDMI,gVdecModuleContext.vdecConfig.numChn,0,0);

MultiCh_setDec2DispMap(VDIS_DEV_HDCOMP,gVdecModuleContext.vdecConfig.numChn,0,0);

}

}

===============

But I am not able to get any buffers from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0. 

A little about my setup:

1. DM8168 based and with DVRRDK 3.5

2. I am using 256MB confuguration in the bootcmd. "setenv bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=107.108.212.53:/home/user/dm8167-software/tftphome/rfs_816x,nolock  mem=256M vram=20M notifyk.vpssm3_sva=0xBEE00000 ddr_mem=1024M  ip=dhcp' ; "

I see that when i run the test the links are successfully created.

I am getting the following output when i print the buffer statistics:

=========

Enter Choice: b

IPCBITSOUTLINK:Buffer Statistics
Num Alloc Pools:1
PoolId | TotalBufCnt | FreeBufCnt | BufSize | AppAllocCount
0| 6| 0| 25344| 0

VDEC:Buffer Statistics
ChId | InBufCnt | OutBufCnt
0| 6| 1

===========

The iva statistics show atleast one buffer processed by Decoder. 

Enter Choice: i
[m3video] 98633: HDVICP-ID:0
[m3video] All percentage figures are based off totalElapsedTime
[m3video] totalAcquire2wait :0 %
[m3video] totalWait2Isr :0 %
[m3video] totalIsr2Done :0 %
[m3video] totalWait2Done :0 %
[m3video] totalDone2Release :0 %
[m3video] totalAcquire2Release :0 %
[m3video] totalAcq2acqDelay :0 %
[m3video] totalElapsedTime in msec : 0
[m3video] numAccessCnt: 1
[m3video] IVA-FPS : 0
[m3video] Average time spent per frame in microsec: 0
[m3video] 98633: HDVICP-ID:1
[m3video] All percentage figures are based off totalElapsedTime
[m3video] totalAcquire2wait :0 %
[m3video] totalWait2Isr :0 %
[m3video] totalIsr2Done :0 %
[m3video] totalWait2Done :0 %
[m3video] totalDone2Release :0 %
[m3video] totalAcquire2Release :0 %
[m3video] totalAcq2acqDelay :0 %
[m3video] totalElapsedTime in msec : 0
[m3video] numAccessCnt: 0
[m3video] IVA-FPS : 0
[m3video] Average time spent per frame in microsec: 0
[m3video] 98634: HDVICP-ID:2
[m3video] All percentage figures are based off totalElapsedTime
[m3video] totalAcquire2wait :0 %
[m3video] totalWait2Isr :0 %
[m3video] totalIsr2Done :0 %
[m3video] totalWait2Done :0 %
[m3video] totalDone2Release :0 %
[m3video] totalAcquire2Release :0 %
[m3video] totalAcq2acqDelay :0 %
[m3video] totalElapsedTime in msec : 0
[m3video] numAccessCnt: 0
[m3video] IVA-FPS : 0
[m3video] Average time spent per frame in microsec: 0
[m3video]
[m3video] *** DECODE Statistics ***
[m3video]
[m3video] Elasped Time : 54 secs
[m3video]
[m3video]
[m3video] CH | In Recv In User Out
[m3video] Num | FPS Skip FPS FPS
[m3video] -----------------------------------
[m3video] 0 | 0 0 0
[m3video]
[m3video] Multi Channel Decode Average Submit Batch Size
[m3video] Max Submit Batch Size : 24
[m3video] IVAHD_0 Average Batch Size : 0
[m3video] IVAHD_0 Max achieved Batch Size : 0
[m3video] IVAHD_1 Average Batch Size : 0
[m3video] IVAHD_1 Max achieved Batch Size : 0
[m3video] IVAHD_2 Average Batch Size : 0
[m3video] IVAHD_2 Max achieved Batch Size : 0
[m3video]
[m3video] Multi Channel Decode Batch break Stats
[m3video] Total Number of Batches created: 0
[m3video] All numbers are based off total number of Batches created
[m3video] Batch breaks due to batch sizeexceeding limit: 0 %
[m3video] Batch breaks due to ReqObj Que being empty: 0 %
[m3video] Batch breaks due to changed resolution class: 0 %
[m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
[m3video] Batch breaks due to channel repeat: 0 %
[m3video] Batch breaks due to different codec: 0 %
[m3video] Total Number of Batches created: 0
[m3video] All numbers are based off total number of Batches created
[m3video] Batch breaks due to batch sizeexceeding limit: 0 %
[m3video] Batch breaks due to ReqObj Que being empty: 0 %
[m3video] Batch breaks due to changed resolution class: 0 %
[m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
[m3video] Batch breaks due to channel repeat: 0 %
[m3video] Batch breaks due to different codec: 0 %
[m3video] Total Number of Batches created: 0
[m3video] All numbers are based off total number of Batches created
[m3video] Batch breaks due to batch sizeexceeding limit: 0 %
[m3video] Batch breaks due to ReqObj Que being empty: 0 %
[m3video] Batch breaks due to changed resolution class: 0 %
[m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
[m3video] Batch breaks due to channel repeat: 0 %
[m3video] Batch breaks due to different codec: 0 %
[m3video]
[m3vpss ]
[m3vpss ] 100637: LOAD: CPU: 0.9% HWI: 0.2%, SWI:0.5%
[m3vpss ]
[m3vpss ] 100638: LOAD: TSK: MISC : 0.2%
[m3vpss ]
[m3video]
[m3video] 101138: LOAD: CPU: 1.2% HWI: 0.1%, SWI:0.3%
[m3video]
[m3video] 101138: LOAD: TSK: IPC_FRAMES_OUT0 : 0.2%
[m3video] 101138: LOAD: TSK: IPC_BITS_IN0 : 0.1%
[m3video] 101138: LOAD: TSK: DEC0 : 0.2%
[m3video] 101139: LOAD: TSK: MISC : 0.3%
[m3video]
[c6xdsp ]
[c6xdsp ] 99331: LOAD: CPU: 0.1% HWI: 0.0%, SWI:0.0%
[c6xdsp ]
[c6xdsp ] 99331: LOAD: TSK: MISC : 0.1%
[c6xdsp ]

===========

The demo_ini folder has the following in config file:

[file00]
path = /opt/video_MAIN_mpeg4.m4v
width = 176
height = 144
enable = 1
codec = mpeg4
numbuf = 1
displaydelay = 0

======

But I am not able to get any buffers from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0. 

This file was successfully displayed in the default McFw dec+disp test.

What am i doing wrong.?

  • My receive thread is as follows:

    rxvthread()

    {

    VIDFrame_BufList bufList;

    bufList.numFrames = 0;
    status = IpcFramesInLink_getFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0,
    &bufList);

    OSA_assert(0 == status);
    if (bufList.numFrames > 0)
    {

    printf("bufList.numFrames = %d\n", bufList.numFrames);

    status = IpcFramesInLink_putEmptyVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0,
    &bufList);

    }

    }

    with this i am getting one buffer as output from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0. but not afterwards,

     The statistics are as follows

    Enter Choice: i
    [m3video] 96578: HDVICP-ID:0
    [m3video] All percentage figures are based off totalElapsedTime
    [m3video] totalAcquire2wait :0 %
    [m3video] totalWait2Isr :0 %
    [m3video] totalIsr2Done :0 %
    [m3video] totalWait2Done :0 %
    [m3video] totalDone2Release :0 %
    [m3video] totalAcquire2Release :0 %
    [m3video] totalAcq2acqDelay :0 %
    [m3video] totalElapsedTime in msec : 0
    [m3video] numAccessCnt: 1
    [m3video] IVA-FPS : 0
    [m3video] Average time spent per frame in microsec: 0
    [m3video] 96578: HDVICP-ID:1
    [m3video] All percentage figures are based off totalElapsedTime
    [m3video] totalAcquire2wait :0 %
    [m3video] totalWait2Isr :0 %
    [m3video] totalIsr2Done :0 %
    [m3video] totalWait2Done :0 %
    [m3video] totalDone2Release :0 %
    [m3video] totalAcquire2Release :0 %
    [m3video] totalAcq2acqDelay :0 %
    [m3video] totalElapsedTime in msec : 0
    [m3video] numAccessCnt: 0
    [m3video] IVA-FPS : 0
    [m3video] Average time spent per frame in microsec: 0
    [m3video] 96579: HDVICP-ID:2
    [m3video] All percentage figures are based off totalElapsedTime
    [m3video] totalAcquire2wait :0 %
    [m3video] totalWait2Isr :0 %
    [m3video] totalIsr2Done :0 %
    [m3video] totalWait2Done :0 %
    [m3video] totalDone2Release :0 %
    [m3video] totalAcquire2Release :0 %
    [m3video] totalAcq2acqDelay :0 %
    [m3video] totalElapsedTime in msec : 0
    [m3video] numAccessCnt: 0
    [m3video] IVA-FPS : 0
    [m3video] Average time spent per frame in microsec: 0
    [m3video]
    [m3video] *** DECODE Statistics ***
    [m3video]
    [m3video] Elasped Time : 22 secs
    [m3video]
    [m3video]
    [m3video] CH | In Recv In User Out
    [m3video] Num | FPS Skip FPS FPS
    [m3video] -----------------------------------
    [m3video] 0 | 0 0 0
    [m3video]
    [m3video] Multi Channel Decode Average Submit Batch Size
    [m3video] Max Submit Batch Size : 24
    [m3video] IVAHD_0 Average Batch Size : 0
    [m3video] IVAHD_0 Max achieved Batch Size : 0
    [m3video] IVAHD_1 Average Batch Size : 0
    [m3video] IVAHD_1 Max achieved Batch Size : 0
    [m3video] IVAHD_2 Average Batch Size : 0
    [m3video] IVAHD_2 Max achieved Batch Size : 0
    [m3video]
    [m3video] Multi Channel Decode Batch break Stats
    [m3video] Total Number of Batches created: 0
    [m3video] All numbers are based off total number of Batches created
    [m3video] Batch breaks due to batch sizeexceeding limit: 0 %
    [m3video] Batch breaks due to ReqObj Que being empty: 0 %
    [m3video] Batch breaks due to changed resolution class: 0 %
    [m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
    [m3video] Batch breaks due to channel repeat: 0 %
    [m3video] Batch breaks due to different codec: 0 %
    [m3video] Total Number of Batches created: 0
    [m3video] All numbers are based off total number of Batches created
    [m3video] Batch breaks due to batch sizeexceeding limit: 0 %
    [m3video] Batch breaks due to ReqObj Que being empty: 0 %
    [m3video] Batch breaks due to changed resolution class: 0 %
    [m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
    [m3video] Batch breaks due to channel repeat: 0 %
    [m3video] Batch breaks due to different codec: 0 %
    [m3video] Total Number of Batches created: 0
    [m3video] All numbers are based off total number of Batches created
    [m3video] Batch breaks due to batch sizeexceeding limit: 0 %
    [m3video] Batch breaks due to ReqObj Que being empty: 0 %
    [m3video] Batch breaks due to changed resolution class: 0 %
    [m3video] Batch breaks due to interlace and progressivecontent mix: 0 %
    [m3video] Batch breaks due to channel repeat: 0 %
    [m3video] Batch breaks due to different codec: 0 %
    [m3video]
    [m3vpss ]
    [m3vpss ] 98583: LOAD: CPU: 1.0% HWI: 0.2%, SWI:0.5%
    [m3vpss ]
    [m3vpss ] 98583: LOAD: TSK: MISC : 0.3%
    [m3vpss ]
    [m3video]
    [m3video] 99083: LOAD: CPU: 1.3% HWI: 0.1%, SWI:0.3%
    [m3video]
    [m3video] 99083: LOAD: TSK: IPC_FRAMES_OUT0 : 0.2%
    [m3video] 99083: LOAD: TSK: IPC_BITS_IN0 : 0.1%
    [m3video] 99084: LOAD: TSK: DEC0 : 0.3%
    [m3video] 99084: LOAD: TSK: MISC : 0.3%
    [m3video]
    [c6xdsp ]
    [c6xdsp ] 97275: LOAD: CPU: 0.1% HWI: 0.0%, SWI:0.0%
    [c6xdsp ]
    [c6xdsp ] 97275: LOAD: TSK: MISC : 0.1%
    [c6xdsp ]

    =============
    Run-Time Menu
    =============


    i: Print detailed system information
    s: Core Status: Active/In-active
    f: Switch IVA Channel Map

    e: Stop Demo

    Enter Choice: b

    IPCBITSOUTLINK:Buffer Statistics
    Num Alloc Pools:1
    PoolId | TotalBufCnt | FreeBufCnt | BufSize | AppAllocCount
    0| 6| 0| 25344| 0

    VDEC:Buffer Statistics
    ChId | InBufCnt | OutBufCnt
    0| 6| 1

    What is the reason why i am getting only one frame from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0.?

  • when i print the info of only one received frame from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0,

    I get the the phyAddr[0][0]  and virtAddr[0][0] to be NULL

    "bufList.numFrames = 1

    [host] CHAINS_IPCFRAMES:VIDFRAME_INFO:chNum:0 fid:0 frameWidth:176 frameHeight:144 timeStamp:0 virtAddr[0][0]:(nil) phyAddr[0][0]:(nil) [m3video]

    "

    Why does this happen?

  • You should set ipcFramesOutVideoPrm.baseCreateParams.notifyPrevLink = TRUE;

    Also if you want to export video frames to A8 make sure tiler is disabled in decLink prm.

    Also set the decLink numOutBufPerCh to 5 (incase you are modifying default value)

  • Thanks Badri very much for your input.  You really saved a lot of my debugging time.

    i am now able to get the buffer from SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0.

    Now i am testing the output with the  standard input testvector from theRDK "airshow_p176x144.h264".

    I am using ddrmem=2GB and linuxmem=512MB configuration.

    The buffer's phyAddr that i receive are from SR2 region(between 0x96000000->0xBE000000).

    As discussed in the forum, I memory mapped the address and wrote to the file as follows:

    ---------

    frameSize = 38016; /* 176(width) * height(144) *1.5*/
    fileIdx = pBuf->channelNum;
    status = OSA_mapMem((UInt32)(pBuf->phyAddr[0][0]), frameSize, &pMemVirtAddr);

    OSA_assert((status == 0) && (pMemVirtAddr != NULL));

    if (fwriteEnableChannelBitmask & (1 << fileIdx))
    {
        write_cnt = fwrite((Ptr) pMemVirtAddr, sizeof(char), frameSize,fpBuf[fileIdx]);

       OSA_assert(write_cnt == frameSize);

    }
    status = OSA_unmapMem((Ptr) pMemVirtAddr,frameSize);

    ------

    "pBuf" above corresponds to (&(bufList.frames[i])) where buflist was obtained from IpcFramesInLink_getFullVideoFrames() call

    I used the standard input testvector from theRDK "airshow_p176x144.h264".

    Though i got some output, When i compared against the reference airshow_p176x144.yuv,  there are discrepencies.

    I was also not able to play the output in the yuv player.

    I assumed the output is yuv-420 in the yuv player and i am using the  pixel sizes= 1.5 to calculate the framesize.

    Is the output in a different yuv format or am i missing any other configuration?

    What am i doing wrong?

    Also is it okay to receive the output decoded data from Video-M3 using [SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0-> SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0 ]

    links instead of [SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0-> SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0]?

  • The output of decoder is in NV12 format. ie. YUV420SP . Y will be in a separate buffer and UV will be in a separate buffer. You can google for details on the format but the issue you should not copy the buffer as w x h x 1.5 from pBuf->phyAddr[0][0] .

    Copy should be

        pitch[0] x h from pBuf->phyAddr[0][0]

        pitch[1] x h from pBuf->phyAddr[0][1].

     

    srini ramanan said:

    Also is it okay to receive the output decoded data from Video-M3 using [SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0-> SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0 ]

    links instead of [SYSTEM_VIDEO_LINK_ID_IPC_FRAMES_OUT_0-> SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0]?

    - No you should uses only IpcFrames and not IpcBits to export video frames.

  • 1. How do i get pitch[0] and pitch[1] values?

    (We were setting the pitch values "ipcBitsOutHostPrm.inQueInfo.chInfo[i].pitch[0]= 0".

     I guess that says it to take default pitch values.

    I tried with pitch[0] with framewidth and pitch[1] as framewidth/2. It didn't help.)

    2. For the FileRd->Scaler->fileWr usecase,  should i  get YUV buffers in this way?

    thanks for replying.

  • VIDEO_FRAMEBUF_S.framePitch has the pitch. pitch[0] and pitch[1] will be same when using YUV420SP format. ipcBitsOut pitch is unrelated to decoder output buffer pitch.

    2. For the FileRd->Scaler->fileWr usecase,  should i  get YUV buffers in this way?

     - Some scalers support YUV420SP output format and some support only YUV422I format. It depends on the scaler path Id you are using.