US6121905A - Method and apparatus for decoding JPEG symbols - Google Patents

Method and apparatus for decoding JPEG symbols Download PDF

Info

Publication number
US6121905A
US6121905A US09/075,580 US7558098A US6121905A US 6121905 A US6121905 A US 6121905A US 7558098 A US7558098 A US 7558098A US 6121905 A US6121905 A US 6121905A
Authority
US
United States
Prior art keywords
symbol
huffman
bit pattern
length
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
US09/075,580
Inventor
John Redford
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qualcomm Inc
CSR Technology Inc
Original Assignee
Oak Technology Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oak Technology Inc filed Critical Oak Technology Inc
Priority to US09/075,580 priority Critical patent/US6121905A/en
Assigned to OAK TECHNOLOGY, INC. reassignment OAK TECHNOLOGY, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: REDFORD, JOHN
Priority to PCT/US1999/010170 priority patent/WO1999059330A2/en
Assigned to OAK TECHNOLOGY, INC. reassignment OAK TECHNOLOGY, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: REDFORD, JOHN
Application granted granted Critical
Publication of US6121905A publication Critical patent/US6121905A/en
Assigned to ZORAN CORPORATION reassignment ZORAN CORPORATION MERGER (SEE DOCUMENT FOR DETAILS). Assignors: OAK TEDCHNOLOGY, INC.
Assigned to CSR TECHNOLOGY INC. reassignment CSR TECHNOLOGY INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ZORAN CORPORATION
Assigned to QUALCOMM TECHNOLOGIES, INC. reassignment QUALCOMM TECHNOLOGIES, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: CSR TECHNOLOGY INC.
Assigned to ZORAN CORPORATION reassignment ZORAN CORPORATION CORRECTIVE ASSIGNMENT TO CORRECT THE CONVEYING PARTY TO OAK TECHNOLOGY, INC.;CORRECT EXECUTION DATE TO AUGUST 18, 2004 PREVIOUSLY RECORDED ON REEL 016038 FRAME 0856. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER. Assignors: OAK TECHNOLOGY, INC.
Assigned to CSR TECHNOLOGY INC. reassignment CSR TECHNOLOGY INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: ZORAN CORPORATION
Assigned to QUALCOMM INCORPORATED reassignment QUALCOMM INCORPORATED ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: QUALCOMM TECHNOLOGIES, INC.
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • H03M7/42Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory
    • H03M7/425Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code using table look-up for the coding or decoding process, e.g. using read-only memory for the decoding process only
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the invention relates generally to a method and apparatus for decoding image data.
  • the invention relates to a method for decoding JPEG symbols utilizing both a content-addressable memory and a compare-add module.
  • Image compression techniques reduce the memory required for storage of large or complex images, permitting storage of images in devices with limited memory. For example, image compression techniques used in digital copiers and scanners assist in storage of complex images for subsequent printing. Similarly, image compression benefits communications where bandwidth limitations would otherwise render transmission of image data impractical. Image compression also offers substantial benefits for archiving large image libraries.
  • the JPEG (Joint Photographic Experts Group) standard is a set of image compression techniques that have gained widespread acceptance.
  • the most popular of the three general compression methods defined by the JPEG standard is the baseline sequential discrete cosine transform (DCT) technique. This technique reduces the file size of grayscale and color images with a near minimum possible loss of image quality.
  • the basic image unit for JPEG compression is the block which includes an eight pixel by eight pixel subset of the image. Each image block is analyzed and quantized, yielding DCT coefficients representative of the image block content. The coefficients are then Huffman coded to reduce the amount of data used to characterize them.
  • Huffman coding generally includes combining a zero run length and a magnitude length to represent the coefficients in the smallest possible number of bits.
  • the zero run length describes the number of consecutive zero-valued coefficients preceding a non-zero coefficient.
  • the magnitude length specifies the size (i.e., number of bits) and sign of the non-zero coefficient.
  • the Huffman codes are based on a set of variable word length symbols. The number of bits used to represent a particular Huffman code is inversely related to the probability of encountering the run-length/magnitude length represented by that code (i.e., entropy encoding).
  • JPEG Huffman symbols are typically decoded by comparing a symbol to a set of stored symbols according to a "compare-add" method. If a match is found, the stored symbol is subtracted from the symbol to be decoded and the difference is added to the corresponding table offset to yield a sum. The sum is then used to address a table that holds the value of the symbol.
  • the compare-add method can sometimes be too slow for some applications because it requires performing a large number of sequential operations.
  • JPEG Huffman symbols can also be decoded by comparing the symbol bit pattern to a set of stored bit patterns according to a "content-addressable-memory" (CAM) method. If a match is found, the value for that symbol is read out.
  • CAM content-addressable-memory
  • the CAM method is generally faster than the compare-add method, but it requires storage for a large number of bit patterns.
  • the present invention features a method for decoding JPEG symbols.
  • the method combines aspects of a compare-add method and a CAM method to achieve an improved decompression rate.
  • the method is particularly useful in applications that require certain Huffman symbols to be decoded faster than others.
  • Bit patterns representing symbols to be decoded in one decode cycle are stored in a CAM.
  • Bit patterns representing symbols to be decoded in multiple cycles are decoded with a compare-add module. The method thus benefits from the high speed of the CAM method when necessary and uses the storage-efficient compare-add method otherwise.
  • the decoding method includes the step of comparing a Huffman symbol bit pattern to a set of stored bit patterns in a CAM and retrieving a first bit pattern if the Huffman symbol bit pattern matches one of the stored bit patterns.
  • the method also includes a compare-add step in which a Huffman symbol bit pattern is compared to each bit pattern in a set of symbol bit patterns.
  • Each base symbol value uniquely corresponds to the base symbol bit pattern, which corresponds to the Huffman symbol bit pattern length.
  • the Huffman symbol bit pattern is subtracted from each stored symbol bit pattern to create a set of offset values.
  • the offset value corresponding to the base symbol bit pattern which is matched to the Huffman symbol bit pattern is selected and added to a base symbol value to generate an offset address.
  • this selection includes choosing the smallest non-negative offset value.
  • a second bit pattern is retrieved from a lookup table based on the offset address.
  • the lookup table can be stored in a random access memory (RAM).
  • the second bit pattern can contain the symbol length and a zero run length corresponding to the matched bit pattern. If the Huffman symbol bit pattern matches one of the bit patterns stored in the CAM, then the first bit pattern is provided as output. If, however, the Huffman symbol is not matched with any of the bit patterns stored in the CAM, then the second bit pattern is provided as output.
  • the set of stored bit patterns in the content-addressable memory represent single coefficient Huffman symbols and the set of stored base symbol bit patterns represent multiple coefficient Huffman symbols.
  • the CAM and compare-add steps described above can include multiple sets of bit patterns for comparison with the Huffman symbol bit pattern. Each of these sets of bit patterns can represent a different Huffman symbol table.
  • the invention features an apparatus for decoding JPEG symbols.
  • the apparatus includes a Huffman symbol register, a CAM module, a compare-add module and a symbol shifter.
  • the Huffman symbol receives, stores and outputs a Huffman symbol to be decoded.
  • the CAM module and the compare-add module receive the Huffman symbol from the Huffman symbol register and each generates a symbol length and a magnitude length.
  • the symbol shifter receives the symbol length from the CAM module or the compare-add module and provides a subsequent symbol to the Huffman symbol register.
  • the CAM compares the bit pattern of the Huffman symbol with a set of stored bit patterns to determine the symbol length and the magnitude length.
  • the compare-add module includes a comparator module, a lookup address register and a RAM. The comparator module compares the bit pattern of the Huffman symbol with a set of stored base symbol bit patterns to generate a lookup address which is provided to the lookup address register for storage.
  • the RAM stores a symbol length and a magnitude length for a set of addresses and provides the symbol length and magnitude length corresponding to the lookup address in the lookup address register.
  • FIGS. 1A and 1B are diagrams of JPEG symbols having an AC coefficient Huffman symbol and a DC coefficient Huffman symbol, respectively.
  • FIG. 2 is a flow chart of the method for decoding a Huffman symbol using the CAM/compare-add method of the present invention.
  • FIG. 3 is a block diagram of an apparatus for decoding a Huffman symbol in accordance with the present invention.
  • FIG. 4 is a block diagram of an apparatus having two CAMs for decoding a Huffman symbol in accordance with the present invention.
  • a JPEG symbol 10a with AC magnitude information includes an AC coefficient Huffman symbol 12 and a magnitude portion 14.
  • the Huffman symbol 12 can be between one and sixteen bits long while the magnitude portion 14 can be between zero and ten bits long.
  • the AC coefficient Huffman symbol 12 includes a zero-run-length portion 16 and a magnitude length portion 18 which describes the number of bits in the magnitude portion 14.
  • FIG. 1B illustrates a JPEG symbol 10b with DC magnitude information.
  • the DC coefficient is always the first coefficient encountered for each 8 ⁇ 8 pixel block, thus the DC coefficient Huffman symbol 20 contains no zero-run-length information. Instead, the DC coefficient Huffman symbol 20 describes the number of bits in the data portion 22 which can be between zero and eleven bits long.
  • the present invention relates to decoding the Huffman symbol portion 12,20 of the JPEG symbol 10a, 10b by using a combination of a CAM method 100 and a compare-add method 110 as illustrated in the flow chart of FIG. 2.
  • a JPEG symbol to be decoded is provided.
  • the Huffman symbol bit pattern in the JPEG symbol is compared with a set of stored symbols that are decoded in a single decoding cycle (i.e., single coefficient Huffman symbols).
  • step 140 if a match is found between the Huffman symbol bit pattern and one of the set of stored symbols in the CAM, then a corresponding bit pattern is retrieved from the CAM in step 150 and provided as an output in step 160.
  • step 170 the Huffman symbol bit pattern portion of the JPEG symbol provided in step 120 is subtracted from each of a set of stored base symbols.
  • Each stored base symbol corresponds to a multiple coefficient Huffman symbol.
  • the result of the subtractions is a set of offsets (i.e., difference values).
  • step 180 the offset corresponding to the matched base symbol is selected. In one embodiment, the selected offset is the smallest non-negative offset value.
  • the selected offset is added to one of a set table indices to generate an address to a lookup table that holds the value of the symbol.
  • the lookup table can be stored in RAM.
  • step 200 a bit pattern corresponding to the address is retrieved from the lookup table and, in step 160, provided as output. The retrieved bit pattern can yield the overall symbol length and the zero run length of the JPEG symbol.
  • Steps 130 and 170 can be performed in parallel. Since the compare-add method 110 has to perform a large number of sequential operations, the sequence of CAM steps 100 (130, 140 and 150) is generally completed faster than the sequence of compare-add steps 110 (170, 180, 190 and 200). Thus, if there is a match according to CAM step 140, the corresponding bit pattern is provided as output in step 160 and there is no need to complete the sequence of compare-add steps 110. However, if no match is found in step 140, then completion of all compare-add steps 110 occurs and the corresponding bit pattern is provided as output in step 160.
  • the method 90 combines the advantages of a CAM method 100 and a compare-add method 110.
  • the method 90 achieves the high speed of the CAM method 90, when necessary, and provides the small size advantage of the compare-add method 110.
  • a Huffman symbol register 52 temporarily stores symbols and provides them to a CAM module 54 and a compare-add module 56. Both the CAM module 54 and the compare-add module 56 can store multiple sets of bit patterns. Each set of bit patterns can represent a different Huffman symbol table.
  • the CAM module 54 preferably stores only those bit patterns which correspond to symbols that need to be decoded in a single decoding cycle. The stored CAM bit patterns are compared with the symbol from the symbol register 52 and, if a match is found on the Huffman symbol portion 12,20, the CAM module 54 generates a symbol shift value which is received by a symbol shifter 64.
  • the symbol shifter 64 shifts over the current symbol in order to access the next symbol and shift in new symbols 65.
  • a magnitude shift value is also generated and provided to a magnitude shifter 66.
  • the Huffman symbol portion 12,20 is shifted by the magnitude shifter 66 in order to access the magnitude portion 14 or data portion 22 which are provided for further processing.
  • the compare-add module 56 processes symbols in parallel with the CAM module 54.
  • the compare-add module 56 includes a comparator 58, a lookup address register 60, and a random access memory 62.
  • the comparator 56 receives the current symbol from the Huffman symbol register 52 and compares it with a set of base symbols. In one embodiment, the set of base symbols contains sixteen symbols.
  • the comparison requires one full decoding cycle to complete, so the result of the comparison is stored in a lookup address register 60 and can be used on the following decoding cycle to retrieve the corresponding bit pattern from the RAM 62. If the CAM module 54 does not find a match during the first decoding cycle, the magnitude 14 is set to zero and the symbol shifter 64 and magnitude shifter 66 receive shift values from the RAM 62 during the following decoding cycle.
  • another embodiment of a decoder 50 includes a second CAM module 54b to replace the compare-add module 56 of FIG. 3.
  • the CAM modules 54a, 54b receive the current symbol from the Huffman symbol register 52 and compare it with a set of stored bit patterns.
  • One CAM module 54 stores bit patterns representing symbols that must be decoded during a single decoding cycle.
  • the second CAM module 54' stores a larger number of bit patterns, each of which need not be decoded during a single decoding cycle.

Abstract

A method and apparatus for decoding JPEG Huffman symbols is described. A content addressable memory module stores bit patterns representing Huffman symbols that must be decoded in a single decoding cycle. A compare-add module stores bit patterns representing Huffman symbols that can be decoded in following cycles. The content addressable memory module and the compare-add module each compare a Huffman symbol with their stored bit patterns and generate a corresponding bit pattern when a match is found. The method takes advantage of the high speed possible with a content addressable memory and the small size of the compare-add module.

Description

FIELD OF THE INVENTION
The invention relates generally to a method and apparatus for decoding image data. In particular, the invention relates to a method for decoding JPEG symbols utilizing both a content-addressable memory and a compare-add module.
BACKGROUND OF THE INVENTION
Image compression techniques reduce the memory required for storage of large or complex images, permitting storage of images in devices with limited memory. For example, image compression techniques used in digital copiers and scanners assist in storage of complex images for subsequent printing. Similarly, image compression benefits communications where bandwidth limitations would otherwise render transmission of image data impractical. Image compression also offers substantial benefits for archiving large image libraries.
The JPEG (Joint Photographic Experts Group) standard is a set of image compression techniques that have gained widespread acceptance. The most popular of the three general compression methods defined by the JPEG standard is the baseline sequential discrete cosine transform (DCT) technique. This technique reduces the file size of grayscale and color images with a near minimum possible loss of image quality. The basic image unit for JPEG compression is the block which includes an eight pixel by eight pixel subset of the image. Each image block is analyzed and quantized, yielding DCT coefficients representative of the image block content. The coefficients are then Huffman coded to reduce the amount of data used to characterize them.
Huffman coding generally includes combining a zero run length and a magnitude length to represent the coefficients in the smallest possible number of bits. The zero run length describes the number of consecutive zero-valued coefficients preceding a non-zero coefficient. The magnitude length specifies the size (i.e., number of bits) and sign of the non-zero coefficient. The Huffman codes are based on a set of variable word length symbols. The number of bits used to represent a particular Huffman code is inversely related to the probability of encountering the run-length/magnitude length represented by that code (i.e., entropy encoding).
JPEG Huffman symbols are typically decoded by comparing a symbol to a set of stored symbols according to a "compare-add" method. If a match is found, the stored symbol is subtracted from the symbol to be decoded and the difference is added to the corresponding table offset to yield a sum. The sum is then used to address a table that holds the value of the symbol. The compare-add method can sometimes be too slow for some applications because it requires performing a large number of sequential operations.
JPEG Huffman symbols can also be decoded by comparing the symbol bit pattern to a set of stored bit patterns according to a "content-addressable-memory" (CAM) method. If a match is found, the value for that symbol is read out. The CAM method is generally faster than the compare-add method, but it requires storage for a large number of bit patterns.
SUMMARY OF THE INVENTION
In one aspect, the present invention features a method for decoding JPEG symbols. The method combines aspects of a compare-add method and a CAM method to achieve an improved decompression rate. The method is particularly useful in applications that require certain Huffman symbols to be decoded faster than others. Bit patterns representing symbols to be decoded in one decode cycle are stored in a CAM. Bit patterns representing symbols to be decoded in multiple cycles are decoded with a compare-add module. The method thus benefits from the high speed of the CAM method when necessary and uses the storage-efficient compare-add method otherwise.
The decoding method includes the step of comparing a Huffman symbol bit pattern to a set of stored bit patterns in a CAM and retrieving a first bit pattern if the Huffman symbol bit pattern matches one of the stored bit patterns. The method also includes a compare-add step in which a Huffman symbol bit pattern is compared to each bit pattern in a set of symbol bit patterns. Each base symbol value uniquely corresponds to the base symbol bit pattern, which corresponds to the Huffman symbol bit pattern length. The Huffman symbol bit pattern is subtracted from each stored symbol bit pattern to create a set of offset values. The offset value corresponding to the base symbol bit pattern which is matched to the Huffman symbol bit pattern is selected and added to a base symbol value to generate an offset address. In one embodiment, this selection includes choosing the smallest non-negative offset value. A second bit pattern is retrieved from a lookup table based on the offset address. The lookup table can be stored in a random access memory (RAM). The second bit pattern can contain the symbol length and a zero run length corresponding to the matched bit pattern. If the Huffman symbol bit pattern matches one of the bit patterns stored in the CAM, then the first bit pattern is provided as output. If, however, the Huffman symbol is not matched with any of the bit patterns stored in the CAM, then the second bit pattern is provided as output.
In one embodiment, the set of stored bit patterns in the content-addressable memory represent single coefficient Huffman symbols and the set of stored base symbol bit patterns represent multiple coefficient Huffman symbols. In another embodiment, the CAM and compare-add steps described above can include multiple sets of bit patterns for comparison with the Huffman symbol bit pattern. Each of these sets of bit patterns can represent a different Huffman symbol table.
In another aspect, the invention features an apparatus for decoding JPEG symbols. The apparatus includes a Huffman symbol register, a CAM module, a compare-add module and a symbol shifter. The Huffman symbol receives, stores and outputs a Huffman symbol to be decoded. The CAM module and the compare-add module receive the Huffman symbol from the Huffman symbol register and each generates a symbol length and a magnitude length. The symbol shifter receives the symbol length from the CAM module or the compare-add module and provides a subsequent symbol to the Huffman symbol register.
In one embodiment, the CAM compares the bit pattern of the Huffman symbol with a set of stored bit patterns to determine the symbol length and the magnitude length. In another embodiment, the compare-add module includes a comparator module, a lookup address register and a RAM. The comparator module compares the bit pattern of the Huffman symbol with a set of stored base symbol bit patterns to generate a lookup address which is provided to the lookup address register for storage. The RAM stores a symbol length and a magnitude length for a set of addresses and provides the symbol length and magnitude length corresponding to the lookup address in the lookup address register.
BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other objects, features and advantages of the invention will become apparent from the following more particular description of preferred embodiments of the invention, as illustrated in the accompanying drawings. The drawings are not necessarily to scale, emphasis instead being placed on illustrating the principles of the present invention.
FIGS. 1A and 1B are diagrams of JPEG symbols having an AC coefficient Huffman symbol and a DC coefficient Huffman symbol, respectively.
FIG. 2 is a flow chart of the method for decoding a Huffman symbol using the CAM/compare-add method of the present invention.
FIG. 3 is a block diagram of an apparatus for decoding a Huffman symbol in accordance with the present invention.
FIG. 4 is a block diagram of an apparatus having two CAMs for decoding a Huffman symbol in accordance with the present invention.
DETAILED DESCRIPTION OF THE INVENTION
Referring to FIG. 1A, a JPEG symbol 10a with AC magnitude information includes an AC coefficient Huffman symbol 12 and a magnitude portion 14. The Huffman symbol 12 can be between one and sixteen bits long while the magnitude portion 14 can be between zero and ten bits long. The AC coefficient Huffman symbol 12 includes a zero-run-length portion 16 and a magnitude length portion 18 which describes the number of bits in the magnitude portion 14. FIG. 1B illustrates a JPEG symbol 10b with DC magnitude information. The DC coefficient is always the first coefficient encountered for each 8×8 pixel block, thus the DC coefficient Huffman symbol 20 contains no zero-run-length information. Instead, the DC coefficient Huffman symbol 20 describes the number of bits in the data portion 22 which can be between zero and eleven bits long.
The present invention relates to decoding the Huffman symbol portion 12,20 of the JPEG symbol 10a, 10b by using a combination of a CAM method 100 and a compare-add method 110 as illustrated in the flow chart of FIG. 2. In step 120, a JPEG symbol to be decoded is provided. In step 130, the Huffman symbol bit pattern in the JPEG symbol is compared with a set of stored symbols that are decoded in a single decoding cycle (i.e., single coefficient Huffman symbols). In step 140, if a match is found between the Huffman symbol bit pattern and one of the set of stored symbols in the CAM, then a corresponding bit pattern is retrieved from the CAM in step 150 and provided as an output in step 160.
In step 170, the Huffman symbol bit pattern portion of the JPEG symbol provided in step 120 is subtracted from each of a set of stored base symbols. Each stored base symbol corresponds to a multiple coefficient Huffman symbol. The result of the subtractions is a set of offsets (i.e., difference values). In step 180, the offset corresponding to the matched base symbol is selected. In one embodiment, the selected offset is the smallest non-negative offset value. In step 190, the selected offset is added to one of a set table indices to generate an address to a lookup table that holds the value of the symbol. The lookup table can be stored in RAM. In step 200, a bit pattern corresponding to the address is retrieved from the lookup table and, in step 160, provided as output. The retrieved bit pattern can yield the overall symbol length and the zero run length of the JPEG symbol.
Steps 130 and 170 can be performed in parallel. Since the compare-add method 110 has to perform a large number of sequential operations, the sequence of CAM steps 100 (130, 140 and 150) is generally completed faster than the sequence of compare-add steps 110 (170, 180, 190 and 200). Thus, if there is a match according to CAM step 140, the corresponding bit pattern is provided as output in step 160 and there is no need to complete the sequence of compare-add steps 110. However, if no match is found in step 140, then completion of all compare-add steps 110 occurs and the corresponding bit pattern is provided as output in step 160.
The method 90 combines the advantages of a CAM method 100 and a compare-add method 110. The method 90 achieves the high speed of the CAM method 90, when necessary, and provides the small size advantage of the compare-add method 110.
Referring to FIG. 3, a block diagram of a decoder 50 of the present invention is shown. A Huffman symbol register 52 temporarily stores symbols and provides them to a CAM module 54 and a compare-add module 56. Both the CAM module 54 and the compare-add module 56 can store multiple sets of bit patterns. Each set of bit patterns can represent a different Huffman symbol table. The CAM module 54 preferably stores only those bit patterns which correspond to symbols that need to be decoded in a single decoding cycle. The stored CAM bit patterns are compared with the symbol from the symbol register 52 and, if a match is found on the Huffman symbol portion 12,20, the CAM module 54 generates a symbol shift value which is received by a symbol shifter 64. The symbol shifter 64 shifts over the current symbol in order to access the next symbol and shift in new symbols 65. A magnitude shift value is also generated and provided to a magnitude shifter 66. The Huffman symbol portion 12,20 is shifted by the magnitude shifter 66 in order to access the magnitude portion 14 or data portion 22 which are provided for further processing.
The compare-add module 56 processes symbols in parallel with the CAM module 54. The compare-add module 56 includes a comparator 58, a lookup address register 60, and a random access memory 62. The comparator 56 receives the current symbol from the Huffman symbol register 52 and compares it with a set of base symbols. In one embodiment, the set of base symbols contains sixteen symbols. The comparison requires one full decoding cycle to complete, so the result of the comparison is stored in a lookup address register 60 and can be used on the following decoding cycle to retrieve the corresponding bit pattern from the RAM 62. If the CAM module 54 does not find a match during the first decoding cycle, the magnitude 14 is set to zero and the symbol shifter 64 and magnitude shifter 66 receive shift values from the RAM 62 during the following decoding cycle.
Referring to FIG. 4, another embodiment of a decoder 50 according to the present invention includes a second CAM module 54b to replace the compare-add module 56 of FIG. 3. The CAM modules 54a, 54b receive the current symbol from the Huffman symbol register 52 and compare it with a set of stored bit patterns. One CAM module 54 stores bit patterns representing symbols that must be decoded during a single decoding cycle. The second CAM module 54' stores a larger number of bit patterns, each of which need not be decoded during a single decoding cycle.
Equivalents
While the invention has been particularly shown and described with reference to specific preferred embodiments, it should be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (15)

What is claimed is:
1. A method for decoding a JPEG symbol comprising the steps of:
comparing a Huffman symbol bit pattern to a set of stored bit patterns in a content-addressable memory;
comparing the Huffman symbol bit pattern to a set of base symbol bit patterns in a compare-add module;
providing as an output signal a first bit pattern from the content-addressable memory if the Huffman symbol bit pattern matches one of the set of stored bit patterns in the content-addressable memory; and
providing as an output signal a second bit pattern from the compare-add module if the Huffman symbol bit pattern matches one of the base symbol bit patterns in the compare-add module.
2. The method of claim 1 wherein the step of comparing the Huffman symbol bit pattern to a set of stored bit patterns in an content-addressable memory and the step of comparing the Huffman symbol bit pattern to a set of base symbol bit patterns in a compare-add module are performed concurrently.
3. A method for decoding a JPEG symbol comprising the steps of:
comparing a Huffman symbol bit pattern to a set of stored bit patterns in a content-addressable memory and retrieving a first bit pattern if the Huffman symbol bit pattern matches one of the set of stored bit patterns;
comparing the Huffman symbol bit pattern to each base symbol bit pattern in a set of stored base symbol bit patterns comprising the steps of:
subtracting the Huffman symbol bit pattern from each stored base symbol bit pattern to generate a set of offset values;
selecting the offset value corresponding to the base symbol bit pattern matched to the Huffman symbol bit pattern length;
adding the selected offset value to a base symbol value to generate an offset address, the base symbol value being uniquely assigned to the base symbol bit pattern which corresponds to the Huffman symbol bit pattern length; and
retrieving a second bit pattern from a lookup table using the offset address;
providing the first bit pattern from the content-addressable-memory at an output if the Huffman symbol bit pattern matches one of the set of stored bit patterns in the content-addressable memory; and
providing the second bit pattern from the lookup table at an output if the Huffman symbol bit pattern does not match one of the set of stored bit patterns in the content-addressable memory.
4. The method of claim 3 wherein the set of stored bit patterns in the content-addressable memory are mapped to single coefficient Huffman symbols and the set of stored base symbol bit patterns are mapped to multiple coefficient Huffman symbols.
5. The method of claim 3 wherein selecting the offset value of the matched base symbol bit pattern further comprises the step of selecting the smallest zero or greater value from the set of offset values.
6. The method of claim 3 wherein the lookup table is stored in a random access memory.
7. The method of 3 wherein the content-addressable memory further comprises one or more additional sets of bit patterns, the Huffman symbol bit pattern being compared with the bit patterns of one of the sets of bit patterns in the content-addressable memory.
8. The method of claim 7 wherein each of the sets of bit patterns in the content-addressable memory represents a Huffman symbol table.
9. The method of claim 3 further comprising multiple sets of base symbol bit patterns, the Huffman symbol bit pattern being compared with the bit patterns of one of the more than one set of base symbol bit patterns.
10. The method of claim 9 wherein each of the more than one set of base symbol bit patterns represents a Huffman symbol table.
11. The method of claim 6 wherein the random access memory provides a JPEG symbol length and a zero run length for the matched bit pattern.
12. An apparatus for decoding a JPEG symbol comprising:
a Huffman symbol register for receiving, storing and outputting a Huffman symbol;
a content-addressable memory module for receiving the Huffman symbol and generating a symbol length and a magnitude length;
a compare-add module for receiving the Huffman symbol and generating a symbol length and a magnitude length; and
a symbol shifter for receiving the symbol length and additional JPEG symbols, and providing a subsequent symbol to the Huffman symbol register.
13. The apparatus of claim 12 wherein the content-addressable memory module compares the bit pattern of the Huffman symbol with a set of bit patterns to determine the symbol length and the magnitude length.
14. The apparatus of claim 12 wherein the compare-add module comprises:
a comparator module for comparing a set of stored base symbol bit patterns with the Huffman symbol bit pattern and generating a lookup address;
a lookup address register for storing the lookup address generated by the comparator module; and
a random access memory storing a symbol length and a magnitude length for each of a set of addresses, the random access memory providing a symbol length and a magnitude length according to the address stored in the lookup address register.
15. An apparatus for decoding a JPEG symbol comprising:
a Huffman symbol register for receiving, storing and outputting a Huffman symbol;
a first content-addressable memory module for receiving the Huffman symbol and generating a symbol length and a magnitude length, the first content-addressable memory module comparing the Huffman symbol with a set of stored symbols representative of zero run length JPEG coefficients;
a second content-addressable memory module for receiving the Huffman symbol and generating a symbol length and a magnitude length, the second content-addressable memory module comparing the Huffman symbol with a set of stored symbols representative of non-zero run length coefficients; and
a symbol shifter for receiving the symbol length and additional JPEG symbols, and providing a subsequent symbol to the Huffman symbol register.
US09/075,580 1998-05-11 1998-05-11 Method and apparatus for decoding JPEG symbols Expired - Lifetime US6121905A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US09/075,580 US6121905A (en) 1998-05-11 1998-05-11 Method and apparatus for decoding JPEG symbols
PCT/US1999/010170 WO1999059330A2 (en) 1998-05-11 1999-05-10 Method and apparatus for decoding jpeg symbols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US09/075,580 US6121905A (en) 1998-05-11 1998-05-11 Method and apparatus for decoding JPEG symbols

Publications (1)

Publication Number Publication Date
US6121905A true US6121905A (en) 2000-09-19

Family

ID=22126700

Family Applications (1)

Application Number Title Priority Date Filing Date
US09/075,580 Expired - Lifetime US6121905A (en) 1998-05-11 1998-05-11 Method and apparatus for decoding JPEG symbols

Country Status (2)

Country Link
US (1) US6121905A (en)
WO (1) WO1999059330A2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6219457B1 (en) 1998-05-26 2001-04-17 Silicon Graphics, Inc. Method and system for decoding data encoded in a variable length code word
US20030074624A1 (en) * 2001-10-15 2003-04-17 Andersson Anders J. Compressing information using CAM for narrow bit pattern output
US6732253B1 (en) 2000-11-13 2004-05-04 Chipwrights Design, Inc. Loop handling for single instruction multiple datapath processor architectures
US6798365B2 (en) * 2002-06-26 2004-09-28 Samsung Electronics Co., Ltd. JPEG Huffman table decoder and method thereof based on binary search technique
US20050146450A1 (en) * 2004-01-06 2005-07-07 Thomas Renjit T. Multi-symbol/coefficient decode operation for huffman codes
US6931518B1 (en) 2000-11-28 2005-08-16 Chipwrights Design, Inc. Branching around conditional processing if states of all single instruction multiple datapaths are disabled and the computer program is non-deterministic
US20090058694A1 (en) * 2007-08-27 2009-03-05 Comtech Aha Corporation Decompressing Dynamic Huffman Coded Bit Streams
US20100315269A1 (en) * 2009-06-12 2010-12-16 Industrial Technology Research Institute Decoding Method
US7996671B2 (en) 2003-11-17 2011-08-09 Bluerisc Inc. Security of program executables and microprocessors based on compiler-architecture interaction
US8607209B2 (en) 2004-02-04 2013-12-10 Bluerisc Inc. Energy-focused compiler-assisted branch prediction
US8724913B2 (en) 2012-07-19 2014-05-13 Omnivision Technologies, Inc. Decoder and method for decoding run-length-encoded data
US9069938B2 (en) 2006-11-03 2015-06-30 Bluerisc, Inc. Securing microprocessors against information leakage and physical tampering
US9235393B2 (en) 2002-07-09 2016-01-12 Iii Holdings 2, Llc Statically speculative compilation and execution
US9569186B2 (en) 2003-10-29 2017-02-14 Iii Holdings 2, Llc Energy-focused re-compilation of executables and hardware mechanisms based on compiler-architecture interaction and compiler-inserted control

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3717851A (en) * 1971-03-03 1973-02-20 Ibm Processing of compacted data
US5055841A (en) * 1991-02-01 1991-10-08 Bell Communications Research, Inc. High-speed feedforward variable word length decoder
US5181031A (en) * 1991-07-30 1993-01-19 Lsi Logic Corporation Method and apparatus for decoding huffman codes by detecting a special class
US5208593A (en) * 1991-07-30 1993-05-04 Lsi Logic Corporation Method and structure for decoding Huffman codes using leading ones detection
US5245338A (en) * 1992-06-04 1993-09-14 Bell Communications Research, Inc. High-speed variable-length decoder
US5254991A (en) * 1991-07-30 1993-10-19 Lsi Logic Corporation Method and apparatus for decoding Huffman codes
EP0589682A2 (en) * 1992-09-24 1994-03-30 Sony Corporation Variable length code decoder
US5325092A (en) * 1992-07-07 1994-06-28 Ricoh Company, Ltd. Huffman decoder architecture for high speed operation and reduced memory
EP0665653A2 (en) * 1994-01-28 1995-08-02 Matsushita Electric Industrial Co., Ltd. Apparatus and method for decoding variable-length code
US5825312A (en) * 1996-11-25 1998-10-20 Xerox Corporation DX JPEG Huffman decoder

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3717851A (en) * 1971-03-03 1973-02-20 Ibm Processing of compacted data
US5055841A (en) * 1991-02-01 1991-10-08 Bell Communications Research, Inc. High-speed feedforward variable word length decoder
US5181031A (en) * 1991-07-30 1993-01-19 Lsi Logic Corporation Method and apparatus for decoding huffman codes by detecting a special class
US5208593A (en) * 1991-07-30 1993-05-04 Lsi Logic Corporation Method and structure for decoding Huffman codes using leading ones detection
US5254991A (en) * 1991-07-30 1993-10-19 Lsi Logic Corporation Method and apparatus for decoding Huffman codes
US5245338A (en) * 1992-06-04 1993-09-14 Bell Communications Research, Inc. High-speed variable-length decoder
US5325092A (en) * 1992-07-07 1994-06-28 Ricoh Company, Ltd. Huffman decoder architecture for high speed operation and reduced memory
EP0589682A2 (en) * 1992-09-24 1994-03-30 Sony Corporation Variable length code decoder
EP0665653A2 (en) * 1994-01-28 1995-08-02 Matsushita Electric Industrial Co., Ltd. Apparatus and method for decoding variable-length code
US5825312A (en) * 1996-11-25 1998-10-20 Xerox Corporation DX JPEG Huffman decoder

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Patent Cooperation Treaty, International Search Report, International Application No. PCT/US99/10170, mailed on Dec. 21, 1999, 6 pages. *

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6219457B1 (en) 1998-05-26 2001-04-17 Silicon Graphics, Inc. Method and system for decoding data encoded in a variable length code word
US6732253B1 (en) 2000-11-13 2004-05-04 Chipwrights Design, Inc. Loop handling for single instruction multiple datapath processor architectures
US20040158691A1 (en) * 2000-11-13 2004-08-12 Chipwrights Design, Inc., A Massachusetts Corporation Loop handling for single instruction multiple datapath processor architectures
US6931518B1 (en) 2000-11-28 2005-08-16 Chipwrights Design, Inc. Branching around conditional processing if states of all single instruction multiple datapaths are disabled and the computer program is non-deterministic
US20030074624A1 (en) * 2001-10-15 2003-04-17 Andersson Anders J. Compressing information using CAM for narrow bit pattern output
US6766488B2 (en) * 2001-10-15 2004-07-20 Nohau Corporation Compressing information using CAM for narrow bit pattern output
US6798365B2 (en) * 2002-06-26 2004-09-28 Samsung Electronics Co., Ltd. JPEG Huffman table decoder and method thereof based on binary search technique
US9235393B2 (en) 2002-07-09 2016-01-12 Iii Holdings 2, Llc Statically speculative compilation and execution
US10101978B2 (en) 2002-07-09 2018-10-16 Iii Holdings 2, Llc Statically speculative compilation and execution
US9569186B2 (en) 2003-10-29 2017-02-14 Iii Holdings 2, Llc Energy-focused re-compilation of executables and hardware mechanisms based on compiler-architecture interaction and compiler-inserted control
US10248395B2 (en) 2003-10-29 2019-04-02 Iii Holdings 2, Llc Energy-focused re-compilation of executables and hardware mechanisms based on compiler-architecture interaction and compiler-inserted control
US7996671B2 (en) 2003-11-17 2011-08-09 Bluerisc Inc. Security of program executables and microprocessors based on compiler-architecture interaction
US9582650B2 (en) 2003-11-17 2017-02-28 Bluerisc, Inc. Security of program executables and microprocessors based on compiler-architecture interaction
US6956511B2 (en) 2004-01-06 2005-10-18 Sharp Laboratories Of America, Inc. Multi-symbol/coefficient decode operation for Huffman codes
US20050146450A1 (en) * 2004-01-06 2005-07-07 Thomas Renjit T. Multi-symbol/coefficient decode operation for huffman codes
US9244689B2 (en) 2004-02-04 2016-01-26 Iii Holdings 2, Llc Energy-focused compiler-assisted branch prediction
US9697000B2 (en) 2004-02-04 2017-07-04 Iii Holdings 2, Llc Energy-focused compiler-assisted branch prediction
US10268480B2 (en) 2004-02-04 2019-04-23 Iii Holdings 2, Llc Energy-focused compiler-assisted branch prediction
US8607209B2 (en) 2004-02-04 2013-12-10 Bluerisc Inc. Energy-focused compiler-assisted branch prediction
US11163857B2 (en) 2006-11-03 2021-11-02 Bluerisc, Inc. Securing microprocessors against information leakage and physical tampering
US9069938B2 (en) 2006-11-03 2015-06-30 Bluerisc, Inc. Securing microprocessors against information leakage and physical tampering
US10430565B2 (en) 2006-11-03 2019-10-01 Bluerisc, Inc. Securing microprocessors against information leakage and physical tampering
US9940445B2 (en) 2006-11-03 2018-04-10 Bluerisc, Inc. Securing microprocessors against information leakage and physical tampering
US20090058694A1 (en) * 2007-08-27 2009-03-05 Comtech Aha Corporation Decompressing Dynamic Huffman Coded Bit Streams
US7764205B2 (en) * 2007-08-27 2010-07-27 Comtech Aha Corporation Decompressing dynamic huffman coded bit streams
US7898444B2 (en) 2009-06-12 2011-03-01 Industrial Technology Research Institute Decoding method
US20100315269A1 (en) * 2009-06-12 2010-12-16 Industrial Technology Research Institute Decoding Method
US8724913B2 (en) 2012-07-19 2014-05-13 Omnivision Technologies, Inc. Decoder and method for decoding run-length-encoded data
US8861877B2 (en) 2012-07-19 2014-10-14 Omnivision Technologies, Inc. System and method for improving decoder performance by using multiple decoding channels
US9002122B2 (en) 2012-07-19 2015-04-07 Omnivision Technologies, Inc. System and method for improving decoder performance using quantization control

Also Published As

Publication number Publication date
WO1999059330A3 (en) 2000-02-10
WO1999059330A2 (en) 1999-11-18

Similar Documents

Publication Publication Date Title
US6292114B1 (en) Efficient memory mapping of a huffman coded list suitable for bit-serial decoding
US5254991A (en) Method and apparatus for decoding Huffman codes
KR100624432B1 (en) Context adaptive binary arithmetic decoder method and apparatus
US5208593A (en) Method and structure for decoding Huffman codes using leading ones detection
US5696507A (en) Method and apparatus for decoding variable length code
JP3978478B2 (en) Apparatus and method for performing fixed-speed block-unit image compression with estimated pixel values
US6124811A (en) Real time algorithms and architectures for coding images compressed by DWT-based techniques
US6121905A (en) Method and apparatus for decoding JPEG symbols
FI92272B (en) Image transfer system compression coding method
KR101678223B1 (en) Multimedia signature coding and decoding
US5883981A (en) Lattice vector transform coding method for image and video compression
US6130631A (en) Method and apparatus utilizing a simplified content-addressable memory for JPEG decoding
FI96646B (en) Image processing apparatus
JP4061104B2 (en) Memory access and skipping based on run / skip count by context model
US6157327A (en) Encoding/decoding device
US6798365B2 (en) JPEG Huffman table decoder and method thereof based on binary search technique
JPH0918350A (en) Coding/decoding device and coding/decoding method
KR100207428B1 (en) Variable length coding apparatus and method adaptive to changes of the hoffman codes
JP2934603B2 (en) Method and apparatus for decoding variable length code
JP3235510B2 (en) Encoding method and encoding device, decoding method and decoding device
US6999627B2 (en) Deterministic prediction in an image processing system
JPH0936749A (en) Coding decoding device and coding method used for it
KR20050066142A (en) Apparatus and method of context-based adaptive variable length decoding
JP3239664B2 (en) Variable length code decoding method
JPH0884260A (en) Compression system and expansion system for two-dimension image data

Legal Events

Date Code Title Description
AS Assignment

Owner name: OAK TECHNOLOGY, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:REDFORD, JOHN;REEL/FRAME:009356/0328

Effective date: 19980717

STCF Information on status: patent grant

Free format text: PATENTED CASE

AS Assignment

Owner name: OAK TECHNOLOGY, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:REDFORD, JOHN;REEL/FRAME:011087/0968

Effective date: 19980717

FPAY Fee payment

Year of fee payment: 4

AS Assignment

Owner name: ZORAN CORPORATION, CALIFORNIA

Free format text: MERGER;ASSIGNOR:OAK TEDCHNOLOGY, INC.;REEL/FRAME:016038/0856

Effective date: 20030811

FPAY Fee payment

Year of fee payment: 8

AS Assignment

Owner name: CSR TECHNOLOGY INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:ZORAN CORPORATION;REEL/FRAME:027550/0695

Effective date: 20120101

FPAY Fee payment

Year of fee payment: 12

AS Assignment

Owner name: QUALCOMM TECHNOLOGIES, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CSR TECHNOLOGY INC.;REEL/FRAME:033134/0007

Effective date: 20140608

AS Assignment

Owner name: ZORAN CORPORATION, CALIFORNIA

Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE CONVEYING PARTY TO OAK TECHNOLOGY, INC.;CORRECT EXECUTION DATE TO AUGUST 18, 2004 PREVIOUSLY RECORDED ON REEL 016038 FRAME 0856. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER;ASSIGNOR:OAK TECHNOLOGY, INC.;REEL/FRAME:033188/0554

Effective date: 20040818

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

AS Assignment

Owner name: CSR TECHNOLOGY INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:ZORAN CORPORATION;REEL/FRAME:036642/0395

Effective date: 20150915

AS Assignment

Owner name: QUALCOMM INCORPORATED, CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:QUALCOMM TECHNOLOGIES, INC.;REEL/FRAME:041694/0336

Effective date: 20170210