Skip to content
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

Misalignment of Overlay and Stream #20

Open
slack2450 opened this issue Apr 23, 2020 · 4 comments
Open

Misalignment of Overlay and Stream #20

slack2450 opened this issue Apr 23, 2020 · 4 comments

Comments

@slack2450
Copy link

I'm trying to overlay images onto my stream however, the overlay seems to be offset a few pixels wrong. It seems to be different each time I plug it in. I can always dial this in manually in my software if needs be but wondered where this could be solved?

@slack2450
Copy link
Author

To be clear The left side of the overlay wraps round to the right

@bunnie
Copy link

bunnie commented Apr 23, 2020

The overlay alignment left/right drifts by a DRAM fetch line or two. From the best I've been able to trace out, it depends a bit upon how the FIFO timing versus the stream line up. Basically, the DRAM fetches a group of pixels all at once, and if the sync happens to fall before or after the fetch this will affect the alignment of the overlay to the image.

iirc the general alignment can be trimmed with a call to hdmi_core_out0_dma_line_align_write() (as seen at

hdmi_core_out0_dma_line_align_write(1920 - 16 * 8 - 1); // this helps align the DMA transfer through various delay offsets
).

However, this option isn't exposed in the current firmware build. You could add a ci.c REPL command to expose it and tweak with it. But the problem is, it will shift from boot to boot depending upon the random luck of where the initial frame position is relative to the DRAM's timing at that moment.

@slack2450
Copy link
Author

Thanks! and thank you for replacing my board :)

@bunnie
Copy link

bunnie commented Apr 23, 2020

glad it's working again. and thank you for being prompt in the return. Helps keep the exchange policy sustainable for everyone!

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

No branches or pull requests

2 participants