-
Notifications
You must be signed in to change notification settings - Fork 93
Fix analog ghosting #596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix analog ghosting #596
Conversation
|
The previous workaround to mitigate ghosting by limiting brightness/contrast to 7/14 has now been removed. While this Pull Request significantly reduces ghosting for high brightness/contrast settings, it's still possible to have to set too high brightness/contrast from the menu to cause ghosting. Please use caution when setting brightness/contrast. |
|
This fix involves TP2825's AGC to "compress" dark vs bright images to prevent clipping with bright pixels. A couple scenarios may introduce artifacts:
AGC (register 0x25) can be tuned (along with brightness/contrast registers 0x10/0x11) to trade-off between ghosting and AGC artifacts. Feedback from testers is welcome. Also any insight from the TP2825 specs or docs, @ligenxxxx or anybody else? |
|
@RaceMiata Reg25[6:0] These bits determine the standard sync pulse amplitude for AGC reference. |
|
I believe that modifying reg25[5:0] will require retesting the stability of the analog video. |
|
Yes, I investigated further and noticed relying on up'ping reg25[5:0] from the current 0x28 value results in inconsistent/unreliable results. On the other hand I noticed only BoxPro sets it to 0x28 on initialization, not goggle1 or 2. I then read the boot-up value on the BoxPro and it turned out to be 0xB8 (bit 8 on) which I believe means AGC gain locked. If that would be the same bootup value on google2 why would BoxPro need to unlock AGC gain? Was it in attempt to reduce mitigate analog ghosting? Now I force reg25 at bootup value of 0xB8 and the results are much more consistent/reliable. C03 used to give me darker image than other cams with brighter analog OSD elements than other cams but not as bad any more with reg25 not set to 0x28. |
Analog input ghosting is caused by TP2825 analog processor output voltage too high. To fix or at least mitigate the issue, the AGC (register 0x25) gain can be raised to prevent clipping. TP2825 registers 0x11 and 0x12 containing brightness and contrast values are also tweaked to match resulting range for digital input.
Also the contrast range of 47 in the goggle menu does not use up the full range for the FPGA register so a conversion was made map the full range of the slider to the full range (0-255) applicable.