This device uses the second method (which, if you don't already know, requires about 100 times less parts), but adds motion detection to switch cameras. The usual way to detect motion is to store a complete video frame and then look for changes on successive frames. Again, a lot of trouble can be saved by only sampling 64 locations on the screen at a low resolution (i.e. just using the A/D in the PIC). Since this device is designed for up to 4 cameras, that is still a lot of data to store in our PIC. Another method was developed to greatly reduce the memory requirements.
Three numeric sums (modulo 256) are computed from the 64 samples in the video frame. The first sum either adds or subtracts the video sample on a 'checkerboard' basis (see fig-1). Any object moving from one cell to an adjacent one will create a shift in the sum. A second sum is made using the pattern in fig-2. This sum is more sensitive to larger objects that may not affect the first sum. Likewise, a third sum is made using the pattern in fig-3. Now we just add the 3 sums! A single 8-bit value now reacts to almost any changes in the visual field. All we need to do now is take the samples. There is no way for the PIC's A/D to sample 8 times on a single video scan line. However, it has no trouble taking one sample per line.
U4-A acts as a 'video clamp': it forces all of the sync tips to zero volts. This allows U4-B to 'slice' off the sync pulses and feed them to the PIC. The PIC can now locate the Vertical Sync by looking for a set of 6 wide Horizontal Sync pulses. It then counts Horizontal Sync pulses to find the start of any particular video line.