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.

need clarification in video_preview Example code

Other Parts Discussed in Thread: TVP5146

Hallo Sir/Madam,

I  have a small doubt , tried to understand but couldn't so please clarify me this.

In the below code( in video_ preview example), what is the value of IOM_COMPLETED ?

For what purpose it was used?

/* allocate some frame buffers */
  if (status == 0) {
    for (i=0; i<FRAME_BUFF_CNT && status == 0; i++) {
      result = FVID_allocBuffer(Vpfe_inputchannel, &frameBuffTable[i]);
      status = (result == IOM_COMPLETED && frameBuffTable[i] != NULL ? 0 : -1);
    }
  }

 

Thank you,

Thupakula.

  • Thupakula said:
    In the below code( in video_ preview example), what is the value of IOM_COMPLETED ?

    IOM_COMPLETED is a #define from BIOS, the mini driver structures in particular (I believe iom.h), IOM_COMPLETED should map to a value of 0.

    Thupakula said:
    For what purpose it was used?

    IOM_COMPLETED is the value that should be returned from a BIOS mini driver function when it returns successfully, in this particular case the line "status = (result == IOM_COMPLETED && frameBuffTable[i] != NULL ? 0 : -1);" is verifying that the FVID_allocBuffer was successful, such that it gives the variable status a value of 0 if it was successfull or -1 if it was unsuccessfull.

  • Thank You Bernie for  the clarification.

  • Hi Bernie,

    In Video_Preview example , I have few more very basic doubts which i should clear to develop my application.

    Can you please help in clearing these simple doubts.

     

    1) sysModuleRegs -> PINMUX0    &= (0x005482A3u);
        sysModuleRegs -> PINMUX0    |= (0x005482A3u);

        /* PCIEN    =   0: PINMUX1 - Bit 0 */
        sysModuleRegs -> PINMUX1 &= (0xFFFFFFFEu);

        sysModuleRegs -> VPSSCLKCTL = (0x18u);

     can you please exaplain me what for these setting s are done?

    2) static PSP_VPBEVencConfigParams vpbeVencConfigParams = {
        PSP_VPBE_DISPLAY_PAL_INTERLACED_COMPONENT /* Display Standard */

     Does it support in the progressive mode also? If so can you please let me know how to do this?

     

    3)static PSP_VPFECcdcConfigParams vpfeCcdcConfigParams = {
        PSP_VPFE_CCDC_YCBCR_8,              /* dataFlow     */
        PSP_VPSS_FRAME_MODE,                /* ffMode       */
        480,                                /* height       */
        720,                                /* width        */
        (720 *2),                           /* pitch        */
        0,                                  /* horzStartPix */
        0,                                  /* vertStartPix */
        NULL,                               /* appCallback  */ 
        {
            PSP_VPFE_TVP5146_Open,         /* extVD Fxn    */
            PSP_VPFE_TVP5146_Close,
            PSP_VPFE_TVP5146_Control,
        },
        0                                   /*segId         */                         
    };

    what is PSP_VPFE_CCDC_YCBCR_8 color format? does CCDC suppports only this format?

    4) can you please explain me how can we read the data into Ycbcr422 from CCDC?

    5)static PSP_VPFE_TVP5146_ConfigParams tvp5146Params =
    {
        TRUE,                              /* enable656Sync */   
        PSP_VPFE_TVP5146_FORMAT_COMPOSITE, /* format        */
        PSP_VPFE_TVP5146_MODE_PAL         /* mode          */
    };
      what is the purpose of this Decoder?


     

  • Thupakula said:
     can you please exaplain me what for these setting s are done?

    These are setting up the PINMUX registers, they are there to determine what function the various pins on the device are, essentially this is enabling the pins for video capture and display.

    Thupakula said:
     Does it support in the progressive mode also? If so can you please let me know how to do this?

    Unfortunately I do not have the documentation in front of me but I do not believe the software supports a progressive video output currently, you would have to check the PSP user's guide for the VPBE driver from your DVSDK install for details on what you would need to change if this is possible.

    Thupakula said:
    what is PSP_VPFE_CCDC_YCBCR_8 color format? does CCDC suppports only this format?

    The CCDC supports other formats, but for communicating with the TVP5146 video decoder on the EVM board this is the setting you will want to use.

    Thupakula said:
    4) can you please explain me how can we read the data into Ycbcr422 from CCDC?

    By default with the EVM setup you are reading in data in YCbCr 422 format, that is your frame buffers are already YCbCr 422.

    Thupakula said:
    what is the purpose of this Decoder?

    The TVP5146 video decoder is taking the analog video input from the composite in connector on the EVM and converting it to a digital format (bt.656) that the DM6437 VPFE can take in.

     

  • Thank you bernie for clearing these.

    In the same example i am trying to configure  the frame mode in CCDCconfigparameters as  progressive by using  FVID_FIELD_MODE which is given in the frame mode enum. Then it is not allowing to create the input channel.

    Can you please explain me why it is not supporting progressive mode?

     

    Thanks in advance,

    Thupakula.