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.

DVRRDK 1080p encode questions

Other Parts Discussed in Thread: TVP7002

Hi all,
    I test DM8168EMV+DaughterCard based on DVRRDK3.0. The demo run ok for 1080p preview. But now it does not encode. I track the code and find DupLink_tskMain() of m3vpss's DUP1 thread can not get data. But DupLink_tskMain() of DUP0 continues getting SYSTWM_CMD_NEW_DATA. So the preview is ok.
    I think the root cause is capture's link configuration. Below is capture's configuration
        
    capturePrm.outQueParams[0].nextLink = gMultiChHd_VcapVencVdisObj.dupId[0];
    capturePrm.outQueParams[1].nextLink = gMultiChHd_VcapVencVdisObj.dupId[1];
    pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
    ...
    pCaptureOutPrm                      = &pCaptureInstPrm->outParams[1];
    ...
    
    Below is debugging flow.
    Print every thread's id, link id,... of DupLink_getFullFrames(), DupLink_putEmptyFrames(), DupLink_tskMain(),CaptureLink_tskRun(), CaptureLink_drvProcessData(), ...


    
    Could anyone help me?

  • How are you getting one capture output in YUV 420SP and another capture output in YUV 422I . Pls share your usecase c file so that the configuration and connection can be reviewed

  • Hi,

    Capture link supports 4 output queues, by default it stores all outputs to queid 0, i think you need to use 2 queues, one for dup0 and other for dup1. You can configure capture parameters to use specific queue by configuring outQueId parameter in outParams capture output parameters. Please also configure dup1 to use queue 1 of the capture link.

    regards,

    Brijesh Jadav

  • Here is the multichhd_vcap_venc_vdis.c code. Thanks!

    /*******************************************************************************
     *                                                                             *
     * Copyright (c) 2009 Texas Instruments Incorporated - http://www.ti.com/      *
     *                        ALL RIGHTS RESERVED                                  *
     *                                                                             *
     ******************************************************************************/
    /*
                                              Capture (4CH 1080p30 422)
                                               ******************
                                                    |         |
                                                   DUP0      DUP1
                                                   | | |     | | |
                                                   | | |     | | +---------------------------+
                                                   | | |  +--+ |                             |
                                                   | | +--[----[--------------------------+  |
                                                   | |    |    +--+                       |  |
                                                   | +----[----+  |                      MERGE1
                                                   |      |    |  |                        |
                                                   | +----+  MERGE0                        |
                                                   | |          |                          |
                                                   | |          +----- SC5 ------+         |
                                                   | |             (4CH D1 422)  |        SC5
                                               +---+ +--------+                  |     (4CH 422) (MJPEG)
                                               |              |                  |         |
                                             DEIH (BP-Mode)  DEI (BP-Mode)       |         |
                                              | |            | |                 |  +------+
                                  2CH 1080p30 | |            | | 2CH 1080p30     |  |
                                              | |            | |                 |  |
                                   +----------+ +-----+  +---+ +---+             |  |
                                   |                  |  |            |          |  |
                                   |          +-------[--+            |         MERGE2
                                   |          |       |               |          |  |
                                   |   (DEI-SC2 422)  +--+            |          |  |
                                   |          |          |            |          |  |
                                   |          |          |       (VIP-SC4 420)   |  |
                              (DEI-SC1 422)   |   (VIP-SC3 420)       |          NSF
                                   |          |          |            |           |(4CH D1 420) + 4Ch MJEPG
                                   +--+   +---+          +----+       |           |
                                      |   |                   |       |           |
                                      MERGE3                 |       +--------+  |
                                        |                     +--------------+ |  |
                                       DUP2------------------+               | |  |
                                        |                    |               | |  |
        +--<<<processLink>>>--- IPC Frames Out (M3)          |               | |  |
        |                               |                    |               MERGE4
        |                       IPC Frames IN (A8)           |                 |
      FramesInDSP                       |                    |                 |
        |                       IPC Frames Out (A8)          |              IPC OUT(M3)----<<<processLink>>>---FramesInDSP--+
     ALG LINK                           |                    |                 |                                            |
     <OSD SCD Algs>             IPC Frames IN (M3)           |              IPC IN(M3)                                      |
                                        |              On-Chip HDMI            |                                            |
                                  OFF-Chip HDMI          1080p60      Encode (4CH 1080p30 + 4CH D1)                      ALG_LINK
                                     1080p60          (1-Ch 1-Window)          |                                       <OSD, SCD Algs>
                                 (1-Ch 1-Window)                          IPC Bits OUT (M3)
                                                                               |
                                                                          IPC Bits IN (A8)

    (BP-Mode) --> Bypass Mode
    */

    #define ENABLE_ENCODE_201212

    #define dpline()        do {        \
                printf("run at %s:%d***************************\n", __func__, __LINE__);    \
        } while(0)

    #include "multich_common.h"

    #include "mcfw/interfaces/link_api/system_tiler.h"


    #define     NUM_CAPTURE_DEVICES     (4)

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

    static UInt8 SCDChannelMonitor[4] = {4, 5, 6, 7};

    //#define TWOOSD_INSTANCE

    typedef struct {

        UInt32 mergeId[5];
        UInt32 dupId[3];
        UInt32 ipcOutVpssId;
        UInt32 ipcInVideoId;
        UInt32 ipcFrameOutVpssId[2];
        UInt32 ipcFramesInDspId[2];
    } MultiChHd_VcapVencVdisObj;

    MultiChHd_VcapVencVdisObj gMultiChHd_VcapVencVdisObj;

    /* =============================================================================
     * Use case code
     * =============================================================================
     */
    //
    static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
    {
        .isPopulated = 1,
        .ivaMap[0] =
        {
            .EncNumCh  = 2,
            .EncChList = {0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
        .ivaMap[1] =
        {
            .EncNumCh  = 2,
            .EncChList = {1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
        .ivaMap[2] =
        {
            .EncNumCh  = 8,
            .EncChList = {4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0 , 0, 0},
            .DecNumCh  = 0,
            .DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        },
    };


    Void MultiChHd_createVcapVencVdis()
    {
        CaptureLink_CreateParams        capturePrm;
        DeiLink_CreateParams            deiPrm[MAX_DEI_LINK];
        //MergeLink_CreateParams          mergePrm[5];
        DupLink_CreateParams            dupPrm[3];
        //SclrLink_CreateParams           sclrPrm[2];
        DisplayLink_CreateParams        displayPrm[2];
        //NsfLink_CreateParams            nsfPrm[2];
        IpcLink_CreateParams            ipcOutVpssPrm;
        IpcLink_CreateParams            ipcInVideoPrm;
        EncLink_CreateParams            encPrm;
        IpcBitsOutLinkRTOS_CreateParams ipcBitsOutVideoPrm;
        IpcBitsInLinkHLOS_CreateParams  ipcBitsInHostPrm[2];
        //IpcFramesOutLinkRTOS_CreateParams  ipcFramesOutVpssToHostPrm;
        //IpcFramesInLinkHLOS_CreateParams   ipcFramesInHostPrm;
        //IpcFramesOutLinkHLOS_CreateParams  ipcFramesOutHostPrm;
        //IpcFramesInLinkRTOS_CreateParams   ipcFramesInVpssFromHostPrm;

        //IpcFramesInLinkRTOS_CreateParams  ipcFramesInDspPrm[2];
        //IpcFramesOutLinkRTOS_CreateParams  ipcFramesOutVpssPrm[2];
        //AlgLink_CreateParams                dspAlgPrm[2];

        //IpcBitsOutLinkRTOS_CreateParams   ipcBitsOutDspPrm;
        UInt32 ipcBitsOutDSPId;

        System_LinkInfo framesProducerLinkInfo;

        CaptureLink_VipInstParams *pCaptureInstPrm;
        CaptureLink_OutParams     *pCaptureOutPrm;
        UInt32 vipInstId, i, j;

        VCAP_VIDDEC_PARAMS_S vidDecVideoModeArgs[NUM_CAPTURE_DEVICES];

        UInt32 numSubChains;
        Bool   enableOsdAlgLink = gVsysModuleContext.vsysConfig.enableOsd;
        Bool   enableScdAlgLink = gVsysModuleContext.vsysConfig.enableScd;

        Bool   enableOsdAlgLinkA8Path = FALSE;
        Bool   enableScdAlgLinkA8Path = FALSE;

        Bool   enableTiler;
        Uint32 noOfDSPAlgo = 2;


        if(enableOsdAlgLink == FALSE)
            enableOsdAlgLinkA8Path = FALSE;

        if(enableScdAlgLink == FALSE)
            enableScdAlgLinkA8Path = FALSE;


        if((enableOsdAlgLinkA8Path == FALSE) && (enableScdAlgLinkA8Path == FALSE))
            noOfDSPAlgo = 1;

        MULTICH_INIT_STRUCT(IpcLink_CreateParams           ,ipcOutVpssPrm);
        MULTICH_INIT_STRUCT(IpcLink_CreateParams           ,ipcInVideoPrm);
        MULTICH_INIT_STRUCT(IpcBitsOutLinkRTOS_CreateParams,ipcBitsOutVideoPrm);
        MULTICH_INIT_STRUCT(IpcBitsInLinkHLOS_CreateParams ,ipcBitsInHostPrm[0]);


        MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm);
        for (i = 0; i < 2;i++)
        {
            MULTICH_INIT_STRUCT(DisplayLink_CreateParams ,displayPrm[i]);
        }

        MultiCh_detectBoard();
        dpline();

        System_linkControl(
            SYSTEM_LINK_ID_M3VPSS,
            SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
            NULL,
            0,
            TRUE
            );
        dpline();
        /* Disable tiler allocator for this usecase
         * for that tiler memory can be reused for
         * non-tiled allocation
         */
        SystemTiler_disableAllocator();
        dpline();



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

        enableTiler                     = FALSE;
        numSubChains                    = 1;

        gVcapModuleContext.captureId    = SYSTEM_LINK_ID_CAPTURE;
        //gVcapModuleContext.deiId[0]     = SYSTEM_LINK_ID_DEI_0;
        //gVcapModuleContext.deiId[1]     = SYSTEM_LINK_ID_DEI_1;
        //gVcapModuleContext.sclrId[0]       = SYSTEM_LINK_ID_SCLR_INST_0;
        //gVcapModuleContext.sclrId[1]       = SYSTEM_LINK_ID_SCLR_INST_1;

        //gVcapModuleContext.nsfId[0]        = SYSTEM_LINK_ID_NSF_0;

        //gVdisModuleContext.swMsId[0]    = SYSTEM_LINK_ID_INVALID;


        gVdisModuleContext.displayId[0] = SYSTEM_LINK_ID_DISPLAY_0; // ON CHIP HDMI
        //gVdisModuleContext.displayId[1] = SYSTEM_LINK_ID_DISPLAY_1; /* OFF CHIP HDMI */

        gVencModuleContext.encId            = SYSTEM_LINK_ID_VENC_0;
        //if(enableScdAlgLink)
        //   gVencModuleContext.ipcBitsInHLOSId   = SYSTEM_HOST_LINK_ID_IPC_BITS_IN_1;
        //else
           gVencModuleContext.ipcBitsInHLOSId   = SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0;

        gVencModuleContext.ipcBitsOutRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0;

    /*
        gMultiChHd_VcapVencVdisObj.mergeId[0]        = SYSTEM_VPSS_LINK_ID_MERGE_0;
        gMultiChHd_VcapVencVdisObj.mergeId[1]        = SYSTEM_VPSS_LINK_ID_MERGE_1;
        gMultiChHd_VcapVencVdisObj.mergeId[2]        = SYSTEM_VPSS_LINK_ID_MERGE_2;
        gMultiChHd_VcapVencVdisObj.mergeId[3]        = SYSTEM_VPSS_LINK_ID_MERGE_3;
        gMultiChHd_VcapVencVdisObj.mergeId[4]        = SYSTEM_VPSS_LINK_ID_MERGE_4;
    */
        gMultiChHd_VcapVencVdisObj.dupId[0]          = SYSTEM_VPSS_LINK_ID_DUP_0;
        gMultiChHd_VcapVencVdisObj.dupId[1]          = SYSTEM_VPSS_LINK_ID_DUP_1;
        //gMultiChHd_VcapVencVdisObj.dupId[2]          = SYSTEM_VPSS_LINK_ID_DUP_2;


        {
            //gVcapModuleContext.ipcFramesOutVpssToHostId  = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_1;
        }
        gMultiChHd_VcapVencVdisObj.ipcOutVpssId      = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0;
        gMultiChHd_VcapVencVdisObj.ipcInVideoId      = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0;


        //gVcapModuleContext.ipcFramesInHostId         = SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0;

        //gVdisModuleContext.ipcFramesOutHostId        = SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0;
        //gVdisModuleContext.ipcFramesInVpssFromHostId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_IN_0;
        dpline();

        CaptureLink_CreateParams_Init(&capturePrm);
        dpline();

        capturePrm.numVipInst               = 1; /* Need to change based on actual HD video decoder */
        capturePrm.outQueParams[0].nextLink = gMultiChHd_VcapVencVdisObj.dupId[0];
        capturePrm.outQueParams[1].nextLink = gMultiChHd_VcapVencVdisObj.dupId[1];
        capturePrm.tilerEnable              = FALSE;
        capturePrm.fakeHdMode               = TRUE;
        capturePrm.enableSdCrop             = FALSE;
        capturePrm.doCropInCapture          = FALSE;
        capturePrm.maxBlindAreasPerCh       = 4;

        for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
        {
            pCaptureInstPrm                     = &capturePrm.vipInst[vipInstId];
            pCaptureInstPrm->vipInstId          = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId)%SYSTEM_CAPTURE_INST_MAX; /* Need to change based on actual HD video decoder */
            pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV; /* Need to change based on actual HD video decoder */
            pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;
            pCaptureInstPrm->standard           = SYSTEM_STD_1080P_60; /* Need to change based on actual HD video decoder */
            pCaptureInstPrm->numOutput          = 1; /* Need to change based on actual HD video decoder */

            pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
            pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;//SYSTEM_DF_YUV420SP_UV;
            pCaptureOutPrm->scEnable            = FALSE; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->scOutWidth          = 0; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->scOutHeight         = 0; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->outQueId            = 0;
    #if 1
        /* Second stream */
            pCaptureOutPrm                      = &pCaptureInstPrm->outParams[1];
            pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV420SP_VU;//SYSTEM_DF_YUV420SP_UV;
            pCaptureOutPrm->scEnable            = FALSE; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->scOutWidth          = 1920; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->scOutHeight         = 1080; /* Need to change based on actual HD video decoder */
            pCaptureOutPrm->outQueId            = 1;
    #endif
        /*
            if (vipInstId >= numSubChains)
              pCaptureOutPrm->outQueId          = 1;
            else
              pCaptureOutPrm->outQueId          = 0;
        */
        }

        for(i = 0; i < NUM_CAPTURE_DEVICES; i++)
        {
            vidDecVideoModeArgs[i].videoIfMode        = DEVICE_CAPT_VIDEO_IF_MODE_16BIT;
            vidDecVideoModeArgs[i].videoDataFormat    = SYSTEM_DF_YUV422P;
            vidDecVideoModeArgs[i].standard           = SYSTEM_STD_1080P_60;
            vidDecVideoModeArgs[i].videoCaptureMode   =
                        DEVICE_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
            vidDecVideoModeArgs[i].videoSystem        =
                                          DEVICE_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT;
            vidDecVideoModeArgs[i].videoCropEnable    = FALSE;
            vidDecVideoModeArgs[i].videoAutoDetectTimeout = -1;
        }
        dpline();

        Vcap_configVideoDecoder(vidDecVideoModeArgs, NUM_CAPTURE_DEVICES);
        dpline();

        dupPrm[0].inQueParams.prevLinkId        = gVcapModuleContext.captureId;
        dupPrm[0].inQueParams.prevLinkQueId     = 0;
        dupPrm[0].numOutQue                     = 1;
    #ifdef ENABLE_ENCODE_201212
        //dupPrm[0].outQueParams[0].nextLink      = gVcapModuleContext.deiId[0];
        dupPrm[0].outQueParams[0].nextLink      = SYSTEM_LINK_ID_DISPLAY_0;
    #endif
        dupPrm[0].notifyNextLink                = TRUE;

        dupPrm[1].inQueParams.prevLinkId        = gVcapModuleContext.captureId;
        dupPrm[1].inQueParams.prevLinkQueId     = 1;
        dupPrm[1].numOutQue                     = 1;
        //dupPrm[1].outQueParams[0].nextLink      = gVcapModuleContext.deiId[1];
        dupPrm[1].outQueParams[0].nextLink      = gMultiChHd_VcapVencVdisObj.ipcOutVpssId;
        dupPrm[1].notifyNextLink                = TRUE;
        dpline();

    #if 0
        {
            i = 0;
            Int32 chId;

            DeiLink_CreateParams_Init(&deiPrm[i]);
            deiPrm[i].inQueParams.prevLinkId                           = gMultiChHd_VcapVencVdisObj.dupId[i];
            deiPrm[i].inQueParams.prevLinkQueId                        = 0;

            /* Set non default DEI Frame Rate */
            deiPrm[i].inputFrameRate[DEI_LINK_OUT_QUE_DEI_SC]       = 30;
            deiPrm[i].outputFrameRate[DEI_LINK_OUT_QUE_DEI_SC]      = 30;

            /* Set non default DEI Frame Rate */
            deiPrm[i].inputFrameRate[DEI_LINK_OUT_QUE_VIP_SC]       = 30;
            deiPrm[i].outputFrameRate[DEI_LINK_OUT_QUE_VIP_SC]      = 30;

            deiPrm[i].comprEnable                                   = FALSE;
            deiPrm[i].setVipScYuv422Format                          = FALSE;
            deiPrm[i].enableDeiForceBypass                          = TRUE;
            deiPrm[i].enableLineSkipSc                              = FALSE;

            deiPrm[i].outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink= SYSTEM_LINK_ID_DISPLAY_0;
        }

        {
            i = 1;
            Int32 chId;

            DeiLink_CreateParams_Init(&deiPrm[i]);
            deiPrm[i].inQueParams.prevLinkId                           = gMultiChHd_VcapVencVdisObj.dupId[i];
            deiPrm[i].inQueParams.prevLinkQueId                        = 0;

            deiPrm[i].outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink= gMultiChHd_VcapVencVdisObj.ipcOutVpssId;
        }
    #endif

    #ifdef ENABLE_ENCODE_201212
        //displayPrm[0].inQueParams[0].prevLinkId        = gVcapModuleContext.deiId[0];
        displayPrm[0].inQueParams[0].prevLinkId        = gMultiChHd_VcapVencVdisObj.dupId[0];
    #endif
        displayPrm[0].inQueParams[0].prevLinkQueId     = 0;
        displayPrm[0].displayRes                    = gVdisModuleContext.vdisConfig.deviceParams[VDIS_DEV_HDMI].resolution;//displayRes[SYSTEM_DC_VENC_HDMI];

        ipcOutVpssPrm.inQueParams.prevLinkId    = gMultiChHd_VcapVencVdisObj.dupId[1];
        ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
        ipcOutVpssPrm.outQueParams[0].nextLink  = gMultiChHd_VcapVencVdisObj.ipcInVideoId;
        ipcOutVpssPrm.notifyNextLink            = TRUE;//FALSE;
        ipcOutVpssPrm.notifyPrevLink            = TRUE;
        ipcOutVpssPrm.noNotifyMode              = FALSE;

        ipcInVideoPrm.inQueParams.prevLinkId    = gMultiChHd_VcapVencVdisObj.ipcOutVpssId;
        ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
        ipcInVideoPrm.outQueParams[0].nextLink  = gVencModuleContext.encId;
        ipcInVideoPrm.notifyNextLink            = TRUE;
        ipcInVideoPrm.notifyPrevLink            = FALSE;
        ipcInVideoPrm.noNotifyMode              = TRUE;

        ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkId    = gVencModuleContext.encId;
        ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcBitsOutVideoPrm.baseCreateParams.outQueParams[0].nextLink   = gVencModuleContext.ipcBitsInHLOSId;
        MultiCh_ipcBitsInitCreateParams_BitsOutRTOS(&ipcBitsOutVideoPrm, TRUE);

        ipcBitsInHostPrm[0].baseCreateParams.inQueParams.prevLinkId    = gVencModuleContext.ipcBitsOutRTOSId;
        ipcBitsInHostPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
        ipcBitsInHostPrm[0].baseCreateParams.outQueParams[0].nextLink   = SYSTEM_LINK_ID_INVALID;
        MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm[0]);

        encPrm.numBufPerCh[0] = 6; //D1
        encPrm.numBufPerCh[1] = 4; //CIF

        {
            EncLink_ChCreateParams *pLinkChPrm;
            EncLink_ChDynamicParams *pLinkDynPrm;
            VENC_CHN_DYNAMIC_PARAM_S *pDynPrm;
            VENC_CHN_PARAMS_S *pChPrm;

            /* Primary Stream Params - D1 */
            for (i=0; i<gVencModuleContext.vencConfig.numPrimaryChn; i++)
            {
                pLinkChPrm  = &encPrm.chCreateParams[i];
                pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

                pChPrm      = &gVencModuleContext.vencConfig.encChannelParams[i];
                pDynPrm     = &pChPrm->dynamicParam;

                pLinkChPrm->format                  = IVIDEO_H264HP;
                pLinkChPrm->profile                 = gVencModuleContext.vencConfig.h264Profile[i];
                pLinkChPrm->dataLayout              = IVIDEO_FIELD_SEPARATED;
                pLinkChPrm->fieldMergeEncodeEnable  = FALSE;
                pLinkChPrm->enableAnalyticinfo      = pChPrm->enableAnalyticinfo;
                pLinkChPrm->enableWaterMarking      = pChPrm->enableWaterMarking;
                pLinkChPrm->maxBitRate              = pChPrm->maxBitRate;
                pLinkChPrm->encodingPreset          = pChPrm->encodingPreset;
                pLinkChPrm->rateControlPreset       = pChPrm->rcType;
                pLinkChPrm->enableSVCExtensionFlag  = pChPrm->enableSVCExtensionFlag;
                pLinkChPrm->numTemporalLayer        = pChPrm->numTemporalLayer;

                pLinkDynPrm->intraFrameInterval     = pDynPrm->intraFrameInterval;
                pLinkDynPrm->targetBitRate          = pDynPrm->targetBitRate;
                pLinkDynPrm->interFrameInterval     = 1;
                pLinkDynPrm->mvAccuracy             = IVIDENC2_MOTIONVECTOR_QUARTERPEL;
                pLinkDynPrm->inputFrameRate         = pDynPrm->inputFrameRate;
                pLinkDynPrm->rcAlg                  = pDynPrm->rcAlg;
                pLinkDynPrm->qpMin                  = pDynPrm->qpMin;
                pLinkDynPrm->qpMax                  = pDynPrm->qpMax;
                pLinkDynPrm->qpInit                 = pDynPrm->qpInit;
                pLinkDynPrm->vbrDuration            = pDynPrm->vbrDuration;
                pLinkDynPrm->vbrSensitivity         = pDynPrm->vbrSensitivity;
            }

            encPrm.inQueParams.prevLinkId   = gMultiChHd_VcapVencVdisObj.ipcInVideoId;
            encPrm.inQueParams.prevLinkQueId= 0;
            encPrm.outQueParams.nextLink    = gVencModuleContext.ipcBitsOutRTOSId;
        }

        capturePrm.isPalMode = Vcap_isPalMode();


        dpline();
        System_linkCreate (gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));
        dpline();
        for(i=0;i<2;i++) {
           System_linkCreate(gMultiChHd_VcapVencVdisObj.dupId[i], &dupPrm[i], sizeof(dupPrm[i]));
           dpline();
        }
        dpline();

    #if 0
        for(i=0;i<2;i++) {
            System_linkCreate(gVcapModuleContext.deiId[i], &deiPrm[i], sizeof(deiPrm[i]));
           dpline();
        }
    #endif

        System_linkCreate(gMultiChHd_VcapVencVdisObj.ipcOutVpssId , &ipcOutVpssPrm , sizeof(ipcOutVpssPrm) );
        dpline();
        System_linkCreate(gMultiChHd_VcapVencVdisObj.ipcInVideoId , &ipcInVideoPrm , sizeof(ipcInVideoPrm) );
        dpline();
        
        System_linkCreate(gVencModuleContext.encId, &encPrm, sizeof(encPrm));
        dpline();
    #if 1
        System_linkCreate(gVencModuleContext.ipcBitsOutRTOSId, &ipcBitsOutVideoPrm, sizeof(ipcBitsOutVideoPrm));
        dpline();
        System_linkCreate(gVencModuleContext.ipcBitsInHLOSId, &ipcBitsInHostPrm[0], sizeof(ipcBitsInHostPrm[0]));
        dpline();

        //System_linkGetInfo(gVcapModuleContext.ipcFramesInHostId,&framesProducerLinkInfo);
        //dpline();
    #endif

        System_linkCreate(gVdisModuleContext.displayId[0], &displayPrm[0], sizeof(displayPrm[0]));
        dpline();


        MultiCh_memPrintHeapStatus();
        dpline();

    }


    Void MultiChHd_deleteVcapVencVdis()
    {
    }

  • Hi,

    Capture number of outputs is set to 1, in this case, it will not at all capture YUV420 data. it should be set to 2.

    pCaptureInstPrm->numOutput          = 1; /* Need to change based on actual HD video decoder */

    Regards,

    Brijesh Jadav

  • That's great. I will try it again! Thanks for your reply