# US 9,357,185 B2 · Context optimization for last significant coefficient position coding

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

- Number: US 9,357,185 B2
- Document ID: US9357185B2
- Status: Granted
- Kind: B2
- Application number: 13/669,096
- Filed: 2012-11-05
- Published: 2013-05-09
- Granted: 2016-05-31
- Earliest claimed: 2011-11-08
- Assignees: QUALCOMM Incorporated
- Applicants: Qualcomm Incorporated
- Inventors: Liwei Guo; Wei-Jung Chien; Marta Karczewicz
- Web page: https://patentgrep.com/patent/US9357185B2

## CPC

- H04N 19/10: using adaptive coding
- H03M 7/4018: {Context adapative binary arithmetic codes [CABAC]}
- H03M 7/4037: {Prefix coding}
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/18: the unit being a set of transform coefficients
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- 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

A video encoder is configured to encode a binary sting indicating a position of a last significant coefficient within a video block. A video decoder is configured to decode the encoded binary string. The string may be coded using context adaptive binary arithmetic coding (CABAC). Binary indices of the binary string may be assigned a context. The context may be determined according to a mapping function. A context may be a assigned to one or more binary indices where each index is associated with a different block size. The last binary index of a 16×16 video block may share a context with the last binary index of a 32×32 video block.

## Claims

### Claim 1

A method of encoding transform coefficients for a video block, the method comprising:
determining a binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with the video block, the binary string including a prefix portion and a suffix portion;
determining a context for a binary index in the prefix portion of the binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes; and
encoding the binary string using context adaptive binary arithmetic coding (CABAC) based at least in part on the determined context.

### Claim 2 (depends on 1)

The method of claim 1, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 3 (depends on 2)

The method of claim 2, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 4 (depends on 1)

The method of claim 1, wherein encoding the binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the binary string, and wherein the transform block is a first transform block, the method further comprising:
determining a second binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
encoding the second binary string using CABAC based at least in part on the updated context.

### Claim 5

A method of decoding transform coefficients for a video block, the method comprising:
obtaining an encoded binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with the video block, the encoded binary string including a prefix portion and a suffix portion, wherein the encoded binary string is encoded using context adaptive binary arithmetic coding (CABAC);
determining a context for a binary index in the prefix portion of the encoded binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes;
decoding the encoded binary string using CABAC based at least in part on the determined context; and
determining the position of the last significant coefficient in the transform block of the transform coefficients associated with the video block based on the decoded binary string.

### Claim 6 (depends on 5)

The method of claim 5, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 7 (depends on 6)

The method of claim 6, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 8 (depends on 5)

The method of claim 5, wherein decoding the encoded binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the encoded binary string, and wherein the transform block is a first transform block; and further comprising:
obtaining a second encoded binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
decoding the second encoded binary string using CABAC based at least in part on the updated context.

### Claim 9

An apparatus configured to encode transform coefficients for a video block, the apparatus comprising:
means for determining a binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with the video block, the binary string including a prefix portion and a suffix portion;
means for determining a context for a binary index in the prefix portion of the binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes; and
means for encoding the binary string using context adaptive binary arithmetic coding (CABAC) based at least in part on the determined context.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein encoding the binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the binary string, and wherein the transform block is a first transform block; and further comprising:
means for determining a second binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
means for entropy coding the second binary string using CABAC based at least in part on the updated context.

### Claim 11

An apparatus configured to decode transform coefficients for a video block, the apparatus comprising:
means for obtaining an encoded binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with the video block, the encoded binary string including a prefix portion and a suffix portion, wherein the encoded binary string is encoded using context adaptive binary arithmetic coding (CABAC);
means for determining a context for a binary index in the prefix portion of the encoded binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes;
means for decoding the encoded binary string using CABAC based at least in part on the determined context; and
means for determining the position of the last significant coefficient in the transform block of the transform coefficients associated with the video block based on the decoded binary string.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein decoding the encoded binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the encoded binary string, and wherein the transform block is a first transform block; and further comprising:
means for obtaining a second encoded binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
means for decoding the second encoded binary string using CABAC based at least in part on the updated context.

### Claim 13

A device configured to encode transform coefficients for a video block, the device comprising:
a memory configured to store the transform coefficients; and
a video encoder configured to:
determine a binary string indicating a position of a last significant coefficient within a transform block of the transform coefficients associated with the video block, the binary string including a prefix portion and a suffix portion;
determine a context for a binary index in the prefix portion of the binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes; and
encode the binary string using context adaptive binary arithmetic coding (CABAC) based at least in part on the determined context.

### Claim 14 (depends on 13)

The device of claim 13, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 15 (depends on 14)

The device of claim 14, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 16 (depends on 13)

The device of claim 13, wherein encoding the binary string using (CABAC) based at least in part on the determined context includes updating the context based on the value of the binary string, and wherein the transform block is a first transform block; and wherein the video encoder is further configured to:
determine a second binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
encode the second binary string using CABAC based at least in part on the updated context.

### Claim 17

A device configured to decode transform coefficients for a video block, the device comprising:
a memory configured to store the transform coefficients; and
a video decoder configured to:
obtain an encoded binary string indicating a position of a last significant coefficient within a transform block of the transform coefficients associated with the video block, the encoded binary string including a prefix portion and a suffix portion, wherein the encoded binary string is encoded using context adaptive binary arithmetic coding (CABAC);
determine a context for a binary index in the prefix portion of the encoded binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes;
decode the encoded binary string using CABAC based at least in part on the determined context; and
determine the position of the last significant coefficient in the transform block of the transform coefficients associated with the video block based on the decoded binary string.

### Claim 18 (depends on 17)

The device of claim 17, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 19 (depends on 18)

The device of claim 18, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 20 (depends on 17)

The device of claim 17, wherein decoding the encoded binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the encoded binary string, and wherein the transform block is a first transform block; and wherein the video decoder is further configured to:
obtain a second encoded binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
decode the second encoded binary string using CABAC based at least in part on the updated context.

### Claim 21

A non-transitory computer-readable storage medium having instructions stored thereon that upon execution cause one or more processors of a video encoding device to:
determine a binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with a video block, the binary string including a prefix portion and a suffix portion;
determine a context for a binary index in the prefix portion of the binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes; and
encode the binary string using context adaptive binary arithmetic coding (CABAC) based at least in part on the determined context.

### Claim 22 (depends on 21)

The non-transitory computer-readable storage medium of claim 21, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 23 (depends on 22)

The non-transitory computer-readable storage medium of claim 22, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 24 (depends on 21)

The non-transitory computer-readable storage medium of claim 21, wherein encoding the binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the binary string, and wherein the transform block is a first transform block; and wherein the instructions upon execution further cause one or more processors of a video encoding device to:
determine a second binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
encode the second binary string using CABAC based at least in part on the updated context.

### Claim 25

A non-transitory computer-readable storage medium having instructions stored thereon that upon execution cause one or more processors of a video decoding device to:
obtain an encoded binary string indicating a position of a last significant coefficient within a transform block of transform coefficients associated with a video block, the encoded binary string including a prefix portion and a suffix portion, wherein the encoded binary string is encoded using context adaptive binary arithmetic coding (CABAC);
determine a context for a binary index in the prefix portion of the encoded binary string based on the size of the transform block, wherein the context is assigned to at least two binary indices according to a context index (ctx_index) defined by the function:
ctx_index=(n>>(log2(T)−2))+15,
wherein n is the binary index, >> represents a binary shift operation, and T is a dimension of the transform block, and wherein each of the at least two binary indices are associated with different transform block sizes;
decode the encoded binary string using CABAC based at least in part on the determined context; and
determine the position of the last significant coefficient in the transform block of the transform coefficients associated with the video block based on the decoded binary string.

### Claim 26 (depends on 25)

The non-transitory computer-readable storage medium of claim 25, wherein the context is assigned to a last binary index of an 16×16 transform block and a last binary index of a 32×32 transform block.

### Claim 27 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein a second context is assigned to adjacent binary indices of the 16×16 transform block.

### Claim 28 (depends on 25)

The non-transitory computer-readable storage medium of claim 25, wherein decoding the encoded binary string using CABAC based at least in part on the determined context includes updating the context based on the value of the encoded binary string, and wherein the transform block is a first transform block; and wherein the instructions upon execution further cause one or more processors of a video encoding device to:
obtain a second encoded binary string indicating a position of a last significant coefficient within a second transform block, wherein the first transform block and the second transform block are different sizes; and
decode the second encoded binary string using CABAC based at least in part on the updated context.

### Claim 29 (depends on 17)

The apparatus of claim 17, wherein the device comprises one or more of:
a wireless communication device comprising at least one of a display configured to display a picture that includes the video block or a camera configured to capture the a picture that includes the video block;
a microprocessor; or
an integrated circuit.
