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.

How to displayed 3840x2160 reslution H264 video.

Hi all
I am using DVRRDK_04.01.00.02 with DM8168X_UD_DVR.
I used the demo to display two H264 video.the video with 3648x2736 reslution displayed succeed,
but the video with 3840x2160 reslution displayed failed.

details:
3648x2736 res video displayed succed.


[m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
[m3vpss ] 30139: MP_SCLR: - Input Resolution Changed, updating...
[m3vpss ] MP_SCLR: numPixelsPerLine[992],inFmt.width[3648],outFmt.width[1920]
[m3vpss ] MP_SCLR: chID[0]Res[992]
[m3vpss ] 30140: MP_SCLR: - Input Resolution Updated


3840x2160 res video displayed failed.

[m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[0],ChID[0],FirstPTS[0]
[m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
[m3vpss ] 722287: MP_SCLR: - Input Resolution Changed, updating...
[m3vpss ] MP_SCLR: numPixelsPerLine[944],inFmt.width[3840],outFmt.width[1920]
[m3vpss ] MP_SCLR: chID[0]Res[944]
[m3vpss ] MP_SCLR: chID[0]Res[928]reTry[0]
[m3vpss ] MP_SCLR: chID[0]Res[912]reTry[1]
[m3vpss ] MP_SCLR: chID[0]Res[896]reTry[2]
[m3vpss ] MP_SCLR: chID[0]Res[880]reTry[3]
[m3vpss ] 722297: MP_SCLR: ERROR could not update channel info!!!
[m3vpss ] 722297: Assertion @ Line: 777 in links_m3vpss/mpSclr/mpSclrLink_drv.c: status == FVID2_SOK : failed !!!

  • Hi,

     

    For this down scaling, vertical side is ok, it will work. The problem is in the horizontal down scaling, it is not able to find proper slice size for the 3840 to 1920 down scaling, which is why it is failing. can you enable horizontal decimation for this down scaling instead of polyphase filter? This requires change in the mpsclr link.

     

    Rgds,

    Brijesh

  • thank you  Brijesh Jadav .

    can you tell me more details ,how to change the code .

    and I modified the code in file:drivers/m2m/src/vpsdrv_m2mSlice.c

    Int32 vpsMdrvScSubFrameCalcHorzInfo(VpsMdrv_SubFrameChInst *slcData):

    ........................................................................................................


                if (slcCfg->tarW >=
                   (slcData->tarFrmW - slcInfo->slcSz * subFrmCnt))
                {
                 Vps_printf("retVal = %d %s %d %d %d %d %d",retVal,__FILE__,__LINE__,slcCfg->tarW,slcData->tarFrmW,slcInfo->slcSz,subFrmCnt);

                    retVal = FVID2_EINVALID_PARAMS;
                    break;            <----------------------- here return retval -3 ,why?
                }

            } while (1u);

    .....................................................................................................

     

     [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[0],ChID[0],FirstPTS[0]
     [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
     [m3vpss ]  177834: MP_SCLR: - Input Resolution Changed, updating...
     [m3vpss ] MP_SCLR: numPixelsPerLine[944],inFmt.width[3840],outFmt.width[1920]
     [m3vpss ]  MP_SCLR: chID[0]Res[944]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 976 1920 944 1
     [m3vpss ]  MP_SCLR: chID[0]Res[928]reTry[0]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 992 1920 928 1
     [m3vpss ]  MP_SCLR: chID[0]Res[912]reTry[1]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1008 1920 912 1
     [m3vpss ]  MP_SCLR: chID[0]Res[896]reTry[2]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1024 1920 896 1
     [m3vpss ]  MP_SCLR: chID[0]Res[880]reTry[3]
     [m3vpss ]  177846: MP_SCLR: ERROR could not update channel info!!!
     [m3vpss ]  177846: Assertion @ Line: 777 in links_m3vpss/mpSclr/mpSclrLink_drv.c: status == FVID2_SOK : failed !!!

    Thanks & Best Regards

  • thank you Brijesh Jadav.
    can you tell me more details and how to modify the code in the mpsclr link.

    I find this :
    when I changed the code :
    FILE:drivers/m2m/src/vpsdrv_m2mSlice.c

    Int32 vpsMdrvScSubFrameCalcHorzInfo(VpsMdrv_SubFrameChInst *slcData)
    ..........................................

    if (slcCfg->tarW >=
    (slcData->tarFrmW - slcInfo->slcSz * subFrmCnt))
    {
    Vps_printf("retVal = %d %s %d %d %d %d %d",retVal,__FILE__,__LINE__,slcCfg->tarW,slcData->tarFrmW,slcInfo->slcSz,subFrmCnt); <-----this is my change !!!!!
    retVal = FVID2_EINVALID_PARAMS;
    break;
    }

    } while (1u);
    ..........................................

    the M3 print info:

    [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[0],ChID[0],FirstPTS[0]
    [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
    [m3vpss ] 177834: MP_SCLR: - Input Resolution Changed, updating...
    [m3vpss ] MP_SCLR: numPixelsPerLine[944],inFmt.width[3840],outFmt.width[1920]
    [m3vpss ] MP_SCLR: chID[0]Res[944]
    [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 976 1920 944 1
    [m3vpss ] MP_SCLR: chID[0]Res[928]reTry[0]
    [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 992 1920 928 1
    [m3vpss ] MP_SCLR: chID[0]Res[912]reTry[1]
    [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1008 1920 912 1
    [m3vpss ] MP_SCLR: chID[0]Res[896]reTry[2]
    [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1024 1920 896 1
    [m3vpss ] MP_SCLR: chID[0]Res[880]reTry[3]
    [m3vpss ] 177846: MP_SCLR: ERROR could not update channel info!!!
    [m3vpss ] 177846: Assertion @ Line: 777 in links_m3vpss/mpSclr/mpSclrLink_drv.c: status == FVID2_SOK : failed !!!

    Best Regards

     

  • thank you Brijesh Jadav.
    can you tell me more details and how to modify the code in the mpsclr link.

  • I find this :
    when I changed the code :
    FILE:drivers/m2m/src/vpsdrv_m2mSlice.c
    Int32 vpsMdrvScSubFrameCalcHorzInfo(VpsMdrv_SubFrameChInst *slcData)
                if (slcCfg->tarW >=
                   (slcData->tarFrmW - slcInfo->slcSz * subFrmCnt))
                {
                 Vps_printf("retVal = %d %s %d %d %d %d %d",retVal,__FILE__,__LINE__,slcCfg->tarW,slcData->tarFrmW,slcInfo->slcSz,subFrmCnt); <-----this is my change !!!!!  
                    retVal = FVID2_EINVALID_PARAMS;
                    break;
                }

            } while (1u);
    the M3 print info:
    [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[0],ChID[0],FirstPTS[0]
     [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
     [m3vpss ]  177834: MP_SCLR: - Input Resolution Changed, updating...
     [m3vpss ] MP_SCLR: numPixelsPerLine[944],inFmt.width[3840],outFmt.width[1920]
     [m3vpss ]  MP_SCLR: chID[0]Res[944]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 976 1920 944 1
     [m3vpss ]  MP_SCLR: chID[0]Res[928]reTry[0]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 992 1920 928 1
     [m3vpss ]  MP_SCLR: chID[0]Res[912]reTry[1]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1008 1920 912 1
     [m3vpss ]  MP_SCLR: chID[0]Res[896]reTry[2]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1024 1920 896 1
     [m3vpss ]  MP_SCLR: chID[0]Res[880]reTry[3]
     [m3vpss ]  177846: MP_SCLR: ERROR could not update channel info!!!
     [m3vpss ]  177846: Assertion @ Line: 777 in links_m3vpss/mpSclr/mpSclrLink_drv.c: status == FVID2_SOK : failed !!!

  • I find this :
    when I changed the code :
    FILE:drivers/m2m/src/vpsdrv_m2mSlice.c
    Int32 vpsMdrvScSubFrameCalcHorzInfo(VpsMdrv_SubFrameChInst *slcData)
                if (slcCfg->tarW >=
                   (slcData->tarFrmW - slcInfo->slcSz * subFrmCnt))
                {
                 Vps_printf("retVal = %d %s %d %d %d %d %d",retVal,__FILE__,__LINE__,slcCfg->tarW,slcData->tarFrmW,slcInfo->slcSz,subFrmCnt); <-----this is my change !!!!!  
                    retVal = FVID2_EINVALID_PARAMS;
                    break;
                }

            } while (1u)

  • the M3 printf info:
    [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[0],ChID[0],FirstPTS[0]
     [m3vpss ] AVSYNC:AVSYNC_LINK_CMD_SET_FIRST_VIDPTS successConfig:DisplayID[1],ChID[0],FirstPTS[0]
     [m3vpss ]  177834: MP_SCLR: - Input Resolution Changed, updating...
     [m3vpss ] MP_SCLR: numPixelsPerLine[944],inFmt.width[3840],outFmt.width[1920]
     [m3vpss ]  MP_SCLR: chID[0]Res[944]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 976 1920 944 1
     [m3vpss ]  MP_SCLR: chID[0]Res[928]reTry[0]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 992 1920 928 1
     [m3vpss ]  MP_SCLR: chID[0]Res[912]reTry[1]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1008 1920 912 1
     [m3vpss ]  MP_SCLR: chID[0]Res[896]reTry[2]
     [m3vpss ] retVal = 0 drivers/m2m/src/vpsdrv_m2mSlice.c 577 1024 1920 896 1
     [m3vpss ]  MP_SCLR: chID[0]Res[880]reTry[3]
     [m3vpss ]  177846: MP_SCLR: ERROR could not update channel info!!!
     [m3vpss ]  177846: Assertion @ Line: 777 in links_m3vpss/mpSclr/mpSclrLink_drv.c: status == FVID2_SOK : failed !!!

    Best Regads

  •  Undo any changes done. We will share the correct  MpSclr patch

  • thanks for your answer,Badri Narayanan.

    Look forward to your share.

  • Walk,

    Please use the following patches. Please note that this patches will work only for the width 3840.

    5482.MpSclr_3840x2160.patch.txt
    diff --git a/packages/ti/psp/vps/core/src/vpscore_vip.c b/packages/ti/psp/vps/core/src/vpscore_vip.c
    index e3af156..16ca994 100755
    --- a/packages/ti/psp/vps/core/src/vpscore_vip.c
    +++ b/packages/ti/psp/vps/core/src/vpscore_vip.c
    @@ -1098,6 +1098,12 @@ static Int32 Vcore_vipProgramReg(Vcore_Handle handle,
             GT_assert(VipCoreTrace,
                 !((0u != chObj->descInfo.nonShadowOvlySize)
                 && (NULL == descMem->nonShadowOvlyMem)));
    +        chObj->scHalCfg.hsType = chObj->vipPrms.scCfg.hsType;
    +		
    +        if (chObj->vipPrms.scCfg.hsType == VPS_SC_HST_AUTO)
    +            chObj->scHalCfg.hPolyBypass = TRUE;
    +        else
    +            chObj->scHalCfg.hPolyBypass = FALSE;
     
             /* Create overlay memory for each of the HAL */
             for (halCnt = 0u; halCnt < VCORE_VIP_MAX_HAL; halCnt++)
    diff --git a/packages/ti/psp/vps/drivers/m2m/src/vpsdrv_m2mSlice.c b/packages/ti/psp/vps/drivers/m2m/src/vpsdrv_m2mSlice.c
    index 15a7c1f..844bec4 100755
    --- a/packages/ti/psp/vps/drivers/m2m/src/vpsdrv_m2mSlice.c
    +++ b/packages/ti/psp/vps/drivers/m2m/src/vpsdrv_m2mSlice.c
    @@ -58,7 +58,7 @@
     /*                          Function Declarations                             */
     /* ========================================================================== */
     
    -/* None */
    +static UInt32 slcLongDivide(UInt32 hiValue, UInt32 loValue, UInt32 divider);
     
     /* ========================================================================== */
     /*                            Global Variables                                */
    @@ -177,16 +177,38 @@ void vpsMdrvScSubFrameInitInfo(VpsMdrv_SubFrameChInst *slcData)
     
     void vpsMdrvScSubFrameHorzInitInfo(VpsMdrv_SubFrameChInst *slcData)
     {
    +    UInt32 shift, hiVal, loVal;
         VpsMDrv_HorzSubFrmCfg  *slcCfg;
     
         slcCfg = &slcData->hSubFrmInfo.slcCfg[0u];
     
         slcCfg->colAccOffset = 0;
    -
    -    /* Calculate the linear Accumulator increament */
    -    slcData->hSubFrmInfo.linAccIncr =
    -        ((unsigned long long)slcData->srcFrmW << VSPMDRV_SC_HORZ_SHIFT) /
    -            slcData->tarFrmW;
    +    if (slcData->tarFrmW > slcData->srcFrmW)
    +    {
    +        shift = 0u;
    +    }
    +    else if (slcData->tarFrmW <= (slcData->srcFrmW >> 2u))
    +    {
    +        shift = 2u;
    +    }
    +    else if (slcData->tarFrmW <= (slcData->srcFrmW >> 1u))
    +    {
    +        shift = 1u;
    +    }
    +    else /* No Decimation */
    +    {
    +        /* Since Decimation will not be used, there is no need to shift */
    +        shift = 0u;
    +    }
    +    /* Note: Minimum target inner width is 8 such that upper 3 bits required to
    +     * be programmed is always 0. */
    +    hiVal = (((slcData->srcFrmW >> shift) - 1u) &
    +                    0x00000700u) >> 8u;
    +    loVal = (((slcData->srcFrmW >> shift) - 1u) &
    +                    (~0x00000700u)) << 24u;
    +    slcData->hSubFrmInfo.linAccIncr = slcLongDivide(hiVal,
    +                                                    loVal,
    +                                                    (slcData->tarFrmW - 1u));
         slcData->hSubFrmInfo.colAcc = 0;
     
         /* Calculate the post processing information */
    @@ -598,4 +620,27 @@ Int32 vpsMdrvScSubFrameCalcHorzInfo(VpsMdrv_SubFrameChInst *slcData)
     }
     
     
    +/**
    + *  \brief Function is used to divide 64 bit value by 32 bit value. It is used
    + *  in calculating linear as well as non-linear horizontal scaling parameters
    + */
    +static UInt32 slcLongDivide(UInt32 hiValue, UInt32 loValue, UInt32 divider)
    +{
    +    Int cnt;
    +    UInt32 temp;
    +    /* Optimization is required */
    +    for (cnt = 1; cnt <= 32; cnt++)
    +    {
    +        temp = (int)hiValue >> 31;
    +        hiValue = (hiValue << 1) | (loValue >> 31);
    +        loValue = loValue << 1;
    +        if ((hiValue | temp) >= divider)
    +        {
    +            hiValue = hiValue - divider;
    +            loValue = loValue + 1;
    +        }
    +    }
    +    return loValue;
    +}
    +
     
    
    2117.dvrrdk_3840x2160_link.patch.txt
    diff --git a/mcfw/src_bios6/links_m3vpss/mpSclr/mpSclrLink_drv.c b/mcfw/src_bios6/links_m3vpss/mpSclr/mpSclrLink_drv.c
    index 6f97d2d..137723b 100755
    --- a/mcfw/src_bios6/links_m3vpss/mpSclr/mpSclrLink_drv.c
    +++ b/mcfw/src_bios6/links_m3vpss/mpSclr/mpSclrLink_drv.c
    @@ -445,7 +445,7 @@ static Int32 mpSclrLinkDvrHndlCreate(MpSclrLink_Obj *pObj)
             pDrvChPrm->scCfg->nonLinear = FALSE;
             pDrvChPrm->scCfg->stripSize = 0;
             pDrvChPrm->scCfg->vsType = VPS_SC_VST_POLYPHASE;
    -        pDrvChPrm->scCfg->hsType = VPS_SC_HST_POLYPHASE;
    +        pDrvChPrm->scCfg->hsType = VPS_SC_HST_DCM_2X;
             pDrvChPrm->scCfg->enablePeaking = TRUE;
     
             if(pObj->createArgs.enableLineSkip &&
    @@ -546,6 +546,8 @@ static Int32 mpSclrLinkDvrHndlCreate(MpSclrLink_Obj *pObj)
             pDrvChPrm->subFrameParams->numPixelsPerLine =
                 (sliceAtPixels * pDrvChPrm->outFmt.width)
                     / pDrvChPrm->inFmt.width;
    +        /* disabling horizontal subframe */
    +        pDrvChPrm->subFrameParams->numPixelsPerLine = pDrvChPrm->inFmt.width;
             /* Should be 16bytes aligned, mask out last 4 bits */
             pDrvChPrm->subFrameParams->numPixelsPerLine &= 0xFFFFFFF0;
     
    @@ -681,7 +683,7 @@ static void mpSclrLinkDrvUpdateIpResChange(MpSclrLink_Obj *pObj,
                                                 UInt32 chId)
     {
         Int32 status;
    -    UInt32 updateCfg, sliceAtPixels;
    +    UInt32 updateCfg, widthBkp,sliceAtPixels;
         FVID2_Format *pCurrCfg;
         Vps_M2mScChParams *pDrvChArgs;
         /* Check if the input width / height / pitch has changed, if so,
    @@ -689,11 +691,15 @@ static void mpSclrLinkDrvUpdateIpResChange(MpSclrLink_Obj *pObj,
     
         UTILS_assert(pObj != NULL);
         updateCfg = FALSE;
    -
    +	pDrvChArgs = &pObj->drvChArgs[chId];
    +    pCurrCfg = &pObj->chObj[chId].outFmt;
    +    /* output width reduced to half since half the frame 
    +    width only processed per call */
    +    pCurrCfg->width = pDrvChArgs->outFmt.width = MP_SCLR_LINK_OUT_MAX_WIDTH >>1;
         pCurrCfg = &pObj->chObj[chId].inFmt;
    -    pDrvChArgs = &pObj->drvChArgs[chId];
    -
    -    if ((pIpRtInfo->width != pCurrCfg->width) ||
    +	widthBkp = MP_SCLR_LINK_MIN_WIDTH_MP_SCALING;
    +	
    +    if ((widthBkp != pCurrCfg->width) ||
             (pIpRtInfo->height != pCurrCfg->height))
         {
             updateCfg = TRUE;
    @@ -709,9 +715,8 @@ static void mpSclrLinkDrvUpdateIpResChange(MpSclrLink_Obj *pObj,
         {
             Vps_printf (" %d: MP_SCLR: - Input Resolution Changed, updating... ",
                 Utils_getCurTimeInMsec());
    -        pDrvChArgs->inFmt.width = pIpRtInfo->width;
    +        pDrvChArgs->inFmt.width = widthBkp;
             pDrvChArgs->inFmt.height = pIpRtInfo->height;
    -
             pDrvChArgs->inFmt.pitch[0] = pIpRtInfo->pitch[0];
             pDrvChArgs->inFmt.pitch[1] = pIpRtInfo->pitch[1];
             pDrvChArgs->inFmt.pitch[2] = pIpRtInfo->pitch[2];
    @@ -729,6 +734,7 @@ static void mpSclrLinkDrvUpdateIpResChange(MpSclrLink_Obj *pObj,
     
             pCurrCfg->width = pDrvChArgs->inFmt.width;
             pCurrCfg->height = pDrvChArgs->inFmt.height;
    +
             pCurrCfg->pitch[0] = pDrvChArgs->inFmt.pitch[0];
             pCurrCfg->pitch[1] = pDrvChArgs->inFmt.pitch[1];
             pCurrCfg->pitch[2] = pDrvChArgs->inFmt.pitch[2];
    @@ -762,9 +768,13 @@ static void mpSclrLinkDrvUpdateIpResChange(MpSclrLink_Obj *pObj,
             pDrvChArgs->subFrameParams->numPixelsPerLine =
                 (sliceAtPixels * pDrvChArgs->outFmt.width)
                     / pDrvChArgs->inFmt.width;
    -        /* Should be 16bytes aligned, mask out last 4 bits */
    +        /* disabling horizontal subframe */
    +        pDrvChArgs->subFrameParams->numPixelsPerLine = pDrvChArgs->inFmt.width;
    +        /* Should be 16bytes aligned, mask out last 4 bits */ 
             pDrvChArgs->subFrameParams->numPixelsPerLine &= 0xFFFFFFF0;
    +		
     
    +		
             status = updateIpFrameCfg(pObj, chId);
             UTILS_assert(status == FVID2_SOK);
             Vps_printf (" %d: MP_SCLR: - Input Resolution Updated ",
    @@ -938,7 +948,7 @@ static Int32 mpSclrLinkDrvScaleMpFrame(MpSclrLink_Obj *pObj,
     {
         System_FrameInfo *pFInfo;
         FVID2_Frame *pIpFrame, *pOpFrame;
    -    UInt32 temp, vSubFrmNum, vIdx, hIdx, chId;
    +    UInt32 temp,  vIdx,  chId, vSubFrmNum,procCtr;
         Int status = FVID2_EFAIL;
         Vps_M2mScChParams *pDrvChPrm;
         UInt32 latency, startTime;
    @@ -997,7 +1007,6 @@ static Int32 mpSclrLinkDrvScaleMpFrame(MpSclrLink_Obj *pObj,
             pIpFrame->subFrameInfo = &pObj->chObj[chId].ipSelSubWin;
     
             pOpFrame->channelNum = pIpFrame->channelNum;
    -
             pFInfo = (System_FrameInfo *)pOpFrame->appData;
             UTILS_assert(pFInfo != NULL);
             *pFInfo = *((System_FrameInfo *)pIpFrame->appData);
    @@ -1037,37 +1046,53 @@ static Int32 mpSclrLinkDrvScaleMpFrame(MpSclrLink_Obj *pObj,
             }
     
             startTime = Utils_getCurTimeInMsec();
    -        /* Scale the 1st coloumn sub-windows (on the vertical axis) */
    -        for (vIdx = 0; vIdx < vSubFrmNum; vIdx++)
    +        /* frame is divided into two parts in horizontal direction  
    +           and this is not subframe division concept instead treating 
    +           one frame as two frame */
    +        
    +		for(procCtr = 0; procCtr < 2; procCtr++)
             {
    -            if (vIdx == vSubFrmNum - 1)
    -            {
    -                pIpFrame->subFrameInfo->numInLines =  pObj->chObj[chId].inFmt.height;
    -            }
    -            else
    -            {
    -                pIpFrame->subFrameInfo->numInLines =
    -                                (vIdx + 1) * MP_SCLR_LINK_MAX_LINES_INPUT_COUNT;
    -            }
    -            pIpFrame->subFrameInfo->subFrameNum = vIdx;
    -
    -            pObj->chObj[chId].waitingForScCompletion = TRUE;
    -
    -            status =
    -                FVID2_processFrames(pObj->fvidHandle, &pReqObj->processList);
    -            UTILS_assert(status == FVID2_SOK);
    -
    -            Semaphore_pend(pObj->scalingDone, BIOS_WAIT_FOREVER);
    -
    -            pObj->chObj[chId].waitingForScCompletion = FALSE;
    -            /* Get the completed frame list */
    -            status =
    -                FVID2_getProcessedFrames(pObj->fvidHandle,
    -                                            &pReqObj->processList,
    -                                            BIOS_NO_WAIT);
    -            UTILS_assert(status == FVID2_SOK);
    +			/* Scale the coloumn sub-windows (on the vertical axis) */
    +			for (vIdx = 0; vIdx < vSubFrmNum; vIdx++)
    +			{
    +				if (vIdx == vSubFrmNum - 1)
    +				{
    +					pIpFrame->subFrameInfo->numInLines =  pObj->chObj[chId].inFmt.height;
    +				}
    +				else
    +				{
    +					pIpFrame->subFrameInfo->numInLines =
    +									(vIdx + 1) * MP_SCLR_LINK_MAX_LINES_INPUT_COUNT;
    +				}
    +				pIpFrame->subFrameInfo->subFrameNum = vIdx;
    +
    +				pObj->chObj[chId].waitingForScCompletion = TRUE;
    +
    +				status =
    +					FVID2_processFrames(pObj->fvidHandle, &pReqObj->processList);
    +				UTILS_assert(status == FVID2_SOK);
    +
    +				Semaphore_pend(pObj->scalingDone, BIOS_WAIT_FOREVER);
    +
    +				pObj->chObj[chId].waitingForScCompletion = FALSE;
    +				/* Get the completed frame list */
    +				status =
    +					FVID2_getProcessedFrames(pObj->fvidHandle,
    +												&pReqObj->processList,
    +												BIOS_NO_WAIT);
    +				UTILS_assert(status == FVID2_SOK);
    +			}
    +			/* Movind to second half of the frame in horizontal direction */
    +            pIpFrame->addr[0][0] = (Ptr) ((UInt32)pIpFrame->addr[0][0] +1920);
    +            pIpFrame->addr[0][1] = (Ptr) ((UInt32)pIpFrame->addr[0][1] +1920);
    +            pOpFrame->addr[0][0] = (Ptr) ((UInt32)pOpFrame->addr[0][0] +1920);
             }
    -
    +        /* Restoring the original address */
    +        pIpFrame->addr[0][0] = (Ptr) ((UInt32)pIpFrame->addr[0][0] -3840);
    +        pIpFrame->addr[0][1] = (Ptr) ((UInt32)pIpFrame->addr[0][1] -3840);
    +        pOpFrame->addr[0][0] = (Ptr) ((UInt32)pOpFrame->addr[0][0] -3840);		
    +#if 0   /* used for width other than 3840 with corresponding changes at */
    +        /*other required place */
             /* 0th Horizontal subframe was completed in the previous loop */
             for (hIdx = 1; hIdx < pObj->chObj[chId].splitWinParms.numSubFrm; hIdx++)
             {
    @@ -1103,7 +1128,7 @@ static Int32 mpSclrLinkDrvScaleMpFrame(MpSclrLink_Obj *pObj,
     
                 }
             }
    -
    +#endif		
             latency = Utils_getCurTimeInMsec() - startTime;
             if (latency < pObj->chObj[chId].minLatencyDrv)
             {
    

    Regards,

    Murali

  • thank you ,Murali Vijayan.

    when I applyed the patch ,I displayed the 3840x2160 reslution video succeed.