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.

VPFE tvp5146 component video

Other Parts Discussed in Thread: TVP5146

Hi all,

I’m developing video application on EVM-DM6437 and I connected my video input using coaxial cable.(analog input) Also I configured tvp5146,VPFE and VPBE on the proper way(find below config. parameters). I understand that data input has following format: Y[8]Cb[8]Y[8]Cr[8]……….. and because I need grayscale picture I’m processing just Y[8] data. It works ok and I’m able to process and display video data. Problem is that I need to detect very dark environment (Night mode) and I’m expecting to get very low values (near to zero) on input but if I check input buffer there are very high values(Y[8] = 0x10). Even if I disconnect camera I’m not able to get values near to zero. (See below buffer content)

0x802C1B80       10801080             10801080

0x802C1B88       10801080             10801080

0x802C1B90       10801080             10801080

I don’t use previewer but I know it is able to check for “Down Sampling and Output Clipping” so I checked SETUP_YC but it has default value (0xff00ff00).

Any idea what’s going on and what I did wrong?

 

static PSP_VPFE_TVP5146_ConfigParams tvp5146Params =

{

    TRUE,                              /* enable656Sync */   

    PSP_VPFE_TVP5146_FORMAT_COMPOSITE, /* format        */

    PSP_VPFE_TVP5146_MODE_AUTO         /* mode          */

};

static PSP_VPFECcdcConfigParams vpfeCcdcConfigParams = {

    PSP_VPFE_CCDC_YCBCR_8,              /* dataFlow     */

    PSP_VPSS_FRAME_MODE,                /* ffMode       */

    NO_OF_IMAGER_ROWS,                                /* height       */

    NO_OF_IMAGER_COLS,                                /* width        */

    (NO_OF_IMAGER_COLS *2),                           /* pitch        */

    0,                                  /* horzStartPix */

    0,                                  /* vertStartPix */

    NULL,                               /* appCallback  */ 

    {

        PSP_VPFE_TVP5146_Open,         /* extVD Fxn    */

        PSP_VPFE_TVP5146_Close,

        PSP_VPFE_TVP5146_Control,

    },

    0                                   /*segId         */                         

};

static PSP_VPBEOsdConfigParams  vpbeOsdConfigParams = {

    PSP_VPSS_FRAME_MODE,                /* ffmode       */

    PSP_VPSS_BITS16,                    /* bitsPerPixel */

    PSP_VPBE_YCbCr422,                  /* colorFormat  */

    (NO_OF_ROI_COLS *  (16/8u)),                   /* pitch        */

    0,                                  /* leftMargin   */

    0,                                  /* topMargin    */

    NO_OF_ROI_COLS,                                /* width        */

    NO_OF_ROI_ROWS,                                /* height       */

    0,                                  /* segId        */

    PSP_VPBE_ZOOM_IDENTITY,             /* hScaling     */

    PSP_VPBE_ZOOM_IDENTITY,             /* vScaling     */

    PSP_VPBE_EXP_IDENTITY,              /* hExpansion   */

    PSP_VPBE_EXP_IDENTITY,              /* vExpansion   */

    NULL                                /* appCallback  */

 

};

  • This is a by product of using the bt.601 YCbCr color space that is used by the bt.656 standard the TVP5146 is using to communicate with the DM6437, the standard defines that the range of the signals be 16-235 for luma and 16-240 for chroma. This being said, the lowest value that the TVP5146 will generate is 0x10 or 16, this is considered the blackest black of a bt.656 (bt.601 format) stream, and the 0x80 in the luma means there is no color variation (i.e. you get no color, in this case black). If you are disconnecting the camera than the TVP5146 will lose sync and you end up seeing the 0x80 0x10 pattern which is considered blanking data, and it just happens that the spec defines blanking data to be black.

    In general the values you are seeing make sense, if you were seeing values less than 0x10 that would be cause for alarm since it means something is probably broken/misconfigured. Note that if the TVP5146 could generate 0x00 and 0xFF values that it would end up violating bt.656 and you could get spurious syncs as these could be incorrectly interpreted as synchronization codes.