A method and apparatus utilizes a three dimensional rendering engine to rotate an image based on user selected or otherwise determined screen orientation. A vertex coordinate transformation is defined for a rotated destination image. The source image is used as a texture for texture mapping during rendering operation to produce rotated image. In one embodiment, a separate set of software instructions is used for each orientation mode. Accordingly, a non-pixel by pixel based 3D rotation may be carried out using a 3D rendering engine to avoid a single parameter based seriatim pixel by pixel based orientation.
|
1. A method for displaying images on a display screen, said method comprising:
receiving a display screen orientation angle;
defining a source image as a texture;
generating geometric primitives for a three dimensional (3D) rendering engine, said geometric primitives corresponding to a rotated display screen image based upon the display screen orientation angle and the source image;
mapping the texture onto the generated geometric primitives; and
outputting the rotated display screen image based on the generated geometric primitives.
10. A non-transitory computer-readable medium storing instructions for causing a computing device to:
receive a display screen orientation angle;
define a source image as a texture;
generate geometric primitives for a three dimensional (3D) rendering engine, said geometric primitives corresponding to a rotated display screen image based upon the display screen orientation angle and the source image;
map the texture onto the generated geometric primitives; and
output the rotated display screen image based on the generated geometric primitives.
28. An apparatus for displaying images of an application on a display, comprising:
means for receiving a display screen orientation angle;
means for defining a source image as a texture;
means for generating geometric primitives for a three dimensional (3D) rendering engine, said geometric primitives corresponding to a rotated display screen image based upon the display screen orientation angle and the source image;
means for mapping the texture onto the generated geometric primitives; and
means for outputting the rotated display screen image based on the generated geometric primitives.
19. An apparatus for displaying images on a display screen, comprising:
a first processor configured to receive a display screen orientation angle;
wherein said first processor is also configured to define a source image as a texture;
wherein said first processor is also configured to generate geometric primitives for a second processor, said geometric primitives corresponding to a rotated display screen image based upon the display screen orientation angle and the source image;
wherein said second processor configured to map the texture onto the generated geometric primitives; and
wherein at least one of said first processor said second processor are configured to output the rotated display screen image based on the generated geometric primitives.
2. The method of
3. The method of
4. The method of
5. The method of
calculating vertices of a target area based on the display screen orientation angle.
6. The method of
7. The method of
8. The method of
9. The method of
mapping the source image from the off-screen memory based on calculating the vertices.
11. The computer-readable medium of
12. The computer-readable medium of
13. The computer-readable medium of
14. The computer-readable medium of
calculate vertices of a target area based on the display screen orientation angle.
15. The computer-readable medium of
calculate the vertices to tessellate the display screen image.
16. The computer-readable medium of
calculate the vertices by associating each vertex of the generated geographic primitives with a corresponding point of the display screen image.
17. The computer-readable medium of
store the source image in an off-screen memory.
18. The computer-readable medium of
map the source image from the off-screen memory based on calculating the vertices.
20. The apparatus of
21. The apparatus of
22. The apparatus of
23. The apparatus of
24. The apparatus of
25. The apparatus of
26. The apparatus of
store the source image in an off-screen memory.
27. The apparatus of
map the source image from the off-screen memory based on the calculated vertices.
29. The apparatus of
30. The apparatus of
31. The apparatus of
32. The apparatus of
33. The apparatus of
34. The apparatus of
35. The apparatus of
36. The apparatus of
|
This application is a continuation of U.S. application Ser. No. 09/772,789 filed Jan. 30, 2001, which issued as U.S. Pat. No. 7,113,194, and is entitled “Method and Apparatus for Rotating an Image on a Display”, having as inventors Andrzej S. Mamona et al., and owned by instant assigned and is incorporated herein by reference.
The invention relates generally to methods and apparatus for rotating images on a display screen, and more particularly to methods and apparatus for rotating a screen image using a 3D rendering engine.
The use of display screens for gaming tablets is known. For example, multiple players may wish to use a laptop computer screen to display a game or other non-game information to different viewers. Systems are known that allow the rotation of the image of, for example, a 90°, 180°, and 270° rotation so that the gaming tablet or screen may be oriented toward different viewers around a table, so that each viewer can view the display in a proper orientation with respect to their position about the table.
One example of such a system is described in U.S. Pat. No. 5,973,664 entitled “Parameterized Image Orientation for Computer Display”. With this system, a software driver, using for example a host processor, uses the same software instructions for each orientation mode. The driver uses parameters to determine where each successive pixel goes in a display memory. For example, the driver (i.e., the host processor) moves pixels from a source memory to display memory using an x and y parameter to rotate an image on a pixel by pixel basis by stepping seriatim through each pixel of the source image and moving the pixel to a corresponding area in display memory using the x and y parameter. The rotation is made directly on a line by line pixel by pixel basis into a display memory. Such a system may require large amounts of host processing time since the calculation of each pixel location is performed on a pixel by pixel basis by stepping, seriatim, through each pixel in a source image and moving the pixel to a display memory based on a single x and y increment value, typically by a host processor.
Other drivers are known that modify image information before putting it into display memory to produce a desired orientation on a computer display. Typically, the code used to effect the orientation of an image in one mode is not used to effect the orientation in another mode. Drivers typically use a host processor to carry out the rotation and thus can unnecessarily overburden the host and decrease performance. With increasing image complexities and the desire to speed up the processing of a host processor, it would be desirable to provide a more efficient mechanism for rotating an image on a display screen.
Also, three dimensional rendering engine are known that receive drawing commands that include primitive information and rendering 3D images. Such 3D rendering engines receive as part of the vertex information, primitive information such as vertex coordinates, color values for each vertex, texture coordinates for one or more textures that are applied to a primitive, specular information, and other information. However, such 3D rendering engines are not known to rotate rendered images. Given their presence in many display systems, it would be desirable to utilize their capability to facilitate image rotation.
Accordingly, a need exists for an improved image rotation apparatus and method.
The invention will be more readily understood with reference to the following drawings wherein:
Briefly, a method and apparatus utilizes a three dimensional (3D) rendering engine to rotate an image based on user selected or otherwise determined screen orientation. A texture mapping is defined for a source image. The source image is treated as a texture and mapped to the destination area. A software driver is used to calculate vertices of the destination area according to the selected orientation mode. In one embodiment, a separate set of software instructions is used to calculate vertices for each orientation mode. Accordingly, a non-pixel by pixel based 3D rotation may be carried out using a 3D rendering engine to avoid a single parameter based seriatim pixel by pixel based orientation. The method and apparatus map the source image into rotated destination area in the display memory.
The driver 12 includes a different instruction set 26a-26c for each of a plurality of selected screen orientations to initiate the defining of destination area for texture mapping of the source image. In this example, the rotation request comes from a user selected orientation that includes at least one of a 90° rotation, a 180° rotation, and a 270° orientation. The driver may be stored in any suitable storage medium such as a CD ROM, system memory, volatile memory, other non-volatile memory, may be downloaded from an Internet storage location, or may be resident in any suitable storage medium.
The 3D rendering engine 20 may be part of a graphics processor, as known in the art, that performs rendering using texture mapping based on primitives (e.g., vertex data). As known in the art, the 3D rendering engine includes various vertex information registers that store information associated with each vertex of a primitive. Such registers may include registers that store vertex coordinate information on a per vertex basis such as coordinate information, color information, texture information (e.g., coordinate on texture associated with the vertex). It will be recognized that the 3D rendering engine 20 is preferably implemented as a hardware rendering engine that uses primitive vertices, such as vertices of triangles or rectangles to represent portions of images. One such 3D rendering engine may be the type found in a RAGE PRO™ graphics processor manufactured by ATI Technologies Inc., Thornhill, Ontario, Canada. However, it will be recognized that any suitable rendering engine may be used.
The driver reports the requested resolution (in this example 600×800) to the operating system and application(s), but allocates display memory 24 with a different width and height. In this example, the driver 12 allocates an 800×600 resolution area of display memory as the rotated destination area. Additionally, the driver 12 allocates intermediate off-screen memory 28 in video memory of a graphics processor. The driver uses the off-screen memory 28 to copy the source images created in system memory. It will be recognized that the off-screen memory can be allocated to be less than the full screen size memory (display memory). In this case the driver will subdivide the source image into sections and copy each section into the intermediate off-screen memory piece by piece.
The method includes using the off-screen memory in a texture mapping operation. Accordingly, the 3D rendering engine uses the allocated off-screen memory 28 content as the texture.
As shown in block 202, the driver defines the source image as a texture by using the source image as a texture. Texture coordinates, which identify the content of the memory containing the source image are sent with the primitive information to the 3D rendering engine. As shown in block 204, in a preferred embodiment, the driver obtains the source image information in the off-screen memory and tessellates the source image into a plurality of triangle primitives by calculating vertices 50a-50c of the target area in the display memory. Tessellation may be carried out in any known manner. Target vertices 50a-50c are calculated depending on the rotation angle based on the received rotation command 14. For example, for a 270 degree rotation:
Xdest=Ysource
Ydest=Width−Xsource
Where Xdest is the destination x coordinate of a vertex in the display memory, Ydest is the destination y coordinate of the vertex in the display memory, Ysource is the y coordinate of the vertex in the offscreen memory, Xsource is the x coordinate of the vertex in the offscreen memory and Width is the width of the display memory.
Every vertex 54a-54c of the target is associated with the corresponding point 50a-50c of the source so that the driver provides texture coordinates for each vertex. As shown, the rectangular target can be tesselated into multiple primitives such as smaller rectangles or triangles subject to a specific implementation of the 3D engine. In such cases the rendering will be performed as a multi-pass operation.
The resulting primitive vertices are sent to the 3D engine in a format such as a conventional vertex information of primitives as understood by the 3D rendering engine. As shown in block 206, The 3D rendering engine performs a rotation by mapping the source image from the off-screen memory 28 to the rotated destination display area 24 based on the calculated vertices.
Stated another way, the application stores the source image as a bit map image, or the operating system stores the image as a bit map image. The driver 12 calculates the vertices of the rotated destination area and provides the texture coordinates for each calculated vertice and sends them to the 3D engine. The 3D rendering engine then maps the source image into rotated destination area using the bitmap as a texture. The 3D rendering engine stores the rotated image into the display memory from which it is displayed by a display engine, as known in the art.
Where the rotation angle is a different location angle other than 2700, a different instruction set 28a or 28b is executed such that each orientation has its own code. The above apparatus and methods treat the off-screen object as a texture and maps the texture from the off-screen memory into a destination surface which may be in the display surface memory on a vertex basis.
As shown in block 306, the driver receives the source image from the application. If this image resides in system memory, the driver (e.g., the host processor) copies it into offscreen video memory 28 as a bitmap, as shown in block 308. As shown in block 310, the method includes defining the source image as a texture and tessallating the source image to determine vertice primitives for a destination area to be used by the 3D rendering engine. As shown in block 312, the driver calculates the vertices for each resulting primitive for the destination coordinate system based on the angle of rotation. As shown in block 314, the method includes calculating, by the driver, the texture coordinates for each of the calculated primitive vertices, based on the angle of rotation and the source image. The driver (e.g., the host processor under control of the driver code) provides the resulting vertex information, including the per vertex texture coordinates to the 3D rendering engine by setting up the requisite 3D engine registers, including the vertex information registers. The 3D rendering engine then maps the texture to the rotated destination area for display by a CRTC or other suitable circuit, as shown in block 316.
The above process is triggered for example in response to the driver receiving a block transfer command to copy a rendered image into display memory. It should be understood that the implementation of other variations and modifications of the invention in its various aspects will be apparent to those of ordinary skill in the art, and that the invention is not limited by the specific embodiments described. It is therefore contemplated to cover by the present invention, any and all modifications, variations, or equivalents that fall within the spirit and scope of the basic underlying principles disclosed and claimed herein.
Khodorkovsky, Oleksandr, Mamona, Andrzej S.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5113357, | May 18 1989 | Sun Microsystems, Inc. | Method and apparatus for rendering of geometric volumes |
5592599, | Dec 18 1991 | Ampex Corporation | Video special effects system with graphical operator interface |
5724492, | Jun 08 1995 | Microsoft Technology Licensing, LLC | Systems and method for displaying control objects including a plurality of panels |
5751295, | Apr 27 1995 | Control Systems, Inc.; CONTROL SYSTEMS, INC | Graphics accelerator chip and method |
5900881, | Mar 22 1995 | DIGITAL MEDIA PROFESSIONALS INC | Computer graphics circuit |
5973664, | Mar 19 1998 | Portrait Displays, Inc. | Parameterized image orientation for computer displays |
5977983, | Feb 20 1997 | S3 GRAPHICS CO , LTD | Method and apparatus for adjusting graphics processing procedures based on a selectable speed/quality gauge |
6137468, | Oct 15 1996 | International Business Machines Corporation | Method and apparatus for altering a display in response to changes in attitude relative to a plane |
6184896, | Jan 08 1999 | Oracle America, Inc | System and method for improved rendering of graphical rotations |
6390918, | Oct 08 1998 | KONAMI DIGITAL ENTERTAINMENT CO , LTD | Video game apparatus, model display method for video games, and readable recording medium for storing model display program for video games |
6466206, | Feb 17 1998 | Oracle America, Inc | Graphics system with programmable real-time alpha key generation |
6577769, | Sep 18 1999 | GAMIGO INC | Data compression through adaptive data size reduction |
6744442, | Aug 29 2000 | Harris Corporation | Texture mapping system used for creating three-dimensional urban models |
6825851, | Aug 23 2000 | NINTENDO CO , LTD | Method and apparatus for environment-mapped bump-mapping in a graphics system |
7113194, | Jan 30 2001 | Qualcomm Incorporated | Method and apparatus for rotating an image on a display |
20020101419, | |||
20020101439, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jan 25 2001 | KHODORKOVSKY, OLEKSANDR | ATI International SRL | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022292 | /0593 | |
Jan 30 2001 | MAMONA, ANDRZEJ S | ATI International SRL | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022292 | /0593 | |
Aug 16 2006 | Qualcomm Incorporated | (assignment on the face of the patent) | / | |||
Jan 19 2009 | ATI International SRL | Qualcomm Incorporated | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022240 | /0856 |
Date | Maintenance Fee Events |
Aug 26 2016 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Aug 13 2020 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
Mar 05 2016 | 4 years fee payment window open |
Sep 05 2016 | 6 months grace period start (w surcharge) |
Mar 05 2017 | patent expiry (for year 4) |
Mar 05 2019 | 2 years to revive unintentionally abandoned end. (for year 4) |
Mar 05 2020 | 8 years fee payment window open |
Sep 05 2020 | 6 months grace period start (w surcharge) |
Mar 05 2021 | patent expiry (for year 8) |
Mar 05 2023 | 2 years to revive unintentionally abandoned end. (for year 8) |
Mar 05 2024 | 12 years fee payment window open |
Sep 05 2024 | 6 months grace period start (w surcharge) |
Mar 05 2025 | patent expiry (for year 12) |
Mar 05 2027 | 2 years to revive unintentionally abandoned end. (for year 12) |