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.

Video quality lose after DEI link

Hi all,

My env: dm8168 and dvr rdk 3.5

data flow:

the output resolution of DEI_SC is the same as the input

I export YUV422 frame after caplink and YUV420 frame(date from DEI_SC) after merge link respectively

The image after cap link:

-------------------------------------------------------------------------------------------------------------------------------------------

the image after merge link:(click the picture to zoom in)

Apparently, The quality of image after cap link is better than the one after merge link. I don't know why.

Someone give some help.

Thanks

  • Are you actually doing deinterlacing in DEI or is DEI in bypass mode

  • "DEI in bypass mode"

    Does that mean deiPrm[i_index].enableDeiForceBypass = TRUE?

  • hi Badri,

    How to bypass scalar if I find the input and output resolution are same? 

  • Pls explain you data flow. Are you getting progressive input and are using DEI just for scaling ?

    enableDeiForceBypass = TRUE is correct setting to bypass DEI.

    There are special scaler coefficients for 1:1 scaling which doesn't modify frame quality which is automatically selected in DVR RDK 4.0. Confirm you are using DVR RDK 4.0 release

  • “Are you getting progressive input and are using DEI just for scaling ?”

    Yes. and the scaler coefficients is 1:1

    "There are special scaler coefficients for 1:1 scaling which doesn't modify frame quality which is automatically selected in DVR RDK 4.0"

    Do you mean the DEI which I use in dvr rdk 3.5 will modify frame quality?

    and the problem is solved in RDK 4.0?  Am I right?

    Thanks a lot

  • hi Badri,

    I change the code to 

    ...

    pChObj->scCfg[outId].bypass = TRUE;

    ...

    in DeiLink_drvCreateChObj, the video quality after DEI is good as the one after capture, Is this right?

    Should I just make this modification?

  • The change you have done will disable Scaler at create time in the DEI and you cannot dynamically modify the DEI output resolution after that. If that is fine for you then I am wondering why you are using DEI at all. You can just use NSF for format conversion

  • Thanks for your quick reply!

    I just modify the code to test. I must use DEI, because our product's need output two channel video data( DEI_SC and DEI_VIP) for one video input. DEI_SC's output resolution is the same as input which I don't need to do scaler; DEI_VIP is used to do scaler as user's wish.

    So my question is:

    1) Why the quality after the scalar is bad than before even if the output resolution is the same as the input? How to fix it?

    2) How to disable scaler at runtime in the DEI if I find the output resolution is the same as the input?

  • If you don't require scaling at all then the change you have done is correct.

    Another option is to dup the capture output and give one input to NSF link and another to DEI configured in single output configuration.

    The issue of artifacts is due to selection of wrong scaling coefficients. There exists a spl set of scaling coefficients for 1:1 scaling but DEI link is using downscaling if Output Resolution <= Input Resolution.

    I discussed this with HDVPSS expert Brijesh and if you want to dynamically select the correct coefficients you can enable the HDVPSS driver lazy loading feature/

    To enable lazy loading for DEI_SC

    For DEI-Sc
           Vps_ScLazyLoadingParams lazyLoadingParams;
     
            lazyLoadingParams.scalarId = VPS_M2M_DEI_SCALAR_ID_DEI_SC;// could be VIP_SC for enabling lazyloading in VIP-Sc
            lazyLoadingParams.enableLazyLoading = TRUE;
            lazyLoadingParams.enableFilterSelect = TRUE;
            retVal = FVID2_control(pObj->fvidHandle,
                        IOCTL_VPS_SC_SET_LAZY_LOADING,
                        &lazyLoadingParams,
                        NULL);
    

    This code should be added in /dvr_rdk/mcfw/src_bios6/links_m3vpss/dei/deiLink_drv.c at the end of below function:

    Int32 DeiLink_drvSetScCoeffs(DeiLink_Obj * pObj, Bool loadAll)