Post Go back to editing

ADV7280-M with CVBS Analog - Deinterlacing Issue

Hi,

  We are converting a CVBS NTSC-M video stream to CSI-2 with  ADV7280-M having I2P enabled. The converted image is having some de-interlacing issues. The images are attached here with. Looks like even the color bars have similar issue. Our settings are below:

adv7180_write(state, 0x0F, 0x80); //chip reset
msleep(50);
adv7180_write(state, 0x0F, 0x00); //Exit Power Down Mode

adv7180_write(state, 0xFE, 0x88); //Set CSI Map Address
adv7180_write(state, 0xFD, 0x84); //Set VPP Map Address

adv7180_write(state, 0x00, 0x00); //INSEL = CVBS in on Ain 1
adv7180_write(state, 0x0E, 0x80); //ADI Required Write
adv7180_write(state, 0x9C, 0x00); //ADI Required Write
adv7180_write(state, 0x9C, 0xFF); //ADI Required Write
adv7180_write(state, 0x0E, 0x00); //Enter User Sub Map

adv7180_write(state, 0x03, 0x4E); //ADI Required Write
adv7180_write(state, 0x04, 0x57); //Power-up INTRQ pad
adv7180_write(state, 0x13, 0x00); //Enable INTRQ output driver
adv7180_write(state, 0x17, 0x41); //select SH1
adv7180_write(state, 0x1D, 0xC0); //Tri-S LLC output driver
adv7180_write(state, 0x52, 0xCD); //ADI Required Write
adv7180_write(state, 0x80, 0x51); //ADI Required Write
adv7180_write(state, 0x81, 0x51); //ADI Required Write
adv7180_write(state, 0x82, 0x68); //ADI Required Write

adv7180_write(state, 0x38, 0x24); //NTSC comb control Tried with and without this
adv7180_write(state, 0x6A, 0x03); //Output Sync Select 1
adv7180_write(state, 0x6B, 0x01); //Output Sync Select 2

adv7180_vpp_write(state, 0xA3, 0x00); //ADI Required Write
adv7180_vpp_write(state, 0x5B, 0x00); //Advanced Timing Enabled
adv7180_vpp_write(state, 0x55, 0x80); //Enable I2P

//enable fast switch
adv7180_write(state, 0x0E, 0x00); //ADI Required Writes
adv7180_write(state, 0x0E, 0x40); //Select User Sub Map 2
adv7180_write(state, 0xE0, 0x01); //Select fast Switching Mode. Tried with and without this
adv7180_write(state, 0x0E, 0x00); //Select User Map

adv7180_csi_write(state, 0x01, 0x20); //ADI Required Write
adv7180_csi_write(state, 0x02, 0x28); //ADI Required Write
adv7180_csi_write(state, 0x03, 0x38); //ADI Required Write
adv7180_csi_write(state, 0x04, 0x30); //ADI Required Write
adv7180_csi_write(state, 0x05, 0x30); //ADI Required Write
adv7180_csi_write(state, 0x06, 0x80); //ADI Required Write
adv7180_csi_write(state, 0x07, 0x70); //ADI Required Write
adv7180_csi_write(state, 0x08, 0x50); //ADI Required Write

adv7180_csi_write(state, 0xDE, 0x02); //Power up D-PHY
adv7180_csi_write(state, 0xD2, 0xF7); //ADI Required Write
adv7180_csi_write(state, 0xD8, 0x65); //ADI Required Write
adv7180_csi_write(state, 0xE0, 0x09); //ADI Required Write
adv7180_csi_write(state, 0x2C, 0x00); //ADI Required Write
adv7180_csi_write(state, 0x1D, 0x80); //ADI Required Write
adv7180_csi_write(state, 0x00, 0x00); //Power up CSI Block

   Enabling/Disabling Fast switch mode is not helping either. 

   Are we missing some thing? Is it really de-interlacing issue (considering the color bars are also affected)? 

  Your help will be highly appreciated. 

Parents
  • Hi,

    Please let us know ,whether this issue observing even in PAL format and also other interface like Y/C, and YPrPb ?

    There are two possible causes of these artifacts : interlaced to progressive conversion arteiacts or 2D comb artefacts.
    Interlaced to progressive conversion:
    The I2P does contain a smoothing filter to minimise artefacts but some artefacts can still occur.
    2D Comb:
    The ADV7180/ADV7182/ADV728x video decoders are designed to be low cost analog to digital video decoders and as such they only have 2D comb YC separation filters.
    2D comb filters are good at separating the luma and chroma information but artefacts such as the one you have highlighted are still possible.     
    Solutions :
    1) Use a deinterlacer in your back end processor rather than using the I2P block of the ADV7280. The backend processor will have to store an odd frame of video in a buffer, then store an even frame of video and then stitch these two frames together to generate a progressive field. This will minimise interlaced to progressive errors but will add a delay to your system.
    Be sure to introduce a line counter or similar software control to ensure that you do not get buffer overflows.
    2) Modify some of the registers in the ADV7280 to try and minimise 2D comb this artefacts for your system.
         Try reading the Chroma filter, Luma Filter, Chroma Transient Improvement, Digital Noise Reduction and Luma      Peaking Filter, and Comb filter sections of the ADV728x hardware manual. You may get some improvement but you      will never be totally able to remove 2D comb artefacts.
    3) Use an Analog Devices video decoder that uses a 3D comb filter e.g. ADV7842.
         3D comb will result in fewer artefacts output to the screen. However  a number of frames of video need to be stored      in an external SDRAM chip in order for the 3D comb filter to work. This will add a delay from inputted video to      outputted video.
    If it is custom board,then please refer to application note for layout design at https://www.analog.com/media/en/technical-documentation/application-notes/AN-1337.pdf

    Thanks,

    Poornima

Reply
  • Hi,

    Please let us know ,whether this issue observing even in PAL format and also other interface like Y/C, and YPrPb ?

    There are two possible causes of these artifacts : interlaced to progressive conversion arteiacts or 2D comb artefacts.
    Interlaced to progressive conversion:
    The I2P does contain a smoothing filter to minimise artefacts but some artefacts can still occur.
    2D Comb:
    The ADV7180/ADV7182/ADV728x video decoders are designed to be low cost analog to digital video decoders and as such they only have 2D comb YC separation filters.
    2D comb filters are good at separating the luma and chroma information but artefacts such as the one you have highlighted are still possible.     
    Solutions :
    1) Use a deinterlacer in your back end processor rather than using the I2P block of the ADV7280. The backend processor will have to store an odd frame of video in a buffer, then store an even frame of video and then stitch these two frames together to generate a progressive field. This will minimise interlaced to progressive errors but will add a delay to your system.
    Be sure to introduce a line counter or similar software control to ensure that you do not get buffer overflows.
    2) Modify some of the registers in the ADV7280 to try and minimise 2D comb this artefacts for your system.
         Try reading the Chroma filter, Luma Filter, Chroma Transient Improvement, Digital Noise Reduction and Luma      Peaking Filter, and Comb filter sections of the ADV728x hardware manual. You may get some improvement but you      will never be totally able to remove 2D comb artefacts.
    3) Use an Analog Devices video decoder that uses a 3D comb filter e.g. ADV7842.
         3D comb will result in fewer artefacts output to the screen. However  a number of frames of video need to be stored      in an external SDRAM chip in order for the 3D comb filter to work. This will add a delay from inputted video to      outputted video.
    If it is custom board,then please refer to application note for layout design at https://www.analog.com/media/en/technical-documentation/application-notes/AN-1337.pdf

    Thanks,

    Poornima

Children
  • Hi Poornima-san,

    Thank you for your reply.
    About question3, I could understand. Thank you so much.

    I told about ADV7186 to the customer.
    But he can't accept it because he requires a video decoder with MIPI output, ADV7186 is too expensive and he doesn't have enough time to change his design.

    The customer is going to try to improve these artefacts by image processing of SoC after the SoC receives MIPI video progressive data from the ADV7282A-M.
    The SoC can not receive an interlace video. And the SoC can receive the video data by only MIPI port.
    So he has to use ADV7282A-M and deinterlacer(I2P) in it.
    So he asks us these questions about the more details of I2P interpolation in order to improve the image quality of the guide lines by SoC.

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    About question 1:
    >>1. Could you tell us more details of I2P interpolation?

    Does the I2P interpolation of ADV7282A-M is just only "outn = (inn–1 + inn+1) / 2"?
    (I think this is right because you said it as follows:)
    ez.analog.com/.../adv7282a-m-more-details-of-the-i2p-interpolation
    If this is right, I told it to the customer and this quesion1 may be closed.

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    About question 2:
    >I2P does not any smoothing filter and also i don't see any smoothing filter block in ADV7282A-M.
    >As per my understanding Smoothing filter is an separate filter that we need to integrate according to our requirement and i don't see such filter in the ADV7280A-M part.

    The Device Manual UG-1176 says as follows:
    "Edge adaptive technology minimizes video defects on low angle lines." on the page 35 as follows:

    So I think that ADV7282A-M has a function to minimize video defects on low angle lines for the deinterlaced video.

    My question2 is "If your answer is that only "outn = (inn–1 + inn+1) / 2" is right for Q1 question, could you tell us why the bottom of one black line affects all of top 5 red line?".
    Please see my attached file "ADV7282A_M_I2P_Conversion_Questions.xlsx" on my first comment on this thread.

    I think that the "Edge adaptive technology" function has multi-tap filtering and it is applied across multiple 5 lines, and it causes the bottom of one black line affects all of top 5 red line.
    Is this right?
    If this is right, I'll tell it to the customer and I think this quesion2 will be closed.

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Sorry for many times. And thank you for your support!

    Thank you!
    Best regards.
    Tamu

  • I'm so sorry. I posted to the wrong place..