Page tearing
Encyclopedia
Screen tearing is a visual artifact
Visual artifact
Visual artifacts are anomalies during visual representation of e.g. digital graphics and imagery.-Examples in digital graphics:* Image quality factors, different types of visual artifacts...

 in video
Video
Video is the technology of electronically capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion.- History :...

 where information from two or more different frames is shown in a display device
Display device
A display device is an output device for presentation of information in visual or tactile form...

 in a single screen draw.

The artifact occurs when the video feed sent to the device isn't in sync with the display's refresh, be it due to non-matching refresh rate
Refresh rate
The refresh rate is the number of times in a second that a display hardware draws the data...

s, or simply lack of sync between the two. During video motion, screen tearing creates a torn look as edges of objects (such as a wall or a tree) fail to line up.

Tearing can occur with most common display technologies and video cards, and is most noticeable on situations where horizontally-moving visuals are commonly found, such as in slow camera pans in a movie, or classic side-scrolling video games.

Prevention

The ways to prevent video tearing are dependent on the technology of the display device and video card, the software in use, and the nature of the material being shown. The most common solution is to use multiple buffering.

Most systems will use this function along with one or both of these two methods:

V-sync

Vertical synchronization is an option found in most systems, wherein the video card is prevented from doing anything visible to the display memory until after the monitor has finished its current refresh cycle.

During the vertical blanking interval
Vertical blanking interval
The vertical blanking interval , also known as the vertical interval or VBLANK, is the time difference between the last line of one frame or field of a raster display, and the beginning of the first line of the next frame. It is present in analog television, VGA, DVI and other signals. During the...

, the driver would order the video card to either rapidly copy the off-screen graphics area into the active display area (double buffering
Double buffering
In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete version of the data, rather than a partially-updated version of the data being created by a "writer"...

), or treat both memory areas as displayable, and simply switch back and forth between them (page flipping).

Complications

When vertical synchronization is in use, the frame rate of the rendering engine will exactly equal the monitor's refresh rate, if it was higher. Although this feature normally results in improved video quality, it is not without trade-offs in some cases.

Judder
Vertical synchronization can also lead to artifacts in video and movie presentations, as they are generally recorded at frame rates significantly lower than the typical monitor frame rates (24–30 frame/s). When such a movie is played on a monitor set for a typical 60 Hz refresh rate, the video player will miss the monitor's deadline fairly frequently, in addition to the interceding frames being displayed at a slightly higher rate than they were intended for, resulting in an effect similar to judder – see Telecine: Frame rate differences.

Input lag
Video games, which have a wide variety of rendering engines, tend to benefit well visually from vertical synchronization, as a rendering engine is normally expected to build each frame in real time, based on whatever the engine's variables specify at the moment a frame is requested. However, because vertical synchronization causes input lag
Input lag
Display lag is a phenomenon associated with some types of LCD displays, and nearly all types of HDTVs, that refers to latency, or lag measured by the difference between the time a signal is input into a display and the time it is shown by the display. This lag time has been measured as high as...

, it interferes with the interactive nature of games, and particularly interferes with games which require precise timing or fast reaction times.

Benchmarking
Lastly, when one wishes to benchmark
Benchmark (computing)
In computing, a benchmark is the act of running a computer program, a set of programs, or other operations, in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it...

 a video card or rendering engine, it is generally implied that the hardware and software render the display as fast as possible, without regard to monitor's capabilities or the resultant video tearing. Otherwise, the monitor and video card will throttle the benchmarking program, causing it to generate invalid results.

Beam tracing

Some graphics systems support a function wherein the software can perform its memory accesses so that they stay at the same time point relative to the display hardware's refresh cycle. In this case, the software would write to the areas of the display that have just been updated, staying just behind the monitor's active refresh point. This allows for copy routines or rendering engines which have a somewhat unpredictable throughput as long as the rendering engine is capable of "catching up" with the monitor's active refresh point when it falls behind.

Alternatively, the software could instead stay just ahead of the active refresh point. Depending on how far ahead one chooses to stay, this method may demand code that copies or renders the display at a fixed, constant speed. Too much latency would cause the monitor to overtake the software on occasion, leading to rendering artifacts, tearing, etc.

Demo software
Demo (computer programming)
A demo is a non-interactive multimedia presentation made within the computer subculture known as the demoscene. Demogroups create demos to demonstrate their abilities in programming, music, drawing, and 3D modeling...

 on classic systems such as the Commodore 64
Commodore 64
The Commodore 64 is an 8-bit home computer introduced by Commodore International in January 1982.Volume production started in the spring of 1982, with machines being released on to the market in August at a price of US$595...

 and ZX Spectrum
ZX Spectrum
The ZX Spectrum is an 8-bit personal home computer released in the United Kingdom in 1982 by Sinclair Research Ltd...

frequently exploited these techniques, owing to the predictable nature of their respective video systems, to achieve effects that might otherwise be impossible.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK