The present invention relates to encoding video images and more specifically to encoding a sequence of video images wherein a portion of a first video image moves between images.
Digital video that is transmitted through a network, such as the Internet or a cable television system is generally compressed. Compression is desirable because of the limited bandwidth of most transmission channels (e.g. cable, DSL, cellular etc.). In general, spatial compression algorithms include at least three steps for encoding: transform coding, quantization, and entropy encoding.
In a compressed digital video environment, such as those that transmit and display MPEG encoded video content, still images may be presented to an end user, wherein the still images are repeatedly displayed as video. In a cable television environment wherein all information is transmitted as an MPEG video stream, the presentation of still images may be useful when a selection screen or a static webpage is provided to a cable television subscriber.
It is known in the prior art to have scrolling content such as a ticker for display of stock quotes at the bottom of a static image. The image onto which the ticker is placed will be referred to herein as the base image. In order to create a ticker in an encoded video environment, the base image must first be decoded to the spatial domain and then repeatedly re-encoded with the ticker at different positions. In other words, for each frame of video, the static image is re-encoded with the ticker repositioned, so that upon playback the ticker appears to move across the screen.
The decoding of the encoded image data requires substantial processing power, especially when transform decoding of the image. Because of the processing demands in decoding and re-encoding the image data, tickers and other translating data are not provided in a real-time encoded video environment wherein there are many subscribers. In addition to being processor intensive, the decoding and re-encoding of video content degrades the final image that is presented to the subscriber.
The present methodology, system, and computer program product provides for the calculation of block data in the encoded domain wherein visual material is translated over a series of video frames and the shifts between frames of a block of data are not on block boundaries, but rather are pixel-level shifts. One embodiment of the present invention discloses a computer implemented method for determining encoded block data of a macroblock for a new image in an elementary stream based upon two or more blocks where at least one block originates from a still encoded image. First, the still image is received by a processor. A pixel shift associated with one or more blocks within the still encoded image is obtained. The pixel shift may be predetermined or input by a user in response to a prompt. Encoded block data for the two or more blocks that form a new block in the new image are obtained. One or more encoded identity matrixes are retrieved from memory based upon the pixel shift value. The new encoded block data is calculated based upon the retrieved one or more identity matrixes and the encoded block data for the two or more blocks. Thus, a matrix multiplication and summation is performed using the block data and identity matrixes. The encoded block data may originate from the encoded still image or may originate from new encoded content. Thus, the new block data that is determined for the purpose of creating a new image with an image element. The new encoded data may move across a viewable display when decoded wherein the new encoded data replaces data from the encoded still image.
Once the new block data is determined, the new encoded block data replaces data within the encoded still image. As a result, the new encoded block data replaces encoded still image data that resides at the same location in the spatial domain. The process may be repeatedly performed to create a video stream, so that upon decoding and display of the sequence of created video frames, spatial domain data will appear to translate across the display. The video stream may be formatted into an elementary stream, such as an MPEG elementary stream. When each video frame is created the blocks that contain new shifted block data are calculated in the encoded domain using an encoded identity matrix and this new encoded data is combined with the data of the still image (i.e., are not translated). Thus, the blocks of the still image that do not change between frames may be encoded to reflect their static nature. In an MPEG-encoded video stream, the repetition of block data between frames can be accommodated by repeating the static encoded data in each frame or temporally encoding the data using standard MPEG techniques, such as zero motion vectors.
The invention may be embodied as a computer program product for use on a computer system wherein the computer program product has computer code thereon for determining new encoded block data from two or more encoded blocks originating from a still video image and/or new data where the new encoded block data results from a spatial translation of either a portion of the still video image or the translation of the spatial representation of the new data across the still video image. The invention as embodied can determine in the encoded domain block encoded data values wherein movement between frames is not on a block or macroblock basis, but the translation is at the pixel level. The computer program may automatically create a series of video frames based upon the still image and the new data so as to represent the translation. Additionally, the path along which the new data will move should be provided. The path may be simply a horizontal or vertical scroll or a more sophisticated path. The computer program product may produce an MPEG elementary stream. In creating each new encoded video frame, the macroblocks that contain translated data will be calculated and the data from the still video image can be reused. Thus, motion vectors can be created for the still video image data that is not in a block or macroblock that has translated material (e.g. MPEG B or P frames) or the encoded block data can be repeated (e.g. MPEG I frames).
In the spatial domain, the new encoded block data contains spatial image elements from at least two shifted blocks (a first block and a second block). The shifted blocks may be blocks that have been shifted by a number of pixels within the still video image or a combination of new material with the still video image. The new encoded block data is created by multiplying a first identity matrix by the transform encoded data from the first block forming a first data set wherein the first identity matrix has a dimensional property proportional to the first portion of the spatial image element. A second identity matrix is multiplied by the transform encoded data from the second block forming a second data set wherein the second identity matrix has a dimensional property proportional to the second portion of the spatial image element. The first and second calculated data sets are used to form a new transform encoded block data set. The new transform encoded block data set is stored in a memory. The new transform encoded block data set may be quantized and entropy encoded. Once the new transform encoded block data set is entropy encoded, it may be placed at a predetermined location within an MPEG frame data set and used as part of an MPEG encoded elementary stream. Thus, the encoding of translating element with a static encoded image can be performed substantially in the encoded domain.
The foregoing features of the invention will be more readily understood by reference to the following detailed description, taken with reference to the accompanying drawings, in which:
The following definitions shall have the meaning provided unless the context indicates otherwise. The term “translation” shall mean the repositioning of image content within a series of video frames to be temporally displayed, so as to simulate movement of the image content. For example, text scrolling and tick displaying are forms of translation of image content. The term “encoded” shall mean that image data has been at least partially passed through a compression process. Spatial compression generally requires that data is transform coded, quantized, and entropy encoded. Pixel data that is passed through a spatial transform, such as the discrete cosine transform (DCT) to create transform data, but that has not been quantized or entropy encoded will still be considered encoded. The term “image” and “frame” shall have the same meaning unless the context indicates otherwise. Both terms shall apply to fields as is understood in the art.
The present invention in one embodiment is directed to a computer-implemented method for creating in the encoded domain one or more blocks in the encoded domain composed from at least two partial blocks that are also encoded. The methodology can be expanded to allow for calculation of one or more new video frames based on an encoded still video image wherein new image content in the created video frames is translated in location from the still frame by panning or scrolling or a combination thereof on a non-block basis (i.e. pixel-level shifts as opposed to block and macroblock shifts). By performing the creation process in the encoded domain, processing power requirements are reduced and image quality is increased in comparison to decoding an encoded image to the spatial domain, performing the translation, and re-encoding the image for each subsequent frame. The process of creating a sequence of images in the encoded domain wherein image content is translated between images can be used to add an object composed of one or more data blocks (e.g. 8×8 pixels), and more specifically, an object that changes between frames to an encoded still video image wherein the object may move along a path, but moves on a non-block boundary basis (pixel-level shifts). The path of movement may be linear or non-linear.
For the remainder of this description, MPEG encoding will be presumed to be the implemented encoding scheme, although other compression algorithms may be employed that spatially subdivide pixel data prior to encoding. As should be understood by one of ordinary skill in the art, when a block or macroblock of pixels is transformed into the encoded/frequency domain an equal number of coefficient values result. Thus, there is a one to one correspondence between pixels in the spatial domain and coefficients in the encoded domain. As a result, blocks and macroblocks can reference either spatial pixel values/locations or frequency-based coefficient values.
The spatial image shown in
The spatial information as represented by the encoded block coefficient values may be translated in position by creating a series of one or more new images wherein new encoded macroblock coefficient data is calculated in the encoded domain. The translation between subsequent image frames occurs pixelwise (i.e. arbitrary position). Since the translation in location is not on a block basis, the pixel information and the corresponding encoded coefficients do not originate in a single block and thus, the coefficient data within macroblocks in which movement has occurred needs to be calculated. For example, new information may scroll across a screen from left to right in the spatial domain. Thus, the first macroblock on the left side of the screen, such as macroblock 213 in
In the pixel domain,
In the DCT domain,
As a result, a processor can calculate the encoded coefficients for block A in the encoded domain. The DCT of H1 and H2 can be pre-computed and stored in memory associated with the processor to reduce the number of computations. For each combination of w1 and w2 there would be a separate DCT encoded H1 and H2 pair (e.g. [1,8], [2,7], [3,6] . . . [8,1]).
As an example H1 and H2 are provided below where section A1 contains 2 pixels from B1 and thus w1=2 and section A2 contains 6 pixels from B2 and thus w2=6. Additionally, the calculation of the encoded version of H1 is also provided for exemplary purposes.
In the DCT domain,
As provided above the DCT for H1 can be pre-calculated and stored in memory for retrieval by the processor. Similarly, the DCT for H2 can also be precalculated. As previously stated, this combination of DCT H1 where w1=2 and DCT H2 where w2=6 may be used to determine the DCT encoded coefficients for macroblock A. Thus, the calculation for each block in a subsequent video image that has shifted by the same number of pixels would use the same H1 and H2 identity matrixes. Similarly, the DCT of all combinations of H1 and H2 can be precalculated and used for other shift combinations of pixels within a block ([w1=1, w2=8], [w1=2, w2=7], etc.). The identity matrixes may be stored in memory in the encoded domain or non-encoded domain.
The equations for determining the encoded data in the encoded domain for this vertical movement are similar to that for horizontal movement and are provided below.
In the pixel domain
C=C1+C2
C1=H1D1, where
Ih1 is identity matrix with size h1×h1.
C2=H2D2, where
Ih2 is identity matrix with size h2×h2.
C=H1D1+H2D2
In the DCT domain
DCT(C)=DCT(C1)+DCT(C2)
DCT(Ci)=DCT(Hi)DCT(Di), where i=1,2.
The flow chart of
In one embodiment, the methodology may be embodied as a processor running computer executable code wherein the computer executable code may be stored in memory either on or off processor. The processor first obtains an MPEG encoded still image or MPEG encoded elementary stream 500. If the processor receives an MPEG encoded elementary stream, the processor will select a single MPEG encoded image from the stream. The MPEG encoded image is encoded as an I-frame as is understood by one of ordinary skill in the art. In alternative embodiments, another frame type (e.g. B or P) may be selected and converted into an intracoded frame.
Each macroblock of the MPEG encoded image includes DCT-encoded coefficient values. A shift amount is received by the processor 501. The shift amount or rate of shift may be predetermined or input by a developer. The number of encoded images to be created is either predetermined, input or determined by the processor. The number of encoded images may be determined by a period of time for movement of the macroblocks. The developer determines the macroblock, row(s), column(s) or object that will be moved along with the number of pixels by which the object is to be moved in a subsequent image or sequence of images. Thus, one or more macroblocks may move between frames along a path defined by a coordinate system. The coordinate system may be an x-y coordinate system and the path can be a linear path or a path defined by a function. The function may include both properties of space within the coordinate system and time. The processor determines the macroblocks in the new video frame(s) that will include data from two or more macroblocks from the MPEG encoded still image along with new encoded material. This process may require calculating the path for the macroblocks that are to be repositioned. Additionally, the path may determine the number of new MPEG encoded images to create. For example, if a macroblock is to traverse a display from left to right, the display rate is 30 frames per second, the macroblock is moving at 4 pixels per frame and the frame is 480 pixels wide, the processor would create 120 MPEG encoded images and the macroblock would take 4 seconds to traverse the screen. The processor then defines a structure for a new encoded image. 502 The structure may include MPEG header information for: an elementary stream, an image, a macroblock and a block along with other MPEG header information.
The encoded still image along with the new encoded information is then processed in order to create the one or more subsequent video frames. A first macroblock is selected from the still image 503. The processor determines if the data within the macroblock in the new image will be composed of macroblock data from two or more macroblocks from the original still image or new material 504. If the answer is “no”, the current DCT coefficients for the macroblock are used 505. Thus, this data is used to construct the macroblock for the new MPEG encoded image. The encoded coefficients for the macroblock are inserted into the structure for the new MPEG encoded image. In the alternative, the motion vector denoting zero motion may be inserted into the structure defining the new MPEG encoded image. If the new macroblock is composed of encoded data from two or more macroblocks from the original still image or new content, the precalculated identity matrix DCT values are retrieved based upon the shift amounts. 506 The DCT coefficients of the two or more macroblocks that will compose the new macroblock are next retrieved. 507 The processor then determines the DCT coefficients for each block of the new macroblock by applying the formula
or
as expressed above if the new macroblock is simply composed of two other macroblocks shifted in the horizontal or vertical directions, and
for more than two macroblocks. 508. Other equations for non-linear movement as provided below may be used and as explained with respect to
The determined coefficients are then inserted into the proper position within the structure defining the encoded MPEG image. 509 The MPEG image structure is defined by the MPEG specification. The processor then checks to see if this is the last macroblock for the image. 510 If it is not, the process continues wherein the next macroblock for the new image is selected. Once all of the macroblocks for the new image have been determined, the processor will determine whether all images have been determined for the sequence of movement of the macroblock(s) or object. 511. If the answer is yes, the process will end, if the answer is no, the process will continue with creation of the next encoded MPEG image for the elementary stream.
where Ih and Iw are identity matrices with size h×h and w×w
Applying the above formulas within a computer program, an encoded MPEG elementary stream can be created without the need for decoding the original still encoded image to the spatial domain shifting the data and encoding each frame for an elementary stream. In other embodiments, a developer may begin with an image in the spatial domain and then encode the image and use the above described methodology and system. The encoded elementary stream may then be distributed to one or more end users or placed on a recordable media for later distribution. Preferably, the above system and methodology may be employed in a real-time system, wherein the computational savings result in increased performance and decreased time lag between a request for content that includes moving elements/macroblocks and presentation of the content on a display device associated with the requester.
The present invention may be embodied in many different forms, including, but in no way limited to, computer program logic for use with a processor (e.g., a microprocessor, microcontroller, digital signal processor, or general purpose computer), programmable logic for use with a programmable logic device (e.g., a Field Programmable Gate Array (FPGA) or other PLD), discrete components, integrated circuitry (e.g., an Application Specific Integrated Circuit (ASIC)), or any other means including any combination thereof.
Computer program logic implementing all or part of the functionality previously described herein may be embodied in various forms, including, but in no way limited to, a source code form, a computer executable form, and various intermediate forms (e.g., forms generated by an assembler, compiler, linker, or locator.) Source code may include a series of computer program instructions implemented in any of various programming languages (e.g., an object code, an assembly language, or a high-level language such as Fortran, C, C++, JAVA, or HTML) for use with various operating systems or operating environments. The source code may define and use various data structures and communication messages. The source code may be in a computer executable form (e.g., via an interpreter), or the source code may be converted (e.g., via a translator, assembler, or compiler) into a computer executable form.
The computer program may be fixed in any form (e.g., source code form, computer executable form, or an intermediate form) either permanently or transitorily in a tangible storage medium, such as a semiconductor memory device (e.g., a RAM, ROM, PROM, EEPROM, or Flash-Programmable RAM), a magnetic memory device (e.g., a diskette or fixed disk), an optical memory device (e.g., a CD-ROM), a PC card (e.g., PCMCIA card), or other memory device. The computer program may be fixed in any form in a signal that is transmittable to a computer using any of various communication technologies, including, but in no way limited to, analog technologies, digital technologies, optical technologies, wireless technologies, networking technologies, and internet working technologies. The computer program may be distributed in any form as a removable storage medium with accompanying printed or electronic documentation (e.g., shrink wrapped software or a magnetic tape), preloaded with a computer system (e.g., on system ROM or fixed disk), or distributed from a server or electronic bulletin board over the communication system (e.g., the Internet or World Wide Web.)
Hardware logic (including programmable logic for use with a programmable logic device) implementing all or part of the functionality previously described herein may be designed using traditional manual methods, or may be designed, captured, simulated, or documented electronically using various tools, such as Computer Aided Design (CAD), a hardware description language (e.g., VHDL or AHDL), or a PLD programming language (e.g., PALASM, ABEL, or CUPL.)
The present invention may be embodied in other specific forms without departing from the true scope of the invention. The described embodiments are to be considered in all respects only as illustrative and not restrictive.
Number | Name | Date | Kind |
---|---|---|---|
7212573 | Winger | May 2007 | B2 |
7346111 | Winger et al. | Mar 2008 | B2 |
7623575 | Winger | Nov 2009 | B2 |
8036271 | Winger et al. | Oct 2011 | B2 |
8155194 | Winger et al. | Apr 2012 | B2 |
8170107 | Winger | May 2012 | B2 |
20080052742 | Kopf et al. | Feb 2008 | A1 |
20080084503 | Kondo | Apr 2008 | A1 |
20080170619 | Landau | Jul 2008 | A1 |
20100166071 | Wu et al. | Jul 2010 | A1 |
Entry |
---|
http://www.activevideo.com/, as printed out in year 2012. |
Authorized Officer: Park, Sangcheol International Search Report and Written Opinion, PCT/US2009/06471; Jun. 15, 2010. |
Number | Date | Country | |
---|---|---|---|
20100118972 A1 | May 2010 | US |