# US 2010/0166076 A1 · Method, apparatus, and computer readable medium for calculating run and level representations of quantized transform coefficients representing pixel values included in a block of a video picture

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

- Number: US 2010/0166076 A1
- Document ID: US20100166076A1
- Status: Published application
- Kind: A1
- Application number: 12/649,764
- Filed: 2009-12-30
- Published: 2010-07-01
- Earliest claimed: 2008-12-30
- Assignees: Tandberg Telecom AS
- Inventors: Lars Petter ENDRESEN
- Web page: https://patentgrep.com/patent/US20100166076A1

## CPC

- H04N 19/93: Run-length coding
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/42: characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation (H04N19/635 takes precedence)
- H04N 19/91: Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A process for calculating run-and-level representations of quantized transform coefficients includes packing each quantized transform coefficients in a value interval [Max, Min] by setting all quantized transform coefficients greater than Max equal to Max, and all quantized transform coefficients less than Min equal to Min; reordering the quantized transform coefficients resulting in an array C of reordered quantized transform coefficients; masking C by generating an array M containing ones in positions corresponding to positions of C having non-zero values, and zeros in positions corresponding to positions of C having zero values; and for each position containing a one in M, generating a run and a level representation by setting the level value equal to an occurring value in a corresponding position of C, and setting the run value equal to the number of proceeding positions relative to a current position in M since a previous occurrence of one in M.

## Claims

### Claim 1

A method for calculating run and level representations of quantized transform coefficients representing pixel values included in a block of a video picture, the method comprising:
packing, at a video processing apparatus, each quantized transform coefficients in a value interval [Max, Min] by setting all quantized transform coefficients greater than Max equal to Max, and all quantized transform coefficients less than Min equal to Min;
reordering, at the video processing apparatus, the quantized transform coefficients according to a predefined order depending on respective positions in the block resulting in an array C of reordered quantized transform coefficients;
masking, at the video processing apparatus, C by generating an array M containing ones in positions corresponding to positions of C having non-zero values, and zeros in positions corresponding to positions of C having zero values;
generating, at the video processing apparatus, for each position containing a one in M, a run and a level representation by setting the level value equal to an occurring value in a corresponding position of C; and
setting, at the video processing apparatus, for each position containing a one in M, the run value equal to the number of proceeding positions relative to a current position in M since a previous occurrence of one in M.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the masking further includes,
creating an array C′ from C where positions corresponding to positions of non-zero values in C are filled with ones, and positions corresponding to positions of zero values in C are filled with zeros, and
creating M from C′ by extracting the most significant bit from values in respective position of C′ and inserting the bits in corresponding positions in M.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the creating of the array C′ is executed by a C++ function PCMPGTB, and the creating of M from C′ is executed by a C++ function PMOVMSKB.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the generating of the run and level representation further includes determining positions containing non-zero values in C by corresponding positions containing ones in M.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining of positions containing non-zero values in C is executed by a C++ function BSF.

### Claim 6 (depends on 1)

The method according to claim 1, wherein Max is 256 and Min is 0.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the predefined order follows a zigzag path of transform coefficient positions in the block starting in an upper left corner heading towards a lower right corner.

### Claim 8

An apparatus for calculating run and level representations of quantized transform coefficients representing pixel values included in a block of a video picture, the apparatus comprising:
a video processor that,
packs each quantized transform coefficients in a value interval [Max, Min] by setting all quantized transform coefficients greater than Max equal to Max, and all quantized transform coefficients less than Min equal to Min;
reorders the quantized transform coefficients according to a predefined order depending on respective positions in the block resulting in an array C of reordered quantized transform coefficients;
masks C by generating an array M containing ones in positions corresponding to positions of C having non-zero values, and zeros in positions corresponding to positions of C having zero values;
generates, for each position containing a one in M, a run and a level representation by setting the level value equal to an occurring value in a corresponding position of C; and
sets, for each position containing a one in M, the run value equal to the number of proceeding positions relative to a current position in M since a previous occurrence of one in M.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein when the video processor masks C, the video processor further,
creates an array C′ from C where positions corresponding to positions of non-zero values in C are filled with ones, and positions corresponding to positions of zero values in C are filled with zeros, and
creates M from C′ by extracting the most significant bit from values in respective position of C′ and inserting the bits in corresponding positions in M.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein when the video processor creates the array C′, the video processor executes a C++ function PCMPGTB, and when the video processor creates M from C′, the video processor executes a C++ function PMOVMSKB.

### Claim 11 (depends on 8)

The apparatus according to claim 8, wherein when the video processor generates the run and level representation, the video processor further determines positions containing non-zero values in C by corresponding positions containing ones in M.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein when the video processor determines the positions containing non-zero values in C, the video processor executes a C++ function BSF.

### Claim 13 (depends on 8)

The apparatus according to claim 8, wherein Max is 256 and Min is 0.

### Claim 14 (depends on 8)

The apparatus according to claim 8, wherein the predefined order follows a zigzag path of transform coefficient positions in the block starting in an upper left corner heading towards a lower right corner.

### Claim 15

A computer readable storage medium encoded with computer executable instructions, wherein the instructions, when executed by a video processing apparatus, cause the video processing apparatus to perform a method for calculating run and level representations of quantized transform coefficients representing pixel values included in a block of a video picture, the method comprising:
packing, at the video processing apparatus, each quantized transform coefficients in a value interval [Max, Min] by setting all quantized transform coefficients greater than Max equal to Max, and all quantized transform coefficients less than Min equal to Min;
reordering, at the video processing apparatus, the quantized transform coefficients according to a predefined order depending on respective positions in the block resulting in an array C of reordered quantized transform coefficients;
masking, at the video processing apparatus, C by generating an array M containing ones in positions corresponding to positions of C having non-zero values, and zeros in positions corresponding to positions of C having zero values;
generating, at the video processing apparatus, for each position containing a one in M, a run and a level representation by setting the level value equal to an occurring value in a corresponding position of C; and
setting, at the video processing apparatus, for each position containing a one in M, the run value equal to the number of proceeding positions relative to a current position in M since a previous occurrence of one in M.

### Claim 16 (depends on 15)

The computer readable medium according to claim 15, wherein the masking further includes,
creating an array C′ from C where positions corresponding to positions of non-zero values in C are filled with ones, and positions corresponding to positions of zero values in C are filled with zeros, and
creating M from C′ by extracting the most significant bit from values in respective position of C′ and inserting the bits in corresponding positions in M.

### Claim 17 (depends on 16)

The computer readable medium according to claim 16, wherein the creating of the array C′ is executed by a C++ function PCMPGTB, and the creating of M from C′ is executed by a C++ function PMOVMSKB.

### Claim 18 (depends on 15)

The computer readable medium according to claim 15, wherein the generating of the run and level representation further includes determining positions containing non-zero values in C by corresponding positions containing ones in M.

### Claim 19 (depends on 15)

The computer readable medium according to claim 15, wherein the determining of positions containing non-zero values in C is executed by a C++ function BSF.

### Claim 20 (depends on 15)

The computer readable medium according to claim 15, wherein the predefined order follows a zigzag path of transform coefficient positions in the block starting in an upper left corner heading towards a lower right corner.
