Computing devices, including handheld mobile devices, have become essential tools for business and personal uses. Advances in computing power and storage capacity continue to enhance graphics and video processing capabilities. For example, handheld devices are now capable of providing multimedia experiences which can include combinations of text, audio, still images, animation, and video. Processing techniques have been developed which include the use of both hardware and software in attempting to efficiently present video and other graphical objects on a display.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended as an aid in determining the scope of the claimed subject matter.
Embodiments are configured to provide information for display. Various embodiments include processing functionality that can be used to efficiently process pixel data associated with video, graphical, and other information. The functionality can be used in conjunction with different hardware and/or software architectures and configurations. In an embodiment, a computing device includes functionality to use a distinct window having alpha and occlusion features that can be used when processing pixel data associated with user interface (UI) elements and video, but is not so limited. The computing device can use the window when displaying user interface elements having different levels or amounts of transparency as part of video capture and/or playback operations.
These and other features and advantages will be apparent from a reading of the following detailed description and a review of the associated drawings. It is to be understood that both the foregoing general description and the following detailed description are explanatory only and are not restrictive of the invention as claimed.
Embodiments are configured to provide pixel data for displaying video, graphical, and/or other information. Various embodiments include functionality to efficiently process pixel data associated with video, graphical, and other information. The functionality can be used with different hardware and/or software architectures and configurations. For example, the functionality can be used with hardware architectures having and not having overlay support. In an embodiment, a computing device includes functionality to use an overlay window when processing pixel data associated with user interface (UI) elements and video, but is not so limited. For example, the overlay window can be used when processing semi-transparent menu items as part of a video capture or playback process. The computing device can use features of the overlay window when preparing to display UI elements having different levels or amounts of transparency as part of video capture and playback operations.
In one embodiment, a handheld computing device includes an operating system (OS) and display functionality to process pixel data associated with video and UI elements having varying levels or amounts of transparency. The handheld computing device can use features of an overlay window to efficiently process pixel data. For example, a portable computing device, such as a camera phone having video processing functionality, can use features of the overlay window to present pixel data associated with UI elements having transparent properties while playing or recording video, wherein the associated pixel data can include differing update rates and times as compared with the video. As further example, the overlay window can be used to present semi-transparent UI elements to allow video to show through the UI elements or to fade one or more UI elements in and out.
As shown in
With continuing reference to
As described briefly above, one or more of the applications 102 can operate to generate and communicate commands and other information to the video generator 108 and/or the UI subsystem 104. The video generator 108 operates to generate video frames comprising a form of pixel data which can be stored in a buffer or other memory. In some cases, pixel data can include overlay information for displaying a video in a video overlay. A hardware overlay can use a dedicated area of memory or buffer when displaying video. The embodiments described herein can also be used in conjunction with multiple overlays.
The video generator 108 receives application and other commands, and can also use information from storage 106 to generate video display signals, such as a pixel data stream, in the form of a sequence of video frames consisting of video pixel data. For example, a digital video application may send commands to the video generator 108 to generate video associated with a video playback or capture operation. The application can send information to the video generator 108 such as a data source location associated with video pixel data in storage 106, transform, and compression information for generating a displayable video stream.
The application may also send commands, pixel data, and other information associated with one or more UI elements, such as a playback timer, file title, interactive controls and menus, display location and size, etc. to the UI subsystem 104 for display with the video during the video playback or capture operation. For example, an application can communicate x position, y position, size, color, z-order, and alpha information for one or more UI elements to the UI subsystem 104. The application can also communicate the location of a window to display a video stream comprising video pixel data.
As described above, as part of a communication, an application can also provide information associated with a video data source (e.g., network storage, from the device, RAM, flash, etc.) to the video generator 108 so that it can output the associated video stream. Other applications also may be communicating commands, pixel data, and other information to the UI subsystem 104 associated with UI elements for display, such as display windows and application interface data associated therewith. While certain examples are discussed herein, the functionality of the system is not so limited and can be used in conjunction with various applications and systems.
After receiving the commands, pixel data, and other information, the UI subsystem 104 can organize the pixel data and presentation information and feed it to the compositor 110 for compositing and other operations. The UI subsystem 104 maintains information associated with interactive elements being displayed on the display 116. For example, the UI subsystem 104 monitors and tracks open windows, including the associated UI elements, being used by a user of a computing device. The UI subsystem 104 also includes functionality to create and track an overlay window requested by an application, wherein the overlay window can be used when processing and presenting one or more UI elements having varying amounts of transparency with video. The UI subsystem 104 can be configured to create and track an overlay window using the dimensions and position information requested by an application, wherein the overlay window can be created to coincide with a hardware overlay that is being used to display a video stream, as described below. For example, the UI subsystem 104 can operate to create an overlay window having the same size and location as a hardware overlay that is being used to display video for an application, such as video being captured or played back.
In an embodiment, the UI subsystem 104 can be configured to create an overlay window having distinct alpha and occlusion properties or features when an application requires video capture or playback operations. For example, the UI subsystem 104 can operate to create a window having associated alpha and occlusion parameters that can be used to combine one or more UI elements having transparency properties with a video stream being captured or played. Correspondingly, the alpha and occlusion properties of the overlay window can be used when processing pixel data, including video and UI element pixel data.
In one embodiment, the overlay window can be defined to include an alpha value of zero with occlusion properties so that co-located pixels having lower z-values will be occluded by the overlay window. As a result, an alpha value of zero can be loaded into the composition buffer for each pixel that is associated with the overlay window. The overlay window can be used by the compositor 110 when processing pixel data so that UI elements having varying amounts of transparency can be efficiently processed and presented with video, but is not so limited. For example, the overlay window can be processed by the compositor 110 as part of presenting interactive controls and menus having alpha values greater than zero and less than one on top of a video stream being displayed on a device display.
In one embodiment, when an update or change occurs to pixel data, as part of its processing functionality, the compositor 110 can operate to process pixel data associated with one or more of the back buffers for inclusion into the composition buffer using a number of dirty rectangle blit operations. The one or more back buffers, composition buffer, and primary buffer can be configured as sections or portions of memory that can be used for processing pixel data. For example, local memory, such as RAM, can be partitioned into a number of buffers which a graphics chip can use when rendering pixel data associated with a frame or other presentation technique.
After processing the one or more back buffers, the compositor 110 can then operate to copy portions of the composition buffer into the primary buffer through a number of dirty blit operations for minimally sized rectangles. In one embodiment, the UI subsystem 104 can track dirty rectangles by maintaining a list of rectangles whose content has been modified by one or more applications (e.g., dirty). In another embodiment, the UI subsystem 104 can track dirty rectangles by tiling the primary surface into a number of tile elements and tracking which tile elements are out of date. The dirty rectangle/tiling information can be sent to the compositor 110 for use in processing the associated pixel data.
With continuing reference to
The display controller 114 can use the commands to generate the ultimate set of pixel data that will be displayed in the display 116. For example, the display controller 114 can use commands generated by the display driver 112 to control aspects of the display 116 by using a primary display buffer and an overlay buffer to display information, such as video streams, animations, text, icons, and/or other display data, if the associated computing device includes the hardware capability.
As described briefly above, the compositor 110 can perform different processing operations based in part on the hardware and/or software capabilities of an associated computing device. For example, the compositor 110 can operate to process pixel data according to a pixel processing operation based in part on whether a display controller includes alpha channel functionality for blending operations or includes color keying functionality for mixing operations. In an embodiment, the compositor 110 can be configured to process and present pixel data associated with a number of allocated back buffers as one combined view. For example, the compositor 110 can operate to process updates associated with a video frame, a UI element, or some combination thereof, to provide a composed view which can be stored and updated using an allocated composition buffer.
In one embodiment, the compositor 110 can operate to process pixel data associated with each of the back buffers in reverse z-order to provide a combined view that can include one or more UI elements having varying amounts of transparency and video. The compositor 110 can use a composition buffer to maintain the combined view. As part of the processing operations, the compositor 110 can identify whether a buffer is opaque (having pixel data with alpha values equal to one) or includes transparency effects (having pixel data with alpha values greater or equal to zero and less than one).
If a buffer includes opaque pixel data, the compositor 110 can operate to copy the contents of the associated back buffer directly to the composition buffer. If the compositor 110 determines that a buffer is transparent, the compositor 110 can operate perform a per-pixel computation to combine pixel values from the associated back buffer with the current composed view as stored in the composition buffer. The composition buffer can then be updated with the computed pixel values.
In one embodiment, a flag can be used by the compositor 110 to identify an overlay window including identifying the associated alpha and occlusion properties. For example, when an application intends to display video as part of a playback or capture operation, the application can communicate with the UI subsystem 104 that an overlay window is required by the application. The overlay window can be configured to be co-located with an overlay and used to present UI pixel data having varying amounts of transparency. As part of the communication, the application can set a flag to identify the overlay window as having alpha values of zero, and also identifying that an associated back buffer is to be treated as being opaque.
When a processing operation is required, during an update for example, the compositor 110 can check the flag before processing the pixel data to determine whether to treat an associated back buffer as being opaque or transparent. If the flag is set, the compositor 110 treats the overlay window as opaque even though the associated pixel data contains alpha values of zero. The compositor 110 will operate differently on the composition buffer depending on the capabilities of the hardware.
As described herein, embodiments are configured to process and present one or more UI elements having varying amounts of transparency with video. For example, one or more UI elements having varying amounts of transparency can be processed and displayed with video on a computing device, such as a desktop, laptop, camera, desktop, smart phone, personal data assistant (PDA), ultra-mobile personal computer, or other computing or communication device. Moreover, components of system 100 described above can be implemented as part of networked, distributed, and/or other computer-implemented and communication environments. The system 100 can be employed in a variety of computing environments and applications. For example, the system 100 can used with computing devices having networking, security, and other communication components configured to provide communication functionality with other computing and/or communication devices.
While a computing architecture is shown in
Moreover, certain components and functionalities can be implemented in hardware and/or software. While certain embodiments include software implementations, they are not so limited and they encompass hardware, or mixed hardware/software solutions. Also, while certain functionality has been described herein, the embodiments are not so limited and can include more or different features and/or other functionality. Accordingly, the embodiments and examples described herein are not intended to be limiting and other embodiments are available.
Referring to
At 202, if the device includes overlay and alpha blending hardware, the flow proceeds to 204 (
If the device includes alpha blending hardware, the compositor 110 can operate to determine final alpha values for UI element pixel data that is to be superimposed with video pixel data. The compositor 110 can communicate alpha values to the display controller 114 for use when performing alpha blending in the device hardware to produce a final composed view for the display 116. An example illustrating the determination of final alpha values for UI element pixel data having transparency effects that is superimposed with video pixel data is provided below with reference to
Referring to
If the compositor 110 has not processed all windows and encounters an overlay window at 208, the flow proceeds to 210 and the compositor 110 operates to set the RGB value equal to zero (RGB′CB=0) and alpha value equal to zero (α′CB=0) for each pixel in the composition buffer that is associated with the overlay window. As it acts as an opaque window, it will cover any previous content. The flow then returns to 206. Otherwise, at 212, the compositor 110 operates to calculate the RGB value (RGB′CB=RGBCB*αw+RGBCB*(1−αw)) and alpha value (α′CB=αw+(1−αw)*αCB) for each pixel associated with the current window being processed and the flow returns to 206.
If there are no further windows to be processed, the flow proceeds to 214 and the compositor 110 operates to copy dirty rectangles from the composition buffer to the primary buffer. In an alternative embodiment, the compositor 110 can copy dirty tiles to the primary buffer when a tiling system is being used to process pixel data. At 216, the compositor 110 informs the display controller 114 to perform alpha blending operations using the pixel data of the primary buffer and the overlay. The flow proceeds to 218 and the compositor 110 waits for change information associated with the display view. For example, the compositor 110 can wait for the UI subsystem 104 or an application to communicate further changes associated with various pixel data. The flow again returns to 206.
If the device does not include alpha hardware at 202, the flow proceeds to 222. If the device includes hardware that supports color keying functionality at 222, the flow proceeds to 224 (
Before continuing with the description of
With continuing reference to
If there are no further windows to be processed, the flow proceeds to 234 and the compositor 110 operates to process the next dirty rectangle. If there are no further dirty rectangles to process, the flow proceeds to 236 and the compositor tells the display controller 114 to color key blend the pixel data associated with the primary buffer and the overlay. The flow proceeds to 238 and the compositor waits for further change information. If the compositor 110 receives a change notification associated with a UI element update at 240, the flow returns to 226.
If the compositor 110 receives a change notification associated with a video frame at 240, the flow proceeds again to 234 and the next dirty rectangle is processed in a processing order. For example, the compositor 110 can process each dirty rectangle in z-order. If the next dirty rectangle only includes video pixel data at 242, the flow proceeds to 244. At 244, the primary buffer is set to the color key and the compositor 110 marks the associated dirty rectangle as clean. The flow then proceeds again to 236.
If the next dirty rectangle includes no video pixel data at 242, the flow proceeds to 246. At 246, the compositor 110 operates to copy each pixel of the dirty rectangle from the composition buffer to the primary buffer and then marks the dirty rectangle as clean. If the next dirty rectangle includes video and UI pixel data (mixed pixel data) at 242, the flow proceeds to 248. At 248, the compositor 110 operates to calculate the RGB value (RGB′PB=RGBCB*αCB+RGBOV*(1−αCB)) for the primary buffer for each pixel associated with the current dirty rectangle. In one embodiment, the video generator 108 can operate to send the RGB value of the overlay to the compositor for the video pixels of the associated dirty rectangle. The compositor 110 then saves the calculated value for the current dirty rectangle and the flow again returns to 234.
If the device does not include hardware that supports color keying or alpha blending functionality at 222, the flow proceeds to 250 (
If there are no further windows to be processed, the flow proceeds to 256 and the compositor 110 operates to copy dirty rectangles from the composition buffer to the primary buffer. At 258, the compositor 110 tells the display controller 114 to use the information of the primary buffer to display a display view. The flow proceeds to 260 and the compositor 110 waits for change information associated with the display view. The flow then returns to 252.
As described above,
As a result, for this case, the video generator 108 will be writing to an opaque window. Accordingly, the video generator 108 can operate to blit video pixel data to the back buffer associated with the opaque window. Thereafter, the compositor 110 can operate to blit pixel data associated with any dirty rectangles from the opaque back buffer to the composition buffer. Then, the compositor 110 can operate to blit pixel data associated with each UI element having an amount of transparency from an associated back buffer to the composition buffer, including performing the appropriate blending operations while accounting for z-ordering. Finally, the compositor 110 can operate to blit pixel data associated with any dirty rectangles from the composition buffer to the primary buffer for use in displaying the pixel data on the display 116.
Referring now to
If an update affects an opaque rectangle or an opaque UI element 308, the compositor 110 can update the primary buffer 302 for the opaque UI element 308 by performing a blit operation to strip the alpha channel from the composition buffer 306 and convert the color component to screen format for the final display 309. As shown in
If an update affects a regular layered window or rectangle having an amount of transparency (alpha greater than zero and less than one), such as UI element 312 which has an alpha source value of 0.5 (αsrc=0.5) in back buffer 314. In this case, the compositor 110 can blend the UI element 312 and the overlay 307 in overlapping areas so that the UI element 312 shows over or is superimposed with the video pixel data in the resulting display 309. As shown in
As described above, the compositor 110 use a list or other data structure to track dirty rectangles for subsequent processing. Correspondingly, the compositor 110 can track portions of the display 309 that need to be blended based in part on the associated alpha values and/or pixel location(s). After blending operations, the video pixel data will show through the UI elements which include an amount of transparency (see the border 316 surrounding the portion of the UI element 312 having an alpha value of 0.5) in the display 309, and no additional processing will be required on the overlay 307. If the results need to be re-blended, and if the overlay 307 has not changed, the overlay hardware can re-blend the results using the information in the composition buffer 306 and in the overlay 307. In each case, the display controller 114 can operate to combine the information of the primary buffer 302 and the overlay 307 based on the color keying, and send the processed result to the display 116.
In an alternative embodiment, the compositor 110 can use a tiling system to track updates. In this embodiment, the compositor 110 can operate to process the associated pixel data by calculating color and alpha values for the associated pixels and write the blended results to the primary buffer 302. For example, consider individual pixels. Opaque pixels with an alpha value of one will include the calculated color for the associated pixel locations of the composition buffer 306. Pixels associated with the overlay window 300 will have an alpha value of zero and will have the color from the overlay. Pixels having values greater than zero and less than one will result in a blended value.
Referring now to
An application (the same application or a different application) has also requested an opaque UI element 406 which includes an alpha source (back buffer 408) value of one (αsrc=1). The compositor 110 has operated to blit the opaque UI element 406 to the composition buffer 404 which includes an alpha destination value of one (αdst=1). An application (the same application or a different application) has requested a regular layered window or rectangle having an amount of transparency (alpha greater than zero and less than one), such as UI element 410 which has an alpha source value of 0.5 (αsrc=0.5) in back buffer 412. Since the UI element 410 includes an amount of transparency, the compositor 110 can operate to calculate the final alpha values associated with the superimposed UI element 410 in conjunction with the overlay window 400.
The compositor 110 can then write the final color values plus alpha to the primary buffer 414. The video pixel data associated with the video stream is written to the overlay 416. The display controller 114 can use the pixel data stored in the primary buffer 414, which includes color and alpha values, in combination with the video stream or pixel data of the overlay 416 to generate the final view on the display 418. Thereafter, the video stream will show through the UI elements which include an amount of transparency (see the border 420 surrounding the portion of the UI element 410 having an alpha value of 0.5) in the display 418. A similar set of operations are implemented when an update to a UI element or the overlay occurs. Accordingly, the compositor 110 can pass requests to update video pixel data to the display controller 114, while independently operating to update pixel data associated with UI elements.
RGB′CB=RGBD*αD+RGBCB*(1−αD)
α′CB=αD+(1−αD)*αCB
In
RGB′CB=0
α′CB=0
In
RGB′CB=RGBB*αB+RGBCB*(1−αB)
α′CB=αB+(1−αB)*αCB
As shown in
In
RGB′CB=RGBC*αC+RGBCB*(1−αC)RGB′CB=RGBC
α′CB=αC+(1−αC)*αCBα′CB=1.0
In
RGB′CB=RGBE*αE+RGBCB*(1−αE)
α′CB=αE+(1−αE)*αCB
As shown in
RGB′SAVE=RGBCB*αCB+RGBoverlay*(1−αCB)
The results can be written to the primary buffer and the overlay can be left unmodified. Alternatively, the color key can be written to the primary buffer and the results can be written to the overlay. For the mixed case, when the actual Flip( )s from the video generator occur (or the overlay requires updating), the regions with saved transparency data can be alpha blended by the compositor with the overlay data onto the primary surface and then the actual Flip takes place, showing the overlay where the color key is still present. The process can also be used when more than one video stream is being used (e.g., picture-in-picture (PIP) scenarios).
RGB′CB=RGBD*αD+RGBCB*(1−αD)
α′CB=αD+(1−αD)*αCB
In
RGB′CB=0
α′CB=0
In
RGB′CB=RGBB*αB+RGBCB*(1−αB)
α′CB=αB+(1−αB)*αCB
As shown in
In
RGB′CB=RGBC*αC+RGBCB*(1−αC)RGB′CB=RGBC
α′CB=αC+(1−αC)*αCBα′CB=1.0
In
RGB′CB=RGBE*αE+RGBCB*(1−αE)
α′CB=αE+(1−αE)*αCB
As shown in
While a certain order and number of operations are described with respect to the FIGURES, the order and/or number of operations and/or components can be modified according to a desired implementation. Accordingly, other embodiments are available.
Exemplary Operating Environment
Referring now to
Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Referring now to
The computer 2 further includes a mass storage device 14 for storing an operating system 32, application programs, and other program modules. The mass storage device 14 is connected to the CPU 8 through a mass storage controller (not shown) connected to the bus 10. The mass storage device 14 and its associated computer-readable media provide non-volatile storage for the computer 2. Although the description of computer-readable media contained herein refers to a mass storage device, such as a hard disk or CD-ROM drive, it should be appreciated by those skilled in the art that computer-readable media can be any available media that can be accessed or utilized by the computer 2.
By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, digital versatile disks (“DVD”), or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 2.
According to various embodiments, the computer 2 may operate in a networked environment using logical connections to remote computers through a network 4, such as a local network, the Internet, etc. for example. The computer 2 may connect to the network 4 through a network interface unit 16 connected to the bus 10. It should be appreciated that the network interface unit 16 may also be utilized to connect to other types of networks and remote computing systems. The computer 2 may also include an input/output controller 22 for receiving and processing input from a number of input types, including a keyboard, mouse, keypad, pen, stylus, finger, speech-based, and/or other means. Other input means are available including combinations of various input means. Similarly, an input/output controller 22 may provide output to a display, a printer, or other type of output device. Additionally, a touch screen or other digitized device can serve as an input and an output mechanism.
As mentioned briefly above, a number of program modules and data files may be stored in the mass storage device 14 and RAM 18 of the computer 2, including an operating system 32 suitable for controlling the operation of a networked personal computing device, such as the WINDOWS operating systems from MICROSOFT CORPORATION of Redmond, Wash. for example. The mass storage device 14 and RAM 18 may also store one or more program modules. In particular, the mass storage device 14 and the RAM 18 may store other application programs, such as a word processing application 28, an inking application 30, e-mail application 34, drawing application, browser application, etc.
It should be appreciated that various embodiments of the present invention can be implemented (1) as a sequence of computer implemented acts or program modules running on a computing system and/or (2) as interconnected machine logic circuits or circuit modules within the computing system. The implementation is a matter of choice dependent on the performance requirements of the computing system implementing the invention. Accordingly, logical operations including related algorithms can be referred to variously as operations, structural devices, acts or modules. It will be recognized by one skilled in the art that these operations, structural devices, acts and modules may be implemented in software, firmware, special purpose digital logic, and any combination thereof without deviating from the spirit and scope of the present invention as recited within the claims set forth herein.
Although the invention has been described in connection with various exemplary embodiments, those of ordinary skill in the art will understand that many modifications can be made thereto within the scope of the claims that follow. Accordingly, it is not intended that the scope of the invention in any way be limited by the above description, but instead be determined entirely by reference to the claims that follow.
Number | Name | Date | Kind |
---|---|---|---|
5850232 | Engstrom et al. | Dec 1998 | A |
6088018 | DeLeeuw | Jul 2000 | A |
6118427 | Buxton | Sep 2000 | A |
6121981 | Trower, II | Sep 2000 | A |
6353450 | DeLeeuw | Mar 2002 | B1 |
6359631 | DeLeeuw | Mar 2002 | B2 |
6384821 | Borrel | May 2002 | B1 |
6396473 | Callahan | May 2002 | B1 |
20040075670 | Bezine | Apr 2004 | A1 |
20040257369 | Fang | Dec 2004 | A1 |
20050019015 | Ackley | Jan 2005 | A1 |
20060061597 | Hui | Mar 2006 | A1 |
20070011713 | Abramson | Jan 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20090262122 A1 | Oct 2009 | US |