Sunday, 18 March 2012

Framebuffer

A framebuffer is a video achievement accessory that drives a video affectation from a anamnesis absorber absolute a complete anatomy of data.

The advice in the anamnesis absorber about consists of blush ethics for every pixel (point that can be displayed) on the screen. Blush ethics are frequently stored in 1-bit bifold (monochrome), 4-bit palettized, 8-bit palettized, 16-bit highcolor and 24-bit truecolor formats. An added alpha approach is sometimes acclimated to absorb advice about pixel transparency. The absolute bulk of the anamnesis appropriate to drive the framebuffer depends on the resolution of the achievement signal, and on the blush abyss and palette size.

Framebuffers alter decidedly from the agent displays that were accepted above-mentioned to the appearance of the framebuffer. With a agent display, alone the vertices of the cartoon primitives are stored. The electron axle of the achievement affectation is again allowable to move from acme to vertex, archetype an analog band beyond the breadth amid these points. With a framebuffer, the electron axle (if the affectation technology uses one) is allowable to trace a left-to-right, top-to-bottom aisle beyond the absolute screen, the way a television renders a advertisement signal. At the aforementioned time, the blush advice for anniversary point on the awning is pulled from the framebuffer, creating a set of detached account elements (pixels).

History

Computer advisers had continued discussed the abstract advantages of a framebuffer, but were clumsy to aftermath a apparatus with acceptable anamnesis at an economically accessible cost. In 1969, Joan Miller of Bell Labs experimented with the aboriginal accepted instance of a framebuffer. The accessory displayed an angel with a blush abyss of three bits. However, it was not until the 1970s that advances in integrated-circuit anamnesis fabricated it applied to actualize the aboriginal framebuffer able of captivation a accepted video image.

In 1972, Richard Shoup developed the SuperPaint arrangement at Xerox PARC.1 This arrangement had 311,040 bytes of anamnesis and was able of autumn 640 by 480 pixels of abstracts with 8 $.25 of blush depth. The anamnesis was broadcast beyond 16 ambit boards, anniversary loaded with assorted 2-kilobit about-face annals chips. While workable, this architecture appropriate that the absolute framebuffer be implemented as a 307,200 byte about-face annals that confused in synchronization with the television achievement signal. The primary check to this arrangement was that anamnesis was not accidental access. Rather, a accustomed position could be accessed alone back the adapted scan-line and pixel time formed around. This gave the arrangement a best cessation of 33 ms for autograph to the framebuffer.

Shoup was additionally able to use the SuperPaint framebuffer to actualize an aboriginal agenda video-capture system. By synchronizing the achievement arresting to the ascribe signal, Shoup was able to overwrite anniversary pixel of abstracts as it confused in. Shoup additionally experimented with modifying the achievement arresting application blush tables. These blush tables accustomed the SuperPaint arrangement to aftermath a advanced array of colors alfresco the ambit of the bound 8-bit abstracts it contained. This arrangement would after become commonplace in computer framebuffers.

In 1974 Evans & Sutherland appear the aboriginal bartering framebuffer, costing about $15,000. It was able of bearing resolutions of up to 512 by 512 pixels in 8-bit grayscale color, and became a benefaction for cartoon advisers who did not accept the assets to body their own framebuffer. The New York Institute of Technology would after actualize the aboriginal 24-bit blush arrangement application three of the Evans & Sutherland framebuffers.2 Anniversary framebuffer was affiliated to an RGB blush achievement (one for red, one for blooming and one for blue), with a minicomputer authoritative the three accessories as one.

The accelerated advance of integrated-circuit technology fabricated it accessible for abounding of the home computers of the backward 1970s (such as the Apple II) to accommodate low-color framebuffers. While initially derided for poor achievement in allegory to the added adult cartoon accessories acclimated in computers like the Atari 400, framebuffers eventually became the accepted for all claimed computers. Today, about all computers with graphical capabilities advance a framebuffer for breeding the video signal.

Framebuffers additionally became accepted in high-end workstations throughout the 1980s. SGI, Sun Microsystems, HP, DEC and IBM all appear framebuffers for their computers. These framebuffers were usually of a abundant college affection than could be begin in best home computers, and were consistently acclimated in television, printing, computer clay and 3D graphics.

Amiga computers, due to their appropriate architecture absorption to cartoon performance, created in the 1980s a all-inclusive bazaar of framebuffer based cartoon cards. Noteworthy to acknowledgment was the cartoon agenda in Amiga A2500 Unix, which was in 1991 the aboriginal computer to apparatus an X11 server affairs as a server for hosting graphical environments and the Open Look GUI graphical interface in aerial resolution (1024x1024 or 1024x768 at 256 colors). The cartoon agenda for A2500 Unix was alleged the A2410 (Lowell TIGA Cartoon Card) and was an 8-bit cartoon lath based on the Texas Instruments TMS34010 clocked at 50 MHz. It was a complete able cartoon coprocessor. The A2410 cartoon agenda for Amiga was co-developed with Lowell University. Other noteworthy Amiga framebuffer based cards were: the Impact Vision IV24 cartoon agenda from GVP, an absorbing chip video suite, able of bond 24-bit framebuffer, with Genlock, Chromakey, TV arresting pass-thru and TV in a window capabilities; the DCTV a cartoon agenda and video abduction system; the Firecracker 32-bit cartoon card; the Harlequin card, the Colorburst; the HAM-E alien framebuffer. The Graffiti alien cartoon agenda is still accessible on the market.

Most Atari ST (Mega STE model), and Atari TT framebuffers were created for the VME rear adapter aperture of Atari machines committed to video amplification cards: Leonardo 24-bit VME cartoon adapter, CrazyDots II 24-bit VME cartoon card, Spektrum TC cartoon card, NOVA ET4000 VME SVGA cartoon agenda (capable of resolutions up to 1024x768 at 256 colors or 800x600 at 32768 colors), whose architecture came from the ISA/PC apple (it was finer an ATI Mach32 S: with 1 MB of video RAM).

Display modes

Framebuffers acclimated in claimed and home accretion generally had sets of authentic "modes" beneath which the framebuffer could operate. These modes would automatically reconfigure the accouterments to achievement altered resolutions, blush depths, anamnesis layouts and brace amount timings.

In the apple of Unix machines and operating systems, such conveniences were usually eschewed in favor of anon manipulating the accouterments settings. This abetment was far added adjustable in that any resolution, blush abyss and brace amount was accessible – bound alone by the anamnesis accessible to the framebuffer.

An adverse side-effect of this adjustment was that the affectation accessory could be apprenticed above its capabilities. In some cases this resulted in accouterments accident to the display.3 Added commonly, it artlessly produced broken and abstract output. Modern CRT monitors fix this botheration through the addition of "smart" aegis circuitry. When the affectation approach is changed, the adviser attempts to access a arresting lock on the fresh brace frequency. If the adviser is clumsy to access a arresting lock, or if the arresting is alfresco the ambit of its architecture limitations, the adviser will avoid the framebuffer arresting and possibly present the user with an absurdity message.

LCD monitors tend to accommodate agnate aegis circuitry, but for altered reasons. Since the LCD charge digitally sample the affectation arresting (thereby battling an electron beam), any arresting that is out of ambit cannot be physically displayed on the monitor

Color palette

Framebuffers accept commonly accurate a advanced array of blush modes. Due to the amount of memory, best aboriginal framebuffers acclimated 1-bit (2 color), 2-bit (4 color), 4-bit (16 color) or 8-bit (256 color) blush depths. The botheration with such baby blush base is that a abounding ambit of colors cannot be produced. The band-aid to this botheration was to add a lookup table to the framebuffers. Anniversary "color" stored in framebuffer anamnesis would act as a blush index; this arrangement was sometimes alleged "indexed color".

The lookup table served as a palette that independent abstracts to ascertain a bound cardinal (such as 256) of altered colors. However, anniversary of those 256 colors, itself, was authentic by added than 8 bits, such as 24 bits, eight of them for anniversary of the three primary colors. With 24 $.25 available, colors can be authentic far added cautiously and exactly, as able-bodied as alms the abounding ambit area which the affectation can show. While accepting a bound absolute cardinal of colors in an angel is somewhat restrictive, about they can be able-bodied chosen, and this arrangement is clearly above to 8-bit color.

The abstracts from the framebuffer in this arrangement bent which of the 256 colors in the palette was for the accepted pixel, and the abstracts stored in the lookup table (sometimes alleged the "LUT") went to three digital-to-analog converters to actualize the video arresting for the display.

The framebuffer's achievement data, instead of accouterment relatively-crude primary-color data, served as an basis – a cardinal – to accept one access in the lookup table. In added words, the basis bent which color, and the abstracts from the lookup table bent absolutely what blush to use for the accepted pixel.

Memory access

While framebuffers are frequently accessed via a anamnesis mapping anon to the CPU anamnesis space, this is not the alone adjustment by which they may be accessed. Framebuffers accept assorted broadly in the methods acclimated to admission memory. Some of the best accepted are:

Mapping the absolute framebuffer to a accustomed anamnesis range.

Port commands to set anniversary pixel, ambit of pixels or palette entry.

Mapping a anamnesis ambit abate than the framebuffer memory, again coffer switching as necessary.

The framebuffer alignment may be beefy (packed pixel) or planar.

Virtual framebuffers

Many systems attack to challenge the action of a framebuffer device, generally for affidavit of compatibility. The two best accepted "virtual" framebuffers are the Linux framebuffer accessory (fbdev) and the X Virtual Framebuffer (Xvfb). The X Virtual Framebuffer was added to the X Window System administration to accommodate a adjustment for active X after a graphical framebuffer. While the aboriginal affidavit for this are absent to history, it is generally acclimated on avant-garde systems to abutment programs such as the Sun Microsystems JVM that do not acquiesce activating cartoon to be generated in a headless environment.

The Linux framebuffer accessory was developed to abstruse the concrete adjustment for accessing the basal framebuffer into a affirmed anamnesis map that is accessible for programs to access. This increases portability, as programs are not appropriate to accord with systems that accept aimless anamnesis maps or crave coffer switching.

Page flipping

Since framebuffers are generally advised to handle added than one resolution, they generally accommodate added anamnesis than is all-important to affectation a distinct anatomy at lower resolutions. Since this anamnesis can be ample in size, a ambush was developed to acquiesce for fresh frames to be accounting to video anamnesis after advancing the anatomy that is currently actuality displayed.

The abstraction works by cogent the framebuffer to use a specific block of its anamnesis to affectation the accepted frame. While that anamnesis is actuality displayed, a absolutely abstracted allotment of anamnesis is abounding with abstracts for the abutting frame. Once the accessory absorber is abounding (often referred to as the "back buffer"), the framebuffer is instructed to attending at the accessory absorber instead. The primary absorber (often referred to as the "front buffer") becomes the accessory buffer, and the accessory absorber becomes the primary. This about-face is usually done during the vertical blanking breach to anticipate the awning from "tearing" (i.e., bisected the old anatomy is shown, and bisected the fresh anatomy is shown).

Most avant-garde framebuffers are bogus with abundant anamnesis to accomplish this ambush alike at aerial resolutions. As a result, it has become a accepted address acclimated by PC bold programmers.

Graphics accelerators

As the appeal for more good cartoon increased, accouterments manufacturers created a way to abatement the bulk of CPU time appropriate to ample the framebuffer. This is frequently alleged a "graphics accelerator" in the Unix world.

Common cartoon cartoon commands (many of them geometric) are beatific to the cartoon accelerator in their raw form. The accelerator again rasterizes the after-effects of the command to the framebuffer. This adjustment can save from bags to millions of CPU cycles per command, as the CPU is freed to do added work.

While aboriginal accelerators focused on convalescent the achievement of 2D GUI systems, best avant-garde accelerators focus on bearing 3D adumbration in absolute time. A accepted architecture is to accelerate commands to the cartoon accelerator application a library such as OpenGL. The OpenGL disciplinarian again translates those commands to instructions for the accelerator's cartoon processing assemblage (GPU). The GPU uses those microinstructions to compute the rasterized results. Those after-effects are bit blitted to the framebuffer. The framebuffer's arresting is again produced in aggregate with congenital video bury accessories (usually acclimated to aftermath the abrasion cursor after modifying the framebuffer's data) and any analog appropriate furnishings that are produced by modifying the achievement signal. An archetype of such analog modification was the anti-aliasing address acclimated by the 3dfx Voodoo cards. These cards add a slight becloud to achievement arresting that makes aliasing of the rasterized cartoon abundant beneath obvious.

Popular manufacturers of 3D cartoon accelerators are Nvidia and AMD.