Monday, June 16, 2008

Graphics Interface Standards

OpenGL

This is the original version of the OpenGL standard interface for 3D graphics on desktop systems. Microsoft also offers a similar standard, Direct3D® (D3D) interface. Both are commonly used on Windows® platforms, but Direct3D® is available only on Windows, where it’s dominate. OpenGL is the dominant standard on all other operating system platforms. OpenGL is known for its architectural stability. There have been several minor revisions, as the standard has evolved, but only one major revision, 2.0. Prior to the 2.0 version, OpenGL supported only vertex shading. Version 2.0 added pixel-shading capabilities. OpenGL has always required floating-point support, which is usually available on desktop systems.

OpenGL is essentially a library of functions which are designed so that they can be ported to any graphics-acceleration hardware without changing the application code that uses these functions. This library of functions is contained within a device driver known as the Installable Client Driver. Hence, OpenGL implementations are often referred to as “drivers” or “libraries”.

One of the great strengths of OpenGL is the abundance of quality resources for learning how to use it, including books, tutorials, online coding examples and classes. In particular, there are two essential books that every developer should have as a starting point – often referred to as the Red and Blue books. These are the official OpenGL Reference Manual and Programming Guide:

• The OpenGL Reference Manual
• The OpenGL Programming Guide

The complete specifications for OpenGL are also available publicly at:
www.opengl.org/

These are great resources for learning OpenGL and for reference during development, but keep in mind that they cover the desktop version which is quite large compared to the embedded OpenGL ES versions supported on the OMAP 2 and 3 platforms.

OpenGL ES 1.1

This is the fixed-function version of the OpenGL ES standard for doing vertex shading on embedded devices. This is the most widely used 3D graphics interface for embedded and mobile devices today. It is a subset of the OpenGL standard used widely on desktop systems. OpenGL ES also supports 2D graphics features for antialiased text, geometry and raster image processing. This embedded version is royalty-free and the complete specifications are publicly available at:
www.khronos.org/opengles/

There are two profiles of OpenGL® ES 1.1, Common and Common Lite. The Common Lite profile is for devices with no floating-point capability. Since all OMAP 2 and 3 devices have floating-point capabilities in hardware, only the Common profile is supported. Supported OSes include embedded Linux, Windows® Embedded® CE and Symbian OS™.

OpenGL ES is the most widely used 3D graphics interface on these platforms. Porting to other operating system platforms is available through TI approved graphics partners. Although this version of OpenGL ES is designed primarily for vertex shading, there is also support for a type of DOT3 per-pixel lighting known as bump mapping. Refer to the ChameleonMan example program in the software development kit (SDK) for an example of this. OpenGL ES 1.1 was preceded by version 1.0. The new functionality includes better support for multitexturing, automatic mipmap generation, vertex buffer objects, state queries, user clip planes and greater control over point rendering.

Sunday, June 15, 2008

Graphics Software Development for DSP

Computer graphics can be as simple as a library of functions that draw geometric shapes, such as lines, rectangles or polygons on a 2-dimensional plane, or copy pixels from one plane to another. Such planes are called bitmaps, drawing surfaces or canvases. They may represent the pixels on a visible display device (such as LCD), or they may be stored somewhere off screen, in an unseen memory area. Bitmaps have a bit depth that determines how many colors they can represent and their pixels may be defined in either the RGB or YUV color space.

The process of drawing shapes on a bitmap is called rasterization or rendering. This can be done directly by software running on the host processor (ARM®), digital signal processor (DSP) or by graphics acceleration hardware. Generally, it’s best to use an accelerator whenever possible because it will require fewer clock cycles and less power to achieve the same rendering.

In 2D graphics, copying pixels from one bitmap to another is a common operation called a BitBlt (Bit Block Transfer), which can be implemented in hardware or software. A typical 2D graphics accelerator is really a BitBlt accelerator, implemented in hardware. It is similar to DMA, but specialized to transferring data on pixel (rather than word) boundaries. BitBlt operations are the foundation of 2D graphics and this is how most graphical user interfaces (GUIs) have traditionally been built.

Simple 2D Graphics

Many applications are built entirely on relatively simple BitBlt operations. Some examples are the graphical user interfaces of Microsoft® Windows®, Linux, MacOS®, set-top boxes and mobile device platforms like Symbian OS™. Each time a user opens or drags a window in a GUI, hundreds of BitBlt operations are instantiated, so the performance of the BitBlts is important to achieve a responsive user interface. The math that is used to calculate BitBlt operations is typically all integer (no floating point), so this helps to achieve good performance.

The main limitation of BitBlt-based graphics is that they do not scale well. User interfaces are typically built for a specific display size (i.e., VGA; 640 × 480 pixels) and it’s difficult to make the graphics adaptable to different screen sizes. A good example of this is what happens to the Windows desktop when it’s changed from a high-resolution mode to VGA mode. The icons become huge and pixilated and most of them no longer fit on the display.

OMAP 2 devices feature a dedicated BitBlt accelerator which applications can access through the PVR2D API (Application Programming Interface). Under Windows Embedded® CE and Windows Mobile®, their DirectX® drivers will utilize the 2D accelerator directly.

OMAP 3 devices approach 2D acceleration differently. Instead of using BitBlt operations, OMAP 3 devices avoid using BitBlts entirely in favor of scalable 2D graphics programmed through OpenVG™ or a 3D interface, such as OpenGL® ES or DirectX Mobile (for Windows).

2D, 2.5D or 3D?

For those uninitiated to the graphics world, it can be difficult to judge whether a particular application is really implemented with 3D graphics, or if it is just making clever use of 2D, to look like 3D. For example, icons which appear to spin in 3D are often achieved on a 2D GUI by repeatedly copying a sequence of still images (BitBlts). Many games feature 3Dlooking characters and objects that really only move in two dimensions (around the screen). This is easy to achieve by applying shading effects to the objects once, then moving them about with BitBlts operations. This typically requires that the “light source” in the scene is at a fixed position; usually somewhere off of the screen. This works well for many applications.

The main criteria that necessitates 3D graphics capabilities is if the user will navigate into the scene at substantial depth, and/or the user’s view will rotate into the depth dimension (for example, the user can “turn around” and look at what’s behind him). Further, if these depth movements must be performed interactively and in real-time in order to achieve an immersive feel of “being in the scene”, this requires the shading of all the objects in the scene be rendered repeatedly to account for each change in the relative position of the user’s view and light source(s). These requirements, taken together, demand 3D graphics capabilities.

Another criterion is the need for a transformation matrix to convert the coordinate system in which the scene is built into the coordinate system of the user’s graphics display. For example, a VGA display is 640 × 480 pixels, but immersive 3D environments require a much larger range of coordinates than VGA allows. Typically, this requires coordinates with such a large dynamic range that they are best specified with either single- or doubleprecision floating-point. However, there are a few notable examples of this being done entirely with fixed-point precision (such as the first Sony PlayStation®).

Finally, 3D graphics accelerators are designed to copy bitmaps onto surfaces with any arbitrary orientation (in three dimensions) with respect to the camera (the display) and to transform the pixels so that their perspective is correct on the new shape. This is called texture mapping and it requires interpolation and filtering that is well beyond the BitBlt capabilities of 2D. The example below contrasts a typical BitBlt operation, which simply copies some portion of the source bitmap, with a texture mapping operation, which maps the bitmap to a different plane in 3D space which requires the pixels to be interpolated to achieve the correct perspective in the scene.



Of course, 3D accelerators add many more capabilities as well, like the ability to handle changes in light sources and removing surfaces which are obscured by other surfaces in the scene (culling).

Graphics Interface Standards

Read the above blog


Friday, June 6, 2008

TMS320DM642 Datasheets, Application Notes and User Guides

TMS320DM642 Video/Imaging Fixed-Point Digital Signal Processor (Rev. L) (tms320dm642.pdf, 1596 KB)
29 Jan 2007 Download


TMS320DM642 DSP Silicon Errata, Silicon Revisions 2.0, 1.2, 1.1, 1.0 (Rev. J) (sprz196j.pdf, 280 KB)
30 Aug 2005 Download

TMS320C6000 EMIF-to-External SDRAM Interface (Rev. E) (spra433e.htm, 8 KB)
04 Sep 2007 Abstract

TMS320DM642 to TMS320DM6437 Migration Guide (spraao2.htm, 9 KB)
29 Jun 2007 Abstract

Migrating from TMS320DM642/3/1/0 to the TMS320DM647/DM648 Device (spraam5.htm, 8 KB)
07 Jun 2007 Abstract

Thermal Considerations for the DM64xx, DM64x, and C6000 Devices (spraal9.htm, 8 KB)
20 May 2007 Abstract

TMS320DM642 Hardware Designer's Resource Guide (Rev. A) (spraa51a.htm, 8 KB)
25 Oct 2005 Abstract

TMS320C64x to TMS320C64x+ CPU Migration Guide (Rev. A) (spraa84a.htm, 8 KB)
20 Oct 2005 Abstract

TMS320DM64x Power Consumption Summary (Rev. F) (spra962f.htm, 9 KB)
18 Feb 2005 Abstract

Video Scaling Example on the DM642 EVM (spraa57.htm, 8 KB)
27 Sep 2004 Abstract

Driver Examples on the DM642 EVM (Rev. A) (spra932a.htm, 8 KB)
31 Aug 2004 Abstract

Use and Handling of Semiconductor Packages With ENIG Pad Finishes (spraa55.htm, 8 KB)
31 Aug 2004 Abstract

Interfacing a CMOS Sensor to the TMS320DM642 Using Raw Capture Mode (spraa52.htm, 8 KB)
30 Aug 2004 Abstract

The TMS320DM642 Video Port Mini-Driver for TVP5146 and TVP5150 decoder (spraa44.htm, 8 KB)
16 Jul 2004 Abstract

JPEG Network on the DM642 EVM (Rev. A) (spra938a.htm, 9 KB)
16 Jul 2004 Abstract

JPEG Netcam2 on the DM642 EVM (Rev. A) (spra937a.htm, 9 KB)
16 Jul 2004 Abstract

JPEG Netcam on the DM642 EVM (Rev. A) (spra936a.htm, 9 KB)
16 Jul 2004 Abstract

JPEG Motion on the DM642 EVM (Rev. A) (spra935a.htm, 9 KB)
16 Jul 2004 Abstract

Interfacing an LCD Controller to a DM642 Video Port (Rev. B) (spra975b.htm, 9 KB)
03 May 2004 Abstract

High Resolution Video Using the DM642 DSP and the THS8200 Driver (Rev. A) (spra961a.htm, 9 KB)
03 May 2004 Abstract

TMS320C6000 Tools: Vector Table and Boot ROM Creation (Rev. D) (spra544d.htm, 8 KB)
26 Apr 2004 Abstract

TMS320C6000 Board Design: Considerations for Debug (Rev. C) (spra523c.htm, 8 KB)
21 Apr 2004 Abstract

TMS320C6000 McBSP Initialization (Rev. C) (spra488c.htm, 8 KB)
08 Mar 2004 Abstract

TMS320C6000 EDMA IO Scheduling and Performance (spraa00.htm, 8 KB)
05 Mar 2004 Abstract

Adapting the SPRA904 Motion Detection Application Report to the DM642 EVM (spra950.htm, 8 KB)
10 Oct 2003 Abstract

An Audio Example Using Reference Frameworks on the DM642 EVM (spra942.htm, 8 KB)
31 Aug 2003 Abstract

MPEG-2 Loop Back on the DM642 EVM (spra941.htm, 8 KB)
31 Aug 2003 Abstract

MPEG-2 High Definition Decoder on the DM642 EVM (spra940.htm, 8 KB)
31 Aug 2003 Abstract

MPEG-2 Encoder on the DM642 EVM (spra939.htm, 8 KB)
31 Aug 2003 Abstract

JPEG Loop Back on the DM642 EVM (spra934.htm, 8 KB)
31 Aug 2003 Abstract

H.263 Loop Back on the DM642 EVM (spra933.htm, 8 KB)
31 Aug 2003 Abstract

Audio Echo on the DM642 EVM (spra931.htm, 8 KB)
31 Aug 2003 Abstract

Audio Demonstration on the DM642 EVM (spra930.htm, 8 KB)
31 Aug 2003 Abstract

The TMS320DM642 Video Port Mini-Driver (Rev. A) (spra918a.htm, 9 KB)
14 Aug 2003 Abstract

A DSP/BIOS AIC23 Codec Device Driver for the TMS320DM642 EVM (spra922.htm, 8 KB)
30 Jun 2003 Abstract

TMS320DM642 EVM Daughtercard Specification Revision 1.0 (spra920.htm, 8 KB)
25 Jun 2003 Abstract

Using IBIS Models for Timing Analysis (Rev. A) (spra839a.htm, 8 KB)
15 Apr 2003 Abstract

TMS320C6000 McBSP Interface to an ST-BUS Device (Rev. B) (spra511b.htm, 9 KB)
04 Jun 2002 Abstract

TMS320C6000 HPI to PCI Interfacing Using the PLX PCI9050 (Rev. C) (spra537c.htm, 8 KB)
17 Apr 2002 Abstract

TMS320C6000 Board Design for JTAG (Rev. C) (spra584c.htm, 8 KB)
02 Apr 2002 Abstract

TMS320C6000 EMIF to External Flash Memory (Rev. A) (spra568a.htm, 8 KB)
13 Feb 2002 Abstract

Cache Usage in High-Performance DSP Applications with the TMS320C64x (spra756.htm, 9 KB)
13 Dec 2001 Abstract

Using a TMS320C6000 McBSP for Data Packing (Rev. A) (spra551a.htm, 9 KB)
31 Oct 2001 Abstract

TMS320C6000 Enhanced DMA: Example Applications (Rev. A) (spra636a.htm, 9 KB)
24 Oct 2001 Abstract

Interfacing theTMS320C6000 EMIFto a PCI Bus Using the AMCC S5933 PCI Controller (Rev. A) (spra479a.htm, 8 KB)
30 Sep 2001 Abstract

TMS320C6000 Host Port to MC68360 Interface (Rev. A) (spra545a.htm, 8 KB)
30 Sep 2001 Abstract

Using the TMS320C6000 McBSP as a High Speed Communication Port (Rev. A) (spra455a.htm, 9 KB)
31 Aug 2001 Abstract

TMS320C6000 Host Port to the i80960 Microprocessors Interface (Rev. A) (spra541a.htm, 8 KB)
31 Aug 2001 Abstract

TMS320C6000 EMIF to External Asynchronous SRAM Interface (Rev. A) (spra542a.htm, 8 KB)
31 Aug 2001 Abstract

TMS320C6000 System Clock Circuit Example (Rev. A) (spra430a.htm, 8 KB)
15 Aug 2001 Abstract

TMS320C6000 McBSP to Voice Band Audio Processor (VBAP) Interface (Rev. A) (spra489a.htm, 9 KB)
23 Jul 2001 Abstract

TMS320C6000 McBSP: AC'97 Codec Interface (TLV320AIC27) (Rev. A) (spra528a.htm, 9 KB)
10 Jul 2001 Abstract

TMS320C6000 McBSP: Interface to SPI ROM (Rev. C) (spra487c.htm, 8 KB)
30 Jun 2001 Abstract

TMS320C6000 Host Port to MPC860 Interface (Rev. A) (spra546a.htm, 8 KB)
21 Jun 2001 Abstract

TMS320C6000 McBSP: IOM-2 Interface (Rev. A) (spra569a.htm, 8 KB)
21 May 2001 Abstract

Circular Buffering on TMS320C6000 (Rev. A) (spra645a.htm, 8 KB)
12 Sep 2000 Abstract

TMS320C6000 McBSP as a TDM Highway (Rev. A) (spra491a.htm, 9 KB)
11 Sep 2000 Abstract

TMS320C6000 u-Law and a-Law Companding with Software or the McBSP (spra634.htm, 9 KB)
02 Feb 2000 Abstract

General Guide to Implement Logarithmic and Exponential Operations on Fixed-Point (spra619.htm, 8 KB)
31 Jan 2000 Abstract

TMS320C6000 C Compiler: C Implementation of Intrinsics (spra616.htm, 8 KB)
07 Dec 1999 Abstract

TMS320C6000 McBSP: I2S Interface (spra595.htm, 9 KB)
08 Sep 1999 Abstract

TMS320C6000 DSP Multichannel Audio Serial Port (McASP) Reference Guide (Rev. J) (spru041j.htm, 8 KB)
20 Mar 2008 Abstract

TMS320C64x/C64x+ DSP CPU and Instruction Set Reference Guide (Rev. G) (spru732g.htm, 8 KB)
20 Feb 2008 Abstract

TMS320C6000 DSP Peripherals Overview Reference Guide (Rev. O) (spru190o.htm, 8 KB)
03 Dec 2007 Abstract

TMS320C64x DSP Video Port/ VCXO Interpolated Control (VIC) Port Reference Guide (Rev. F) (spru629f.htm, 8 KB)
15 Jun 2007 Abstract

TMS320C6000 DSP External Memory Interface (EMIF) Reference Guide (Rev. E) (spru266e.htm, 8 KB)
11 Apr 2007 Abstract

TMS320C6000 DSP Inter-Integrated Circuit (I2C) Module Reference Guide (Rev. D) (spru175d.htm, 8 KB)
26 Mar 2007 Abstract

TMS320C6000 DSP Peripheral Component Interconnect (PCI) Reference Guide (Rev. C) (spru581c.htm, 8 KB)
25 Jan 2007 Abstract

TMS320C6000 DSP Multichannel Buffered Serial Port ( McBSP) Reference Guide (Rev. G) (spru580g.htm, 8 KB)
14 Dec 2006 Abstract

TMS320C6000 DSP Enhanced Direct Memory Access (EDMA) Controller Reference Guide (Rev. C) (spru234c.htm, 8 KB)
15 Nov 2006 Abstract

TMS320C64x DSP Two Level Internal Memory Reference Guide (Rev. C) (spru610c.htm, 8 KB)
28 Feb 2006 Abstract

TMS320C6000 DSP Host-Post Interface (HPI) Reference Guide (Rev. C) (spru578c.htm, 8 KB)
01 Jan 2006 Abstract

TMS320C6000 DSP Power-Down Logic and Modes Reference Guide (Rev. C) (spru728c.htm, 8 KB)
01 Mar 2005 Abstract

TMS320C6000 DSP 32-bit Timer Reference Guide (Rev. B) (spru582b.htm, 8 KB)
25 Jan 2005 Abstract

TMS320C6000 Chip Support Library API Reference Guide (Rev. J) (spru401j.htm, 8 KB)
13 Aug 2004 Abstract

TMS320C6000 DSP EMAC/MDIO Module Reference Guide (Rev. A) (spru628a.htm, 8 KB)
26 Mar 2004 Abstract

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide (Rev. A) (spru584a.htm, 8 KB)
25 Mar 2004 Abstract

TMS320C6000 DSP Designing for JTAG Emulation Reference Guide (spru641.htm, 8 KB)
31 Jul 2003 Abstract

TMS320DM642 EVM OSD FPGA User's Guide (spru295.htm, 8 KB)
26 Jun 2003 Abstract

TMS320C6000 DSP Cache User's Guide (Rev. A) (spru656a.htm, 8 KB)
05 May 2003 Abstract

TMS320DM642 Technical Overview (spru615.htm, 9 KB)
13 Sep 2002 Abstract

TMS320C64x Technical Overview (Rev. B) (spru395b.htm, 8 KB)
30 Jan 2001 Abstract