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.

Why the video is dark when I use the bt656 mode on the DM365 IPNC?

Hello everyone,

    I use BT656 data as my input source on the DM365 IPNC. We use a external decoder to produce the bt656 data, and connect the decoder  with J5 I/F on DM365. Then we could get the output video from a TV, but the image on the TV looks very dark. Could someone help me?

    My isif registers value as following:

 0x01c71000: 00000003 0000200b 00000000 00000000
 0x01c71010: 000002cf 0000023f 00000000 0000059f
 0x01c71020: 00000000 00000000 0000011f 0000ffff
 0x01c71030: 000000ff 0000002d 00001249 0000041f
 0x01c71040: 00004280 00000000 00000000 00000000
 0x01c71050: 00000200 00000200 00000200 00000200
 0x01c71060: 00000000 00000000 00000000 00000000
 0x01c71070: 0000011f 0000011f 0000011f 00000000
 0x01c71080: 00000028 00000003 00001902 00000000
 0x01c71090: 00000000 00000000 00000000 00000000
 0x01c710a0: 00000000 00000000 00000000 00000000
 0x01c710b0: 00000000 00000000 00000000 00000000
 0x01c710c0: 00000000 00000000 00000000 00000000
 0x01c710d0: 00000000 00000000 00000000 00000000
 0x01c710e0: 00000000 00000000 00006600 00000100
 0x01c710f0: 00000000 00000000 00000000 00000000
 0x01c71100: 00000000 00000000 00000000 00000000
 0x01c71110: 00000000 00000000 00000000 00000000
 0x01c71120: 00000000 00000000 00000000 00000000
 0x01c71130: 00000000 00000000 00000000 00000000

    I guess I need configure the Ipipe registers to make it do not the color space conversion to ycbcr, because my input source's format has been ycbcr, but I could't find which register should I configure. Could someone help me ?

 

Thanks.

  • Hi,

    Is it 10bit input?

    If not, you may try with CCDW = 0.

     

    regards,

    Sang-Yong

  • Hi, Sang-Yong


    The CCDW has been setted as 0,

    0x01c71000: 00000003 0000200b 00000000 00000000

    The CCDW should be 8-10 bit in  0x200b, it is already 0.

     

     

    regards

    Yanbin-Yue

  • I am sorry but I am not clear on your situation.

    If your data is 10bit, then please use 2bit shift and save the data in 1byte per color,pixel.

    If your data is 8bit, then please use 0bit shift, and save the data in 1byte per color,pixel.

     

    Also, if possible, please check the data in the memory (whether the value is much smaller than you expect or not).

    By checking the data in the memory, you can find whether the problem is in ISP side or in Display side.

     

    Regards,

    Sang-Yong

     

     

  • Sorry for my description.

    >>If your data is 8bit, then please use 0bit shift, and save the data in 1byte per color,pixel.

    My data is 8bit, and we use 0bit shift.

    If I want to save the data in 1byte per color,pixel, which register should I configure?

    Is CCDCFG.SDRPACK ? I set this register as 2 (8bits/pixel).

    If I run moduletest.out drv_isif,  does the file I have caputred contain the data in the memory ?

     

    Thanks,

    Yanbin Yue

  • Yes, your setting is right.

    I don't have knowledge about the driver, but your data should be in memory before display. The memory address is defined by register setting so we can figure it out.

     

    regards,

    Sang-Yong

     

  • I want to know if I use the J5 input port on the IPNC, and use the 8bit BT656 data as input data, then can I get the right output on TV?

    I can't find the contents about this mode in the documentation section 4.2 VPFE, dose the hardware suppot this case?

     

    Thanks,

    Yanbin Yue

  • Yes,

     Either C0~C7 (8bit mode) or C0~Y1 (10bit mode).

     

    regards,

    Sang-Yong

  • I use the command moduletest.out drv_isif to get the memory data, you can see in the attachment. The input source is a red color picture.

    The value of ycbcr looks very different with my expect value. Could you tell me what has happened?

    Another problem is a frame data size should be 1440*576, but no matter how I configure the registers, I get half size data only.

    Is my understanding  about the fram size correct?

     

    Thanks,

    Yanbin Yue

    IMG_0100_1440x576.zip
  • I don't see any proper image, either.

    Please post "Data capture" as a separate question (as I am not familiar with the S/W).

    As your data is already YUV, it is supposed to be displayed (or after resizing or format conversion (422to420), you have another YUV data.

    Do you actually see some meaningful image on screen (although it is dark)? If so, can you dump the data in display address? If not, please post it as separate quesiton.

     

    regards,

    Sang-Yong 

  • The attachment is the image data on screen, and the input source is a red color image, too.

    I think the RGB2YCbCr conversion matrix dm365 using is differnent from the standard BT.656's.

    The input source I used is a DVD.

    DVD -> TVP5146->DM365

     

    Thanks,

    Yanbin Yue

    IMG_0100_736x576.zip
  • I think we should check the data in memory first to move on.

    When you get the right image, please dump the register setup (of ISIF, IPIPE, IPIPEIF) together.

     

    By the way, RGB2YCbCr is not part of BT.656 data path. Please check our doc again (and hope you can figure out some clues).

     

    Regards,

    Sang-Yong

  • I have noted the path problem already, but can't find a appropriate register value to set IPIPE.SRC_FMT.FMT. In the doc VPFE, it says "3 / YCbCr (16bit) input, YCbCr (or RGB) output", but my input data is YCbCr 8bit. If I use the other path , the image will be very dark, and if I set IPIPE.SRC_FMT.FMT as 3, the image looks only have greeen and red components. The register setup  as following,

    ISIF:

     0x01c71000: 00000003 00002083 00000000 00000000
     0x01c71010: 000002cf 0000023f 00000000 0000059f
     0x01c71020: 00000001 00000001 0000011f 0000ffff
     0x01c71030: 000000ff 0000002d 00000000 0000041f
     0x01c71040: 00004280 00000000 00000000 00000000
     0x01c71050: 00000200 00000200 00000200 00000200
     0x01c71060: 00000000 00000000 00000000 00000000
     0x01c71070: 0000011f 0000011f 0000011f 00000000
     0x01c71080: 00000028 00000003 00001902 00000000
     0x01c71090: 00000000 00000000 00000000 00000000
     0x01c710a0: 00000000 00000000 00000000 00000000
     0x01c710b0: 00000000 00000000 00000000 00000000
     0x01c710c0: 00000000 00000000 00000000 00000000
     0x01c710d0: 00000000 00000000 00000000 00000000
     0x01c710e0: 00000000 00000000 00006600 00000100
     0x01c710f0: 00000000 00000000 00000000 00000000
     0x01c71100: 00000000 00000000 00000000 00000000
     0x01c71110: 00000000 00000000 00000000 00000000
     0x01c71120: 00000000 00000000 00000000 00000000
     0x01c71130: 00000000 00000000 00000000 00000000

    IPIPE:

     0x01c70800: 00000001 00000000 00000003 000000b1
     0x01c70810: 00000001 0000011f 00000000 0000059f
     0x01c70820: 00000000 00000000 00000001 0000000f
     0x01c70830: 00000000 00000000 00000000 00000000
     0x01c70840: 000003ff 00000000 00000000 00000000
     0x01c70850: 00000000 00000000 00000000 00000000
     0x01c70860: 00000000 00000000 00000000 00000000
     0x01c70870: 00000000 00000000 00000000 00000000
     0x01c70880: 00000000 00000000 00000000 00000000
     0x01c70890: 00000000 00000000 00000000 00000000
     0x01c708a0: 00000000 00000000 00000000 00000000
     0x01c708b0: 00000000 00000000 00000000 00000000
     0x01c708c0: 00000000 00000000 00000000 00000000
     0x01c708d0: 00000000 00000000 00000000 00000004
     0x01c708e0: 0000000a 00000013 0000001c 00000025
     0x01c708f0: 00000025 0000002a 0000002f 00000035
     0x01c70900: 0000001f 0000001d 0000001b 0000001a
     0x01c70910: 0000001a 00000011 00000008 00000000
     0x01c70920: 00000000 00000000 00000000 00000000
     0x01c70930: 00000000 00000000 00000000 00000000
     0x01c70940: 00000000 000007ff 00000000 00000000
     0x01c70950: 00000000 00000000 00000000 00000000
     0x01c70960: 00000000 00000000 00000000 00000000
     0x01c70970: 00000000 00000000 00000000 00000000
     0x01c70980: 00000000 00000000 00000000 00000000
     0x01c70990: 00000000 00000000 00000000 00000000
     0x01c709a0: 00000000 00000000 00000000 00000000
     0x01c709b0: 00000000 00000000 00000000 00000000
     0x01c709c0: 00000000 00000000 00000000 00000000
     0x01c709d0: 00000000 00000000 00000000 00000000
     0x01c709e0: 0000018b 00000200 00000200 00000296
     0x01c709f0: 00000001 00000400 00000000 0000001e
     0x01c70a00: 0000000a 00000004 0000000a 00000010
     0x01c70a10: 00000018 00000019 0000001b 00000014
     0x01c70a20: 00000032 00000028 00000010 00000100
     0x01c70a30: 00000000 00000000 00000000 00000100
     0x01c70a40: 00000000 00000000 00000000 00000100
     0x01c70a50: 00000000 00000000 00000000 00000060
     0x01c70a60: 00000100 00000000 00000000 00000000
     0x01c70a70: 00000100 00000000 00000000 00000000
     0x01c70a80: 00000100 00000000 00000000 00000000
     0x01c70a90: 00000000 00000010 0000004d 00000096
     0x01c70aa0: 0000001d 00000fd5 00000fab 00000080
     0x01c70ab0: 00000080 00000f95 00000feb 00000000
     0x01c70ac0: 00000080 00000080 00000000 00000000
     0x01c70ad0: 00000000 00000000 00000000 00000000
     0x01c70ae0: 00000000 00000000 00000000 00000000
     0x01c70af0: 00000000 00000000 00000000 00000000
     0x01c70b00: 00000000 00000000 00000000 00000000
     0x01c70b10: 00000000 00000000 00000000 00000000
     0x01c70b20: 00000000 00000000 00000000 00000000
     0x01c70b30: 00000000 00000000 00000000 00000000
     0x01c70b40: 00000000 00000000 00000000 00000000
     0x01c70b50: 00000000 00000000 00000000 00000000
     0x01c70b60: 00000000 00000000 00000000 00000000
     0x01c70b70: 00000000 00000000 00000000 00000000
     0x01c70b80: 00000000 00000000 00000000 00000000
     0x01c70b90: 00000000 00000000 00000000 00000000
     0x01c70ba0: 00000000 00000000 00000000 00000000
     0x01c70bb0: 00001fff 00000000 00001fff 00000000
     0x01c70bc0: 00001fff 00000000 00001fff 00000000
     0x01c70bd0: 00001fff 00000000 00001fff 00000000
     0x01c70be0: 00001fff 00000000 00001fff 00000000
     0x01c70bf0: 00000000 00000000 00000000 00000000


    IPIPEIF:

     0x01c71200: 00000000 00000000 000005a0 00000120
     0x01c71210: 00000000 00000000 00000000 00000000
     0x01c71220: 00000000 00000010 00000200 00000000
     0x01c71230: 00000000 00000000 00000fff 00000000
     0x01c71240: 0000ffff 00000000 00000000 00000000
     0x01c71250: 00000fff 00000010 00000000 00000000

     

    Thanks,

    Yanbin Yue

  • When I setup the registers as above, I get  the yuv data only has Y compents, the Cb,Cr values are 0x80, 0x00.

    So, IPNC does support 8bit BT.656 input from parallel port?

     

    Thanks,

    Yanbin Yue

  • Hi,

    Inherently, IPNC software did not support YUV input mode (neither BT656 nor discrete sync mode). But we had created some patch that can be used to make it work with YUV 8 bit input mode for progressive input. I am attaching the patch that can help. Please note that IPNC does not have a YUV sensor connection, so we have not done thorough testing of this patch but have used it on other custom platform.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Missed the patch in previous post. Updating it now.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

    YUV_input_mode.patch
  • Hi, Anshuman

     Thank you very much to answer my question.

     I read the YUV_input_mode.patch, and find some problem.

    1. miscConfig.ycInSwap = TRUE;

       When I use this setup, I can't get the interrupt of the isif. I think this is becaue we have only used the CIN0-CIN7, so I must set this register to FALSE for the interrupt.

    2. sdrOutConfig.outWidth  = gDRV_isifObj.imgsModeInfo.validWidth*2

       The value gDRV_isifObj.imgsModeInfo.sensorDataWidth and gDRV_isifObj.imgsModeInfo.sensorDataHeight in my code is 720 and 576, if I set gDRV_isifObj.imgsModeInfo.validWidth and gDRV_isifObj.imgsModeInfo.validHeight as 720 and 576, and set sdrOutConfig.outWidth as 1440, then I get wrong image on TV. But if I set gDRV_isifObj.imgsModeInfo.validWidth and gDRV_isifObj.imgsModeInfo.validHeight as 1440 and 288, the image on TV will be right. I don't know why.

    3. vdInt = ((Uint32)gDRV_isifObj.imgsModeInfo.sensorDataHeight-32);

      If gDRV_isifObj.imgsModeInfo.sensorDataHeight's value is 576, and use vdInt as 576-32, I can't get the isif interrupt too. I can get the isif interrupt only when vInt is 287 or less.

    4.gDRV_ipipeObj.rszInConfig.inputDataPath      = CSL_RSZ_INPUT_DATA_PATH_IPIPEIF;

     This is the key set for YUV8. But I found this set several days ago, too. But in this set, I can't get the chroma value, as you see in the attachment.  But I can get the closest to the input image(It contain the chroma value), when I run moduletest.out drv_isif. I guess, I need to change some resizer registers to get the right output on TV, but I can't find them. By the way, when I set cb and cr as 0x80, I can get the correct grayscale.

     

    Thanks,

    Yanbin Yue

    IMG_0100_736x576.zip