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.

DM8168 DEI LINK scale output failure

Hi all

I develop on dm8168 evm board + vs child board using dvrrdk  2.80,

i capture a XGA 60 progressive video ,and i want to use dei link to get three channel video ,

1,xga 60 for display

2.  xga 60 for h.264 encoder

3.xga 60 down sample to 512x384 for h.264 encoder,

the question is down sample chan no video output, Does progressive  video can not use dei link to do scale?

as progressive video i do not want to do dei , so     deiPrm[i].enableDeiForceBypass  = TRUE;  

or XGA channel will be blocked, no video output any more.

in my code two dei is used ,and i ued dei 0 to process XGA ,DEI 1 process 4 chan PAL ,

the following is my configure code:

  for(i=0; i<2; i++)    

 {         Int32 chId;

        DeiLink_CreateParams_Init(&deiPrm[i]);

        deiPrm[i].inQueParams.prevLinkId = gVcapModuleContext.captureId;        

        deiPrm[i].inQueParams.prevLinkQueId = i;           

        deiPrm[i].outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink =          gMultiCh_VcapVencVdisObj.mergeId[DEI_SC_D1_MERGE_LINK_IDX];           

        deiPrm[i].outQueParams[DEI_LINK_OUT_QUE_VIP_SC].nextLink =          gMultiCh_VcapVencVdisObj.mergeId[DEI_VIP_SC_MERGE_LINK_IDX];   

       deiPrm[i].outQueParams[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT].nextLink = gMultiCh_VcapVencVdisObj.mergeId[DEI_VIP_SC_MERGE_LINK_IDX];          

       deiPrm[i].enableOut[DEI_LINK_OUT_QUE_DEI_SC]     = TRUE;        

       deiPrm[i].enableOut[DEI_LINK_OUT_QUE_VIP_SC]     = TRUE;        

      deiPrm[i].enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT]  = TRUE;           

      deiPrm[i].tilerEnable    = FALSE;        

      deiPrm[i].comprEnable    = FALSE;        

      deiPrm[i].setVipScYuv422Format  = FALSE;     

      deiPrm[i].enableDeiForceBypass  = FALSE;      

      deiPrm[i].enableLineSkipSc   = FALSE;

if(i==0)  

 {   

     deiPrm[i].enableDeiForceBypass  = TRUE;   

     deiPrm[i].enableLineSkipSc   = TRUE;   

}

        /* Set Output Scaling at DEI based on ratio */      deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].scaleMode = DEI_SCALE_MODE_RATIO;      deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].ratio.widthRatio.numerator   = 1;      deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].ratio.widthRatio.denominator  = 2;      deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].ratio.heightRatio.numerator   = 1;    

 deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].ratio.heightRatio.denominator = 2;     

 for (chId=1; chId < DEI_LINK_MAX_CH; chId++)

{

             deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][chId] =                

             deiPrm[i].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0];  

 }

  ....

 }

 best regards

xavier

  • You are giving 60 frames XGA input to DEI .This can be scaled to 60 frames output in two different resolutions.You are using one output for display and one output for h.264 encoder.It is not possible to get additional 60 fps for the secondary resolution.You will have to reduce fps of primary h264 encode channel to be able to support secondary resolution encoding.

  • Hi Badri

    i want to get

    1. a xga 60(1024x768 ) for display,

    2. a xga 60(1024x768 ) for  h264 encoder,

    3. a xga 60 1/2 down sample video( 512x384 60Hz)

    throw dei link, dei link has three output que, and the 1,2 video works as i thought, and 3 no output,

    you say "have to reduce fps of primary h264 encode channel to be able to support secondary resolution encoding"

    1. what do you mean ? what's bussiness with fps to do video scale?

    2 . another question is that i think encoder link configure param is not enough to configure codec except struct  EncLink_ChCreateParams?

    any other params can be configured?

    best regards

    xavier

  • You are capturing 60 frames. Using DEI you can convert it to two streams of different resolution each at 60 fps.So it is not possible to get an additional 60 1/2 stream using DEI.

    How many channels are you capturing ?

     

    . another question is that i think encoder link configure param is not enough to configure codec except struct  EncLink_ChCreateParams?

    any other params can be configured?

    I dont understand the questions. Are you asking what parameters can be changed in  encoder at runtime. There are a number of params that can be set in enc link .Pls refer the encLink API guide for details. Most params can be found in EncLink_ChDynamicParams

     

     

  • Hi Badri

    Thank you for your relay!

    in my mind dei link has three different output  ques.

    DEI_LINK_OUT_QUE_DEI_SC

    DEI_LINK_OUT_QUE_VIP_SC

    DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT

    does not means that three different  resolutions output can be gotten?

    in my code , for PAL video this works well,

    and for XGA progressive DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT has no output then,

    i only have one channel for DEI link input , and want to get 3 output from three output que of DEI

    best regards

    xavier

  • WHen given NTSC input 60 fields are converted to 60 frames by DEI.

    The DEI driver (HDVPSS HW) only supports scaling of input frame into two output resolutions simultanesouly.

       - THe 60 frames  can be resized in two scalers to output

         - 60 frames in DEI_SC

               - 30 frames are output for preview (DEI_LINK_OUT_QUE_DEI_SC)

        - 60 frames in VIP_SC.

            - 30 frames are output for primary encode (DEI_LINK_OUT_QUE_VIP_SC)

           - 30 frames are output for secondary encode (DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT)

    So to summarize

     DEI_LINK_OUT_QUE_DEI_SC FPS <= (less than equal to) DEI input FPS

    ((DEI_LINK_OUT_QUE_VIP_SC FPS + DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT FPS) <= (less than equal to)  DEI input FPS

    This is the reason I mentioned that you have to reduce primary stream fps to 30 to be able to get secondary stream of 30 fps.

    If you have only one channel you can dup the capture output and feed it to two DEIs to get 4 resolutions at 60 fps.

  • Thank you Badri , i got it !