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.

pObj->createArgs.baseCreateParams.inQueParams.prevLinkQueId < pObj->inQueInfo.numQue : failed !!!

Other Parts Discussed in Thread: TVP5158

hi

i use dm8168,in my usecase,the vdec_vdis+alg

the code of multich_vdec_vdis.c is:

/*******************************************************************************
 *                                                                             *
 * Copyright (c) 2009 Texas Instruments Incorporated - http://www.ti.com/      *
 *                        ALL RIGHTS RESERVED                                  *
 *                                                                             *
 ******************************************************************************/
/*  ========================= TI_816X_BUILD case ==============================
                          |
                        IPC_BITS_OUT_A8 (BitStream)
                          |
                        IPC_BITS_IN (Video)
                          |
                        DEC (YUV420SP)
                          |
                        IPC_OUT (Video)
                          |
                        IPC_IN (Vpss)
                          |   (32 D1 + 10 720P + 6 1080P)
                        MP_SCLR (Vpss)
                          |
                         DUP
               (48CH)    | |    (48CH)
         +---------------+ +-------------+
         |                               |
         |                               |
      SW Mosaic                       SW Mosaic
     (SC5 SC1 YUV422I)                (SC4 SC2 YUV422I)
        |  |                             |  |
        |  |                             |  |
       (DDR)(422I)                      (DDR)(422I)
          |                               |
  GRPX0   |                      GRPX1    |
     |    |                          |    |
     On-Chip HDMI                    Off-Chip HDMI
       1080p60                        1080p60
*/

/* ========================= TI_814X_BUILD case ==============================
                          |
                        IPC_BITS_OUT_A8 (BitStream)
                          |
                        IPC_BITS_IN (Video)
                          |
                        DEC (YUV420SP)
                          |
                        IPC_OUT (Video)
                          |
                        IPC_IN (Vpss)
                          |   (16 channels)
                        MP_SCLR (Vpss)
                          |
                         DUP
               (16CH)    | |    (16CH)
         +---------------+ +-------------+
         |                               |
         |                               |
      SW Mosaic                       SW Mosaic
     (SC5 YUV422I)                (SC5 YUV422I)
        |  |                             |  |
        |  |                             |  |
       (DDR)(422I)                      (DDR)(422I)
          |                               |
  GRPX0   |----Tied---|                   |
     |    |           |                   |
     On-Chip HDMI  Off-Chip HDMI         SDTV
       1080p60       1080p60
*/

#include "mcfw/src_linux/mcfw_api/usecases/multich_common.h"
#include "mcfw/src_linux/mcfw_api/usecases/multich_ipcbits.h"
#include "mcfw/interfaces/link_api/system_tiler.h"
#include "mcfw/interfaces/link_api/avsync_hlos.h"

/* =============================================================================
 * Externs
 * =============================================================================
 */


/* =============================================================================
 * Use case code
 * =============================================================================
 */

 

#define MAX_DEC_OUT_FRAMES_PER_CH                           (5)
#define MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_NUM_CHANNELS       (16)
#define MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_FRAME_WIDTH        (720)
#define MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_FRAME_HEIGHT       (480)
#define MULTICH_NUM_SWMS_MAX_BUFFERS                        (7)

#define     MAX_BUFFERING_QUEUE_LEN_PER_CH           (50)

#define     BIT_BUF_LENGTH_LIMIT_FACTOR_CIF           (10)
#define     BIT_BUF_LENGTH_LIMIT_FACTOR_SD            (6)
#define     BIT_BUF_LENGTH_LIMIT_FACTOR_HD            (5)
#define     BIT_BUF_LENGTH_LIMIT_FACTOR_720P          (4)
#define     BIT_BUF_LENGTH_LIMIT_FACTOR_HMP           (4)


#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
{
    .isPopulated = 1,
    .ivaMap[0] =
    {
        .EncNumCh  = 0,
        .EncChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},

        .DecNumCh  = 16,
        .DecChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
    },
};
#define NUM_STATIC_CHANNELS   (6)
#else
/*
Max channels per IVA-HD MUST be < 16,
i.e total number of channels for decode can be 48.

Example CH allocation for SD+HD,

32CH SD    :  0 to 31
 6CH 1080P : 32 to 38
10CH 720P  : 39 to 48

*/
static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
{
    .isPopulated = 1,
    .ivaMap[0] =
    {
        .EncNumCh  = 0,
        .EncChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},

        .DecNumCh  = 17,
        .DecChList = {   0,  3,  6,  9, 12, 15, 18, 21,
                        24, 27, 30, 33, 36, 39, 42, 45,
                        48
                     },
    },
    .ivaMap[1] =
    {
        .EncNumCh  = 0,
        .EncChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},

        .DecNumCh  = 17,
        .DecChList = {   1,  4,  7, 10, 13, 16, 19, 22,
                        25, 28, 31, 34, 37, 40, 43, 46,
                        49
                     },
    },
    .ivaMap[2] =
    {
        .EncNumCh  = 0,
        .EncChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},

        .DecNumCh  = 16,
        .DecChList = {   2,  5,  8, 11, 14, 17, 20, 23,
                        26, 29, 32, 35, 38, 41, 44, 47
                     },
    },
};
#define NUM_STATIC_CHANNELS   (8)
#endif

typedef struct {

    UInt32 dupId;
    UInt32 ipcOutVideoId;
    UInt32 ipcInVpssId;
    UInt32 mergeId;
    Bool   enableVideoFrameExport;
    AvsyncLink_LinkSynchConfigParams   avsyncCfg[VDIS_DEV_MAX];
    UInt32 mpSclrId;

} MultiCh_VdecVdisObj;

MultiCh_VdecVdisObj gMultiCh_VdecVdisObj;

static Void MultiCh_setIpcFramesOutInQueInfo(System_LinkQueInfo *inQueInfo)
{
    Int i;

    inQueInfo->numCh = MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_NUM_CHANNELS;
    for (i = 0; i < inQueInfo->numCh; i++)
    {
        inQueInfo->chInfo[i].bufType = SYSTEM_BUF_TYPE_VIDFRAME;
        inQueInfo->chInfo[i].dataFormat = SYSTEM_DF_YUV422I_YUYV;
        inQueInfo->chInfo[i].memType    = SYSTEM_MT_NONTILEDMEM;
        inQueInfo->chInfo[i].scanFormat = SYSTEM_SF_PROGRESSIVE;
        inQueInfo->chInfo[i].startX     = 0;
        inQueInfo->chInfo[i].startY     = 0;
        inQueInfo->chInfo[i].width      =
                   MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_FRAME_WIDTH;
        inQueInfo->chInfo[i].height     =
                   MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_FRAME_HEIGHT;
        inQueInfo->chInfo[i].pitch[0]   =
                   MULTICH_VDEC_VDIS_IPCFRAMEEXPORT_FRAME_WIDTH * 2;
        inQueInfo->chInfo[i].pitch[1]   = 0;
        inQueInfo->chInfo[i].pitch[2]   = 0;
    }
}

static
Void mulich_vdec_vdis_set_avsync_vidque_prm(Avsync_SynchConfigParams *queCfg,
                                            Int chnum,
                                            UInt32 avsStartChNum,
                                            UInt32 avsEndChNum,
                                            VDIS_DEV vdDevId)
{
    queCfg->chNum = chnum;
    queCfg->audioPresent = FALSE;
    if ((queCfg->chNum >= avsStartChNum)
        &&
        (queCfg->chNum <= avsEndChNum)
        &&
        (gVsysModuleContext.vsysConfig.enableAVsync))
    {
        queCfg->avsyncEnable = TRUE;
    }
    else
    {
        queCfg->avsyncEnable = FALSE;
    }

    queCfg->clkAdjustPolicy.refClkType = AVSYNC_REFCLKADJUST_NONE;
    queCfg->clkAdjustPolicy.clkAdjustLead = AVSYNC_VIDEO_TIMEBASESHIFT_MAX_LEAD_MS;
    queCfg->clkAdjustPolicy.clkAdjustLag  = AVSYNC_VIDEO_TIMEBASESHIFT_MAX_LAG_MS;
    queCfg->vidSynchPolicy.maxReplayLead  = AVSYNC_VIDEO_FUTURE_FRAME_DROP_THRESHOLD_MS;
    queCfg->vidSynchPolicy.playMaxLag  = 180;
    queCfg->vidSynchPolicy.playMaxLead = 0;
    queCfg->vidSynchPolicy.doMarginScaling = FALSE;
    queCfg->playTimerStartTimeout = 0;
    queCfg->playStartMode = AVSYNC_PLAYBACK_START_MODE_WAITSYNCH;
    queCfg->ptsInitMode   = AVSYNC_PTS_INIT_MODE_APP;
}

static
Void mulich_vdec_vdis_set_avsync_prm(AvsyncLink_LinkSynchConfigParams *avsyncPrm,
                                     UInt32 swMsIdx,
                                     VDIS_DEV vdDevId)
{
    Int i;
    Int32 status;

    Vdis_getAvsyncConfig(vdDevId,avsyncPrm);
    avsyncPrm->displayLinkID        = Vdis_getDisplayId(vdDevId);
    avsyncPrm->videoSynchLinkID = gVdisModuleContext.swMsId[swMsIdx];
    avsyncPrm->numCh            = gVdecModuleContext.vdecConfig.numChn;
    avsyncPrm->syncMasterChnum =  AVSYNC_INVALID_CHNUM;
    for (i = 0; i < avsyncPrm->numCh;i++)
    {
        mulich_vdec_vdis_set_avsync_vidque_prm(&avsyncPrm->queCfg[i],
                                               i,
                                               0,
                                               (0 + gVdecModuleContext.vdecConfig.numChn),
                                               vdDevId);
    }
    if (0 == swMsIdx)
    {
        Vdis_setAvsyncConfig(VDIS_DEV_HDMI,avsyncPrm);
    }
    else
    {
        Vdis_setAvsyncConfig(VDIS_DEV_SD,avsyncPrm);
    }

    status = Avsync_configSyncConfigInfo(avsyncPrm);
    OSA_assert(status == 0);
}

Void MultiCh_createVdecVdis()

 
 UInt32                         dspAlgId[1];
 UInt32                         ipcFramesInDspId[1];
    UInt32                         ipcFramesOutVpssId[1];
 
    IpcBitsOutLinkHLOS_CreateParams   ipcBitsOutHostPrm;
    IpcBitsInLinkRTOS_CreateParams    ipcBitsInVideoPrm;
    DecLink_CreateParams        decPrm;
    IpcLink_CreateParams        ipcOutVideoPrm;
    IpcLink_CreateParams        ipcInVpssPrm;
    DupLink_CreateParams        dupPrm;
    static SwMsLink_CreateParams       swMsPrm[VDIS_DEV_MAX];
    DisplayLink_CreateParams    displayPrm[VDIS_DEV_MAX];
    IpcFramesOutLinkHLOS_CreateParams  ipcFramesOutHostPrm;
    IpcFramesInLinkRTOS_CreateParams   ipcFramesInVpssFromHostPrm;
    MergeLink_CreateParams             mergePrm;
    MpSclrLink_CreateParams            mpSclrPrm;

    UInt32 i;
    UInt32 enableGrpx;
    Bool tilerEnable;
    Bool enableVideoFrameExport;
 
 IpcFramesOutLinkRTOS_CreateParams  ipcFramesOutVpssPrm[1];
    IpcFramesInLinkRTOS_CreateParams  ipcFramesInDspPrm[1];
 AlgLink_CreateParams                dspAlgPrm[1];

    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcInVpssPrm);
    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcOutVideoPrm);
    MULTICH_INIT_STRUCT(IpcBitsOutLinkHLOS_CreateParams,ipcBitsOutHostPrm);
    MULTICH_INIT_STRUCT(IpcBitsInLinkRTOS_CreateParams,ipcBitsInVideoPrm);
    MULTICH_INIT_STRUCT(DecLink_CreateParams, decPrm);
    MULTICH_INIT_STRUCT(IpcFramesOutLinkHLOS_CreateParams ,ipcFramesOutHostPrm);
    MULTICH_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams  ,ipcFramesInVpssFromHostPrm); MULTICH_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams,ipcFramesOutVpssPrm[0]);
    MULTICH_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams,ipcFramesInDspPrm[0]);
    MULTICH_INIT_STRUCT(AlgLink_CreateParams, dspAlgPrm[0]);
 
    for (i = 0; i < VDIS_DEV_MAX;i++)
    {
        MULTICH_INIT_STRUCT(DisplayLink_CreateParams,displayPrm[i]);
        MULTICH_INIT_STRUCT(SwMsLink_CreateParams ,swMsPrm[i]);
    }

    MULTICH_INIT_STRUCT(MpSclrLink_CreateParams, mpSclrPrm);

    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 defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    enableGrpx   = FALSE;
#else
    enableGrpx   = FALSE;//TRUE;
#endif

    tilerEnable  = FALSE;

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

        bucketRes.bucketWidth  = SYSTEM_TILER_ALLOCATOR_BUCKET_WIDTH_DEFAULT;
        bucketRes.bucketHeight = SYSTEM_TILER_ALLOCATOR_BUCKET_HEIGHT_DEFAULT;
        bucketRes.minResolution = SYSTEM_TILER_RESOLUTION_CIF;
        bucketRes.setSingleBucketGeometry = FALSE;
        SystemTiler_setBucketGeometry(&bucketRes);
    }

    enableVideoFrameExport = FALSE;

    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;

    gMultiCh_VdecVdisObj.ipcOutVideoId  = SYSTEM_VIDEO_LINK_ID_IPC_OUT_M3_0;
    gMultiCh_VdecVdisObj.ipcInVpssId    = SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0;
    gMultiCh_VdecVdisObj.dupId          = SYSTEM_VPSS_LINK_ID_DUP_0;
    gMultiCh_VdecVdisObj.mpSclrId       = SYSTEM_LINK_ID_MP_SCLR_INST_0;
    gVdisModuleContext.mpSclrId         = SYSTEM_LINK_ID_MP_SCLR_INST_0;
    gVdisModuleContext.swMsId[0]        = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0;

    gVdisModuleContext.displayId[0]     = SYSTEM_LINK_ID_DISPLAY_0; // ON AND OFF CHIP HDMI
 

 dspAlgId[0] = SYSTEM_LINK_ID_ALG_0;
    ipcFramesOutVpssId[0] = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;
    ipcFramesInDspId[0] = SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0;

    if (gVsysModuleContext.vsysConfig.numDisplays > 1)
    {
        gVdisModuleContext.swMsId[1]        = SYSTEM_LINK_ID_SW_MS_MULTI_INST_1;
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
        gVdisModuleContext.displayId[1]     = SYSTEM_LINK_ID_DISPLAY_2; // SDTV
#else
        gVdisModuleContext.displayId[1]     = SYSTEM_LINK_ID_DISPLAY_1; // OFF CHIP HDMI
#endif
    }

    if (enableVideoFrameExport)
    {
        gMultiCh_VdecVdisObj.mergeId                 = SYSTEM_VPSS_LINK_ID_MERGE_0;
        gVdisModuleContext.ipcFramesOutHostId        = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
        gVdisModuleContext.ipcFramesInVpssFromHostId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_IN_0;
    }

    if(enableGrpx)
    {
        // GRPX is enabled in Vdis_start() based on the link ID set here
        gVdisModuleContext.grpxId[0]    = SYSTEM_LINK_ID_GRPX_0;
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
        gVdisModuleContext.grpxId[1]    = SYSTEM_LINK_ID_INVALID;
#else
        gVdisModuleContext.grpxId[1]    = SYSTEM_LINK_ID_GRPX_1;
#endif
    }

    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;

    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.maxQueueDepth[i] = MAX_BUFFERING_QUEUE_LEN_PER_CH;
        ipcBitsOutHostPrm.chMaxReqBufSize[i] =
                (ipcBitsOutHostPrm.inQueInfo.chInfo[i].width * ipcBitsOutHostPrm.inQueInfo.chInfo[i].height);
        ipcBitsOutHostPrm.totalBitStreamBufferSize [i] =
                (ipcBitsOutHostPrm.chMaxReqBufSize[i] * BIT_BUF_LENGTH_LIMIT_FACTOR_HD);

    }

    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;
        if (gVdecModuleContext.vdecConfig.decChannelParams[i].fieldPicture)
        {
            OSA_printf("MULTICH_VDEC_VDIS:INFO ChId[%d] configured for field picture\n",i);
            decPrm.chCreateParams[i].processCallLevel   = VDEC_FIELDLEVELPROCESSCALL;
        }
        else
        {
            decPrm.chCreateParams[i].processCallLevel   = VDEC_FRAMELEVELPROCESSCALL;
        }
        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;
        if (FALSE == tilerEnable)
        {
         decPrm.chCreateParams[i].tilerEnable = FALSE;
        }
        else
        {
         decPrm.chCreateParams[i].tilerEnable = gVdecModuleContext.vdecConfig.decChannelParams[i].tilerEnable;
        }
    }

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

    ipcOutVideoPrm.inQueParams.prevLinkId    = gVdecModuleContext.decId;
    ipcOutVideoPrm.inQueParams.prevLinkQueId = 0;
    ipcOutVideoPrm.outQueParams[0].nextLink     = gMultiCh_VdecVdisObj.ipcInVpssId;
    ipcOutVideoPrm.notifyNextLink            = TRUE;
    ipcOutVideoPrm.notifyPrevLink            = TRUE;
    ipcOutVideoPrm.numOutQue                 = 1;

    ipcInVpssPrm.inQueParams.prevLinkId    = gMultiCh_VdecVdisObj.ipcOutVideoId;
    ipcInVpssPrm.inQueParams.prevLinkQueId = 0;
    ipcInVpssPrm.notifyNextLink            = TRUE;
    ipcInVpssPrm.notifyPrevLink            = TRUE;
    ipcInVpssPrm.numOutQue                 = 1;
 
  ipcInVpssPrm.outQueParams[0].nextLink   = ipcFramesOutVpssId[0];
 
      
  
 ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkId = gMultiCh_VdecVdisObj.ipcInVpssId;//gMultiCh_VdecVdisObj.mpSclrId;
    ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkQueId = ipcInVpssPrm.numOutQue; //1
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyPrevLink = TRUE;

    ipcFramesOutVpssPrm[0].baseCreateParams.numOutQue = 1;
    ipcFramesOutVpssPrm[0].baseCreateParams.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.mpSclrId;
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyNextLink = TRUE;
  
 ipcFramesOutVpssPrm[0].baseCreateParams.processLink = ipcFramesInDspId[0];
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyProcessLink = TRUE;
    ipcFramesOutVpssPrm[0].baseCreateParams.noNotifyMode = FALSE;
 
 mpSclrPrm.inQueParams.prevLinkId        = ipcFramesOutVpssId[0];
 
 
 

     //prevLink->processLink->nextLink
        ipcFramesInDspPrm[0].baseCreateParams.inQueParams.prevLinkId = ipcFramesOutVpssId[0];
        ipcFramesInDspPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcFramesInDspPrm[0].baseCreateParams.numOutQue   = 1;
        ipcFramesInDspPrm[0].baseCreateParams.outQueParams[0].nextLink = dspAlgId[0];
        ipcFramesInDspPrm[0].baseCreateParams.notifyPrevLink = TRUE;
        ipcFramesInDspPrm[0].baseCreateParams.notifyNextLink = TRUE;
        ipcFramesInDspPrm[0].baseCreateParams.noNotifyMode   = FALSE;

        dspAlgPrm[0].inQueParams.prevLinkId = ipcFramesInDspId[0];
        dspAlgPrm[0].inQueParams.prevLinkQueId = 0;
  
     if(TRUE)
  {
  //int chId;
  dspAlgPrm[0].enableOSDAlg = TRUE;
  dspAlgPrm[0].enableSCDAlg = FALSE;
  dspAlgPrm[0].outQueParams[ALG_LINK_SCD_OUT_QUE].nextLink = SYSTEM_LINK_ID_INVALID;


//                   for(chId = 0; chId < ALG_LINK_OSD_MAX_CH; chId++)
//                   {
//                       AlgLink_OsdChWinParams * chWinPrm = &dspAlgPrm[0].osdChCreateParams[chId].chDefaultParams;
//
//                       /* set osd window max width and height */
//                       dspAlgPrm[0].osdChCreateParams[chId].maxWidth  = EXAMPLE_OSD_WIN_MAX_WIDTH;
//                       dspAlgPrm[0].osdChCreateParams[chId].maxHeight = EXAMPLE_OSD_WIN_MAX_HEIGHT;
//
//                       chWinPrm->chId = chId;
//                       chWinPrm->numWindows = 0;
//                   }
        }
  


    if (enableVideoFrameExport)
    {
        ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
        ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
        ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
        ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
        ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcFramesOutHostPrm.baseCreateParams.numOutQue = 1;
        ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
        MultiCh_setIpcFramesOutInQueInfo(&ipcFramesOutHostPrm.inQueInfo);

        ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
        ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
        ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcFramesInVpssFromHostPrm.baseCreateParams.numOutQue = 1;
        ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.mergeId;


        ipcInVpssPrm.outQueParams[0].nextLink     = gMultiCh_VdecVdisObj.mergeId;

        mergePrm.numInQue                     = 2;
        mergePrm.inQueParams[0].prevLinkId    = gMultiCh_VdecVdisObj.ipcInVpssId;
        mergePrm.inQueParams[0].prevLinkQueId = 0;
        mergePrm.inQueParams[1].prevLinkId    = gVdisModuleContext.ipcFramesInVpssFromHostId;
        mergePrm.inQueParams[1].prevLinkQueId = 0;

        mergePrm.outQueParams.nextLink        = gMultiCh_VdecVdisObj.mpSclrId;
        mergePrm.notifyNextLink               = TRUE;
        mpSclrPrm.inQueParams.prevLinkId      = gMultiCh_VdecVdisObj.mergeId;
    }

#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    mpSclrPrm.pathId = MP_SCLR_LINK_SEC0_SC3_VIP0;
#else
    mpSclrPrm.pathId = MP_SCLR_LINK_SEC1_SC4_VIP1;
#endif

    mpSclrPrm.numCh = 1;//4;
    mpSclrPrm.enableLineSkip = FALSE;

    mpSclrPrm.outQueParams.nextLink       = gMultiCh_VdecVdisObj.dupId;
 dupPrm.inQueParams.prevLinkId         = gMultiCh_VdecVdisObj.mpSclrId;

    dupPrm.inQueParams.prevLinkQueId      = 0;
    dupPrm.numOutQue                      = gVsysModuleContext.vsysConfig.numDisplays;
    dupPrm.outQueParams[0].nextLink       = gVdisModuleContext.swMsId[0];
    dupPrm.outQueParams[1].nextLink       = gVdisModuleContext.swMsId[1];
    dupPrm.notifyNextLink                 = TRUE;
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)

    swMsPrm[0].numSwMsInst = 1;
    swMsPrm[0].swMsInstId[0]        = SYSTEM_SW_MS_SC_INST_DEIHQ_SC_NO_DEI;

    swMsPrm[0].swMsInstStartWin[0]  = 0;
    swMsPrm[0].swMsInstStartWin[1]  = 10;

    swMsPrm[1].numSwMsInst = 1;
    swMsPrm[1].swMsInstId[0]        = SYSTEM_SW_MS_SC_INST_DEI_SC_NO_DEI;

    swMsPrm[1].swMsInstStartWin[0]  = 0;
    swMsPrm[1].swMsInstStartWin[1]  = 10;

    swMsPrm[0].enableProcessTieWithDisplay = TRUE;
    swMsPrm[1].enableProcessTieWithDisplay = FALSE;

    /* We do not require dual output, this free up SC3 scalar */
    swMsPrm[0].includeVipScInDrvPath = FALSE;
    swMsPrm[1].includeVipScInDrvPath = FALSE;
#else
    swMsPrm[0].swMsInstId[0]        = SYSTEM_SW_MS_SC_INST_DEI_SC_NO_DEI;
    swMsPrm[0].swMsInstId[1]        = SYSTEM_SW_MS_SC_INST_VIP1_SC;

    swMsPrm[1].swMsInstId[0]        = SYSTEM_SW_MS_SC_INST_DEIHQ_SC_NO_DEI;
    swMsPrm[1].swMsInstId[1]        = SYSTEM_SW_MS_SC_INST_VIP0_SC;

    swMsPrm[0].numSwMsInst          = 2;

    swMsPrm[0].swMsInstStartWin[0]  = 0;
    swMsPrm[0].swMsInstStartWin[1]  = 16;

    swMsPrm[1].numSwMsInst          = swMsPrm[0].numSwMsInst;
    swMsPrm[1].swMsInstStartWin[0]  = swMsPrm[0].swMsInstStartWin[0];
    swMsPrm[1].swMsInstStartWin[1]  = swMsPrm[0].swMsInstStartWin[1];

    swMsPrm[0].enableProcessTieWithDisplay = TRUE;
    swMsPrm[1].enableProcessTieWithDisplay = TRUE;

#endif
    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
    {
        VDIS_DEV vdDevId = VDIS_DEV_HDMI;

        swMsPrm[i].inQueParams.prevLinkId     = gMultiCh_VdecVdisObj.dupId;
        swMsPrm[i].inQueParams.prevLinkQueId  = i;
        swMsPrm[i].outQueParams.nextLink      = gVdisModuleContext.displayId[i];
        swMsPrm[i].numOutBuf                 = MULTICH_NUM_SWMS_MAX_BUFFERS;

        /* Disable inQue drop at SwMs as input may arrive very fast in VDEC->VDIS use case */
        swMsPrm[i].maxInputQueLen             = SYSTEM_SW_MS_INVALID_INPUT_QUE_LEN;
        if (i == 0)
        {
            vdDevId = VDIS_DEV_HDMI;
            swMsPrm[i].maxOutRes              = VSYS_STD_1080P_60;
            swMsPrm[i].initOutRes             = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_HDMI].resolution;
        }
        else if (i == 1)
        {
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
            vdDevId = VDIS_DEV_SD;
            swMsPrm[i].maxOutRes              = VSYS_STD_PAL;
            swMsPrm[i].outQueParams.nextLink  = SYSTEM_LINK_ID_DISPLAY_2;
            swMsPrm[i].initOutRes             = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_SD].resolution;

#else
            vdDevId = VDIS_DEV_DVO2;
            swMsPrm[i].maxOutRes              = VSYS_STD_1080P_60;
            swMsPrm[i].initOutRes             = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_DVO2].resolution;
#endif
        }
        /* low cost line skip mode of scaling can be used, when tiler is off */
        if(tilerEnable)
            swMsPrm[i].lineSkipMode           = FALSE;
        else
            swMsPrm[i].lineSkipMode           = TRUE;

        swMsPrm[i].enableLayoutGridDraw = gVdisModuleContext.vdisConfig.enableLayoutGridDraw;

        MultiCh_swMsGetDefaultLayoutPrm(vdDevId, &swMsPrm[i], FALSE);    /* both from 0-16 chnl */

        displayPrm[i].inQueParams[0].prevLinkId    = gVdisModuleContext.swMsId[i];
        displayPrm[i].inQueParams[0].prevLinkQueId = 0;
        displayPrm[i].displayRes                = swMsPrm[i].initOutRes;
        if (i == 1)
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
                        displayPrm[i].displayRes            = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_SD].resolution;
#else
                        displayPrm[i].displayRes            = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_DVO2].resolution;
#endif
        mulich_vdec_vdis_set_avsync_prm(&gMultiCh_VdecVdisObj.avsyncCfg[i],i,vdDevId);
    }

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

    System_linkCreate(gMultiCh_VdecVdisObj.ipcOutVideoId, &ipcOutVideoPrm, sizeof(ipcOutVideoPrm));
    System_linkCreate(gMultiCh_VdecVdisObj.ipcInVpssId  , &ipcInVpssPrm, sizeof(ipcInVpssPrm));
 
 System_linkCreate(ipcFramesOutVpssId[0], &ipcFramesOutVpssPrm[0], sizeof(ipcFramesOutVpssPrm[0]));
    System_linkCreate(ipcFramesInDspId[0], &ipcFramesInDspPrm[0], sizeof(ipcFramesInDspPrm[0]));
    System_linkCreate(dspAlgId[0] , &dspAlgPrm[0], sizeof(dspAlgPrm[0]));

    if (enableVideoFrameExport)
    {
        System_linkCreate(gVdisModuleContext.ipcFramesOutHostId     , &ipcFramesOutHostPrm    , sizeof(ipcFramesOutHostPrm));
        System_linkCreate(gVdisModuleContext.ipcFramesInVpssFromHostId     , &ipcFramesInVpssFromHostPrm    , sizeof(ipcFramesInVpssFromHostPrm));
        System_linkCreate(gMultiCh_VdecVdisObj.mergeId,&mergePrm,sizeof(mergePrm));
    }

    System_linkCreate(gMultiCh_VdecVdisObj.mpSclrId, &mpSclrPrm, sizeof(mpSclrPrm));
    System_linkCreate(gMultiCh_VdecVdisObj.dupId     , &dupPrm    , sizeof(dupPrm));

    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
        System_linkCreate(gVdisModuleContext.swMsId[i]  , &swMsPrm[i], sizeof(swMsPrm[i]));

    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
        System_linkCreate(gVdisModuleContext.displayId[i], &displayPrm[i], sizeof(displayPrm[i]));

    MultiCh_memPrintHeapStatus();
    gMultiCh_VdecVdisObj.enableVideoFrameExport = enableVideoFrameExport;
    {
        MultiCh_setDec2DispMap(VDIS_DEV_HDMI,gVdecModuleContext.vdecConfig.numChn,0,0);
        #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
        MultiCh_setDec2DispMap(VDIS_DEV_SD,gVdecModuleContext.vdecConfig.numChn,0,0);
        #else
        MultiCh_setDec2DispMap(VDIS_DEV_HDCOMP,gVdecModuleContext.vdecConfig.numChn,0,0);
        #endif
   }

}

Void MultiCh_deleteVdecVdis()
{
    Bool tilerEnable;

    tilerEnable  = FALSE;

    /* delete can be done in any order */
    Vdec_delete();
    Vdis_delete();

    if (gMultiCh_VdecVdisObj.enableVideoFrameExport)
    {
        System_linkDelete(gMultiCh_VdecVdisObj.mergeId);
    }

    System_linkDelete(gMultiCh_VdecVdisObj.mpSclrId);
    System_linkDelete(gMultiCh_VdecVdisObj.dupId);
    System_linkDelete(gMultiCh_VdecVdisObj.ipcOutVideoId );
    System_linkDelete(gMultiCh_VdecVdisObj.ipcInVpssId );

    /* Print the HWI, SWI and all tasks load */
    /* Reset the accumulated timer ticks */
    MultiCh_prfLoadCalcEnable(FALSE, TRUE, FALSE);


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

        bucketRes.minResolution = SYSTEM_TILER_RESOLUTION_CIF;
        bucketRes.setSingleBucketGeometry = TRUE;
        SystemTiler_setBucketGeometry(&bucketRes);
    }

}

 

error:

after run ,it print error:

 35400: Assertion @ Line: 235 in links_common/ipcFramesOut/ipcFramesOutLink_tsk.c: pObj->createArgs.baseCreateParams.inQueParams.prevLinkQueId < pObj->inQueInfo.numQue : failed !!!
 
where need i modify the code.thanks best regards.
  • ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkQueId = ipcInVpssPrm.numOutQue; //

    Code abovd is wrong.prevLinkQueId should be 0

  • thanks but the error is the prelinkqueid
  • thanks but the error is the prelinkqueid
  • thanks for reply

    but the error is  prevLinkQueId < pObj->inQueInfo.numQue ,the value of ipcInVpssPrm.numOutQue is 1,if i modify to 0,is it must be the  prevLinkQueId < pObj->inQueInfo.numQue,is it?

    best regards.help hearing from your answer.

  • I don't understand your question. As I mentioned your code is wrong.

    ipcInVpssPrm has 1 output queue with outputQueId as 0.

    So  ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkQueId should be 0.You are setting it wrongly to 1.

     

  • thanks for your reply.

    my meaning is the error is:  prevLinkQueId <pObj->inQueInfo.numQue    < 

    my original code is:set the prevLinkQueId  to  ipcInVpssPrm.numOutQue,its value is 1;

    you told me to modify it to 0, 0<1,so it must be the same error.

    i have modified it to 0 as you said,then it is the same error.

    best regards

  • The condition is an assert check. Assert check means it validates tested condition is true.

    If true no error will be reported. If false assert will fail and execution will stop.

    If you correctly set prevLinkQueId to 0 prevLinkQueId <pObj->inQueInfo.numQue     condition will be satisfied and no error will be triggered.

     

    You will not get same assert unless your prevLinkId is also wrongly set.

  • thanks

    your meaning is, if the satisfy the prevLinkQueId<pObj->inQueInfo.numQue ,then there will be no error

    if it does not satisfy the  prevLinkQueId<pObj->inQueInfo.numQue ,then there will be error.

    is it??

    but i have modified the prevLinkQueId to 0 as you saied,there is the same error.why?it there other error in my code.please help me.

    best regards.

  • Share the full application logs from start of your app. Also add Vps_printf in

    /dvr_rdk/mcfw/src_bios6/links_common/ipcFramesOut/ipcFramesOutLink_tsk.c

    IpcFramesOutLink_create

    after line

     memcpy(&pObj->createArgs, pPrm, sizeof(pObj->createArgs));

    and print the createArgs including prevLinkId and prevLinkQueId and share the logs.

     

     

  • hi. thanks for your help.

    the code is as the first above.

    the log is:

     _____                    _____           _         _  
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
                  |___|                    |___|           

    Arago Project http://arago-project.org dm816x ttyO2

    Arago 2012.10 dm816x ttyO2

    dm816x login: root
    root@dm816x:~# cd /opt/dvr_rdk/ti816x
    root@dm816x:/opt/dvr_rdk/ti816x# ./init.sh
    *** Bootargs Validated for mem param ***
    *** Bootargs Validated for notifyk.vpssm3 params ***
    *** Kernel Base address validated ***
    Kernel bootargs validated
    numid=101,iface=MIXER,name='Left DAC Mux'
      ; type=ENUMERATED,access=rw------,values=1,items=3
      ; Item #0 'DAC_L1'
      ; Item #1 'DAC_L3'
      ; Item #2 'DAC_L2'
      : values=2
    numid=99,iface=MIXER,name='Right DAC Mux'
      ; type=ENUMERATED,access=rw------,values=1,items=3
      ; Item #0 'DAC_R1'
      ; Item #1 'DAC_R3'
      ; Item #2 'DAC_R2'
      : values=2
     [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
     [m3video] Remote Debug Shared Memory @ 0xbf010820
     [m3vpss ] Remote Debug Shared Memory @ 0xbf021040
    SysLink version : 2.20.02.20
    SysLink module created on Date:Apr  4 2014 Time:01:57:58
    Trace enabled
    Trace SetFailureReason enabled
     Setting DMM priority for [DUCATI  ] to [0] ( 0x4e000624 = 0x08000000 )
     Setting DMM priority for [HDVICP0 ] to [2] ( 0x4e000634 = 0x0000000a )
     Setting DMM priority for [HDVICP1 ] to [2] ( 0x4e000634 = 0x000a0000 )
     Setting DMM priority for [HDVICP2 ] to [2] ( 0x4e000634 = 0x00a00000 )
     
     *** TVP5158 probe : START ***
     
     TI VS EVM : TVP5158 device address : 0x58, 0x5a, 0x5c, 0x5e
     TI DVR    : TVP5158 device address : 0x5c, 0x5d, 0x5e, 0x5f
     
     Device found     : I2C (0xXX): 0x08 = 0x51
                        I2C (0xXX): 0x09 = 0x58
     
     Device NOT found : I2C (0xXX): Read ERROR !!! (reg[0x08], count = 2)
     
     I2C (0x58): Read ERROR !!! (reg[0x08], count = 2)
     I2C (0x5a): Read ERROR !!! (reg[0x08], count = 2)
     I2C (0x5c): 0x08 = 0x00
     I2C (0x5c): 0x09 = 0x00
     I2C (0x5d): 0x08 = 0x00
     I2C (0x5d): 0x09 = 0x00
     I2C (0x5e): Read ERROR !!! (reg[0x08], count = 2)
     I2C (0x5f): Read ERROR !!! (reg[0x08], count = 2)
     
     *** TVP5158 probe : END ***
     
    /opt/dvr_rdk/ti816x
    root@dm816x:/opt/dvr_rdk/ti816x# ./load.sh
    Attached to slave procId 2.
    Loaded file ../firmware/dvr_rdk_fw_m3vpss_1024M_156M.xem3 on slave procId 2.
    Started slave procId 2.
    After Ipc_loadcallback status [0x00000000]
     [m3vpss ] ***** VPSS Firmware build time 00:23:30 Apr 15 2014  EDG gcc 3.0 mode
     [m3vpss ] ***** SYSTEM  : Frequency <ORG> - 250000000, <NEW> - 246857136
     [m3vpss ] notify_attach  rtnVal  0
     [m3vpss ] initProxyServer  rtnVal  0
     [m3vpss ] 
     [m3vpss ]  *** UTILS: CPU KHz = 493714 Khz ***
     [m3vpss ] 
     [m3vpss ]  38: SYSTEM  : System Common Init in progress !!!
     [m3vpss ]  38: SYSTEM: IPC init in progress !!!
     [m3vpss ]  38: SYSTEM: Attaching to [HOST] ...
     [m3vpss ]  41: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
    After Ipc_startcallback status [0x00000000]
    Attached to slave procId 1.
    Loaded file ../firmware/dvr_rdk_fw_m3video_1024M_156M.xem3 on slave procId 1.
    Started slave procId 1.
    After Ipc_loadcallback status [0x00000000]
     [m3video] ***** VIDEO Firmware build time 00:24:42 Apr 15 2014  EDG gcc 3.0 mode
     [m3video] ***** SYSTEM  : Frequency <ORG> - 250000000, <NEW> - 246857136
     [m3video] 
     [m3video]  *** UTILS: CPU KHz = 493714 Khz ***
     [m3video] 
     [m3video]  277: SYSTEM  : System Common Init in progress !!!
     [m3video]  277: SYSTEM: IPC init in progress !!!
     [m3video]  277: SYSTEM: Attaching to [HOST] ...
     [m3video]  281: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
    After Ipc_startcallback status [0x00000000]
    Attached to slave procId 0.
    Loaded file ../firmware/dvr_rdk_fw_c6xdsp_1024M_156M.xe674 on slave procId 0.
    Started slave procId 0.
    After Ipc_loadcallback status [0x00000000]
    After Ipc_startcallback status [0x00000000]
     [c6xdsp ] ***** VIDEO Firmware build time 00:21:40 Apr 15 2014  EDG gcc 3.0 mode
     [m3video]  401: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
     [c6xdsp ] ***** SYSTEM  : Frequency <ORG> - 800000000, <NEW> - 813176448
     [c6xdsp ]  Zhao: ObjDetectTSKhandle Create success !!!
     [c6xdsp ] 
     [c6xdsp ]  *** UTILS: CPU KHz = 813176 Khz ***
     [c6xdsp ] 
     [c6xdsp ]  5: SYSTEM  : System Common Init in progress !!!
     [c6xdsp ]  5: SYSTEM: IPC init in progress !!!
     [c6xdsp ]  5: SYSTEM: Attaching to [HOST] ...
     [c6xdsp ]  9: SYSTDMA: Module install successful, device major num = 251
    EM: Attaching toDRV: Module install successful
     [HOST] ... SUCCDRV: Module built on Apr  4 2014 01:58:36
    ESS !!!
     [c6xdsp ]  11: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
     [c6xdsp ]  12: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
     [m3video]  403: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
     [m3vpss ]  402: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
     [c6xdsp ]  13: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_0] ...
     [m3video]  403: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_1] ...
     [m3vpss ]  403: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
     [c6xdsp ]  13: SYSTEM: Creating MsgQ [DSP_MSGQ] ...
     [m3video]  404: SYSTEM: Creating MsgQ [VIDEO-M3_MSGQ] ...
     [m3vpss ]  403: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_2] ...
     [c6xdsp ]  13: SYSTEM: Creating MsgQ [DSP_ACK_MSGQ] ...
     [m3video]  404: SYSTEM: Creating MsgQ [VIDEO-M3_ACK_MSGQ] ...
     [m3vpss ]  404: SYSTEM: Creating MsgQ [VPSS-M3_MSGQ] ...
     [c6xdsp ]  13: SYSTEM: Notify register to [HOST] line 0, event 15 ...
     [m3video]  406: SYSTEM: Notify register to [HOST] line 0, event 15 ...
     [m3vpss ]  404: SYSTEM: Creating MsgQ [VPSS-M3_ACK_MSGQ] ...
     [c6xdsp ]  13: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
     [m3video]  406: SYSTEM: Notify register to [DSP] line 0, event 15 ...
     [m3vpss ]  406: SYSTEM: Notify register to [HOST] line 0, event 15 ...
     [c6xdsp ]  13: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
     [m3video]  406: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
     [m3vpss ]  406: SYSTEM: Notify register to [DSP] line 0, event 15 ...
     [c6xdsp ]  13: SYSTEM: IPC init DONE !!!
     [m3video]  406: SYSTEM: IPC init DONE !!!
     [m3vpss ]  406: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
     [c6xdsp ]  16: MEM: Shared Region 2: Base = 0xae000000, Length = 0x109c0000 (265 MB)
     [m3vpss ]  406: SYSTEM: IPC init DONE !!!
     [c6xdsp ]  16: MEM: ERROR: SharedRegion_setEntry (2, 0x9a212abc) FAILED !!!  (status=-1)
     [m3vpss ]  412: MEM: Shared Region 2: Base = 0xae000000, Length = 0x109c0000 (265 MB)
     [m3video]  413: MEM: Shared Region 2: Base = 0xae000000, Length = 0x109c0000 (265 MB)
     [m3vpss ]  413: MEM: Shared Region 1: Base = 0x89c00000, Length = 0x0c900000 (201 MB)
     [m3video]  413: MEM: Shared Region 1: Base = 0x89c00000, Length = 0x0c900000 (201 MB)
     [m3vpss ]  415: SYSTEM  : System Common Init Done !!!
     [m3video]  415: SYSTEM  : System Common Init Done !!!
     [m3vpss ]  415: SYSTEM  : System VPSS Init in progress !!!
     [m3video]  415: SYSTEM  : System Video Init in progress !!!
     [m3vpss ]  415: SYSTEM: All VPDMA Free !!!
     [m3video]  415: SYSTEM  : System Video Init Done !!!
     [m3vpss ] === HDVPSS Clocks are enabled ===
     [m3video]  415: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_0] in region 0 ...
     [m3vpss ] === HDVPSS is fully functional ===
     [m3video]  416: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_0] in region 0 ...
     [m3vpss ] === HDVPSS module is not in standby ===
     [m3video]  416: SYSTEM: ListElem Shared Addr = 0xbf273e00
     [m3video]  418: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_1] in region 0 ...
     [m3video]  418: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_1] in region 0 ...
     [m3video]  418: SYSTEM: ListElem Shared Addr = 0xbf277300
     [m3video]  425: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_19] in region 0 ...
     [m3vpss ] === I2C1 Clk is active ===
     [m3video]  425: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_19] in region 0 ...
     [m3vpss ]  424: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_0] in region 0 ...
     [m3video]  425: SYSTEM: ListElem Shared Addr = 0xbf27dd00
     [m3vpss ]  425: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_0] in region 0 ...
     [m3video]  428: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_20] in region 0 ...
     [m3vpss ]  425: SYSTEM: ListElem Shared Addr = 0xbf27ab00
     [m3video]  428: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_20] in region 0 ...
     [m3vpss ]  427: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_1] in region 0 ...
     [m3video]  428: SYSTEM: ListElem Shared Addr = 0xbf2a6a00
     [m3vpss ]  428: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_1] in region 0 ...
     [m3video]  431: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_21] in region 0 ...
     [m3vpss ]  428: SYSTEM: ListElem Shared Addr = 0xbf2a3780
     [m3video]  431: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_21] in region 0 ...
     [m3vpss ]  443: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_19] in region 0 ...
     [m3video]  431: SYSTEM: ListElem Shared Addr = 0xbf2cc200
     [m3vpss ]  443: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_19] in region 0 ...
     [m3video]  446: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_24] in region 0 ...
     [m3vpss ]  444: SYSTEM: ListElem Shared Addr = 0xbf2f1a00
     [m3video]  446: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_24] in region 0 ...
     [m3vpss ]  446: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_20] in region 0 ...
     [m3video]  447: SYSTEM: ListElem Shared Addr = 0xbf317500
     [m3vpss ]  447: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_20] in region 0 ...
     [m3video]  449: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_25] in region 0 ...
     [m3vpss ]  447: SYSTEM: ListElem Shared Addr = 0xbf334d00
     [m3video]  449: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_25] in region 0 ...
     [m3vpss ]  450: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_21] in region 0 ...
     [m3video]  449: SYSTEM: ListElem Shared Addr = 0xbf35a500
     [m3vpss ]  450: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_21] in region 0 ...
     [m3video]  451: HDVICP: Doing PRCM for IVAHD[0] ...
     [m3vpss ]  450: SYSTEM: ListElem Shared Addr = 0xbf378000
     [m3video]  451: HDVICP: PRCM for IVAHD[0] ... DONE.
     [m3vpss ]  452: SYSTEM : HDVPSS Drivers Version: HDVPSS_01_00_01_37
     [m3video]  451: HDVICP: Doing PRCM for IVAHD[1] ...
     [m3vpss ]  452: SYSTEM  : FVID2 Init in progress !!!
     [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
     [m3video] Remote Debug Shared Memory @ 0xbf010820
     [m3vpss ] Remote Debug Shared Memory @ 0xbf021040
     [m3vpss ] Received character 's'
     [m3video]  452: HDVICP: PRCM for IVAHD[1] ... DONE.
     [m3video]  452: HDVICP: Doing PRCM for IVAHD[2] ...
     [m3video]  452: HDVICP: PRCM for IVAHD[2] ... DONE.
     [m3video]  452: SYSTEM  : Initializing Links !!!
     [m3vpss ] TILER_STATS: CNT :8BIT
     [m3video]  452: SYSTEM  : FREE SPACE : System Heap      = 6279304 B, Mbx = 10240 msgs)
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 8192
     [m3video]  453: SYSTEM  : FREE SPACE : SR0 Heap         = 12987904 B (12 MB)
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 8188
     [m3video]  453: SYSTEM  : FREE SPACE : Frame Buffer     = 278658944 B (265 MB)
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3video]  453: SYSTEM  : FREE SPACE : Bitstream Buffer = 210763648 B (200 MB)
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3video]  453: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
     [m3video]  455: SYSTEM  : FREE SPACE : Tiler 8-bit      = 134152192 B (127 MB)  - TILER ON
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   134152192 (99 %)
     [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
     [m3video] Remote Debug Shared Memory @ 0xbf010820
     [m3vpss ] Remote Debug Shared Memory @ 0xbf021040
     [m3video] Received character 's'
     [m3video]  455: SYSTEM  : FREE SPACE : Tiler 16-bit     = 100663296 B (96 MB)  - TILER ON
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
     [m3video] Remote Debug Shared Memory @ 0xbf010820
     [m3vpss ] Remote Debug Shared Memory @ 0xbf021040
     [m3video]  493: SYSTEM  : Initializing Links ... DONE !!!
     [m3vpss ] TILER_STATS: CNT :16BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 3072
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 3072
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   100663296 (100 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ]  525: SYSTEM  : FVID2 Init in progress DONE !!!
     [m3vpss ]  525: SYSTEM  : Device Init in progress !!!
     [m3vpss ]  528: SYSTEM  : Device Init in progress DONE !!!
     [m3vpss ]  572: SYSTEM  : System VPSS Init Done !!!
     [m3vpss ]  573: UTILS: DMA: HWI Create for INT63 !!!
     [m3vpss ]  574: SYSTEM  : Initializing Links !!!
     [m3vpss ]  574: SYSTEM  : FREE SPACE : System Heap      = 74000 B, Mbx = 10240 msgs)
     [m3vpss ]  574: SYSTEM  : FREE SPACE : SR0 Heap         = 12987904 B (12 MB)
     [m3vpss ]  574: SYSTEM  : FREE SPACE : Frame Buffer     = 274348928 B (261 MB)
     [m3vpss ]  574: SYSTEM  : FREE SPACE : Bitstream Buffer = 210763648 B (200 MB)
     [m3vpss ] TILER_STATS: CNT :8BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    16384 x 8192
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 16384 x 8188
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   134152192 (99 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ] TILER_STATS: CNT :16BIT
     [m3vpss ] TILER_STATS: CNT RESOLUTION:    32768 x 3072
     [m3vpss ] TILER_STATS: BUCKET RESOLUTION: 32768 x 3072
     [m3vpss ] TILER_STATS: NUM FREE BUCKETS:  1
     [m3vpss ] TILER_STATS: NUM USED BUCKETS:  0
     [m3vpss ] TILER_STATS: TOTAL FREE AREA:   100663296 (100 %)
     [m3vpss ] TILER_STATS: TOTAL USED AREA:   0 (0 %)
     [m3vpss ]  576: SYSTEM  : FREE SPACE : Tiler 8-bit      = 134152192 B (127 MB)  - TILER ON
     [m3vpss ]  576: SYSTEM  : FREE SPACE : Tiler 16-bit     = 100663296 B (96 MB)  - TILER ON
     [m3vpss ]  702: SYSTEM  : Initializing Links ... DONE !!!
     [m3vpss ]  702: SYSTEM  : Set Static L3 pressure for HDVPSS as High
     [c6xdsp ]  1023: MEM: Shared Region 1: Base = 0x89c00000, Length = 0x0c900000 (201 MB)
     [c6xdsp ]  1023: SYSTEM  : System Common Init Done !!!
     [c6xdsp ]  1010: SYSTEM  : System DSP Init in progress !!!
     [c6xdsp ]  1010: SYSTEM  : RpeServer_init() done... Ret Val 0!!!
     [c6xdsp ]  1026: SYSTEM: Creating ListMP [DSP_IPC_OUT_19] in region 0 ...
     [c6xdsp ]  1026: SYSTEM: Creating ListMP [DSP_IPC_IN_19] in region 0 ...
     [c6xdsp ]  1026: SYSTEM: ListElem Shared Addr = 0xbf39d800
     [c6xdsp ]  1026: SYSTEM: Creating ListMP [DSP_IPC_OUT_20] in region 0 ..[module] vpss probe done.
    .
     [c6xdsp ]  1027: SYSTEM: Creating ListMP [DSP_IPC_IN_20] in region 0 ...
     [c6xdsp ]  1027: SYSTEM: ListElem Shared Addr = 0xbf3c3000
     [c6xdsp ]  1027: SYSTEM: Creating ListMP [DSP_IPC_OUT_21] in region 0 ...
     [c6xdsp ]  1027: SYSTEM: Creating ListMP [DSP_IPC_IN_21] in region 0 ...
     [c6xdsp ]  1027: SYSTEM: ListElem Shared Addr[module] ti81xxfb probe done.
     = 0xbf3e8800
     [c6xdsp ]  1028: SYSTEM: Creating ListMP [DSP_IPC_OUT_24] in region 0 ...
     [c6xdsp ]  1028: SYSTEM: Creating ListMP [DSP_IPC_IN_24] in region 0 ...
     [c6xdsp ]  1028: SYSTEM: ListElem Shared Addr = 0xbf40e000
     [c6xdsp ]  1029: SYSTEM: CreHDMI W1 rev 2.0
    ating ListMP [DSHDMI CEC Spec version 1.2
    P_IPC_OUT_25] in region 0 ...
     [c6xdsp ]  1029: SYSTEM: Creating ListMP [DSP_IPC_IN_25] in region 0 ...
     [c6xdsp ]  1029: SYSTEM: ListElem Shared Addr = 0xbf42bb00
     [c6xdsp ] !!WARNING.Resource already registered:2
     [c6xdsp ]  1016: SYSTEM  : Initializing Links !!!
     [c6xdsp ] Received character 's'
    /opt/dvr_rdk/ti816x
     [c6xdsp ]  1029: SYSTEM  : FREE SPACE : System Heap      = 10374632 B, Mbx = 10240 msgs)
     [c6xdsp ] ------yzj_call AlgLink_init
     [c6xdsp ]  1026: SYSTEM  : Initializing Links ... DONE !!!
     [c6xdsp ]  ETH_OFFLOAD: Init !!!
     [c6xdsp ]  1026: SYSTEM  : System DSP Init Done !!!
     
     ORG 0x46c00524: 0
     NEW 0x46c00524: 2
     
    root@dm816x:/opt/dvr_rdk/ti816x# ./run.sh
    short=2short=2short=1short=14 ========= Main Menu ========= 1: VCAP + VENC + VDEC + VDIS  - Progressive SD Encode + Decode 2: VCAP + VENC        + VDIS  - SD Encode ONLY 3: VCAP + VENC + VDEC + VDIS  - Progressive HD Encode + Decode 4:               VDEC + VDIS  - SD/HD Decode ONLY a: 960H DVR usecase e: Exit Enter Choice: 4
     
     Sample ini files available in ./demo_ini folder.
     Enter the .ini filename with full path : demo_ini/demo.ini
     *** a new param codec is needed for ini, if you not sure about this
     *** please reference demo_ini/704x576_02_32CH.ini
     *** H264:  codec = h264
     *** MPEG4: codec = mpeg4
     *** MJPEG: codec = mjpeg
     *** Four new params numbuf ,displaydelay,tilerEnable,fieldPicture has been added for ini, if not defaults are set
     
     *** Generate header files ***
     
     This will take very long time if the file is large.
     - For first time you MUST select YES.
     - If you already have the header file on disk, you can select NO.
     
     Do you want to generate header ? (YES - y, NO - n) : n
     
     0: Opening file [/opt/dvr_rdk/ti816x/dm816x_1080p_demo.264] of 704 x 480  Codec: h264...
    gVdecVdis_config.numChannels : 1 gVdecVdis_config.chBufSize[0] : 337920
     File open ... DONE !!!
     
    --------------- CHANNEL DETAILS-------------
    Dec Channels => 1
    Disp Channels => 1
    -------------------------------------------
     0: SYSTEM: System Common Init in progress !!!
     0: SYSTEM: IPC init in progress !!!
     14: SYSTEM: CPU [DSP] syslink proc ID is [0] !!!
     14: SYSTEM: CPU [VIDEO-M3] syslink proc ID is [1] !!!
     14: SYSTEM: CPU [VPSS-M3] syslink proc ID is [2] !!!
     14: SYSTEM: CPU [HOST] syslink proc ID is [3] !!!
     14: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP_3] ...
     17: SYSTEM: Creating MsgQ [HOST_MSGQ] ...
     19: SYSTEM: Creating MsgQ [HOST_ACK_MSGQ] ...
     21: SYSTEM: Opening MsgQ [DSP_MSGQ] ...
     21: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
     22: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
     23: SYSTEM: Notify register to [DSP] line 0, event 15 ...
     24: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
     24: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
     25: SYSTEM: IPC init DONE !!!
     26: SYSTEM: Creating ListMP [HOST_IPC_OUT_24] in region 0 ...
     29: SYSTEM: Creating ListMP [HOST_IPC_IN_24] in region 0 ...
     30: SYSTEM: ListElem Shared Addr = 0x40ea5880
     31: SYSTEM: Creating ListMP [HOST_IPC_OUT_25] in region 0 ...
     34: SYSTEM: Creating ListMP [HOST_IPC_IN_25] in region 0 ...
     36: SYSTEM: ListElem Shared Addr = 0x40edaa80
     37: SYSTEM: Creating ListMP [HOST_IPC_OUT_19] in region 0 ...
     40: SYSTEM: Creating ListMP [HOST_IPC_IN_19] in region 0 ...
     41: SYSTEM: ListElem Shared Addr = 0x40f0fc80
     42: SYSTEM: Creating ListMP [HOST_IPC_OUT_20] in region 0 ...
     45: SYSTEM: Creating ListMP [HOST_IPC_IN_20] in region 0 ...
     47: SYSTEM: ListElem Shared Addr = 0x40f52f80
     48: SYSTEM: Creating ListMP [HOST_IPC_OUT_21] in region 0 ...
     50: SYSTEM: Creating ListMP [HOST_IPC_IN_21] in region 0 ...
     52: SYSTEM: ListElem Shared Addr = 0x40f96280
     70: SYSTEM: System Common Init Done !!!
    ch[0], h264
     [host] HDMI Ctrl :Initializing
     [host] HDMI Ctrl :Initialized
     [host] HDMI Ctrl :Sink Connected
     126: MCFW  : CPU Revision [ES1.1] !!!

     [host]  128: IPC_BITS_OUT   : Create in progress !!!


     [host] IPC_BITSOUT:BitBuffer Alloc.ChID:0,Size:0x19C800

     [host] ******* RingBuf 0 created ********


     [host] IPCBITSOUTLINK:Translated Addr Virt:0x48661080 To Phy:0x89c00080

     [host]
    ###Bit buff of size from the SR # 1 : 1689600 / bufsize 337920, maxQueueDepth 50


     [host] ###Bit buff BasePtr: 48661080 / PhyAddr 89C00080


     [host]  130: IPC_BITS_OUT   : Create Done !!!
     [m3video]  21215: IPC_BITS_IN   : Create in progress !!!
     [m3video]  21215: SYSTEM: Opening ListMP [HOST_IPC_OUT_24] ...
     [m3video]  21215: SYSTEM: Opening ListMP [HOST_IPC_IN_24] ...
     [m3video]  21216: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
     [m3video]  21218: IPC_BITS_IN   : Create Done !!!
     [m3video]  21218: DECODE: Create in progress ... !!!
     [m3video] DECLINK_H264:HEAPID:0 USED:4264
     [m3video] DECLINK_H264:HEAPID:3 USED:4444160
     [m3video]  21320: DECODE: Creating CH0 of 704 x 480 [PROGRESSIVE] [NON-TILED  ],target bitrate = 2000 Kbps ...
     [m3video]  21322: DECODE: All CH Create ... DONE !!!
     [m3vpss ]  21326: IPC_IN_M3   : Create in progress !!!
     [m3vpss ]  21327: SYSTEM: Opening ListMP [VIDEO-M3_IPC_OUT_0] ...
     [m3video] DECLINK:HEAPID:0 USED:4384
     [m3vpss ]  21327: SYSTEM: Opening ListMP [VIDEO-M3_IPC_IN_0] ...
     [m3video] DECLINK:HEAPID:3 USED:18894848
     [m3vpss ]  21327: SYSTEM: Opening MsgQ [VIDEO-M3_MSGQ] ...
     [m3video]  21325: DECODE: Create ... DONE !!!
     [m3vpss ]  21329: IPC_IN_M3   : Create Done !!!
     [m3video]  21325: IPC_OUT_M3   : Create in progress !!!
     [m3vpss ]  21330: IPC_FRAMES_OUT   : Create in progress !!!
     [m3video]  21326: IPC_OUT_M3   : Create Done !!!
     [m3vpss ] pObj->createArgs.baseCreateParams.inQueParams.prevLinkQueId is 0,pObj->inQueInfo.numQue is 0
     [m3vpss ] pObj->createArgs.baseCreateParams.inQueParams.prevLinkQueId is 0,pObj->inQueInfo.numQue is 0
     [m3vpss ]  21332: Assertion @ Line: 237 in links_common/ipcFramesOut/ipcFramesOutLink_tsk.c: pObj->createArgs.baseCreateParams.inQueParams.prevLinkQueId < pObj->inQueInfo.numQue : failed !!!

  • numQue cannot be zero. It means either previous link is not created or it is wrongly configured.

    Pls invoke System_linkGetInfo after each link create and print the paramters for each link and check which link has 0 output queue.

  • in multich_vdec_vdis.c

    i configure the link in the below codes.is there error somewhere?thanks for your help.

    Void MultiCh_createVdecVdis()
    {
    IpcBitsOutLinkHLOS_CreateParams ipcBitsOutHostPrm;
    IpcBitsInLinkRTOS_CreateParams ipcBitsInVideoPrm;
    DecLink_CreateParams decPrm;
    IpcLink_CreateParams ipcOutVideoPrm;
    IpcLink_CreateParams ipcInVpssPrm;
    DupLink_CreateParams dupPrm;
    static SwMsLink_CreateParams swMsPrm[VDIS_DEV_MAX];
    DisplayLink_CreateParams displayPrm[VDIS_DEV_MAX];
    IpcFramesOutLinkHLOS_CreateParams ipcFramesOutHostPrm;
    IpcFramesInLinkRTOS_CreateParams ipcFramesInVpssFromHostPrm;
    MergeLink_CreateParams mergePrm;
    MpSclrLink_CreateParams mpSclrPrm;

    UInt32 i;
    UInt32 enableGrpx;
    Bool tilerEnable;
    Bool enableVideoFrameExport;

    //yzj
    IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm[1];
    IpcFramesInLinkRTOS_CreateParams ipcFramesInDspPrm[1];
    AlgLink_CreateParams dspAlgPrm[1];

    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcInVpssPrm);
    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcOutVideoPrm);
    MULTICH_INIT_STRUCT(IpcBitsOutLinkHLOS_CreateParams,ipcBitsOutHostPrm);
    MULTICH_INIT_STRUCT(IpcBitsInLinkRTOS_CreateParams,ipcBitsInVideoPrm);
    MULTICH_INIT_STRUCT(DecLink_CreateParams, decPrm);
    MULTICH_INIT_STRUCT(IpcFramesOutLinkHLOS_CreateParams ,ipcFramesOutHostPrm);
    MULTICH_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams ,ipcFramesInVpssFromHostPrm);

    //yzj
    MULTICH_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams,ipcFramesOutVpssPrm[0]);
    MULTICH_INIT_STRUCT(IpcFramesInLinkRTOS_CreateParams,ipcFramesInDspPrm[0]);
    MULTICH_INIT_STRUCT(AlgLink_CreateParams, dspAlgPrm[0]);

    for (i = 0; i < VDIS_DEV_MAX;i++)
    {
    MULTICH_INIT_STRUCT(DisplayLink_CreateParams,displayPrm[i]);
    MULTICH_INIT_STRUCT(SwMsLink_CreateParams ,swMsPrm[i]);
    }

    MULTICH_INIT_STRUCT(MpSclrLink_CreateParams, mpSclrPrm);

    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 defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    enableGrpx = FALSE;
    #else
    enableGrpx = FALSE;//TRUE;
    #endif

    tilerEnable = FALSE;

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

    bucketRes.bucketWidth = SYSTEM_TILER_ALLOCATOR_BUCKET_WIDTH_DEFAULT;
    bucketRes.bucketHeight = SYSTEM_TILER_ALLOCATOR_BUCKET_HEIGHT_DEFAULT;
    bucketRes.minResolution = SYSTEM_TILER_RESOLUTION_CIF;
    bucketRes.setSingleBucketGeometry = FALSE;
    SystemTiler_setBucketGeometry(&bucketRes);
    }

    enableVideoFrameExport = FALSE;

    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;

    gMultiCh_VdecVdisObj.ipcOutVideoId = SYSTEM_VIDEO_LINK_ID_IPC_OUT_M3_0;
    gMultiCh_VdecVdisObj.ipcInVpssId = SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0;
    gMultiCh_VdecVdisObj.dupId = SYSTEM_VPSS_LINK_ID_DUP_0;
    gMultiCh_VdecVdisObj.mpSclrId = SYSTEM_LINK_ID_MP_SCLR_INST_0;
    gVdisModuleContext.mpSclrId = SYSTEM_LINK_ID_MP_SCLR_INST_0;
    gVdisModuleContext.swMsId[0] = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0;

    gVdisModuleContext.displayId[0] = SYSTEM_LINK_ID_DISPLAY_0; // ON AND OFF CHIP HDMI

    //yzj
    dspAlgId[0] = SYSTEM_LINK_ID_ALG_0;
    ipcFramesOutVpssId[0] = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;
    ipcFramesInDspId[0] = SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0;

    if (gVsysModuleContext.vsysConfig.numDisplays > 1)
    {
    gVdisModuleContext.swMsId[1] = SYSTEM_LINK_ID_SW_MS_MULTI_INST_1;
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    gVdisModuleContext.displayId[1] = SYSTEM_LINK_ID_DISPLAY_2; // SDTV
    #else
    gVdisModuleContext.displayId[1] = SYSTEM_LINK_ID_DISPLAY_1; // OFF CHIP HDMI
    #endif
    }

    if (enableVideoFrameExport)
    {
    gMultiCh_VdecVdisObj.mergeId = SYSTEM_VPSS_LINK_ID_MERGE_0;
    gVdisModuleContext.ipcFramesOutHostId = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
    gVdisModuleContext.ipcFramesInVpssFromHostId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_IN_0;
    }

    if(enableGrpx)
    {
    // GRPX is enabled in Vdis_start() based on the link ID set here
    gVdisModuleContext.grpxId[0] = SYSTEM_LINK_ID_GRPX_0;
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    gVdisModuleContext.grpxId[1] = SYSTEM_LINK_ID_INVALID;
    #else
    gVdisModuleContext.grpxId[1] = SYSTEM_LINK_ID_GRPX_1;
    #endif
    }

    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;

    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.maxQueueDepth[i] = MAX_BUFFERING_QUEUE_LEN_PER_CH;
    ipcBitsOutHostPrm.chMaxReqBufSize[i] =
    (ipcBitsOutHostPrm.inQueInfo.chInfo[i].width * ipcBitsOutHostPrm.inQueInfo.chInfo[i].height);
    ipcBitsOutHostPrm.totalBitStreamBufferSize [i] =
    (ipcBitsOutHostPrm.chMaxReqBufSize[i] * BIT_BUF_LENGTH_LIMIT_FACTOR_HD);

    }

    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;
    if (gVdecModuleContext.vdecConfig.decChannelParams[i].fieldPicture)
    {
    OSA_printf("MULTICH_VDEC_VDIS:INFO ChId[%d] configured for field picture\n",i);
    decPrm.chCreateParams[i].processCallLevel = VDEC_FIELDLEVELPROCESSCALL;
    }
    else
    {
    decPrm.chCreateParams[i].processCallLevel = VDEC_FRAMELEVELPROCESSCALL;
    }
    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;
    if (FALSE == tilerEnable)
    {
    decPrm.chCreateParams[i].tilerEnable = FALSE;
    }
    else
    {
    decPrm.chCreateParams[i].tilerEnable = gVdecModuleContext.vdecConfig.decChannelParams[i].tilerEnable;
    }
    }

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

    ipcOutVideoPrm.inQueParams.prevLinkId = gVdecModuleContext.decId;
    ipcOutVideoPrm.inQueParams.prevLinkQueId = 0;
    ipcOutVideoPrm.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.ipcInVpssId;
    ipcOutVideoPrm.notifyNextLink = TRUE;
    ipcOutVideoPrm.notifyPrevLink = TRUE;
    ipcOutVideoPrm.numOutQue = 1;

    ipcInVpssPrm.inQueParams.prevLinkId = gMultiCh_VdecVdisObj.ipcOutVideoId;
    ipcInVpssPrm.inQueParams.prevLinkQueId = 0;
    ipcInVpssPrm.notifyNextLink = TRUE;
    ipcInVpssPrm.notifyPrevLink = TRUE;
    ipcInVpssPrm.numOutQue = 1;

    if (enableVideoFrameExport)
    {
    ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
    ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
    ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
    ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutHostPrm.baseCreateParams.numOutQue = 1;
    ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
    MultiCh_setIpcFramesOutInQueInfo(&ipcFramesOutHostPrm.inQueInfo);

    ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
    ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
    ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesInVpssFromHostPrm.baseCreateParams.numOutQue = 1;
    ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.mergeId;


    ipcInVpssPrm.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.mergeId;

    mergePrm.numInQue = 2;
    mergePrm.inQueParams[0].prevLinkId = gMultiCh_VdecVdisObj.ipcInVpssId;
    mergePrm.inQueParams[0].prevLinkQueId = 0;
    mergePrm.inQueParams[1].prevLinkId = gVdisModuleContext.ipcFramesInVpssFromHostId;
    mergePrm.inQueParams[1].prevLinkQueId = 0;

    mergePrm.outQueParams.nextLink = gMultiCh_VdecVdisObj.mpSclrId;
    mergePrm.notifyNextLink = TRUE;
    mpSclrPrm.inQueParams.prevLinkId = gMultiCh_VdecVdisObj.mergeId;
    }
    else
    {

    ipcInVpssPrm.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.mpSclrId;
    mpSclrPrm.inQueParams.prevLinkId = gMultiCh_VdecVdisObj.ipcInVpssId;

    }
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    mpSclrPrm.pathId = MP_SCLR_LINK_SEC0_SC3_VIP0;
    #else
    mpSclrPrm.pathId = MP_SCLR_LINK_SEC1_SC4_VIP1;
    #endif

    mpSclrPrm.numCh = 1;//4;
    mpSclrPrm.enableLineSkip = FALSE;

    mpSclrPrm.outQueParams.nextLink = ipcFramesOutVpssId[0];//gMultiCh_VdecVdisObj.dupId;

    //yzj
    ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkId = gMultiCh_VdecVdisObj.mpSclrId;
    ipcFramesOutVpssPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyPrevLink = TRUE;

    ipcFramesOutVpssPrm[0].baseCreateParams.numOutQue = 1;//应该是1对应3.0 vcap
    ipcFramesOutVpssPrm[0].baseCreateParams.outQueParams[0].nextLink = gMultiCh_VdecVdisObj.dupId;//mergeId;
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyNextLink = TRUE;

    ipcFramesOutVpssPrm[0].baseCreateParams.processLink = ipcFramesInDspId[0];
    ipcFramesOutVpssPrm[0].baseCreateParams.notifyProcessLink = TRUE;
    ipcFramesOutVpssPrm[0].baseCreateParams.noNotifyMode = FALSE;

    dupPrm.inQueParams.prevLinkId = ipcFramesOutVpssId[0];//gMultiCh_VdecVdisObj.mpSclrId;

    //yzj
    //prevLink->processLink->nextLink
    ipcFramesInDspPrm[0].baseCreateParams.inQueParams.prevLinkId = ipcFramesOutVpssId[0];
    ipcFramesInDspPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcFramesInDspPrm[0].baseCreateParams.numOutQue = 1;
    ipcFramesInDspPrm[0].baseCreateParams.outQueParams[0].nextLink = dspAlgId[0];
    ipcFramesInDspPrm[0].baseCreateParams.notifyPrevLink = TRUE;
    ipcFramesInDspPrm[0].baseCreateParams.notifyNextLink = TRUE;
    ipcFramesInDspPrm[0].baseCreateParams.noNotifyMode = FALSE;

    dspAlgPrm[0].inQueParams.prevLinkId = ipcFramesInDspId[0];
    dspAlgPrm[0].inQueParams.prevLinkQueId = 0;

    if(TRUE)
    {
    //int chId;
    dspAlgPrm[0].enableOSDAlg = TRUE;
    dspAlgPrm[0].enableSCDAlg = FALSE;
    dspAlgPrm[0].outQueParams[ALG_LINK_SCD_OUT_QUE].nextLink = SYSTEM_LINK_ID_INVALID;


    // for(chId = 0; chId < ALG_LINK_OSD_MAX_CH; chId++)
    // {
    // AlgLink_OsdChWinParams * chWinPrm = &dspAlgPrm[0].osdChCreateParams[chId].chDefaultParams;
    //
    // /* set osd window max width and height */
    // dspAlgPrm[0].osdChCreateParams[chId].maxWidth = EXAMPLE_OSD_WIN_MAX_WIDTH;
    // dspAlgPrm[0].osdChCreateParams[chId].maxHeight = EXAMPLE_OSD_WIN_MAX_HEIGHT;
    //
    // chWinPrm->chId = chId;
    // chWinPrm->numWindows = 0;
    // }
    }

    dupPrm.inQueParams.prevLinkQueId = ipcFramesOutVpssId[0];//0;
    dupPrm.numOutQue = gVsysModuleContext.vsysConfig.numDisplays;
    dupPrm.outQueParams[0].nextLink = gVdisModuleContext.swMsId[0];
    dupPrm.outQueParams[1].nextLink = gVdisModuleContext.swMsId[1];
    dupPrm.notifyNextLink = TRUE;
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)

    swMsPrm[0].numSwMsInst = 1;
    swMsPrm[0].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_DEIHQ_SC_NO_DEI;

    swMsPrm[0].swMsInstStartWin[0] = 0;
    swMsPrm[0].swMsInstStartWin[1] = 10;

    swMsPrm[1].numSwMsInst = 1;
    swMsPrm[1].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_DEI_SC_NO_DEI;

    swMsPrm[1].swMsInstStartWin[0] = 0;
    swMsPrm[1].swMsInstStartWin[1] = 10;

    swMsPrm[0].enableProcessTieWithDisplay = TRUE;
    swMsPrm[1].enableProcessTieWithDisplay = FALSE;

    /* We do not require dual output, this free up SC3 scalar */
    swMsPrm[0].includeVipScInDrvPath = FALSE;
    swMsPrm[1].includeVipScInDrvPath = FALSE;
    #else
    swMsPrm[0].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_DEI_SC_NO_DEI;
    swMsPrm[0].swMsInstId[1] = SYSTEM_SW_MS_SC_INST_VIP1_SC;

    swMsPrm[1].swMsInstId[0] = SYSTEM_SW_MS_SC_INST_DEIHQ_SC_NO_DEI;
    swMsPrm[1].swMsInstId[1] = SYSTEM_SW_MS_SC_INST_VIP0_SC;

    swMsPrm[0].numSwMsInst = 2;

    swMsPrm[0].swMsInstStartWin[0] = 0;
    swMsPrm[0].swMsInstStartWin[1] = 16;

    swMsPrm[1].numSwMsInst = swMsPrm[0].numSwMsInst;
    swMsPrm[1].swMsInstStartWin[0] = swMsPrm[0].swMsInstStartWin[0];
    swMsPrm[1].swMsInstStartWin[1] = swMsPrm[0].swMsInstStartWin[1];

    swMsPrm[0].enableProcessTieWithDisplay = TRUE;
    swMsPrm[1].enableProcessTieWithDisplay = TRUE;

    #endif
    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
    {
    VDIS_DEV vdDevId = VDIS_DEV_HDMI;

    swMsPrm[i].inQueParams.prevLinkId = gMultiCh_VdecVdisObj.dupId;
    swMsPrm[i].inQueParams.prevLinkQueId = i;
    swMsPrm[i].outQueParams.nextLink = gVdisModuleContext.displayId[i];
    swMsPrm[i].numOutBuf = MULTICH_NUM_SWMS_MAX_BUFFERS;

    /* Disable inQue drop at SwMs as input may arrive very fast in VDEC->VDIS use case */
    swMsPrm[i].maxInputQueLen = SYSTEM_SW_MS_INVALID_INPUT_QUE_LEN;
    if (i == 0)
    {
    vdDevId = VDIS_DEV_HDMI;
    swMsPrm[i].maxOutRes = VSYS_STD_1080P_60;
    swMsPrm[i].initOutRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_HDMI].resolution;
    }
    else if (i == 1)
    {
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    vdDevId = VDIS_DEV_SD;
    swMsPrm[i].maxOutRes = VSYS_STD_PAL;
    swMsPrm[i].outQueParams.nextLink = SYSTEM_LINK_ID_DISPLAY_2;
    swMsPrm[i].initOutRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_SD].resolution;

    #else
    vdDevId = VDIS_DEV_DVO2;
    swMsPrm[i].maxOutRes = VSYS_STD_1080P_60;
    swMsPrm[i].initOutRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_DVO2].resolution;
    #endif
    }
    /* low cost line skip mode of scaling can be used, when tiler is off */
    if(tilerEnable)
    swMsPrm[i].lineSkipMode = FALSE;
    else
    swMsPrm[i].lineSkipMode = TRUE;

    swMsPrm[i].enableLayoutGridDraw = gVdisModuleContext.vdisConfig.enableLayoutGridDraw;

    MultiCh_swMsGetDefaultLayoutPrm(vdDevId, &swMsPrm[i], FALSE); /* both from 0-16 chnl */

    displayPrm[i].inQueParams[0].prevLinkId = gVdisModuleContext.swMsId[i];
    displayPrm[i].inQueParams[0].prevLinkQueId = 0;
    displayPrm[i].displayRes = swMsPrm[i].initOutRes;
    if (i == 1)
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    displayPrm[i].displayRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_SD].resolution;
    #else
    displayPrm[i].displayRes = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_DVO2].resolution;
    #endif
    mulich_vdec_vdis_set_avsync_prm(&gMultiCh_VdecVdisObj.avsyncCfg[i],i,vdDevId);
    }

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

    System_linkCreate(gMultiCh_VdecVdisObj.ipcOutVideoId, &ipcOutVideoPrm, sizeof(ipcOutVideoPrm));
    System_linkCreate(gMultiCh_VdecVdisObj.ipcInVpssId , &ipcInVpssPrm, sizeof(ipcInVpssPrm));

    //yzj
    System_linkCreate(ipcFramesOutVpssId[0], &ipcFramesOutVpssPrm[0], sizeof(ipcFramesOutVpssPrm[0]));
    System_linkCreate(ipcFramesInDspId[0], &ipcFramesInDspPrm[0], sizeof(ipcFramesInDspPrm[0]));
    System_linkCreate(dspAlgId[0] , &dspAlgPrm[0], sizeof(dspAlgPrm[0]));

    if (enableVideoFrameExport)
    {
    System_linkCreate(gVdisModuleContext.ipcFramesOutHostId , &ipcFramesOutHostPrm , sizeof(ipcFramesOutHostPrm));
    System_linkCreate(gVdisModuleContext.ipcFramesInVpssFromHostId , &ipcFramesInVpssFromHostPrm , sizeof(ipcFramesInVpssFromHostPrm));
    System_linkCreate(gMultiCh_VdecVdisObj.mergeId,&mergePrm,sizeof(mergePrm));
    }

    System_linkCreate(gMultiCh_VdecVdisObj.mpSclrId, &mpSclrPrm, sizeof(mpSclrPrm));
    System_linkCreate(gMultiCh_VdecVdisObj.dupId , &dupPrm , sizeof(dupPrm));

    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
    System_linkCreate(gVdisModuleContext.swMsId[i] , &swMsPrm[i], sizeof(swMsPrm[i]));

    for(i=0; i<gVsysModuleContext.vsysConfig.numDisplays; i++)
    System_linkCreate(gVdisModuleContext.displayId[i], &displayPrm[i], sizeof(displayPrm[i]));

    MultiCh_memPrintHeapStatus();
    gMultiCh_VdecVdisObj.enableVideoFrameExport = enableVideoFrameExport;
    {
    MultiCh_setDec2DispMap(VDIS_DEV_HDMI,gVdecModuleContext.vdecConfig.numChn,0,0);
    #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
    MultiCh_setDec2DispMap(VDIS_DEV_SD,gVdecModuleContext.vdecConfig.numChn,0,0);
    #else
    MultiCh_setDec2DispMap(VDIS_DEV_HDCOMP,gVdecModuleContext.vdecConfig.numChn,0,0);
    #endif
    }

    }

    Void MultiCh_deleteVdecVdis()
    {
    Bool tilerEnable;

    tilerEnable = FALSE;

    /* delete can be done in any order */
    Vdec_delete();
    Vdis_delete();

    if (gMultiCh_VdecVdisObj.enableVideoFrameExport)
    {
    System_linkDelete(gMultiCh_VdecVdisObj.mergeId);
    }

    System_linkDelete(gMultiCh_VdecVdisObj.mpSclrId);
    System_linkDelete(gMultiCh_VdecVdisObj.dupId);
    System_linkDelete(gMultiCh_VdecVdisObj.ipcOutVideoId );
    System_linkDelete(gMultiCh_VdecVdisObj.ipcInVpssId );

    /* Print the HWI, SWI and all tasks load */
    /* Reset the accumulated timer ticks */
    MultiCh_prfLoadCalcEnable(FALSE, TRUE, FALSE);


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

    bucketRes.minResolution = SYSTEM_TILER_RESOLUTION_CIF;
    bucketRes.setSingleBucketGeometry = TRUE;
    SystemTiler_setBucketGeometry(&bucketRes);
    }

    }