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.

TDA2SX: algorithmLink_vpeSwMs的使用和参数设置

Part Number: TDA2SX

想使用 vpeSwMs link 实现这样一个功能:把五个摄像头拍摄的图像,缩放后拼接在一起;不过录制出来的录像是杂乱无章的,想了解一下是哪里出了问题,谢谢!

其中:

链路设计是这样的:

Capture -> Dup

Dup -> Select_front -> Merge -> Gate_enc -> Encode -> Null (A15)

Dup -> Gate_avm -> Select_avm -> VPE_avm -> DesaySync_avm -> Alg_DmaSwMs_avm -> Merge

参数设置是这样的:

static Void desay_APA_SetAvmVpeDmaMosaicPrms(
                    AlgorithmLink_VpeSwMsCreateParams *pPrm,
                    UInt32 inputChannelNum,
                    UInt32 channelWidth,
                    UInt32 channelHeight
                   )
{
    UInt32 winId,chId;
    AlgorithmLink_VpeSwMsLayoutWinInfo *pWinInfo;
    //UInt32 widthFactor, heightFactor;

    pPrm->maxOutBufWidth     = channelWidth;
    pPrm->maxOutBufHeight    = channelHeight;
    pPrm->numOutBuf          = 10;
    pPrm->numInputCh          = inputChannelNum;

    pPrm->initLayoutParams.numWin = inputChannelNum;
    pPrm->initLayoutParams.outBufWidth  = pPrm->maxOutBufWidth;
    pPrm->initLayoutParams.outBufHeight = pPrm->maxOutBufHeight;
    pPrm->enableOut[0] = TRUE;

    /* assuming 5Ch layout */
    for(winId=0; winId<pPrm->initLayoutParams.numWin; winId++)
    {
        pWinInfo = &pPrm->initLayoutParams.winInfo[winId];

        pWinInfo->chId = winId;

        pWinInfo->inStartX = 0;
        pWinInfo->inStartY = 0;

        switch(winId)
        {
        case 0:
        {
            pWinInfo->width    = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->height   = channelHeight/2;
            pWinInfo->outStartX = 0;
            pWinInfo->outStartY = 0;
        }
            break;
        case 1:
        {
            pWinInfo->width    = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->height   = channelHeight/2;
            pWinInfo->outStartX = 0;
            pWinInfo->outStartY = channelHeight/2;

        }
            break;
        case 2:
        {
            pWinInfo->width    = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->height   = channelHeight;
            pWinInfo->outStartX = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->outStartY = 0;
        }
            break;
        case 3:
        {
            pWinInfo->width    = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->height   = channelHeight/2;
            pWinInfo->outStartX = SystemUtils_floor(channelWidth/3,16)*2;
            pWinInfo->outStartY = 0;
        }
            break;
        case 4:
        {
            pWinInfo->width    = SystemUtils_floor(channelWidth/3,16);
            pWinInfo->height   = channelHeight/2;
            pWinInfo->outStartX = SystemUtils_floor(channelWidth/3,16)*2;
            pWinInfo->outStartY = channelHeight/2;
        }
            break;
        default:
            break;
        }
    }

    for(chId = 0; chId < inputChannelNum; chId++)
    {

        pWinInfo = &pPrm->initLayoutParams.winInfo[chId];
        pPrm->chParams[chId].outParams[0].width
            = pWinInfo->width ;

        pPrm->chParams[chId].outParams[0].height
            = pWinInfo->height ;

        pPrm->chParams[chId].outParams[0].dataFormat
            = SYSTEM_DF_YUV420SP_UV;
        pPrm->chParams[chId].outParams[0].numBufsPerCh = 10;


        /* Setting Crop parameter */
        pPrm->chParams[chId].scCropCfg.cropStartX  = 0;
        pPrm->chParams[chId].scCropCfg.cropStartY  = 0;

        pPrm->chParams[chId].scCropCfg.cropWidth    = channelWidth;
        pPrm->chParams[chId].scCropCfg.cropHeight   = channelHeight;
    }
}