fsphil / hacktv

Analogue TV transmitter for the HackRF
GNU General Public License v3.0
669 stars 80 forks source link

WSS data not present when Videocrypt is enabled #73

Closed philpem closed 3 years ago

philpem commented 3 years ago

I noticed that with VideoCrypt scrambling enabled, line 24 was being passed through as clear video, while all other lines were scrambled.

Upon further investigation, I noticed that videocrypt.c includes a "hack for WSS signalling":

https://github.com/fsphil/hacktv/blob/e03945bc01d1dc4fa93569e2f84e16362864a215/videocrypt.c#L481

This allows line 24 to pass through the VideoCrypt encoding process unmodified -- but WSS data is carried on line 23. The net effect is that:

This means WSS will not work in conjunction with VideoCrypt.

If the "if" statement is modified to check for line 23, the following happens -- at least with the Thomson/Sky SVA1:

This sounds closer to the intended behaviour, and TVs checking Line 23 should ignore the scrambled WSS data on line 24. If the TV is adjusted to eliminate overscan, the WSS data will appear (in scrambled form) as the first complete line of the picture.

fsphil commented 3 years ago

Looks like I broke this when I introduced the new process functions. Fix applied.