Skip to content

Conversation

@RaceMiata
Copy link
Contributor

@RaceMiata RaceMiata commented Feb 1, 2026

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.

@RaceMiata RaceMiata marked this pull request as draft February 1, 2026 03:04
@RaceMiata
Copy link
Contributor Author

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.

@RaceMiata RaceMiata marked this pull request as ready for review February 1, 2026 06:07
@RaceMiata RaceMiata marked this pull request as draft February 1, 2026 06:53
@RaceMiata
Copy link
Contributor Author

This fix involves TP2825's AGC to "compress" dark vs bright images to prevent clipping with bright pixels. A couple scenarios may introduce artifacts:

  1. image brighter than OSD elements may cause extra whole-scene dimming than it's already doing
  2. super dark overall scene (e.g. Betaflight Race Pro menu with full black background) will show gray background

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 RaceMiata marked this pull request as ready for review February 2, 2026 06:34
@ligenxxxx
Copy link
Member

@RaceMiata Reg25[6:0] These bits determine the standard sync pulse amplitude for AGC reference.

@RaceMiata RaceMiata marked this pull request as draft February 5, 2026 19:49
@ligenxxxx
Copy link
Member

I believe that modifying reg25[5:0] will require retesting the stability of the analog video.

@RaceMiata
Copy link
Contributor Author

RaceMiata commented Feb 10, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants