1. Field of the Invention
The present invention relates to a command queue manager. More particularly, the present invention relates to a method and system for minimizing bus traffic in a video decoder.
2. The Background Art
With the merging of personal computer systems and entertainment systems, digital component video and audio were developed. Typically, this audio and video data are encoded into a compressed program stream for transmission. A stream demultiplexer parses the incoming program stream into audio and video bitstreams. When video frames are ultimately displayed, there must be a decompression of these compressed video bitstreams. A video decoder is used for this decompression, or decoding, process.
According to the MPEG-2 video compression standard, the compression ratio can be as high as 50 to 1. Similarly, decompression expands data up to 50 times. This high data rate, as well as the high video window resolution of MPEG-2 decoding, puts heavy demands on the video system. Moreover, at the present time, a video decoder must accommodate a frame rate of approximately 30 frames per second.
Traditionally, software sends video data to a video decoder implemented entirely in hardware. If the entire decoder is built in hardware, then only a compressed data stream is needed. As a result, a decoder built entirely in hardware is extremely fast. However, the hardwired decoder is inflexible as well as complex, which makes the debugging process extremely difficult. In addition, the hardwired decoder requires numerous gates, resulting in a costly system.
Software can be used to provide greater versatility. However, software is computation intensive, and results in a substantial increase in bus traffic. Accordingly, a need exists for a video decoder which provides greater flexibility than the hardwired decoder while minimizing bus traffic and reducing hardware costs.
According to a first aspect of the present invention, a method and system for selectively controlling each hardware device within a video decoder includes obtaining a video stream, performing Variable Length Coding (VLC) decoding, on the video stream, encoding a plurality of instructions to control each hardware device within the video decoder, decoding each one of the plurality of instructions, and controlling each hardware device in response to the plurality of instructions. Since the decoder of the present invention comprises hardware and software, greater versatility than traditional hardwired decoders is achieved while manufacturing costs are substantially reduced. Thus, the decoder has the flexibility to control the hardware devices through the use of an instruction set. Since the software portion of the video decoder can instruct the hardware to perform operations that the data stream requires, various instructions can be used to control the hardware to compensate for various problems with a data stream, or substitute software functions in place of non-functional hardware devices. Moreover, since the CPU in a desktop or laptop computer environment can be used to process a portion of the decoding steps at the beginning of the process, it is beneficial to take advantage of this added processing power.
According to a second aspect of the present invention, a method and system for compressing Inverse Discrete Cosine Transform (IDCT) coefficients corresponding to a macroblock, the macroblock having a plurality of blocks, includes locating each non-zero IDCT coefficient corresponding to one of the plurality of blocks, assigning an index to each non-zero IDCT coefficient, the index designating a location within the one of the plurality of blocks, packing each non-zero IDCT coefficient in little endian format, and specifying a terminator bit corresponding to each non-zero coefficient, the terminator bit indicating the end of all non-zero IDCT coefficients for the one of the plurality of blocks. Since the IDCT coefficients are packed in this manner, bus traffic is decreased and efficiency of the decoder is increased.
According to a third aspect of the present invention, a method and system for processing a portion of a reference picture includes designating the reference picture, selecting a display picture within the reference picture, transmitting a display picture size, and sending a display picture offset. This method allows panning and shifting of a display window selected by a user within a reference picture. Therefore, the present invention provides greater flexibility than systems limiting the display picture size to that of the reference picture. Furthermore, only the display picture data rather than the reference picture data must be processed, resulting in a more efficient decoder.
In the following description, a preferred embodiment of the invention is described with regard to preferred process steps and data structures. However, those skilled in the art would recognize, after perusal of this application, that embodiments of the invention may be implemented using a set of general purpose computers operating under program control, and that modification of a set of general purpose computers to implement the process steps and data structures described herein would not require undue invention.
The present invention provides a method and apparatus for distributing commands in a video decoder. According to a first aspect of the present invention, the MPEG-2 decoder comprises hardware and software to provide greater versatility than hardwired decoders. Referring first to
Referring now to
The command queue 22, shown in
Commands and data are packed in the frame buffer and an instruction set is set forth to allow the command queue manager to identify and interpret these commands. The commands are then sent to the appropriate hardware block. According to a presently preferred embodiment of the present invention, the command queue is 64 bits wide. Similarly, each instruction is a multiple of 32-bit words. Therefore, each word in the command queue can store up to 2 instructions.
According to a second aspect of the present invention, a method for packing IDCT coefficients is presented. Referring now to
Referring now to
Next, at step 64, the non-zero IDCT coefficient is packed in little endian format. The non-zero IDCT coefficient is packed in an available least significant position in memory. Therefore, the first coefficient is stored in the least significant memory location, or right most position. According to a presently preferred embodiment of the present invention, the coefficient data comprises 12 bits.
According to a presently preferred embodiment of the present invention, each 32 bit instruction comprises index and coefficient data, with the two most significant bits comprising terminator bits. Therefore, each coefficient and index are packed across multiple 32-bit words. Each terminator bit corresponds to one coefficient. A terminator bit may comprise a 0 or a 1. According to a presently preferred embodiment of the present invention, a 0 indicates that more coefficients follow within the current 8×8 block, while a 1 indicates that no more coefficients follow after the current one of this 8×8 block. According to the presently preferred embodiment of the present invention, the least significant terminator bit in the first 32 bit instruction is not used.
If it is determined at step 66 that more IDCT coefficients exist for the current block, a terminator bit for the current IDCT coefficient is set to 0 at step 68. Next, at step 70, the terminator bit corresponding to the non-zero IDCT coefficient is packed in one of two most significant bits of the memory location. The next non-zero IDCT coefficient for the current block is then obtained at step 58.
If it is determined at step 66 that no more coefficients exist for the current block, the terminator bit for the current IDCT coefficient is set to 1 at step 72. Next, at step 74, the terminator bit corresponding to the non-zero IDCT coefficient is packed in one of two most significant bits of the memory location. The IDCT coefficients for the current block are then stored in a location designated for the current macroblock at step 76. However, if the IDCT coefficients for the current block are originally stored in a location designated for the current macroblock, this step may be ignored. If at step 78, it is determined that there are no more blocks in the current macroblock, the process is completed at step 80. However, if there are more blocks in the current macroblock, the next block is obtained at step 56, the process is repeated. Those of ordinary skill in the art will readily recognize that the above steps are presented for illustrative purposes only. Moreover, those of ordinary skill in the art will similarly recognize that the steps may be performed in an alternate order to achieve the same result.
Referring now to
Referring now to
According to a third aspect of the present invention, a method for allowing panning and shifting of a display window within a reference picture is provided. In this manner, a portion of a reference picture may be processed. Referring now to
While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.
This application is a divisional application based on U.S. patent application Ser. No. 09/027,014, filed on Feb. 20, 1998 now U.S. Pat. No. 6,823,016.
Number | Name | Date | Kind |
---|---|---|---|
4121283 | Walker | Oct 1978 | A |
4346377 | Green | Aug 1982 | A |
4382254 | Ranalli | May 1983 | A |
4399435 | Urabe | Aug 1983 | A |
4418344 | Brown | Nov 1983 | A |
4471465 | Mayer et al. | Sep 1984 | A |
4488254 | Ward | Dec 1984 | A |
4531160 | Ehn | Jul 1985 | A |
4569019 | DiOrio et al. | Feb 1986 | A |
4644495 | Crane | Feb 1987 | A |
4700182 | Ohgami | Oct 1987 | A |
4737772 | Nishi et al. | Apr 1988 | A |
4751502 | Ishii et al. | Jun 1988 | A |
4760387 | Ishii et al. | Jul 1988 | A |
4763118 | Takai | Aug 1988 | A |
4779083 | Ishii et al. | Oct 1988 | A |
4821226 | Christopher et al. | Apr 1989 | A |
5028917 | Imanishi et al. | Jul 1991 | A |
5030946 | Yamamura | Jul 1991 | A |
5065346 | Kawai et al. | Nov 1991 | A |
5122792 | Stewart | Jun 1992 | A |
5138305 | Tomiyasu | Aug 1992 | A |
5274794 | Ewing et al. | Dec 1993 | A |
5355465 | Yoshida | Oct 1994 | A |
5594467 | Marlton et al. | Jan 1997 | A |
5654759 | Augenbraun et al. | Aug 1997 | A |
5675387 | Hoogenboo et al. | Oct 1997 | A |
5754243 | Kurihara et al. | May 1998 | A |
5781788 | Woo et al. | Jul 1998 | A |
5815646 | Purcell et al. | Sep 1998 | A |
5905839 | Yanagihara et al. | May 1999 | A |
5905840 | Ohtani | May 1999 | A |
5907372 | Oku et al. | May 1999 | A |
5969770 | Horton | Oct 1999 | A |
5970173 | Lee et al. | Oct 1999 | A |
6058463 | Langan et al. | May 2000 | A |
6061400 | Pearlstein et al. | May 2000 | A |
6104434 | Nakagawa et al. | Aug 2000 | A |
6121998 | Voois et al. | Sep 2000 | A |
6405273 | Fleck et al. | Jun 2002 | B1 |
6823016 | Nguyen et al. | Nov 2004 | B1 |
Number | Date | Country | |
---|---|---|---|
Parent | 09027014 | Feb 1998 | US |
Child | 10374777 | US |