The post is valid for the ADV7182, ADV7280, ADV7280-M, ADV7281, ADV7281-M, ADV7281-MA, ADV7282, ADV7282-M and ADV7283.
Note there are circumstances where the ADV728x can output fields or video that are too long / too short. This can confuse some back end microprocessors that are trying to process the output from the ADV728x.
Inital Lock to Video
When the ADV728x locks to a video source it will do so in a random location. I.e. it can detect the video souce when in the middle of a field of video. The ADV728x will imediately output video when it has locked to it. This can result in the first line output by the ADV728x being shorter than standard.
This can confuse some back end processors that are storing the output from the ADV728x in a memory buffer. Since the first field output by the ADV728x can be shorter than standard this can result in the memory buffer in the microprocessor being only partially filled. The rest of the memory buffer will be filled with dummy information i.e. all 1's or 0's.
The result will be that the output from the microprocessor will be a partical field of video with dummy information at the bottom of the field. If the dummy information are 1's the dummy informatin will appear as a pink box. If the dummy information are 0's the dummy informatin will appear as a green box. It can take a number of field for these pink or green boxes to disapear on the output video.
- The solution to this issue is to wait until the IN_LOCK and FSC_LOCK bits are high in the ADV728x (User Map register 0x10 bits  and  respecively). Then also wait until the start of the next field of video as indicated by a MIPI frame start packet or a TTL Start-of-active video (SAV) code. This will ensure that the first field output by the the ADV728x will be a full field.
- A line counter algorithm will also prevent this issue (see below).
- Note implementing a fixed delay will not solve this issue.
Video Disconnect/Reconnect + Free Run Mode
When a video source is disconnected the ADV728x will assume that valid video is still present. It will remain in a "coast mode" where it will continue to output whever noise is on the analog video input lines to the ADV728x. It will try and keep the same horizontal and vertical timing of the last video source it locked to.
There are no register bits in the ADV728x that reliably indicate that the ADV728x has entered "coast mode". The best indicator is the instantaneous Horizontal lock bit (user map register 0x13 bit). However this bit can give false positive results.
The ADV728x will remain in "coast mode" for upto a second with standard script or under 250 ms in fast-switching scripts. See here for more information on fast switching mode: Fast Switch Mode- ADV728x
When the ADV728x exits "coast mode" it will enter free-run mode. In this mode the ADV728x will ignore the video input and output a test pattern. See here for more information on Free-run Mode How Does the Free-run Mode Work in the ADV728x Devices ? The "FREE_RUN_ACT" bit (user map register 0x13 bit) will go high when the ADV728x has entered free-run mode.
The ADV728x will then remain in free-run mode until a video source is reconnected to the ADV728x. When the ADV728x has entered active video mode again the IN_LOCK (user map register 0x10 bit), FSC_LOCK (user map register 0x10 bit ) will go high. The FREE_RUN_ACT bit will also go low.
- When the ADV728x transisitons from active video mode to coast mode.
- When the ADV728x transisitions from coast mode to free-run mode.
- When the ADV728x transisition from coast or free-run mode to active video mode.
During each of these discontinuities the ADV728x can output fields of video that are too long. This can cause issues for microprocessors that are storing the video fields output from the ADV728x. The long fields can cause the memory buffer to become overloaded.
The solution to this problem is to implement a control loop in the backend microprocessor to prevent memory buffer overflows. One way of doing this is to count the number of lines being output by the ADV728x per field.
For MIPI parts you can count the number of MIPI line start packets per field.
For TTL parts you can count the number of line start codes or Hsync pulses per field.
If the number of lines go above a maximum allowed value, then ignore the output from the ADV728x until the next field of video.
See applications note AN-1337 for more inforamtion on the line counter algorithm. http://www.analog.com/media/en/technical-documentation/application-notes/AN-1337.pdf
- Increasing the size of the memory buffer is not a reliable solution. Analog Devices cannot supply a known maximum field size that the ADV728x can output.
- Note we do not advise disabling free-run mode. This will prevent one of the discontinuity events (going from coast mode to free-run mode) however it will result in the ADV728x staying in coast mode until a video source is connected. This will result in the ADV728x outputting a noisy image for a long period of time.