Ilya Alekseev
unread,May 19, 2026, 3:07:52 PM (3 days ago) May 19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to linux-sunxi
Hello everyone.
I have a custom board based on an Allwinner t113-s3.
A standard PAL camera, interlaced mode, is connected to the TV IN input.
I'm using Linux kernel 6.1.x.
The Tina Linux SDK includes a TV decoder driver, sunxi-tvd.
I ported it to my kernel—well, ported it, I just added it to the source tree with very minimal changes.
And everything seems to work: the image is moving, frames are being captured.
BUT.
Sometimes an effect periodically appears and disappears, which, from what I've read, is called "Ghosting."
That is, the edges of objects "doubling" when the camera moves.
Analysis of the situation showed that when this occurs, even and odd lines of two adjacent frames are mixed in a single buffer (frame) coming from the driver.
It's as if the PAL receiver is confused and can't correctly determine whether to operate in BFF or TFF (i.e., Bottom Field First or Top Field First) mode.
And it creates a frame from, so to speak, the lower field (even lines) of one frame and the upper field (odd lines) of the next frame.
The TV decoder has a bit in one of its registers called FLIP FIELDS. If a 1 is written to it while this effect is occurring, the effect immediately disappears.
So, the receiver has indeed mixed up the field order. But after a certain amount of time, which would normally have passed,
the ghosting effect reappears, and now FLIP FIELDS must be reset to 0. This line mixing effect appears and disappears over a period of several minutes.
By examining the state of all possible TV decoder registers, this effect cannot be detected. No bits are changed when the effect appears or disappears.
Does anyone have any ideas as to what could be causing the receiver to misalign the fields? How can this be overcome? Any ideas are welcome.
Thanks everyone.