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.

About TVP5158 image cast

Expert 2990 points
Other Parts Discussed in Thread: TVP5158

HI ALL:

             Just Now  We refer to the TI8168 evm board and produced a custom board.

             which have two tvp5158 chip and connected to ti8168 VIP1 portA and VIP1 portB instance.

             The first  tvp5158 capture four channel D1 video and the second  tvp5158  capture two channel D1 video. 

             But now We meet across a problem.

             The six  input image have a color cast. The red image become blue however the blue image become red, That's very strange.

             The tvp5158 driver source code is from dvrrdk4.0 dvr_rdk/dvr_rdk/mcfw/src_linux/devices/tvp5158.

              Below is my Initialize code for tvp5158

VCAP_DEVICE_CREATE_PARAM_S vidDecVideoCreatePrm[2];
for( i = 0 ; i < 2 ; i ++) {
vipInstId = SYSTEM_CAPTURE_INST_VIP1_PORTA+i;
vidDecVideoCreatePrm[i].deviceId = DEVICE_VID_DEC_TVP5158_DRV;
vidDecVideoCreatePrm[i].vipInstId = vipInstId;
vidDecVideoCreatePrm[i].numChInDevice = 4;
vidDecVideoCreatePrm[i].modeParams.videoCaptureMode =
DEVICE_CAPT_VIDEO_CAPTURE_MODE_MULTI_CH_PIXEL_MUX_EMBEDDED_SYNC;
vidDecVideoCreatePrm[i].modeParams.videoIfMode = DEVICE_CAPT_VIDEO_IF_MODE_8BIT;
vidDecVideoCreatePrm[i].modeParams.videoDataFormat = SYSTEM_DF_YUV422P;
vidDecVideoCreatePrm[i].modeParams.standard = SYSTEM_STD_MUX_4CH_D1;
vidDecVideoCreatePrm[i].modeParams.videoSystem =
DEVICE_VIDEO_DECODER_VIDEO_SYSTEM_AUTO_DETECT;
vidDecVideoCreatePrm[i].modeParams.videoCropEnable = FALSE;
vidDecVideoCreatePrm[i].modeParams.videoAutoDetectTimeout = -1;
}
Vcap_deviceCreate(vidDecVideoCreatePrm, 2);
Vcap_deviceStart();

         We have using the blue screen function to debug this problem.

         We using tvp5158 output the blue image,the red image,  the Magenta image.

         The TI8168 can capture the image successfully.

         So I think the tvp5158's output is OK. But We don't know what causes color cast.

            

Thanks

      

  • HI ALL

              Below is the schematic about tvp5158

  • Could you provide the frames captured?
    I believe that all your parameters in capture link is the same as the usecases in DVRRDK, am I right?

    BR,
    Eason
  • Yes, the capture link's paramters  is the same as tvp5158.

    below is the original image

  • Below is the capture's image

    the link is capture->swMs->display

    I' m sorry that the image is not particularly clear, But we can found that the red color become blue

    and the blue color become red

  • Hi ,

    If the UV swap is  the issue, then you may change the YUV format to other possible format to swap the UV again.

    vidDecVideoCreatePrm[i].modeParams.videoDataFormat = SYSTEM_DF_YUV422P;

    However, I suggest you make one more experiment to make sure it is the case.

    Set the bluescreen register to let TVP output a pure color test pattern.

    The bluescreen color can be set as you wish.

    If the color still shows blue and red is reverted, then try to modify the YUV format.

    BR,

    Eason

  • Dear Eason

             We have used the blue screen function to debug this problem.

             We using tvp5158 output the blue image,the red image,  the Magenta image.

             The TI8168 can capture the image successfully.

             So I think the tvp5158's output is OK. But We don't know what causes color cast.

              We set the 0xA9 = (0x02 << 2);and output a pure color test pattern including red, blue, green.

              The ti8168 can capture the pure image successfully and the ti8168 display color normal

  • Dear Eason

                 We have some query  about the hardware

                 1 What is the requirements for power supply ?  for example the 3.3V and 1.1V ripple voltage requirements whether it  effect on the image quality.

                 2 As shown below, We should place R50, R51, R52 and R53 close to J1

                    And place R54, R55, R56 and R57 close to J1, While in my schematic this Resistances is close to the tvp5158 chip whether it effect on the image quality

                

                                                    

  • Hi Try:
    1. Using a TV signal generator to provide a standard CVBS signal.
    2. Connect CVBS direct to the input pin of TVP5158


    BR,
    Eason

  • Dear Eason

                        If we connect the CVBS direct to input pin of TVP5158.

                        The capture  image is white and can not see anything.

  • Dear Eason:

                        We found a phenomenon that the captured image superimposed a color bar.

                        Sometimes it will disappear but sometimes it is very clear.

  • What do you mean about superimposed a color bar?
    TVP5158 doesnt have built-in colorbar generation mechanism so the colorbar should come from video input.
    Could you provide a picture that can show me the issue?
    And, as I mentioned before, please use other video input and standard TV signal generator to make sure this issue is related to video source or not.
    Thanks,
    Eason
  • Dear Eson

                       Even though We don't have the TV signal generator

                       But We can make sure that the issue is not related to the video source.

                       Because we put the tvp5158 's input pin connected to the TV.

                       The TV can display the video normaly. So I think the video source is OK

                   

                       In our custom board It exit anther phenomenon.

                       some SD cameras connected to the board. it will  display gray  image.

                       some SD cameras connected to the board, it will display color image but the image cast

  • Dear Eson

                       Do you have any other advice for us. 

                       Just now the issue is very important for us.

                       Thanks.