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.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
BACKGROUND OF THE INVENTION

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 FIG. 1a, generally the operational values of JPEG IDCT are between 127 and −128. It means the JPEG data stream must follow steps in FIG. 1a to generate operational input for IDCT: if the original value of JPEG data stream is smaller than −128, the output value will change into −128 (step 110,112); if the original value is larger than 127, the output value will change into 127 (step 120,122); otherwise output the original value (step 124). Similarly, the operational values of MPEG IDCT are between −256 and 255. See FIG. 1b, if the original value of MPEG data stream is smaller than −256, the output value will change into −256 (step 130,132); if the original value is larger than 255, the output value will change into 255 (step 140,142); otherwise output the original value (step 144). Sometimes the values after change have to do offset operation before IDCT, for example, adding 128 to JPEG data results in the IDCT input values lies in between 255 and 0.

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 INVENTION

The 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 DRAWINGS

Other 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:

FIG. 1a and FIG. 1b are flow charts of the prior art;

FIG. 2 shows a block diagram of the embodiment of the invention;

FIG. 3a and FIG. 3b shows a flow chart of the embodiment of the invention; and

FIG. 4 shows the block diagram of the embodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

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.

FIG. 2 is a diagram according to an embodiment of the invention. First, receiving an input word consists of a data word and an identifier via step 200, in which the identifier represents the encoding method of the input word.

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.

FIG. 3a is flow chart of another embodiment of the invention. First, determine the data format after received a signed word (step 221), which may comprised in the input word or generated after analyzing the input word. The next, determine if the signed word is smaller than the minimum value of this format (step 222), and output the minimum value of the format if the signed word's smaller than the minimum value of the format. Then, determine if the signed word is larger than the maximum value of this format (step 224), and output the maximum value of the format if the signed word is larger than the maximum value of the format (step 225). Otherwise, output the original value (step 231).

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 FIG. 3b, when a signed word of MPEG data has been identified (step 321), if the range of the format's value is between a minimum value (like −256) and a maximum value (like 255), each signed word has to be limited in the range between the minimum and the maximum value after transformation from signed word into formatted word. Hence if a signed word is larger than the maximum value, the output formatted word will be transformed into the maximum value; if the signed word is smaller than the minimum value, the output formatted word will be transformed into the minimum value. For instance, the range of formatted word is between −256 and 255, if the signed value is smaller than −256 (step 322), the output formatted word will be assigned −256 (step 324); if the signed word is larger than 255 (step 325), the output formatted word will be assigned 255 (step 327); if the signed word is between −256 and 255, then the formatted word will be outputted in original value (step 328). Beside, if a formatted word of JPEG data has been identified, define the formatted word's value of signed word between a sub-maximum value and a sub-minimum value. Therefore, after IDCT the formatted word could be transformed into a value ranges between the predefined sub-maximum value (127) and sub-minimum value (−128) or the minimum value (−256) and maximum value (255). For example, the predefined sub-maximum and sub-minimum value of JPEG are 127 and −128, hence, if the signed word is smaller than −128 the formatted word will be transformed into −256 to output (step 323 and 324); if the signed word is larger than 127 the formatted word will be transformed into 255 to output (step 326 and 327); else if a signed word ranges between −256 and 255, output it's original value (step 328). Beside, one function was provided that an offset could be added in the process of transforming signed word into formatted word to make formatted word between a specific range. When the predefined signed word's range between 127 and −128 changes to between 255 and 0, concludes the offset is 128. If a signed word identified as JPEG, for example, the formatted word will be assigned the signed word's value plus 128 (not shown in paragraph); if not, the formatted word will be assigned the signed word. The implementation of adding 128 to signed word could be by setting all bits after ninth bit (from the least significant bit) to 0 and turns the eighth bit from 1 to 0 or 0 to 1.

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. FIG. 4 is another preferred embodiment of the invention. A device of sharing IDCT consists of: an input word receiver 410, an IDCT device 420, and a word transforming device 430. The input word receiver 410 is used for receiving an input word 420 which consists of a data word 412 and an identifier 414, wherein the identifier 414 represents the encoding method of the input word 412 (there are several possible encoding methods). Besides, the IDCT device 420 is used to transform the data word 412 into a signed word 422 and further transform the signed word 422 into a formatted word 432 in accordance to the identifier 414. The word transforming device 430 transforms the signed word 422 which is larger than the sub-maximum value of the format into the maximum value of the format and, transforms the signed word 422 which is smaller than the sub-minimum value of the format into the minimum value of the format, further to do offset operation on signed word with specific encoded. Details of the embodiment of the invention are the same with former better embodiment, such that we don't discuss here.

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.

Patent History
Publication number: 20050125475
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
Classifications
Current U.S. Class: 708/402.000