I've been using the AVES scripts for the ADV7842/AD7511 eval board to successfully setup up my custom ADV7842 board to handle analog RGB inputs. I've moved onto CVBS (NTSC) inputs and I'm not having the same success. I started with the 1-1e script (NTSC to 480i HDMI) and I was able to get video out of my board but the colors where all messed up. Specifically, black is coming out as purple and white is coming out as a lime color. As I dug into it I saw the script sets up the ADV7511 to accept YCrCb so the ADV7842 must output YCrCb. However, the DVI Transmitter on my board only accepts RGB so I need the ADV7842 to output RGB as it did with the analog RGB input scripts. I thought that should be as simple as switching 0x40 (IO) 0x02 from '0' to '1' but that seemed to have no impact. I realize the analog RGB inputs use CP and the CVBS inputs use SDP but other than the register I just mentioned I don't see anything related to SDP color output specifically.
I've been analyzing scripts all day and I can't seem to figure out why the analog RGB input scripts work but the CVBS input scripts don't. Do you have any ideas or things for me to check that might help me diagnose because I'm pretty stumped?
By the way, I tried disabling the 3D comb filter to take the SDRAM on my board out of the equation and it didn't resolve my issue.
Please try the script in the attached script file:
:CVBS NTSC_PAL-M no ped 480p I_P H_V_DE 36bit 444 RGB out DVI:
It uses a set of CSC coeffs from the Apps team.
Analog RGB scripts route through the CP in RGB444 format. CVBS scripts route through the SDP in YCbCr format.
Have you enabled and programmed the SDP_IO CSC for RGB output? In the hardware manual check out paragraph 7.22.7.
I don't have a specific script for CVBS 480i -> RGB 480i since I don't have a monitor that understands RGB 480i. Without the monitor it's hard for me to validate the script.
The comb filters should have no effect on the SD stream. the SDP CSC is after the comb filter.
I believe the CSCs we use are pretty much the same on most devices so I'd begin by getting the hardware manual for the ADV7441A at
and look at Table 36 on page 107. Select CSC Mode 0001 which is YPbPr 601 to RGB. These coefficients should work fine for CVBS to RGB conversion.
You're right, I should be able to do CVBS -> RGB 480p script but it will take a bit of time to write and verify. I'll need to turn on the line doubler to do the interlace to progressive conversion.
Sounds like the output is only 8 bits wide, make sure it's a full 24 bit wide.
I see, I was thinking by setting the RGB_OUT bit I was automatically informing the SDP to execute color space conversion. But it sounds like I have to manually setup the color space conversion.
I skimmed through 7.22.7 and I'm assuming to execute a YCrCb to RGB conversion I need to alter the coefficients. Any chance you have example register settings for that exact conversion? I know you said you can't test CVBS 480i -> RGB 480i because your monitor doesn't support RGB 480i. However, I assume your monitor supports RGB 480p so a CVBS 480i -> RGB 480p would be possible. And in order to execute that the color space conversion would be setup the same as what I need.
This seemed to be a step in the right direction. Black is now black but all other colors are now a different shade of green. Below is what I added to my script:
write 0x94 0xE0 0x08write 0x94 0xE1 0x00write 0x94 0xE2 0x1Awrite 0x94 0xE3 0x6Awrite 0x94 0xE4 0x1Dwrite 0x94 0xE5 0x50write 0x94 0xE6 0x04write 0x94 0xE7 0x23write 0x94 0xE8 0x08write 0x94 0xE9 0x00write 0x94 0xEA 0x0Awrite 0x94 0xEB 0xF8write 0x94 0xEC 0x00write 0x94 0xED 0x00write 0x94 0xEE 0x1Awrite 0x94 0xEF 0x84write 0x94 0xF0 0x08write 0x94 0xF1 0x00write 0x94 0xF2 0x00write 0x94 0xF3 0x00write 0x94 0xF4 0x0Dwrite 0x94 0xF5 0xDBwrite 0x94 0xF6 0x19