# US 10,313,681 B2 · Techniques for rate-distortion optimization in video compression

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

- Number: US 10,313,681 B2
- Document ID: US10313681B2
- Status: Granted
- Kind: B2
- Application number: 14/133,078
- Filed: 2013-12-18
- Published: 2015-06-18
- Granted: 2019-06-04
- Earliest claimed: 2013-12-18
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Heon-Mo Koo; Atthar H. Mohammed; Thuan H. Pham
- Web page: https://patentgrep.com/patent/US10313681B2

## CPC

- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/124: Quantisation
- H04N 19/13: Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
- H04N 19/147: according to rate distortion criteria (rate-distortion as a criterion for motion estimation H04N19/567)
- 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: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Various embodiments are generally directed to techniques for reducing processing and/or storage resource requirements for RDO in compressing motion video. A device to compress motion video includes a first cost calculator to derive a first bitcost value of using a quantized coefficient of a quantized coefficient block of a frame of a video in compressing the video, the first bitcost value based on a context model of a context-adaptive binary arithmetic coder (CABAC); and a second cost calculator to derive a second bitcost value of replacing the quantized coefficient with an alternate value derived from the quantized coefficient in compressing the video, the second bitcost value based on the context model. Other embodiments are described and claimed.

## Claims

### Claim 1

A device to compress motion video comprising:
a processor circuit;
a memory storing instructions which when executed by the processor circuit cause the processor circuit to:
concurrently derive, based on a context model of a context-adaptive binary arithmetic coder (CABAC), the context model retrieved from among multiple context models based on an indication provided to the CABAC of the context model as an initial context model:
a first bitcost value of using a quantized coefficient of a quantized coefficient block of a first frame of a video in compressing the video; and
a second bitcost value of replacing the quantized coefficient with an alternate value derived by subtracting a value of one from an absolute value of the quantized coefficient in compressing the video; and
a first bitcost value and a second bitcost value for a second frame of the video as estimated bitcost values using the context model of the CABAC without incurring a delay to receive a new context model of the multiple context models as a new initial context model and without the CABAC generating actual bitcost values for the second frame, the first bitcost value for the second frame derived using a quantized coefficient of a quantized coefficient block of the second frame, the second bitcost value to replace the quantized coefficient of the quantized coefficient block of the second frame with an alternate value derived from quantized coefficient of the quantized coefficient block of the second frame; and
store source data representing the video in a storage.

### Claim 2 (depends on 1)

The device of claim 1, the memory storing instructions which when executed by the processor circuit cause the processor circuit to:
derive a first distortion value of using the quantized coefficient of the quantized coefficient block of the first frame in compressing the video based at least in part on an unquantized coefficient of an unquantized coefficient block of the first frame; and
derive a second distortion value of using the alternate value in compressing the video based at least in part on the unquantized coefficient, the unquantized coefficient block corresponding to the quantized coefficient block of the first frame and the quantized coefficient derived from the unquantized coefficient through quantization of the unquantized coefficient block.

### Claim 3 (depends on 2)

The device of claim 2, the first distortion value derived from a squared difference between the quantized coefficient of the quantized coefficient block of the first frame and the unquantized coefficient, and the second distortion value derived from a squared difference between the alternate value and the unquantized coefficient.

### Claim 4 (depends on 1)

The device of claim 1, comprising at least one of a display to visually present the video or an interface to transmit the video to a display service via a network following compression of the video.

### Claim 5 (depends on 1)

The device of claim 1, the memory storing instructions which when executed by the processor circuit cause the processor circuit to:
receive the indication of the new context model of the multiple context models based on an indication provided to the CABAC of the new context model as the new initial context model;
derive a first bitcost value for a third frame of the video using a quantized coefficient of a quantized coefficient block of the third frame of the video based on the new context model of the CABAC; and
derive a second bitcost value for the third frame of the video based on the new context model of the CABAC, the second bitcost value for replacing the quantized coefficient of the quantized coefficient block of the third frame with an alternate value derived from quantized coefficient of the quantized coefficient block of the third frame.

### Claim 6

A device to compress motion video comprising:
a processor circuit;
a memory storing instructions which when executed by the processor circuit cause the processor circuit to:
divide an unquantized coefficient of an unquantized coefficient block of a first frame of a video by a quantization value to derive a quotient, and to add a rounding value to and truncate the quotient to derive a quantized coefficient of a quantized coefficient block that corresponds to the unquantized coefficient block;
receive, from a context-adaptive binary arithmetic coder (CABAC), an indication of a bitcost of a video bitstream resulting from compressing the video, the primary quantizer to alter the rounding in response to the indication;
derive, based on a context model of the CABAC, a first bitcost value of using the quantized coefficient in compressing the video, the context model retrieved from among multiple context models based on an indication provided to the CABAC of the context model as an initial context model;
derive, based on the context model of the CABAC, a second bitcost value of replacing the quantized coefficient with an alternate value derived by subtracting a value of one from an absolute value of the quantized coefficient in compressing the video;
derive a first bitcost value and a second bitcost value for a second frame of the video as estimated bitcost values using the context model of the CABAC without incurring a delay to receive a new context model of the multiple context models as a new initial context model and without the CABAC generating actual bitcost values for the second frame, the first bitcost value for the second frame derived using a quantized coefficient of a quantized coefficient block of the second frame, the second bitcost value to replace the quantized coefficient of the quantized coefficient block of the second frame with an alternate value derived from quantized coefficient of the quantized coefficient block of the second frame; and
store source data representing the video in a storage.

### Claim 7 (depends on 6)

The device of claim 6, the memory storing instructions which when executed by the processor circuit cause the processor circuit to:
derive a first distortion value of using the quantized coefficient of the quantized coefficient block of the first frame in compressing the video based at least in part on the unquantized coefficient; and
derive a second distortion value of using the alternate value in compressing the video based at least in part on the unquantized coefficient.

### Claim 8 (depends on 7)

The device of claim 7, the memory storing instructions which when executed by the processor circuit cause the processor circuit to:
derive a first rate-distortion (RD) cost from a sum of the first bitcost value of the first frame and the first distortion value; and
derive a second RD cost from a sum of the second bitcost value of the first frame and the second distortion value.

### Claim 9 (depends on 8)

The device of claim 8, the memory storing instructions which when executed by the processor circuit cause the processor circuit to:
selectively replace the quantized coefficient of the quantized coefficient block of the first frame with the alternate value in compressing the video based on a comparison of at least a first overall cost of using a first combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video and a second combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video, the first combination comprising the quantized coefficient of the quantized coefficient block of the first frame, the second combination comprising the alternate value, the first overall cost comprising the first RD cost, and the second overall cost comprising the second RD cost.

### Claim 10 (depends on 6)

The device of claim 6, comprising at least one of a display to visually present the video or an interface to transmit the video to a display device via a network following compression of the video.

### Claim 11

A computer-implemented method for compressing motion video comprising:
deriving a first bitcost value of using a quantized coefficient of a quantized coefficient block of a first frame of a video in compressing the video, the first bitcost value based on a context model of a context-adaptive binary arithmetic coder (CABAC), the context model retrieved from among multiple context models based on an indication provided to the CABAC of the context model as an initial context model;
concurrent with the derivation of the first bitcost value, deriving a second bitcost value of replacing the quantized coefficient with an alternate value derived by subtracting a value of one from an absolute value of the quantized coefficient in compressing the video, the second bitcost value based on the context model;
selectively replacing the quantized coefficient with the alternate value in compressing the video based on a comparison of at least the first bitcost value and the second bitcost value; and
deriving, based on the context model, a first bitcost value and a second bitcost value for a second frame of the video as estimated bitcost values without incurring a delay to receive a new context model of the multiple context models as a new initial context model and without the CABAC generating actual bitcost values for the second frame, the first bitcost value for the second frame derived using a quantized coefficient of a quantized coefficient block of the second frame, the second bitcost value to replace the quantized coefficient of the quantized coefficient block of the second frame with an alternate value derived from quantized coefficient of the quantized coefficient block of the second frame.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, the method comprising:
deriving a first distortion value of using the quantized coefficient of the quantized coefficient block of the first frame in compressing the video based at least in part on an unquantized coefficient of an unquantized coefficient block of the first frame, the unquantized coefficient block corresponding to the quantized coefficient block of the first frame and the quantized coefficient of the quantized coefficient block of the first frame derived from the unquantized coefficient through quantization of the unquantized coefficient block; and
deriving a second distortion value of using the alternate value in compressing the video based at least in part on the unquantized coefficient.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, comprising:
deriving the first distortion value from a squared difference between the quantized coefficient of the quantized coefficient block of the first frame and the unquantized coefficient; and
deriving the second distortion value from a squared difference between the alternate value and the unquantized coefficient.

### Claim 14 (depends on 12)

The computer-implemented method of claim 12, comprising:
deriving a first overall cost of using a first combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video from a sum of at least the first bitcost value of the first frame and the first distortion value, the first combination comprising the quantized coefficient of the quantized coefficient block of the first frame;
deriving a second overall cost of using a second combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video from a sum of at least the second bitcost value of the first frame and the second distortion value of the first frame, the second combination comprising the alternate value; and
selectively replacing the quantized coefficient of the quantized coefficient block of the first frame with the alternate value in compressing the video based on a comparison of the first overall cost and the second overall cost.

### Claim 15 (depends on 11)

The computer-implemented method of claim 11, comprising deriving the first bitcost value and the second bitcost value of the first frame concurrently, and deriving the first bitcost value and the second bitcost value of the second frame concurrently.

### Claim 16 (depends on 11)

The computer-implemented method of claim 11, comprising at least one of visually presenting the video on a display or transmitting the video to a display device via a network following compression of the video.

### Claim 17

At least one non-transitory machine-readable storage medium comprising instructions that when executed by a computing device, cause the computing device to:
derive a first bitcost value of using a quantized coefficient of a quantized coefficient block of a first frame of a video in compressing the video, the first bitcost value based on a context model of a context-adaptive binary arithmetic coder (CABAC), the context model retrieved from among multiple context models based on an indication provided to the CABAC of the context model as an initial context model;
concurrent with the derivation of the first bitcost value, derive a second bitcost value of replacing the quantized coefficient with an alternate value derived by subtracting a value of one from an absolute value of the quantized coefficient in compressing the video, the second bitcost value based on the context model;
selectively replace the quantized coefficient with the alternate value in compressing the video based on a comparison of at least the first bitcost value and the second bitcost value; and
derive a first bitcost value and a second bitcost value for a second frame of the video as estimated bitcost values using the context model of the CABAC without incurring a delay to receive a new context model of the multiple context models as a new initial context model and without the CABAC generating actual bitcost values for the second frame, the first bitcost value for the second frame derived using a quantized coefficient of a quantized coefficient block of the second frame, the second bitcost value to replace the quantized coefficient of the quantized coefficient block of the second frame with an alternate value derived from quantized coefficient of the quantized coefficient block of the second frame.

### Claim 18 (depends on 17)

The at least one non-transitory machine-readable storage medium of claim 17, the computing device caused to:
derive a first distortion value of using the quantized coefficient of the quantized coefficient block of the first frame in compressing the video based at least in part on an unquantized coefficient of an unquantized coefficient block of the first frame, the unquantized coefficient block corresponding to the quantized coefficient block of the first frame and the quantized coefficient derived from the unquantized coefficient through quantization of the unquantized coefficient block; and
derive a second distortion value of using the alternate value in compressing the video based at least in part on the unquantized coefficient.

### Claim 19 (depends on 18)

The at least one non-transitory machine-readable storage medium of claim 18, the computing device caused to:
derive the first distortion value from a squared difference between the quantized coefficient of the quantized coefficient block of the first frame and the unquantized coefficient; and
derive the second distortion value from a squared difference between the alternate value and the unquantized coefficient.

### Claim 20 (depends on 18)

The at least one non-transitory machine-readable storage medium of claim 18, the computing device caused to:
derive a first overall cost of using a first combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video from a sum of at least the first bitcost value of the first frame and the first distortion value, the first combination comprising the quantized coefficient;
derive a second overall cost of using a second combination of quantized coefficients of the quantized coefficient block of the first frame and alternate values associated with the quantized coefficient block of the first frame in compressing the video from a sum of at least the second bitcost value of the first frame and the second distortion value, the second combination comprising the alternate value; and
selectively replace the quantized coefficient of the quantized coefficient block of the first frame with the alternate value in compressing the video based on a comparison of the first overall cost and the second overall cost.

### Claim 21 (depends on 17)

The at least one non-transitory machine-readable storage medium of claim 17, the computing device caused to derive the first bitcost value and the second bitcost value of the first frame concurrently, the computing device caused to derive the first bitcost value and the second bitcost value of the second frame concurrently.

### Claim 22 (depends on 17)

The at least one non-transitory machine-readable storage medium of claim 17, the computing device caused to transmit the video to a display device following compression of the video.
