# US 2010/0141487 A1 · Method and apparatus for decoding variable length data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0141487 A1
- Document ID: US20100141487A1
- Status: Published application
- Kind: A1
- Application number: 12/328,833
- Filed: 2008-12-05
- Published: 2010-06-10
- Earliest claimed: 2008-12-05
- Assignees: Advanced Micro Devices, Inc.
- Inventors: Michael Frank
- Web page: https://patentgrep.com/patent/US20100141487A1

## CPC

- H03M 7/40: Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

System and method for decompressing data. A compressed data stream including contiguous variable length data blocks is received, each variable length data block including multiple contiguous variable length data fields. A current data block of the contiguous variable length data blocks is stored in one or more registers of a processor. Decoding state information is stored in another register of the processor. A single machine instruction of the processor is loaded. The instruction includes one or more operands corresponding respectively to the one or more registers, and another operand corresponding to the other register, where the other register is further operable as a destination register to store a result of the machine instruction. The instruction is executed to decompress the current data block using the stored decoding state information, including storing the decompressed current data block in the other register. The decompression is repeated for subsequent blocks in the stream.

## Claims

### Claim 1

A method for decompressing data, comprising:
receiving a compressed data stream comprising one or more contiguous variable length data blocks, wherein each variable length data block comprises a plurality of contiguous variable length data fields;
storing a current data block of the one or more contiguous variable length data blocks in one or more registers of a processor;
storing decoding state information in another register of the processor;
loading a single machine instruction of the processor, wherein the single machine instruction comprises one or more operands corresponding respectively to the one or more registers, and another operand corresponding to the other register, wherein the other register is further operable as a destination register to store a result of the machine instruction; and
executing the single machine instruction to decompress the current data block using the stored decoding state information, including storing the decompressed current data block in the other register.

### Claim 2 (depends on 1)

The method of claim 1, wherein said executing the single machine instruction comprises:
determining a location of a next data block of the one or more contiguous variable length data blocks; and
storing the determined location of the next data block in a further register of the processor.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
setting the next data block as the current data block; and
performing said storing a current data block, said storing decoding state information, said loading, and said executing to decode the next data block, wherein said storing the current data block is performed using the determined location of the next data block.

### Claim 4 (depends on 3)

The method of claim 3, further comprising:
repeating said setting the next data block and said performing said storing a current data block, said storing decoding state information, said loading, and said executing, in an iterative manner to decode the compressed data stream.

### Claim 5 (depends on 1)

The method of claim 1, wherein said executing the single machine instruction does not reference external memory.

### Claim 6 (depends on 1)

The method of claim 1, wherein the processor has an x86 architecture.

### Claim 7 (depends on 1)

The method of claim 1, wherein the one or more registers and the other register comprise multimedia extension registers for performing multimedia operations.

### Claim 8 (depends on 1)

The method of claim 1, wherein the processor is configured to operate under an operating system, and wherein the single machine instruction of the processor does not require modification of the operating system to execute.

### Claim 9 (depends on 1)

The method of claim 1, wherein the one or more registers comprise two registers, and wherein the one or more operands comprise two operands corresponding to the two registers.

### Claim 10 (depends on 9)

The method of claim 9, wherein the one or more operands further comprise an immediate value that specifies an encoding format of the compressed data stream, and wherein said executing the single machine instruction comprises decompressing the current data block in accordance with the encoding format specified by the immediate value.

### Claim 11 (depends on 1)

The method of claim 1, wherein said executing the single machine instruction comprises:
converting the single machine instruction to two or more microcode instructions; and
executing the two or more microcode instructions.

### Claim 12

A processor for decompressing a compressed data stream comprising one or more contiguous variable length data blocks, wherein each variable length data block comprises a plurality of contiguous variable length data fields, the processor comprising:
a plurality of registers, wherein the plurality of registers comprise a set of one or more registers and another register operable to store decoding state information; and
processor logic, wherein the processor logic is configured with a single machine instruction that comprises one or more operands corresponding respectively to the one or more registers, and another operand corresponding to the other register, wherein the other register is further operable as a destination register to store a result of the machine instruction;
wherein the processor logic is configured to:
store a current data block of the one or more contiguous variable length data blocks in the one or more registers;
store decoding state information in the other register;
execute the single machine instruction to decompress the current data block in the one or more registers using the stored decoding state information, including storing the decompressed current data block in the other register.

### Claim 13 (depends on 12)

The processor of claim 12, wherein to execute the single machine instruction, the processor logic is configured to:
determine a location of a next data block of the one or more contiguous variable length data blocks; and
store the determined location of the next data block in a further register of the processor.

### Claim 14 (depends on 13)

The processor of claim 13, wherein the processor logic is further configured to:
set the next data block as the current data block; and
perform said storing a current data block, said storing decoding state information, said loading, and said executing to decode the next data block;
wherein, to store a current data block, the processor logic is configured to store the current data block using the determined location of the next data block.

### Claim 15 (depends on 14)

The processor of claim 14, wherein the processor logic is further configured to:
repeat said setting the next data block and said performing said storing a current data block, said storing decoding state information, said loading, and said executing, in an iterative manner to decode the compressed data stream.

### Claim 16 (depends on 12)

The processor of claim 12, wherein to execute the single machine instruction, the processor logic does not reference external memory.

### Claim 17 (depends on 12)

The processor of claim 12, wherein the processor has an x86 architecture.

### Claim 18 (depends on 12)

The processor of claim 12, wherein the one or more registers and the other register comprise multimedia extension registers for performing multimedia operations.

### Claim 19 (depends on 12)

The processor of claim 12, wherein the processor is configured to operate under an operating system, and wherein the single machine instruction of the processor does not require modification of operating system to execute.

### Claim 20 (depends on 12)

The processor of claim 12, wherein the one or more registers comprise two registers, and wherein the one or more operands comprise two operands.

### Claim 21 (depends on 20)

The method of claim 20, wherein the one or more operands further comprise an immediate value that specifies an encoding format of the compressed data stream, and wherein said executing the single machine instruction comprises decompressing the current data block in accordance with the encoding format specified by the immediate value.

### Claim 22 (depends on 1)

The processor of claim 1, wherein to execute the single machine instruction, the processor is configured to:
convert the single machine instruction to two or more microcode instructions; and
execute the two or more microcode instructions.
