Phase Lock, Sync, Genlock slave rasters via pixel clock subtraction

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is sort of a partial repost, as another member asked about genelocking of a an alphanumeric display (some years ago) to one of the old video types no longer used.

 

However  phase locking (aka slave rasters that track a master for timing) display or camera rasters for video types of:

HDMI, or DisplayPort, or SMPTE video streams, is a current useful subject.

 

Often camera systems, like on an automobile need graphics to be over-layed on top.   

This method of pixel clock subtraction will also work for two similar camera's to create a stereo camera system.

 

You can have in theory an unlimited number of slave rasters or multiple displays or overlay , or even to compress video real-time, or to display all changing pixels, such as on real-time military radar display, with very little work on the circuits.

 

FOR  two video source rasters, a slave and a master :

 

1) get the two vertical syncs matched for both width and polarity, and stable to the same root pixel clock.

 

2) next use pixel clock subtraction, as explained in US patent 6,262,695  (its expired and thus free),  

put the two syncs of the two rasters, into an XOR ,  this will make a signal to subtract a pixel clocks , whenever the two syncs are not in perfect match.

 

Let's call this, XOR-NOR of the two syncs  "2Syn-XOR"    (depending on your transistors, in your gates, you will want an XOR or a N-XOR)

 

We have run this up to 150 MHZ with gates in FPGA's  And it works.

 

3) use "2Sy-XOR"    to control an "AND" gate , by way of one its two inputs.

the other input to this AND-gate is pixel clock.  

 

Thus the output of the AND-gate will be gated pixel clock.  This gated clock, will gently bring the slave raster into phase lock.

 

4) this gated pixel clock ,  is the pixel clock for the slave raster.   

 

5) the process will subtract groups of pixel clocks, of 1 clock up to a count of the number of clocks that make up a vertical sync.

 

in a raster of XGA size (1024 x 768)  at 60 Hz frame rate,  this will lock the two rasters in about 1/10 th of a second. 

 

Should the two rasters get out of sync, due to noise issues, or if you are pushing the speed of the gates too near a switching event (clock edge), the system will "re-sync" automatically.  (better wording may be to "re-phase-lock").

If desired, an LED with a simple RC-mono-stable-FF can also trigger on the output of the XOR-NOR gate, to indicate if the system, is re-phase-locking from time to time (aka having stability issues). 

 

The mono-stable FF, needs to be slow enough for the human eye to see a blink happen. Or use you O-scope set of single event, once the system should have calmed down and fully phase-locked, such as 1/5 th of second, after the both raster register sets and the clocks have all been have been set up.

 

You can see white papers, drawings of the gates, and O-scope images and a moving image of this process on you-tube).

Mimax.com  has the info, and youtube has the mimax phase-locking video  (again, its FREE, expired patent)

 

Note:

The two rasters can be from different branded equipment's  but you have to have the rasters using the same root pixel clock.

Most video sources like HDMI and SMPTE and Displayport , all 3 can provide the root pixel clock to use, from the "master".

 

Logically of course the two rasters must have the same number of hort pixels, same number of lines, same hort and vert blank time.

 

This has been applied to products like dual head graphics cards, that provide a wide desktop for popular computers.  When the two rasters are booted up,  even when having the same root pixel clock, the two sets of GPU registers (aka video controller's registers), of the two raster heads, get set up at random time (as the operating system of the PC is still booting and doing all sorts of things, that grab the processor cycles), which is little different, in the timing of many events of PC hardware set up, at each boot up.  Thus the user will see two 60Hz displays, but they are randomly out of phase.

 

Viewing movies or animations across the two, or even fast moments of large application windows produce visual tearing affects.  Phase locking the two vertical syncs (via pixel clock subraction) fixes this.

 

Pixel lock subtraction can easily, bring the two rasters (aka video heads) into phase lock.

 

What of the problem of subtracting pixel clocks, if the pixel clock is also used for DRAM refresh?

Because the clocks are nibbled away, in small groups, of only a maximum, of the vertical system (in many systems that could be about 20 pixel clocks),

this small delay, of 20 worse case pixel clocks being taken away, for any full frame,  wont bother DRAM refresh.

 

Recall, almost all DRAM's were designed to be able to hold (retain) memory for 1/60th of a second, very reliably  No matter what flavor of DRAM refresh that is used.. whether is its refresh distributed in small chunks throughout the whole frame period, or one big refresh-event of all columns during vertical blank period.

 

A note on color-keying. 

 

I have used this also for color-key, where the raster on top (ie the foreground)  has animated characters moving over a gaming background.

We used color-number-zero, as the key.   Typically the color key of  00000-R, 000000-G and 00000-B  (RGB of 565 color [16 bits]) is used,   When all zeros 00000-R, and 000000-G, and 00000-B , the gates between the raster layers, know that this "zero" color of the foreground is to be transparent, and thus gate in the background pixels.

ScooterMcGooter

Last Edited: Wed. Mar 9, 2022 - 12:42 AM