# US 2006/0039621 A1 · Two-dimensional variable length coding of runs of zero and non-zero transform coefficients for image compression

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

- Number: US 2006/0039621 A1
- Document ID: US20060039621A1
- Status: Published application
- Kind: A1
- Application number: 10/922,508
- Filed: 2004-08-18
- Published: 2006-02-23
- Earliest claimed: 2004-08-18
- Assignees: Cisco Technology, Inc.
- Inventors: John Toebes; Wen-hsiung Chen; Fang Wu; Dov Rosenfeld
- Web page: https://patentgrep.com/patent/US20060039621A1

## CPC

- H04N 19/48: using compressed domain processing techniques other than decoding, e.g. modification of transform coefficients, variable length coding [VLC] data or run-length data (motion estimation in a transform domain H04N19/547; processing of decoded motion vectors H04N19/513)
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/17: the unit being an image region, e.g. an object
- H04N 19/18: the unit being a set of transform coefficients
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method, apparatus, and carrier medium to encode a series of quantized transform coefficients. The method includes identifying events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, and for each such event, jointly encoding the run lengths of the preceding run of zero-valued coefficients and the following run of non-zero-valued coefficients with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths. The method further includes encoding each amplitude in the run of consecutive non-zero-valued coefficients, and encoding the signs of such coefficients. The method is applicable to encoding a region in the series where there is likely to be a cluster of non-zero-valued coefficients.

## Claims

### Claim 1

A method for processing an ordered series of digital signals that each have an amplitude from a finite set of amplitudes consisting of the most likely-to-occur amplitude and at least one other amplitude, the processing to reduce the amount of data used to represent the digital signals and to form codewords such that the more likely-to-occur values or sequences of values of digital signals are represented by relatively short codewords and the less-likely-to-occur values or sequences of values of digital signals are represented by relatively long codewords, the method comprising:
for a first continuous region in the series:
identifying events that each includes a run of consecutive coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive signals having any value other than the most likely-to-occur amplitude, including events of no coefficients of the most likely-to-occur amplitude preceding a run of one or more consecutive coefficients having other than the most likely-to-occur amplitude;
for each identified event, jointly encoding the run lengths of the preceding run of the most likely-to-occur amplitude and the following run of other than the most likely-to-occur amplitude with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths;
for each identified event, encoding each amplitude in the run of consecutive signals having other than the most likely-to-occur amplitude, the encoding according to an amplitude coding method,
such that relatively short codewords are formed to represent values or sequences of values that are relatively more likely-to-occur, and relatively long codewords are formed to represent values or sequences of values that are relatively less likely-to-occur.

### Claim 2 (depends on 1)

A method as recited in claim 1,
wherein the series of digital signals is a series of quantized coefficients of a transformed block of image data, the transform such that the most likely-to-occur amplitude is 0, and the next most likely-to-occur amplitude is 1, such that the identifying of events identifies events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, including events of no zero-valued coefficients preceding a run of non-zero-valued coefficients.

### Claim 3 (depends on 2)

A method as recited in claim 2, wherein the transformed block of image data includes a DC term, and wherein the DC term is separately encoded, such that the series of digital signals is a set f non-DC quantized coefficients of a transformed block of image data.

### Claim 4 (depends on 2)

A method as recited in claim 2, further comprising in the first region:
for each identified event, encoding the signs of the non-zero-valued coefficients in the run of non-zero-valued coefficients.

### Claim 5 (depends on 2)

A method as recited in claim 2, further comprising:
providing a breakpoint defining the first contiguous region along the ordering of the series followed by a second continuous region; such that the coefficients of the first region are encoded by a first encoding method that includes the identifying of events, the jointly encoding the runlengths of the events, and the encoding the amplitudes of non-zero-valued coefficients of the events; and
encoding the coefficients in the second region using a second region encoding method, and
wherein a first region encoding method and a second region encoding method are such that the encoding of at least some of the coefficients or runs of coefficients in the first region is different than the encoding of at least some of the coefficients or runs of coefficients in the second region.

### Claim 6 (depends on 5)

A method as recited in claim 5, further comprising:
providing at least one additional breakpoint such that the series is divided into more than two regions by the breakpoint and the one additional breakpoint for each region in addition to the second region; and
encoding the coefficients in each additional regions defined by the corresponding additional breakpoint, the respective encoding in a region using a region coding method different from the coding methods used in other regions.

### Claim 7 (depends on 5)

A method as recited in claim 5, wherein the breakpoint value is pre-selected.

### Claim 8 (depends on 5)

A method as recited in claim 5, wherein the breakpoint value is selected from a finite set of pre-defined breakpoint values according to an image-dependent criterion.

### Claim 9 (depends on 5)

A method as recited in claim 5, wherein the second corresponding method is applicable to intraframe image data and to interframe blocks of image data, and wherein a first pre-selected breakpoint value is used for intraframe image data and a second pre-selected breakpoint value is used for interframe image data.

### Claim 10 (depends on 5)

A method as recited in claim 5, wherein the breakpoint defines a hard boundary between the first and second regions.

### Claim 11 (depends on 5)

A method as recited in claim 5, wherein the breakpoint defines a soft boundary between the first and second regions, such that for an identified event in the first region block having a sequence of consecutive non-zero values that crosses the breakpoint, the boundary between the first and second region is at the end of the event such that the whole event is in the first region.

### Claim 12 (depends on 2)

A method as recited in claim 2, wherein the joint encoding of the runlengths on an event uses a multidimensional coding table.

### Claim 13 (depends on 2)

A method as recited in claim 2, wherein the number of events that are identified and whose run lengths are jointly encoded is limited such that only events up to a maximum total number of coefficients (the “maximal length”) are identified, and wherein the identifying also identifies events of all zeroes of the maximum length, and maximal length events that end in a non-zero-coefficient, such that escape codes may be avoided in coding the coefficients of the first region.

### Claim 14 (depends on 13)

A method as recited in claim 13, wherein the first region includes the first identified event; wherein the jointly encoding the runlengths of the event in the first region uses a first variable length coding method, and wherein the encoding the amplitudes of the non-zero-amplitudes of the event in the first region uses a first amplitude coding method, the method further comprising:
providing a breakpoint defining a second contiguous region following the first region along the ordering of the series and a third continuous region following the second region; such that the coefficients of the second region are encoded by a second encoding method, the second encoding method including:
identifying events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, including an event of no zero-valued coefficients preceding a run of one or more non-zero-valued coefficients;
for each identified event in the second region, jointly encoding the run lengths of the preceding run of the most likely-to-occur amplitude and the following run of other than the most likely-to-occur amplitude with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths, the jointly encoding the run lengths of events in the second region using a second coding method;
for each identified event in the second region, encoding each amplitude in the run of consecutive signals having other than the most-likely-to-occur amplitude, the encoding according to a second amplitude coding method; and
encoding the coefficients in the third region using a third region encoding method.

### Claim 15

A carrier medium carrying machine readable code including instructions for performing, when executed by a processor, a method for processing an ordered series of digital signals that each have an amplitude from a finite set of amplitudes consisting of the most likely-to-occur amplitude and at least one other amplitude, the processing to reduce the amount of data used to represent the digital signals and to form codewords such that the more likely-to-occur values or sequences of values of digital signals are represented by relatively short codewords and the less likely-to-occur values or sequences of values of digital signals are represented by relatively long codewords, the method comprising:
for a first contiguous region in the series:
identifying events that each includes a run of consecutive coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive signals having any value other than the most likely-to-occur amplitude, including a run of no coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive coefficients having other than the most likely-to-occur amplitude;
for each identified event, jointly encoding the run lengths of the preceding run of the most likely-to-occur amplitude and the following run of other than the most likely-to-occur amplitude with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths;
for each identified event, encoding each amplitude in the run of consecutive signals having other than the most likely-to-occur amplitude, the encoding according to an amplitude coding method,
such that relatively short codewords are formed to represent values or sequences of values that are relatively more likely-to-occur, and relatively long codewords are formed to represent values or sequences of values that are relatively less likely-to-occur.

### Claim 16 (depends on 15)

A carrier medium as recited in claim 15,
wherein the series of digital signals is a series of quantized coefficients of a transformed block of image data, the transform such that the most likely-to-occur amplitude is 0, and the next most likely-to-occur amplitude is 1, such that the identifying of events identifies events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, including a run of no zero-valued coefficients preceding a run of non-zero-valued coefficients.

### Claim 17 (depends on 16)

A carrier medium as recited in claim 16, wherein the transformed block of image data includes a DC term, and wherein the DC term is separately encoded, such that the series of digital signals is a set f non-DC quantized coefficients of a transformed block of image data.

### Claim 18 (depends on 16)

A carrier medium as recited in claim 16, wherein the method further comprises, in the first region:
for each identified event, encoding the signs of the non-zero-valued coefficients in the run of non-zero-valued coefficients.

### Claim 19 (depends on 16)

A carrier medium as recited in claim 16, wherein the method further comprises:
providing a breakpoint defining the first contiguous region along the ordering of the series followed by a second continuous region; such that the coefficients of the first region are encoded by a first encoding method that includes the identifying of events, the jointly encoding the runlengths of the events, and the encoding the amplitudes of non-zero-valued coefficients of the events; and
encoding the coefficients in the second region using a second region encoding method,
wherein a first region encoding method and the second region encoding method are such that the encoding of at least some of the coefficients or runs of coefficients in the first region is different than the encoding of at least some of the coefficients or runs of coefficients in the second region.

### Claim 20 (depends on 19)

A carrier medium as recited in claim 19, wherein the method further comprises:
providing at least one additional breakpoint such that the series is divided into more than two regions by the breakpoint and the one additional breakpoint for each region in addition to the second region; and
encoding the coefficients in each additional region defined by the corresponding additional breakpoint, the respective encoding in a region using a region coding method different from the coding methods used in other regions.

### Claim 21 (depends on 19)

A carrier medium as recited in claim 19, wherein the breakpoint value is pre-selected.

### Claim 22 (depends on 19)

A carrier medium as recited in claim 19, wherein the breakpoint value is selected from a finite set of pre-defined breakpoint values according to an image-dependent criterion.

### Claim 23 (depends on 19)

A carrier medium as recited in claim 19, wherein the second corresponding method is applicable to intraframe image data and to interframe blocks of image data, and wherein a first pre-selected breakpoint value is used for intraframe image data and a second first pre-selected breakpoint value is used for interframe image data.

### Claim 24 (depends on 19)

A carrier medium as recited in claim 19, wherein the breakpoint defines a hard boundary between the first and second regions.

### Claim 25 (depends on 19)

A carrier medium as recited in claim 19, wherein the breakpoint defines a soft boundary between the first and second regions, such that for an identified event in the first region block having a sequence of consecutive non-zero values that crosses the breakpoint, the boundary between the first and second region is at the end of the event such that the whole event is in the first region.

### Claim 26 (depends on 16)

A carrier medium as recited in claim 16, wherein the joint encoding of the runlengths of an event uses a multidimensional coding table.

### Claim 27 (depends on 16)

A carrier medium as recited in claim 16, wherein the number of events that are identified and whose run lengths jointly encoded is limited such that only events up to a maximum total number of coefficients (the “maximal length”) are identified, and wherein the identifying also identifies events of all zeroes of the maximum length, and maximal length events that end in a non-zero-coefficient, such that escape codes may be avoided in coding the coefficients of the first region.

### Claim 28

An apparatus for processing an ordered series of digital signals that each have an amplitude from a finite set of amplitudes consisting of the most likely-to-occur amplitude and at least one other amplitude, the processing to reduce the amount of data used to represent the digital signals and to form codewords such that the more likely-to-occur values or sequences of values of digital signals are represented by relatively short codewords and the less likely-to-occur values or sequences of values of digital signals are represented by relatively long codewords, the apparatus comprising:
means for identifying events in a first contiguous region in the series, each event including a run of consecutive coefficients of the most Likely-to-occur amplitude, preceding a run of one or more consecutive signals having any value other than the most likely-to-occur amplitude, including a run of no coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive coefficients having other than the most likely-to-occur amplitude;
means for jointly encoding, for each identified event, the run lengths of the preceding run of the most likely-to-occur amplitude and the following run of other than the most likely-to-occur amplitude with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths; and
means for encoding, for each identified event, each amplitude in the run of consecutive signals having other than the most likely-to-occur amplitude, the encoding according to an amplitude coding method,
such that relatively short codewords are formed to represent values or sequences of values that are relatively more likely-to-occur, and relatively long codewords are formed to represent values or sequences of values that are relatively less likely-to-occur.

### Claim 29 (depends on 28)

An apparatus as recited in claim 28,
wherein the series of digital signals is a series of quantized coefficients of a transformed block of image data, the transform such that the most likely-to-occur amplitude is 0, and the next most likely-to-occur amplitude is 1, such that the means for identifying events includes identifying events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, including a run of no zero-valued coefficients preceding a run of non-zero-valued coefficients.

### Claim 30 (depends on 29)

An apparatus as recited in claim 29, wherein the transformed block of image data includes a DC term, and wherein the DC term is separately encoded, such that the series of digital signals is a set of non-DC quantized coefficients of a transformed block of image data.

### Claim 31 (depends on 29)

An apparatus as recited in claim 29, further comprising:
means for encoding the signs of the non-zero-valued coefficients in the run of non-zero-valued coefficients for each identified event in the first region.

### Claim 32 (depends on 29)

An apparatus as recited in claim 29, wherein the method further comprises:
means for providing a breakpoint defining the first contiguous region along the ordering of the series followed by a second continuous region; such that the coefficients of the first region are encoded by a first encoding method that includes the identifying of events, the jointly encoding the runlengths of the events, and the encoding the amplitudes of non-zero-valued coefficients of the events; and
means for encoding the coefficients in the second region using a second region encoding method,
wherein a first region encoding method and the second region encoding method are such that the encoding of at least some of the coefficients or runs of coefficients in the first region is different than the encoding of at least some of the coefficients or runs of coefficients in the second region.

### Claim 33 (depends on 32)

An apparatus as recited in claim 32, further comprising:
means for providing at least one additional breakpoint such that the series is divided into more than two regions by the breakpoint and the one additional breakpoint for each region in addition to the second region; and
means for encoding the coefficients in each additional region defined by the corresponding additional breakpoint, the respective encoding in a region using a region coding method different from the coding methods used in other regions.

### Claim 34 (depends on 32)

An apparatus as recited in claim 32, wherein the breakpoint value is pre-selected.

### Claim 35 (depends on 32)

An apparatus as recited in claim 32, wherein the breakpoint value is selected from a finite set of pre-defined breakpoint values according to an image-dependent criterion.

### Claim 36 (depends on 32)

An apparatus as recited in claim 32, wherein the second corresponding method is applicable to intraframe image data and to interframe blocks of image data, and wherein a first pre-selected breakpoint value is used for intraframe image data and a second first pre-selected breakpoint value is used for interframe image data.

### Claim 37 (depends on 32)

An apparatus as recited in claim 32, wherein the breakpoint defines a hard boundary between the first and second regions.

### Claim 38 (depends on 32)

An apparatus as recited in claim 32, wherein the breakpoint defines a soft boundary between the first and second regions, such that for an identified event in the first region block having a sequence of consecutive non-zero values that crosses the breakpoint, the boundary between the first and second region is at the end of the event such that the whole event is in the first region.

### Claim 39 (depends on 29)

An apparatus as recited in claim 29, wherein the means for jointly encoding the runlengths on an event uses a multidimensional coding table.

### Claim 40 (depends on 29)

An apparatus as recited in claim 29, wherein the number of events that are identified by the means for identifying and whose run lengths jointly encoded by the means for jointly encoding is limited such that only events up to a maximum total number of coefficients (the “maximal length”) only are identified, and wherein the means for identifying also identifies events of all zeroes of the maximum length, and maximal length events that end in a non-zero-coefficient, such that escape codes may be avoided in coding the coefficients of the first region.

### Claim 41

An apparatus including a processing system, the apparatus to accept an ordered series of digital signals that each have an amplitude from a finite set of amplitudes consisting of the most likely-to-occur amplitude and at least one other amplitude, the apparatus to perform a method for processing an ordered series of digital signals to reduce the amount of data used to represent the digital signals and to form codewords such that the more likely-to-occur values or sequences of values of digital signals are represented by relatively short codewords and the less likely-to-occur values or sequences of values of digital signals are represented by relatively long codewords, the method comprising:
for a first contiguous region in the series:
identifying events that each includes a run of consecutive coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive signals having any value other than the most likely-to-occur amplitude, including a run of no coefficients of the most likely-to-occur amplitude, preceding a run of one or more consecutive coefficients having other than the most likely-to-occur amplitude;
for each identified event, jointly encoding the run lengths of the preceding run of the most likely-to-occur amplitude and the following run of other than the most likely-to-occur amplitude with a codeword, such that for at least some events, relatively more likely-to-occur pairs of runlengths are encoded by a shorter codeword than relatively less likely-to-occur runlengths;
for each identified event, encoding each amplitude in the run of consecutive signals having other than the most likely-to-occur amplitude, the encoding according to an amplitude coding method,
such that relatively short codewords are formed to represent values or sequences of values that are relatively more likely-to-occur, and relatively long codewords are formed to represent values or sequences of values that are relatively less likely-to-occur.

### Claim 42 (depends on 41)

An apparatus as recited in claim 41,
wherein the series of digital signals is a series of quantized coefficients of a transformed block of image data, the transform such that the most likely-to-occur amplitude is 0, and the next most likely-to-occur amplitude is 1, such that the identifying of events identifies events that each includes a run of zero-valued coefficients preceding a run of one or more non-zero-valued coefficients, including a run of no zero-valued coefficients preceding a run of non-zero-valued coefficients.

### Claim 43 (depends on 42)

An apparatus as recited in claim 42, wherein the transformed block of image data includes a DC term, and wherein the DC term is separately encoded, such that the series of digital signals is a set f non-DC quantized coefficients of a transformed block of image data.

### Claim 44 (depends on 42)

An apparatus as recited in claim 42, wherein the method further comprises, in the first region:
for each identified event, encoding the signs of the non-zero-valued coefficients in the run of non-zero-valued coefficients.

### Claim 45 (depends on 42)

An apparatus as recited in claim 42, wherein the method further comprises:
providing a breakpoint defining the first contiguous region along the ordering of the series followed by a second continuous region; such that the coefficients of the first region are encoded by a first encoding method that includes the identifying of events, the jointly encoding the runlengths of the events, and the encoding the amplitudes of non-zero-valued coefficients of the events; and
encoding the coefficients in the second region using a second region encoding method,
wherein a first region encoding method and the second region encoding method are such that the encoding of at least some of the coefficients or runs of coefficients in the first region is different than the encoding of at least some of the coefficients or runs of coefficients in the second region.

### Claim 46 (depends on 45)

An apparatus as recited in claim 45, wherein the method further comprises:
providing at least one additional breakpoint such that the series is divided into more than two regions by the breakpoint and the one additional breakpoint for each region in addition to the second region; and
encoding the coefficients in each additional regions defined by the corresponding additional breakpoint, the respective encoding in a region using a region coding method different from the coding methods used in other regions.

### Claim 47 (depends on 45)

An apparatus as recited in claim 45, wherein the breakpoint value is pre-selected.

### Claim 48 (depends on 45)

An apparatus as recited in claim 45, wherein the breakpoint value is selected from a finite set of pre-defined breakpoint values according to an image-dependent criterion.

### Claim 49 (depends on 45)

An apparatus as recited in claim 45, wherein the second corresponding method is applicable to intraframe image data and to interframe blocks of image data, and wherein a first pre-selected breakpoint value is used for intraframe image data and a second first pre-selected breakpoint value is used for interframe image data.

### Claim 50 (depends on 45)

An apparatus as recited in claim 45, wherein the breakpoint defines a hard boundary between the first and second regions.

### Claim 51 (depends on 45)

An apparatus as recited in claim 45, wherein the breakpoint defines a soft boundary between the first and second regions, such that for an identified event in the first region block having a sequence of consecutive non-zero values that crosses the breakpoint, the boundary between the first and second region is at the end of the event such that the whole event is in the first region.

### Claim 52 (depends on 42)

An apparatus as recited in claim 42, wherein the joint encoding of the runlengths on an event uses a multidimensional coding table.

### Claim 53 (depends on 42)

An apparatus as recited in claim 42, wherein the number of events that are identified and whose run lengths jointly encoded is limited such that only events up to a maximum total number of coefficients (the “maximal length”) are identified, and wherein the identifying also identifies events of all zeroes of the maximum length, and maximal length events that end in a non-zero-coefficient, such that escape codes may be avoided in coding the coefficients of the first region.
