A video node for use in rendering one or more video frames of a video stream. The video node is represented by a compositing tree (2100). The compositing tree (2100) comprises at least one image primitive node (2140) representing one or more video frames (2300) of the video stream. At least one of the video frames (2300) represented by the image primitive node (2140) is composited with at least one further graphical primitive represented by at least one further primitive node (2130) of the compositing tree (2100). The video frame (2300) is composited with the further graphical primitive according to a compositing operation represented by an operation node of the compositing tree (2100) in order to generate a composite image (2303) represented by at least one composite node (2150) of the compositing tree (2100).
|
1. A method of rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said method comprising the steps of:
representing at least one video frame of a video sequence by a first image node;
representing at least one video frame of the video sequence by a second image node;
compositing the video frame represented by the first image node with a corresponding path graphical primitive for extracting a predetermined shape of an image represented by a first primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation represented by a first composite node of said compositing tree, in order to generate a first composite image;
compositing the video frame represented by the second image node with a further corresponding path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
compositing the first and second composite images together, according to at least one of a plus compositing operation and an over compositing operation represented by a third composite node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of the third composite node; and
displaying said image on a display device.
14. A method of creating a video node, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said method comprising the steps of:
representing at least one video frame of a video sequence by a first image node;
representing at least one video frame of the video sequence by a second image node;
compositing the video frame represented by the first image node with a corresponding path graphical primitive for extracting a predetermined shape of an image, represented by a first primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation represented by a first composite node of said compositing tree, in order to generate a first composite image;
compositing the video frame represented by the second image node with a further corresponding path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
compositing the first and second composite images represented by the first and second composite nodes together, according to at least one of a plus compositing operation and an over compositing operation represented by said video node, in order to create said video node representing the video frames, wherein one or more attributes of said video frames are changeable by changing an attribute of said video node; and
displaying one or more of the video frames on a display device using said video node.
27. An apparatus for creating a video node, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said apparatus comprising:
representation means for representing at least one video frame of a video sequence by a first image node and representing at least one video frame of the video sequence by a second image node;
first compositing means for compositing the video frame represented by the first image node with a corresponding path graphical primitive for extending a predetermined shape of an image, represented by a first primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation each represented by a first composite node of said compositing tree, in order to generate a first composite image;
second compositing means for compositing the video frame represented by the second image node with a further path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
third compositing means for compositing the first and second composite images represented by the first and second composite node together, according to at least one of a plus compositing operation and an over compositing operation represented by said video node, in order to create said video node representing the video frames, wherein one or more attributes of the video frames are changeable by changing an attribute of said video node; and
displaying means for displaying one or more of the video frames on a display device using said video node.
29. A computer readable storage medium encoded with a computer program for creating a video node, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said computer readable storage medium comprising:
means for representing at least one video frame of a video sequence by a first image node;
means for representing at least one video frame of the video sequence by a second image node;
means for compositing the video frame represented by the first image node, with a corresponding path graphical primitive for extracting a predetermined shape of an image, represented by a first primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation represented by a first composite node of said compositing tree, in order to generate a first composite image;
means for compositing the video frame represented by the second image node with a further path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
means for compositing the first and second composite images represented by the first and second composite nodes together, according to at least one of a plus compositing operation and an over compositing operation represented by said video node, in order to create said video node representing the video frames, wherein one or more attributes of the video frames are changeable by changing an attribute of said video node; and
means for displaying one or more of the video frames on a display device using said video node.
26. An apparatus for rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said apparatus comprising:
representation means for representing at least one video frame of a video sequence by a first image node and representing at least one video frame of a second video sequence by a second image node;
first compositing means for compositing the video frame represented by the first node with a corresponding path graphical primitive for extracting a predetermined shape of an image, represented by a primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation represented by a first composite node of said compositing tree, in order to generate a second composite image;
second compositing means for compositing the video frame represented by the second image node with a further path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
third compositing means for compositing the first and second composite images represented by the first and second composite nodes together, according to at least one of a plus compositing operation and an over compositing operation represented by a third composite node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of the third composite node; and
displaying means for displaying said image on a display device.
28. A computer readable storage medium encoded with a computer program for rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said computer readable storage medium comprising:
means for representing at least one video frame of a video sequence by a first node;
means for representing at least one video frame of the video sequence by a second image node;
means for compositing the video frame represented by the first image node with a corresponding path graphical primitive for extracting a predetermined shape of an image, represented by a first primitive node of said compositing tree, according to at least one of an in compositing operation and an out compositing operation represented by a first composite node of said compositing tree, in order to generate a first composite image;
means for compositing the video frame represented by the second image node with a further path graphical primitive represented by a second primitive node of said compositing tree, according to the at least one compositing operation represented by a second composite node of said compositing tree, in order to generate a second composite image;
means for compositing the first and second composite images represented by the first and second composite nodes together, according to at least one of a plus compositing operation and an over compositing operation represented by a third composite node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of the third composite node; and
means for displaying said image on a display device.
2. The method according to
3. The method according to
4. The method according to
5. The method according to
6. The method according to
7. The method according to
8. The method according to
9. The method according to
10. The method according to
11. The method according to
12. The method according to
13. The method according to
15. The method according to
16. The method according to
17. The method according to
18. The method according to
19. The method according to
20. The method according to
21. The method according to
22. The method according to
23. The method according to
24. The method according to
25. The method according to
|
This application claims the right of priority under 35 U.S.C. § 119 based on Australian Patent Application No. 2004901571, filed 24 Mar. 2004, which is incorporated by reference herein in its entirety as if fully set forth herein.
The present invention relates generally to image processing and, in particular, to rendering video images comprising a plurality of frames. The present invention also relates to a method and apparatus for rendering video images, and to a computer program product including a computer readable medium having recorded thereon a computer program for rendering video images.
Many existing graphics rendering systems provide images, text and line work as “primitives”. The term primitive refers to a base graphical element used in the creation of a complex graphical image. In order to display video images on such graphics rendering systems, software applications executing on the systems need to constantly update the contents of image primitives. These software applications also have to process audio data associated with the image primitives. The need to update image primitives constantly makes it difficult for software applications to process multiple video streams, or to composite multiple video images and still images.
In order to improve the processing of multiple video streams, some existing graphics rendering systems provide video images as a series of image primitives. However, these rendering systems are typically limited in their ability to composite video with other video or still graphical primitives or to create special effects. Such rendering systems typically also require special hardware.
Thus a need clearly exists for an improved method and apparatus for rendering an image and, in particular, for rendering video images.
It is an object of the present invention to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.
According to one aspect of the present invention there is provided a video node for use in rendering one or more video frames of a video stream, said video node being represented by a compositing tree, said compositing tree comprising at least one image primitive node representing one or more video frames of said video stream, at least one of said video frames represented by said image primitive node being composited with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, said at least one video frame being composited with said further graphical primitive according to a compositing operation represented by an operation node of said compositing tree in order to generate a composite image represented by at least one composite node of said compositing tree.
According to another aspect of the present invention there is provided a method of rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said method comprising the steps of:
representing one or more video frames of a video sequence by at least one of said primitive nodes;
compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
compositing the composite image represented by said at least one composite node with one or more other composite images represented by other composite nodes of said compositing tree, according to a further operation represented by a further operation node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of said further operation node.
According to still another aspect of the present invention there is provided a method of creating a video node representing one or more video frames of a video sequence, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said method comprising the steps of:
representing said one or more video frames of said video sequence by at least one of said primitive nodes;
compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
compositing the composite image represented by said at least one composite node with one or more other ones of said graphical primitives represented by other ones of said primitive nodes of said compositing tree, according to a further operation represented by said video node, in order to create said video node representing said one or more video frames, wherein one or more attributes of said video frames are changeable by changing an attribute of said video node.
According to still another aspect of the present invention there is provided an apparatus for rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said apparatus comprising:
representation means for representing one or more video frames of a video sequence by at least one of said primitive nodes;
compositing means for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
further compositing means for compositing the composite image represented by said at least one composite node with one or more other composite images represented by other composite nodes of said compositing tree, according to a further operation represented by a further operation node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of said further operation node.
According to still another aspect of the present invention there is provided an apparatus for creating a video node representing one or more video frames of a video sequence, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said apparatus comprising:
representation means for representing said one or more video frames of said video sequence by at least one of said primitive nodes;
compositing means for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
further compositing means for compositing the composite image represented by said at least one composite node with one or more other ones of said graphical primitives represented by other ones of said primitive nodes of said compositing tree, according to a further operation represented by said video node, in order to create said video node representing said one or more video frames, wherein one or more attributes of said video frames are changeable by changing an attribute of said video node.
According to still another aspect of the present invention there is provided a computer program product including a computer readable medium comprising recorded thereon a computer program for rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said computer program comprising:
code for representing one or more video frames of a video sequence by at least one of said primitive nodes;
code for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
code for compositing the composite image represented by said at least one composite node with one or more other composite images represented by other composite nodes of said compositing tree, according to a further operation represented by a further operation node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of said further operation node.
According to still another aspect of the present invention there is provided a computer program product including a computer readable medium comprising recorded thereon a computer program for creating a video node representing one or more video frames of a video sequence, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said computer program comprising:
code for representing said one or more video frames of said video sequence by at least one of said primitive nodes;
code for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
code for compositing the composite image represented by said at least one composite node with one or more other ones of said graphical primitives represented by other ones of said primitive nodes of said compositing tree, according to a further operation represented by said video node, in order to create said video node representing said one or more video frames, wherein one or more attributes of said video frames are changeable by changing an attribute of said video node.
According to still another aspect of the present invention there is provided a computer program for rendering an image, said image being formed by compositing one or more graphical primitives according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive of said image or an operation for combining said graphical primitives, said computer program comprising:
code for representing one or more video frames of a video sequence by at least one of said primitive nodes;
code for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
code for compositing the composite image represented by said at least one composite node with one or more other composite images represented by other composite nodes of said compositing tree, according to a further operation represented by a further operation node of said compositing tree, in order to render said image, wherein one or more attributes of said video frames are changeable by changing an attribute of said further operation node.
According to still another aspect of the present invention there is provided a computer program for creating a video node representing one or more video frames of a video sequence, said video node being created according to a compositing tree, said compositing tree comprising a plurality of nodes each representing a graphical primitive or an operation for combining said graphical primitives, said computer program comprising:
code for representing said one or more video frames of said video sequence by at least one of said primitive nodes;
code for compositing at least one of said video frames represented by said at least one primitive node with at least one further graphical primitive represented by at least one further primitive node of said compositing tree, according to a first operation represented by a first operation node of said compositing tree, in order to generate a composite image represented by at least one composite node of said compositing tree; and
code for compositing the composite image represented by said at least one composite node with one or more other ones of said graphical primitives represented by other ones of said primitive nodes of said compositing tree, according to a further operation represented by said video node, in order to create said video node representing said one or more video frames, wherein one or more attributes of said video frames are changeable by changing an attribute of said video node.
Other aspects of the invention are also disclosed.
Some aspects of the prior art and one or more embodiments of the present invention will now be described with reference to the drawings and appendices, in which:
Where reference is made in any one or more of the accompanying drawings to steps and/or features, which have the same reference numerals, those steps and/or features have for the purposes of this description the same function(s) or operation(s), unless the contrary intention appears.
It is to be noted that the discussions contained in the “Background” section and that above relating to prior art arrangements relate to discussions of documents or devices which form public knowledge through their respective publication and/or use. Such should not be interpreted as a representation by the present inventor(s) or patent applicant that such documents or devices in any way form part of the common general knowledge in the art.
A general purpose computer system 800 upon which arrangements described below may be practiced is shown in
The computer system 800 is formed by a computer module 801, input devices such as a keyboard 802 and mouse 803, output devices including a printer 815, a display device 814 and loudspeakers 817. A Modulator-Demodulator (Modem) transceiver device 816 is used by the computer module 801 for communicating to and from a communications network 820, for example, connectable via a telephone line 821 or other functional medium. The modem 816 may be used to obtain access to the Internet, and other network systems, such as a Local Area Network (LAN) or a Wide Area Network (WAN), and may be incorporated into the computer module 801 in some implementations.
The computer module 801 typically includes at least one processor unit 805, and a memory unit 806, for example formed from semiconductor random access memory (RAM) and read only memory (ROM). The module 801 also includes a number of input/output (I/O) interfaces including an audio-video interface 807 that couples to the video display 814 and loudspeakers 817, an I/O interface 813 for the keyboard 802 and mouse 803 and optionally a joystick (not illustrated), and an interface 808 for the modem 816 and printer 815. In some implementations, the modem 8116 may be incorporated within the computer module 801, for example within the interface 808. A storage device 809 is provided and typically includes a hard disk drive 810 and a floppy disk drive 811. A magnetic tape drive (not illustrated) may also be used. A CD-ROM drive 812 is typically provided as a non-volatile source of data. The components 805 to 813 of the computer module 801, typically communicate via an interconnected bus 804 and in a manner which results in a conventional mode of operation of the computer system 800 known to those in the relevant art. Examples of computers on which the described arrangements can be practised include IBM-PC's and compatibles, Sun Sparcstations or alike computer systems evolved therefrom.
Typically, the software implementing the described methods is resident on the hard disk drive 810 and is read and controlled in its execution by the processor 805. Intermediate storage of the program and any data fetched from the network 820 may be accomplished using the semiconductor memory 806, possibly in concert with the hard disk drive 810. In some instances, the software may be supplied as an application program supplied to the user encoded on a CD-ROM or floppy disk and read via the corresponding drive 812 or 811, or alternatively may be read by the user from the network 820 via the modem device 816. Still further, the software may also be loaded into the computer system 800 from other computer readable media. The term “computer readable medium” as used herein refers to any storage or transmission medium that participates in providing instructions and/or data to the computer system 800 for execution and/or processing. Examples of storage media include floppy disks, magnetic tape, CD-ROM, a hard disk drive, a ROM or integrated circuit, a magneto-optical disk, or a computer readable card such as a PCMCIA card and the like, whether or not such devices are internal or external of the computer module 801. Examples of transmission media include radio or infra-red transmission channels as well as a network connection to another computer or networked device, and the Internet or Intranets including e-mail transmissions and information recorded on Websites and the like.
The described methods may alternatively be implemented in dedicated hardware such as one or more integrated circuits performing the functions or sub functions of the described methods. Such dedicated hardware may include graphic processors, digital signal processors, or one or more microprocessors and associated memories.
Many existing graphics rendering systems use what is known as an ‘immediate mode’ application programming interface (API) between an application program and a rendering system. For each video frame to be rendered, for example, a complete corresponding set of rendering commands are sent to the API by the application program. In contrast, a ‘retained mode’ API provides a complete compositing tree on a per-frame basis. For such a retained mode API an application program provides an initial compositing tree. The initial compositing tree is then modified for each video frame in a video stream in order to effect a change in an image being displayed.
Modifications which may be made to a compositing tree include geometrically transforming part of the compositing tree or the entire compositing tree. The structure of a compositing tree may also be modified by unlinking and linking subtrees or nodes. Attributes (eg: colour or opacity) of individual nodes of a compositing tree may also be changed/modified.
In retained mode rendering systems, graphical primitives may be used to build a compositing tree. Primitives form the leaf nodes of such a compositing tree. Six graphics primitives may be defined below as follows:
Compositing is the process of combining several graphical primitives to represent a final image. Graphical primitives may be combined using operators to represent more complex graphical images. The result of combining graphical primitives may likewise be combined using the same set of operators to form a compositing tree representing any desired image.
A sequence of images may be generated by repeatedly rendering or “updating” a compositing tree representing the image sequence. In a compositing tree, graphical primitives are represented by the leaf nodes of the compositing tree and compositing operations are represented by the internal nodes of the compositing tree. The leaf nodes will be referred to below as “primitive nodes” and the internal nodes will be referred to as “composite nodes.”
Primitive nodes and composite nodes may have different attributes associated with the nodes. These attributes may include transform matrices, colour, opacity and quality. Such attributes may be stored in memory 806 and referenced by a corresponding node. A transform matrix determines the final position that a graphical primitive represented by a corresponding node will appear on a rendering target (e.g., the display screen 814). The attributes such as opacity and colour apply to primitive nodes. Two new primitive types, namely a “video primitive” and an “audio primitive”, are described below for use in a retained mode rendering system.
As described above, the software program implementing the described methods may be effected by instructions being executed by the processor 805. The instructions may be formed as one or more code modules, each for performing one or more particular tasks. In one implementation, the software 100 may have three core code modules 110, 120 and 130 as shown in
In order to describe the code modules 110, 120 and 130 in more detail, an example of a compositing tree 2100 representing an image to be displayed on the display 314 will now be described with reference to
The method 2200 begins at the first step 2210, where the processor 805 creates the video node 2140 representing the video movie 2300. In this present example, the video movie 2300 is used as an input video source to the video node 2140 and the frames of the video movie 2300 may be configured within a video file stored in memory 806, which is referenced by the video node 2140. At the next step 2220, the primitive node 2130 is created to represent the circle shape path 2301. Then at step 2230, the video node 2120 is created to represent the video movie 1901 and the video movie 1901 is used as an input video source to the video node 2120. Again, frames of the video movie 1901 may be stored in a video file configured within memory 806 and referenced by the video node 2120.
The method 2200 continues at the next step 2240, where the video movie 2300 is clipped within the circle shape 2301 by compositing each of the frames of the video movie 2300 “in” the circle shape 2301. That is, the video node 2140 is composited with the primitive node 2130 using the in operation. The result of the in operation (i.e., the clipped movie 2303) is represented by the composite node 2150. Frames of the clipped movie 2303 may be stored in a video file configured within memory 806, which is referenced by the composite node 2150. Alternatively, the frames of the clipped movie 2303 may be rendered to an intermediate buffer configured within memory 806. At the next step 2250, the clipped movie 2303 is placed on top of the video movie 1901 by compositing the frames of the clipped movie 2303 “over” frames of the video movie 1901. Again, the result of the over operation may be stored in a video file configured within memory 806, which is referenced by the composite node 2150, or rendered to an intermediate buffer configured within memory 806. Then at step 2260, the video node 2140 and video node 2120 are set to a playing mode. The video nodes 2140 and 2120 may be set to play, for example, by executing the video files containing the frames of the video movies 2300 and 1901, respectively, or the video file containing the result of the over operation. The setting of video nodes 2140 and 2120 to play may be triggered by altering the state of a variable associated with each of the nodes 2140 and 2120, for example. Similarly, the playback rate of the video frames of the movies 2300 and 1901, the volume of audio associated with the video frames and the opacity of the video frames may be changed by altering the state of a variable associated with each of the video nodes 2140 and 2120, for example. In the following steps 2270 and 2280 the compositing tree 2100 gets updated regularly. A transform matrix of the composite node 2150 is changed before each update. The final output 1905 as seen in
The rendering code module 110 executes in a retained-mode rendering manner and thereby, supports a compositing tree structure and compositing operations. In particular, the rendering code module 110 supports the operations “plus” and at least one of “in” or “out”. Alternatively, the operations “over” or “rover” may be used instead of “plus”. (Note: “rover” is the same as “over” with the operands reversed.) Using the operations “plus” and “in” or “plus” and “out”, the media management code module 120 may preform opacity operations on graphical primitives and in particular video images in an efficient manner.
An example of a video node 300 representing a video primitive is shown in
A conventional rendering system operating in a retained-mode provides a set of graphical primitives and a set of operations. Such a rendering system supports the use of each primitive with different operations, such as “path over text” or “image in path” and is required to process all of the possible combinations of primitives and operations. If a new primitive type is introduced, the rendering system has to process a whole new set of primitive-operation combinations. For example, if P represents the number of primitives, O the number of operations and the rendering system complexity without a new primitive is P×P×O, then the rendering system complexity with one new primitive is (P+1)×(P+1)×O. This is a large increase in the complexity of the rendering system.
Rather than using a new primitive type, a composite node (e.g., the composite node 2150) may be used to form a new primitive at an application level. As will be described in more detail below, two image nodes (e.g., the image node 301 as seen in
The pixel format widely used for rendering images is RGBA or BGRA. In accordance with such a pixel format, each pixel has a colour component comprising red, green and blue levels (RGB), and an opacity component known as the alpha channel (A). In a conventional retained mode rendering system, in order to change the opacity of an image, the opacity of each pixel of the image has to be changed. However, such a method is inefficient. In a rendering system executing in a retained mode such as the rendering code module 110, when an object A is composited “in” another object B, the opacity of the resultant composite object is determined by multiplying the opacities of each pixel in object B with those of object A. If a plane-fill primitive of uniform opacity is used as object B, and the object A is composited “in” object B, the opacity of the resultant composite object is equivalent to changing the opacity of the object A. Such a method is a much more efficient method of changing the opacity of the object A.
The video node 300 of
Each of the image nodes 301 and 308 represents a frame of an input video stream at a certain time associated with the respective node. The source of the input video stream may be a digital video file stored in memory 806 or a live video stream sourced via the communications network 820, for example. Each of the frames associated with each of the nodes 301 and 308 are stored in one of two further memory buffers configured within memory 806 with each of the memory buffers being referenced by each of the nodes 301 and 308, respectively. The opacity of a displayed frame and hence the opacity of the video node 300, may be altered by changing the opacity of the plane fill nodes 303 and 309 or path nodes 307 and 311. Generally, only one of the video frames represented by the nodes 305 and 306 will be active (i.e., currently being displayed on the display 814, for example) at any time. The active video frame will be the frame that represents the correct time in the input video stream. However, when interpolation between two consecutive video frames is required, the video frames represented by the nodes 305 and 306 will be active and each of memory buffers associated with the nodes 305 and 306 will contain one of the two consecutive frames to be interpolated.
The opacity of each plane fill (e.g., 303) or path node (e.g., 307) may be linearly interpolated based on a required frame position between the two consecutive video frames to be interpolated. For example, as shown in
As described above, video attributes, such as frame rate, length, frame size, corresponding to one or more video frames represented by a video node (e.g., the video node 300) may be stored in memory 806, which is referenced by the video node. Accordingly, a new primitive type may be added to the compositing tree 2100 without increasing the complexity of a corresponding rendering system such as the rendering code module 110. A method 1600 of creating a video node will be described below with reference to
An audio node 400 as described herein is a single composition of a plane fill node 401, as shown in
The media management code module 120 maintains two lists, a video node list 200 comprising a plurality of video nodes (e.g., the video node 205) and an audio node list 201 comprising a plurality of audio nodes (e.g., the audio node 206), as shown in
When a video node switches between play mode and stop mode, the media management code module 120 changes the mode of an associated audio node linked with the particular video node, if any. If a video node is deleted, the media management code module 120 also deletes the associated audio node.
A method 700 of rendering images will now be described with reference to
A method 900 of updating the compositing tree, as executed at step 730, will now be described with reference to
Following step 920, the method 900 continues at step 930 where the compositing tree generated at step 710 is updated by the rendering code module 110. The method 900 concludes after step 920.
The method 1000 of updating media nodes (i.e., video and audio nodes), as executed at step 920 will now be described with reference to
The method 1000 begins at step 1010, where if the processor 805 determines that the rendering code module 110 is executing in a time base mode, then the method 1000 proceeds to step 1020. Otherwise the rendering code module 110 is running in a frame base mode and the method 1000 proceeds to step 1030. At step 1020, the processor 805 sets an update time to the current time of a system clock (not shown) of the computer module 801.
At step 1030, the update time is set to the time of a next frame, since the rendering code module 110 is running in a frame based mode, to generate a current update time. At step 1030, the update time is set by adding the interval between a current frame and a next frame (i.e., the frame interval) to the previous update time to form the current update time. The current update time is used during the updating of the media nodes of the compositing tree and is applied to every media node regardless of actual time taken to perform the update of a particular node. At the next step 1040, the video nodes of the compositing tree are updated. A method 1100 of updating video nodes will be described below with reference to
The method 1100 of updating video nodes will now be described below with reference to
The method 1100 begins at the first step 1110, where the processor 805 accesses the video node list stored in memory 806 for the compositing tree and selects a first video node (i.e., a current node) that is present in the compositing tree. At the next step 1120, if the processor 805 determines that the current node is in play mode, then the method 1100 proceeds to step 1130 where a new frame position for the video node is determined based on the current update time and a first update time. Otherwise, if the current video node is stopped (i.e., not in play mode) then the method 1100 proceeds directly to step 1140. A method 1300 of determining a new frame position for a video node will be described below with reference to
One method of determining whether a particular video node is present in a given compositing tree, as at step 1110 of the method 1100, is to traverse the entire compositing tree from the root of the compositing tree down to the leaf nodes. However, such a method is inefficient. Typically, the proportion of video nodes in a compositing tree is small compared to the total number of nodes in the compositing tree. Therefore, rather than potentially searching through an entire compositing tree, the media management code module 120 may retrieve the root of each video node by traversing up through ancestors of the video node. The root of the particular video node may then be compared against the root of a particular compositing tree. If the compared nodes are in fact the same node, the particular video node is present in the particular compositing tree.
After all video nodes of the compositing tree have been processed in accordance with the method 1100, the audio nodes of the compositing tree are processed in accordance with the method 1200. Again, all of the audio nodes of the compositing tree are contained in an audio node list configured within memory 806. The method 1200 of updating audio nodes may be implemented as software being resident in the hard disk drive 810 and being controlled in its execution by the processor 805. The method 1200 may be implemented as one or more code modules of the media management code module 120. The media management code module 120 updates the current position of each audio node that is in play mode and may decompress an audio node if necessary.
The encoder/decoder code module 130 maintains a set of codecs that may be used to encode or decode various video and audio formats. The codecs are loaded into memory buffers configured within memory 806 on request of the encoder/decoder code module 130 and are retained in these memory buffers for later use. The codecs are placed into a decoder list or encoder list, configured in memory 806, as appropriate. The decoder or encoder lists are ordered such that a last codec to be loaded into a particular list will be the first codec to be used during processing (i.e., last-in/first-out). Such a last-in/first-out ordering allows the encoder/decoder code module 130 to override priority of previously-loaded codecs.
When a codec is required for loading and playing video and/or audio, for example, the encoder/decoder code module 130 attempts to open a requested video and/or audio file corresponding to the video and/or audio to be played using the first codec in the decoder list (i.e., the last codec to be loaded into the decoder list). If successful, the first codec in the decoder list may be associated with a media node (i.e., video node or audio node) that is created for the video and/or audio to be played. The media node uses the same codec until the node is deleted, even if a new codec is loaded after the media node was created. If the codec failed to open the corresponding video and/or audio file, the encoder/decoder code module 130 tries a next codec in the decoder list and so on until the decoder list is exhausted. In the event that no codec is able to open the corresponding video and/or audio file, the encoder/decoder code module 130 reports the failure to load the video and/or audio to be played.
When a codec is required for outputting video images (e.g., to a video file on hard disk 810), the encoder/decoder code module 130 attempts to initialise the requested video to be output using a first codec in the encoder list (i.e. the last codec to be loaded). If successful, the first codec in the encoder list may be used for the video to be output. If the first codec in the encoder list cannot be used, the encoder/decoder code module 130 tries a next encoder codec in the encoder list until all codecs in the encoder list have been tried. In the event that no codec in the encoder list can be used for the video to be output, the encoder/decoder code module 130 reports the failure.
The method 1600 of creating a video node will now be described with reference to
The method 1600 begins at the first step 1610, where the processor 805 selects a first codec in the decoder list. At the next step 1620, the processor 805 attempts to open the video file using the selected codec. At the next step 1630, if the video file was successfully decoded then the method 1600 proceeds to step 1660. Otherwise, the method 1600 proceeds to step 1640. At step 1640, if the processor 805 determines that there are more codecs in the decoder list then the method 1600 returns to step 1610. Otherwise, the method 1600 proceeds to step 1650 where the processor 805 generates a message indicating that the video node creation has failed and the method 1600 concludes.
The method 1600 continues at step 1660, where after successful opening of the video file, the processor 805 creates two image nodes (e.g., 301 and 308) and two plane-fill nodes (e.g., 303 and 309). The processor 805 then composites each image node with one of the plane-fill nodes using an “in” operation. The processor 805 then composites the two composite nodes with a “plus” operation. No image data is yet assigned to each image node created at step 1660. That is, memory buffers configured within memory 806 and being referenced by the respective image nodes do not have any images stored within them. However, image data will be assigned to the image nodes and stored in these memory buffers when the compositing tree comprising the image nodes is updated at update time as will be described below with reference to
The method 1600 continues at the next step 1670, where the video node created at step 1660 is added to a video node list and the method 1600 concludes. The video node list is configured within memory 806. Also at step 1670, the video node is initialised. In initialising the video node, the video node is set to the frame rate of the video file used to create the video node, the start point of the video node is set to the beginning (i.e., the start time) of the play range, the video node is set to stop mode and the opacity of the video node is set to opaque. The video node created at step 1660 may be returned to an application that requested the creation of the video node, for example.
A method 2000 of creating a video node using different codecs will now be described with reference to
The method 2000 begins at step 2010, where codec A is loaded into a decoding list configured within memory 806. At the next step 2020, a video node V1 representing the input media M is created using codec A. One or more frames of the input media M are stored in a memory buffer configured within memory 806 and being referenced by the video node V1. The video node is created at step 2020 in accordance with the method 1600. Then at step 2030, codec B is loaded into the decoding list configured within memory 806. Since the codecs are used in last-in/first-out order, codec B now has a higher priority than codec A. At step 2040, a video node V2 representing the same media M is created using the codec B instead of the codec A to open the input media M The video node is created at step 2040 in accordance with the method 1600. Again, one or more frames of the input media M may be stored in a memory buffer configured within memory 806 and being referenced by the video node V2. Then at the next step 2050, different transform matrices are applied to video node V1 and video node V2, so that the video frames associated with each of the nodes (i.e., the video frames stored in the two memory buffers associated with a respective one of the video nodes V1 and V2) will appear at different positions on a rendering target such as the display screen 814.
The method 2000 continues at the next step 2070, where the video nodes are composited with a background image using the rendering code module 110. The video nodes V1 and V2 are then set to the play mode by altering an attribute associated with the video nodes V1 and V2. If the compositing tree comprising the video nodes V1 and V2 is then regularly updated at the next step 2080, two versions of the same video input will play on the display screen 814 at different positions. However, the output of video node V1 will have better colour quality than the output of video node V2, and the output of video node V2 will have better image quality than the output of video node V1, due to the differing codecs used for each.
The method 1200 of updating audio nodes will now be described with reference to
The method 1300 of determining a new frame position for a video node, as executed at step 1130 of the method 1100, will be described below with reference to
New frame number=(current time−start time)×video frame rate×playback rate
where ‘video frame rate’ refers to the original frame rate (in frames per second) of the video stream being input to the memory buffer associated with the current video node and the ‘playback rate’ indicates the speed ratio relative to the original frame rate. For example, if the playback rate is equal to two then video stream is playing at twice the original frame rate.
At the next step 1330, the frame number determined at step 1320 is stored in memory 806 as the new frame position. Then at the next step 1340, if the processor 805 determines that the new frame position has reached or surpassed the end of a predetermined play range, then the method 1300 proceeds to step 1350. Otherwise the method 1300 concludes. At step 1350, the processor 805 determines whether or not the video stream associated with the current video node should loop (i.e., be replayed). If the video stream associated with the current video node is looping then the method 1300 proceeds to step 1360. Otherwise, if the video stream associated with the video node is not looping or a prescribed number of loops have been played, then the method 1300 proceeds to step 1370. At step 1360, the frame position of the video stream of the current video node is reset to the beginning (i.e., the start time) of the play range and the video stream will continue playing as per usual from the start time. At step 1370, the frame position of the video stream associated with the current video node is set to the end of the play range. The processor 805 may also generate a notification to indicate that playback has finished.
The method 1800 of updating a video frame, as executed at step 1140, will now be described with reference to
The method 1400 of updating a video frame associated with a video node in normal mode will now be described with reference to
At the next step 1440, if the processor 805 determines that the frame corresponding to the required frame number is stored in either one of the two image buffers associated with the image nodes (e.g., 301 and 308) of the current video node to be updated, then the method 1400 proceeds to step 1470. Otherwise, the method 1400 proceeds to step 1450.
At step 1450, one of the image buffers associated with the image nodes of the current video node is updated with the frame corresponding to the required frame number. The image node image buffer containing a frame that is furthest from the required frame corresponding to the required frame number is updated at step 1450, in case a next update uses the image node image buffer comprising a frame that is closer to the required frame. The method 1400 continues at the next step 1460 where the processor 805 notifies the rendering code module 110 that the frame to be rendered has changed so that the rendering code module 110 will update the rendered frame. The method 1400 concludes at the next step 1470, where an activity property of the current video node is used to enable a frame stored in one image node's image buffer associated with the current video node and to disable the frame stored in the other image node's image buffer in order to choose the appropriate image node containing the required frame.
The method 1500 of updating a video frame in accurate mode, as executed at step 1810, will now be described below with reference to
F1=└required frame position┘
F2=┌required frame position┐
At the next step 1515, if F1 is equal to F2 then the method 1500 proceeds to step 1525. Otherwise, the method 1500 proceeds to step 1520, where two opacities O1 and O2 that will be applied to the frames F1 and F2 are determined as follows:
where the ‘opacity’ value represents the opacity of the current video node in both cases. The opacity of the current video node is determined by an attribute associated with the video node, as at step 1410 of the method 1400. The opacities O1 and O2 determined at step 1520, are only applicable for a video node using a plus operator as in
At the next step 1530, the existing contents of the image node image buffers associated with the current video node are analysed to determine if the image node image buffers already contain frames matching the frames represented by F1 and F2. If the image node image buffers already contain frames matching the frames F1 and F2, then no changes are required to be made to the image node image buffers at step 1530. If one of the image node image buffers does not contain a frame matching either one of the frames F1 and F2, then the image node image buffer not containing the frame is updated the appropriate missing frame F1 or F2, at the next step 1540. Then at the next step 1550, if both of the image node image buffers associated with the image buffers of the current video node do not contain frames matching either one of the frames F1 and F2, then both of image node image buffers are updated so that one of the image node image buffers is updated to contain the frame F1 and the other image node image buffer is updated to contain the frame F2.
The method 1500 concludes at the next step 1560, where the opacities O1 and O2 detemined at step 1520 are applied to the plane-fill nodes composited with the image nodes associated with the image buffers comprising the frames F1 and F2. The opacity O1 is applied to the plane-fill node composited with the image node associated with the image buffer comprising the frame F1. Further, the opacity O2 is applied to the plane-fill node composited with the image node associated with the image buffer comprising the frame F2.
As described above, if F1 is equal to F2 then the method 1500 proceeds to step 1525. At step 1525, the existing contents of the image node image buffers associated with the current video node are analysed and if either one of the image node image buffers already contain a frame matching the required frame number, then the method 1500 proceeds directly to step 1545. Otherwise, the method 1500 proceeds to step 1535. At step 1535, the frame that is closer to the frame matching the required frame number is retained in the corresponding image node image buffer and the other frame is replaced by the frame matching the required frame number. The method 1300 concludes at the next step 1545, where the opacity of the video node (i.e., the opacity attribute associated with the video node) is applied to the plane-fill node composited with the image node associated with the image node buffer containing either the frame matching the required frame number, or the updated frame containing the frame F1. The method 1500 concludes at step 1555, Where an activity property of the current video node is used to enable the frame stored in the node's image buffer containing the required frame, and disable the frame stored in the other image buffer.
A method 1700 of creating a video file will now be described with reference to
The aforementioned preferred method(s) comprise a particular control flow. There are many other variants of the preferred method(s) which use different control flows without departing the spirit or scope of the invention. Furthermore one or more of the steps of the preferred method(s) may be performed in parallel rather sequentially.
The foregoing describes only some embodiments of the present invention, and modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiments being illustrative and not restrictive.
Liu, Ping, Liao, Bin, Halim, Farris Junius, Arena, Eugene Robert
Patent | Priority | Assignee | Title |
10163088, | Dec 05 2006 | Adobe Inc | Embedded document within an application |
10630908, | Sep 09 2010 | RED.COM, LLC | Optical filter opacity control in motion picture capture |
7535480, | Aug 24 2005 | Microsoft Technology Licensing, LLC | Compositing rendering layers |
7603113, | Dec 31 2005 | Adobe Inc | Using local codecs |
7743339, | Feb 01 2007 | Adobe Inc | Rendering text in a brew device |
8249569, | Dec 31 2005 | Adobe Inc | Using local codecs |
8443299, | Feb 01 2007 | Adobe Inc | Rendering text in a brew device |
8589779, | Mar 08 2007 | Adobe Inc | Event-sensitive content for mobile devices |
8633941, | May 28 2008 | Canon Kabushiki Kaisha | Image-processing apparatus, method for controlling thereof, and computer program |
8817013, | Jul 13 2007 | AUTOSTEREOSCOPIC 3D LIMITED | Method for processing a spatial image |
9164963, | Dec 05 2006 | Adobe Inc | Embedded document within an application |
9342322, | Sep 12 2011 | Microsoft Technology Licensing, LLC | System and method for layering using tile-based renderers |
9582478, | Dec 05 2006 | Adobe Inc | Embedded document within an application |
9715750, | Sep 12 2011 | Microsoft Technology Licensing, LLC | System and method for layering using tile-based renderers |
Patent | Priority | Assignee | Title |
5237648, | Jun 08 1990 | Apple Inc | Apparatus and method for editing a video recording by selecting and displaying video clips |
5469536, | Feb 25 1992 | BET FUNDING LLC | Image editing system including masking capability |
5923791, | Sep 18 1991 | Sarnoff Corporation | Video merging employing pattern-key insertion |
6392712, | Mar 31 2000 | Intel Corporation | Synchronizing interlaced and progressive video signals |
6504577, | Apr 01 1997 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Method and apparatus for display of interlaced images on non-interlaced display |
6683619, | Oct 18 2000 | Sony Corporation; Sony Electronics Inc. | System and method for increasing performance when compositing images |
6751347, | Apr 07 2000 | AUTODESK, Inc | Color diamond chroma keying |
6795589, | Sep 03 1998 | Canon Kabushiki Kaisha | Optimizing image compositing |
6816619, | Sep 03 1998 | Canon Kabushiki Kaisha | Optimising image compositing |
6867782, | Mar 30 2000 | AUTODESK, Inc | Caching data in a processing pipeline |
6954611, | Jul 16 2001 | Ricoh Company, Limited | Method of and apparatus for generation/presentation of program-related contents |
6985161, | Sep 03 1998 | Canon Kabushiki Kaisha | Region based image compositing |
7016011, | Nov 12 2002 | AUTODESK, Inc | Generating image data |
7190376, | Mar 16 1999 | Canon Kabushiki Kaisha | Method of compiling compositing expressions for optimised rendering |
20020027563, | |||
20020196296, | |||
20030118250, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Mar 17 2005 | Canon Kabushiki Kaisha | (assignment on the face of the patent) | / | |||
Apr 26 2005 | LIAO, BIN | Canon Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016590 | /0784 | |
Apr 26 2005 | HALIM, FARRIS JUNIUS | Canon Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016590 | /0784 | |
Apr 26 2005 | LIU, PING | Canon Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016590 | /0784 | |
Apr 26 2005 | ARENA, EUGENE ROBERT | Canon Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 016590 | /0784 |
Date | Maintenance Fee Events |
Dec 21 2011 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Mar 04 2016 | REM: Maintenance Fee Reminder Mailed. |
Jul 22 2016 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jul 22 2011 | 4 years fee payment window open |
Jan 22 2012 | 6 months grace period start (w surcharge) |
Jul 22 2012 | patent expiry (for year 4) |
Jul 22 2014 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jul 22 2015 | 8 years fee payment window open |
Jan 22 2016 | 6 months grace period start (w surcharge) |
Jul 22 2016 | patent expiry (for year 8) |
Jul 22 2018 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jul 22 2019 | 12 years fee payment window open |
Jan 22 2020 | 6 months grace period start (w surcharge) |
Jul 22 2020 | patent expiry (for year 12) |
Jul 22 2022 | 2 years to revive unintentionally abandoned end. (for year 12) |