Circuit sharing of MPEG and JPEG on IDCT
A device and a method of sharing IDCT are disclosed. Firstly, a data word and an identifier for representing which one of several formats are extracted from a received word. Then the data word is treated with IDCT to be a signed word afterward. Then the signed word is transformed into a formatted word between the values of a maximum value and a minimum value. The data word and identifier can be received by a word receiving means and treated with IDCT by an IDCT means to generate a signed word. The signed word is transformed into a formatted word for outputting via a word transforming means. Such that words with different formats can be treated with a sharing IDCT to save the redundant cost.
Latest Patents:
1. Field of the Invention
The presented invention relates to a device and method of sharing IDCT, specially relates to a device and method of sharing IDCT for MPEG and JPEG.
2. Description of the Prior Art
MPEG (Moving Picture Experts Group) is one of the standards of digital video/audio compression established by ISO (International Organization for Standardization). MPEG mostly is a definition concerned of compressed bit stream, and also defines a decompressor indirectly. MPEG has been modified for several times, and the official name of MPEG is ISO/IEC (International Electro-technical Commission) JTC1 (Joint Technical Committee 1) SC29 (Sub-committee 29) WG 11 (Work Group 11).
JPEG (Joint Photographic Experts Group) sounds like MPEG and it also is part of the sub-committee of ISO. JPEG is a standard applied on still image compression. The major difference between JPEG and MPEG is that MPEG uses block-based motion compensated prediction (MCP). The next difference, the application area is different. JPEG is applied on general purpose characterized, uncorrelated with color space, and each component has its quantization tables. The extension mode of JPEG comprises: two sampling accuracy (8 bit and 12 bit), combination of frequency progressive, spatially progressive, and amplitude progressive scanning modes . . . etc. And the independence on color is contributed by a down-loadable Huffman tables.
Because MPEG is applied on specific purpose, hence it has only one color space (4:2:0 YcrCr), one sampling accuracy (8 bit), and one scanning mode. MPEG uses identical quantization tables in color and brightness which limits the range of sampling dimensions, and increases an adaptive quantization function in microblock (for example, 16×16 pixel area) to make smoother bit rate control and perceptually uniform quntization extend all over the image and image sequences. Beside, the variable length coding tables of MPEG are non-downloadable, therefore MPEG is suitable for some specific applications concerned with optimizing the limit range of specific compression rate.
For method of decorrelation on partial area, MPEG and JPEG are very similar—block transform coding of image data is performed by 8×8 two dimension orthogonal discrete cosine transform (DCT) and 63 AC quantization indices are generated. The next, the 63 AC quantization indices are performed by following zig-zag scan and run-length coding, then encoded by Huffman coding (JPEG Huffman coding or MPEG Huffman coding).
Therefore, JPEG and MPEG data streams must perform inverse discrete cosine transform (IDCT) to regenerate original image. In general, the IDCT is operated in a prescribed range, in other words, the results after run-length coding must be transformed into some value that between the maximum value and the minimum value in the prescribed range. See
IDCT plays an important role in JPEG and MPEG decoding. However, IDCT is executed by software (for example, a program written in C language) for JPEG data, but by hardware (for example, Verlog HDL) for MPEG data to gain faster decoding speed. Therefore, IDCT of JPEG and IDCT of MPEG can not be performed by same device or means, and the cost and the efficiency is not optimal for any system which supports both JPEG and MPEG.
SUMMARY OF THE INVENTIONThe invention provides a device and a method of sharing IDCT for performing IDCT on DCT-transformed data of different standards with the same device or means, which saves the cost of setting multiple IDCT devices.
The invention also provides a device and a method of sharing IDCT such that makes multimedia players have more compatibility in digital data processing.
As mentioned above, the invention provides a device and a method for IDCT, comprising: First, analyzing received input word to extract a data word and an identifier which represents the coding method of the input word; performing IDCT on extracted data word to form a signed word; referring to the identifier and transforming the value of the signed word into a formatted word which value ranges between a maximum and a minimum value. The input word could be received by an input word receiver and then transformed into a formatted word via a word transformation device, such that we can use a method of sharing IDCT handling the input word with different coding method to save the cost of setting multiple IDCT devices.
BRIEF DESCRIPTION OF THE DRAWINGSOther objects, features, and advantages of the invention will become apparent from the following detailed description of the preferred but non-limiting embodiments. The description is made with reference to the accompanying drawings in which:
The transforming method of the invention for digital image data will be discussed afterward. For more distinct expression about the invention, we take MPEG (9 bits) and JPEG (8 bits) for example. However these expressions do not limit the applications of the invention.
Because of the similarity between JPEG and MPEG, it's possible to develop encoding/decoding methods or devices suitable to both of them. However, they still have differences suchlike the quantization accuracy is 9 bits in MPEG but 8 bits in JPEG. In other words, the saturation range of MPEG ranges between −256 and 255 but between −128 and 127 for JPEG. Since the DCT-transformed value of JPEG data is between 0 and 255, the JPEG data must make an offset of −128 for transforming into a value between −128 and 127.
The identifier could be consisting of one or several bits to represent the encoding method of the signed word, for example, the identifier could indicate the signed word is encoded in JPEG, MPEG-1, MPEG-2, or other encoding method concerned of DCT. Take emphasis on it that the invention doesn't limit the means for implementing encoding and doesn't limit the numbers of bits of the received input word and signed word. For instance, the input word could be 32 bits, 64 bits or else and the signed word could be 8 bits, 9 bits, 11 bits or else.
In step 210, the data word is transformed into a signed word, wherein the signed bit indicates the signed word is positive or negative, which could represents by 2's complement, 1's complement, or other representations able to represent positive or negative. Next via step 220 transforms the signed word into a formatted word according to the indicated encoding method of the identifier. The value of the formatted word is defined in a range and, which could be involved in the range of formatted word directly or after transformation. Hence the signed words of different encoding method could be formatted in a specific range and output the formatted word via step 230.
If the result via step 221 shows the signed word is encoded in another format, determine if the signed word is smaller than the sub-minimum value of that format via 223 and output the minimum value (step 226) if true. If not, determine if the signed word is larger than the sub-maximum value of the format. If true, output the maximum value of the format (step 225). Otherwise if the signed word's value is not larger than the sub-maximum value, determine if it's necessary to do offset operation or not. If not, output the original signed word's value (step 230), otherwise output the signed word's value with a fixed offset (step 229).
Take example of MPEG and JPEG. Refer to
As discussed above, one significant important characteristic of the invention in step 220 lies on the following: when identify as JPEG format, transform the signed word's value which is larger than the sub-maximum value into the maximum value; transform the signed word's value which is smaller than the sub-minimum value into the minimum value, and further optionally comprises doing offset operation on the particularly encoded signed word. All mentioned above are just preferred embodiment of the invention. The sequences of each step discussed above can change arbitrarily and non-limiting for the invention.
The sub-maximum and sub-minimum value of different encoding method or those with an offset must be in the range of the maximum and minimum value. For example, if the maximum and minimum value of the formatted word are 255 and −256 for each other, the signed word's value of MPEG ranges between −256 and 255 but the range of JPEG could be −128 to 0 or 0 to 255. Also the range of the formatted word is non-limiting in the invention.
Besides the invention is suitable to any numerical systems suchlike binary, octal, hexadecimal or any others. In binary system, the signed word could be represented in 2's complement, 1's complement, or any other means. Furthermore, the representation of sign bit could be that when MSB (most significant bit) is 1 for negative, and 0 for positive.
Furthermore, the range of the encoded data for MPEG and JPEG could be −256 to 255 and −128 to 127 individually. When input word is 32 bits, 64 bits, or more bits, assign 11 consecutive bits as signed word and a fixed bit as sign bit. In most cases the sign bit is assigned MSB (most significant bit) and, the sign bit is 0 as the signed word is 0 or positive, otherwise the sign bit is 1 as the sign word is negative. Mostly the signed word is represented via 2's complement, for example, the numerical values 255, 127, 0, −128, −256 are represented as 255, 127, 0, 1920, 1792.
According to all the discussions, a device of sharing IDCT has been provided.
To compare with the conventional hardware circuits, it needs only to increase 1 bit (1 pin) to identify what format of input data is when using a device and method of sharing IDCT provided by the invention. Similarly, for controlling software, it needs only a little modifications in the program code. Therefore, because of sharing the same IDCT circuits, the processing speed of JPEG data could become faster when using the device and method of sharing IDCT provided by the invention. Besides, for a DVD player, we could save lot's of cost in hardware circuits because it needs only one IDCT device.
The device and method of the better embodiment, of course, does not limit it's application on JPEG and MPEG when used in a DVD player and, the method of the invention operates well as long as any two formats of different digital image data could be identified.
The above-mentions are only the preferred embodiments of the present invention, not intended to limit the scope thereof. It will be appreciated and carried out by those professions skilled in the art. Thus, many modifications of the embodiments which can be made without departing from the spirit of the present invention should be covered by the following Claims.
Claims
1. A method of sharing IDCT (Inverse Discrete Cosine Transform), comprising:
- receiving an input word which comprises a data word and an identifier, wherein said identifier represents the encoding method of said data word;
- performing IDCT on said data word to generate a signed word;
- generating a formatted word according to a maximum value, a sub-maximum value, a minimum value, and a sub-minimum value corresponding to the identifier respectively; and
- output said formatted word.
2. The method of sharing IDCT of claim 1, wherein said signed word is encoded via two's complement.
3. The method of sharing IDCT of claim 1, wherein the most significant bit of said signed word represents negative when it is 1, otherwise represents positive when it is 0.
4. The method of sharing IDCT of claim 1, wherein said identifier comprises at least one bit.
5. The method of sharing IDCT of claim 1, wherein the encoding method of said signed word is chosen from one or combinations of the MPEG (Moving Picture Experts Group) and JPEG (Joint Photographic Experts Group) encoding method.
6. The method of sharing IDCT of claim 1, wherein the formatted word is assigned a minimum value while said signed word is smaller than said minimum value.
7. The method of sharing IDCT of claim 6, wherein if said signed word is smaller than said sub-minimum value and encoded in JPEG format, said formatted word is assigned said minimum value, smaller than said sub-minimum value.
8. The method of sharing IDCT of claim 2, wherein said formatted word is assigned a maximum value while said signed word is larger than said maximum value.
9. The method of sharing IDCT of claim 8, wherein if said signed word is larger than said sub-maximum value and encoded in JPEG format, said formatted word is assigned said maximum value, larger than said sub-maximum value.
10. The method of sharing IDCT of claim 2, wherein if said signed word is neither smaller than said minimum value nor larger than said maximum value and encoded in MPEG format, said formatted word's value is assigned said signed word's value.
11. The method of sharing IDCT of claim 10, wherein if said signed word is neither smaller than said sub-minimum value nor larger than said sub-maximum value and encoded in JPEG format, then said formatted word's value is assigned said signed word's value plus 128, wherein said sub-minimum value is larger than said minimum value and said sub-maximum value is smaller than said maximum value.
12. The method of sharing IDCT of claim 11, wherein said minimum value, said sub-minimum value, said sub-maximum value, and said maximum value are −256, −128, 127, and 255 respectively.
13. A device of sharing IDCT, comprising:
- a word receiver for receiving an input word, wherein said input word comprises a data word and an identifier, and said identifier represents the encoding method of said input word where the encoding method has a plurality;
- an IDCT device which performs IDCT on said data word and then generates a signed word; and
- a word transforming device which transforms said signed word into a formatted word according to said identifier.
14. The device of sharing IDCT of claim 13, wherein said identifier represents if said signed word is encoded in JPEG format or in MPEG format.
15. The device of sharing IDCT of claim 13, wherein said formatted word comprises at least one function below:
- said formatted word is assigned a minimum value while said signed word is smaller than said minimum value; and
- said formatted word is assigned a maximum value while said is larger than said maximum value.
16. The device of sharing IDCT of claim 15, wherein if said signed word is smaller than a sub-minimum value and encoded in JPEG format, said formatted word is assigned said sub-minimum value, larger than said minimum value.
17. The device of sharing IDCT of claim 15, wherein if said signed word is larger than a sub-maximum and encoded in JPEG format, said formatted word is assigned said maximum value, larger than said sub-maximum value.
18. The device of sharing IDCT of claim 13, wherein if said signed word is neither smaller than said minimum value nor larger than said maximum value and encoded in MPEG format, said formatted word's value is assigned said signed word's value.
19. The device of sharing IDCT of claim 18, wherein if said signed word is neither smaller than a minimum value nor larger than a maximum value and encoded in JPEG format, then said formatted word's value is assigned said signed word's value plus 128, wherein said sub-minimum value is larger than said minimum value and said sub-maximum value is smaller than said maximum value.
20. The device of sharing IDCT of claim 19, wherein said minimum value, said sub-minimum value, said sub-maximum value, and said maximum value are −256, −128, 127, 255 respectively.
Type: Application
Filed: Nov 22, 2004
Publication Date: Jun 9, 2005
Applicant:
Inventors: Ting-Kun Yeh (Taipei), Roy Wang (Taipei), David Wang (Taipei)
Application Number: 10/992,814