# US 2014/0192892 A1 · Blockiness metric for large hevc block artifacts

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

- Number: US 2014/0192892 A1
- Document ID: US20140192892A1
- Status: Published application
- Kind: A1
- Application number: 14/150,306
- Filed: 2014-01-08
- Published: 2014-07-10
- Earliest claimed: 2013-01-09
- Assignees: QUALCOMM Incorporated
- Applicants: Qualcomm Incorporated
- Inventors: Geert Van der Auwera; Marta Karczewicz
- Web page: https://patentgrep.com/patent/US20140192892A1

## CPC

- H04N 19/86: involving reduction of coding artifacts, e.g. of blockiness
- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

In one example, a method for encoding video data includes determining a first value for a line of a first plurality of lines, wherein the first plurality of lines are perpendicular to a first edge of a block of the video data; in response to determining that the value satisfies at least one threshold: determining a second value for the line of the first plurality of lines; and determining a second value for a line of a second plurality of lines, wherein the second plurality of lines are perpendicular to a second edge of the block of video data; determining, based on the second value for the line of the first plurality of lines and the second value for the line of the second plurality of lines, an average value; and determining, based on the average value, whether or not to encode one or more deblocking parameter offsets.

## Claims

### Claim 1

A method for encoding video data comprising:
determining a first value for a line of a first plurality of lines, wherein the first plurality of lines are perpendicular to a first edge of a block of the video data;
in response to determining that the first value satisfies at least one threshold:
determining a second value for the line of the first plurality of lines; and
determining a second value for a line of a second plurality of lines, wherein the second plurality of lines are perpendicular to a second edge of the block of video data, and wherein the first edge is a vertical edge or a horizontal edge, and wherein the second edge is a different edge of the vertical edge or the horizontal edge;
determining, based on the second value for the line of the first plurality of lines and the second value for the line of the second plurality of lines, an average value; and
determining, based on the average value, whether or not to encode one or more deblocking parameter offsets.

### Claim 2 (depends on 1)

The method of claim 1, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, and wherein determining the first value for the line of the first plurality of lines comprises:
determining a first intermediate value based on a first set of sample values of video data corresponding to the line of the first plurality of lines, wherein the first set of sample values are included in the first block;
determining a second intermediate value based on a second set of sample values of video data corresponding to the line of the first plurality of lines, wherein the second set of sample values are included in the second block; and
determining the first value based on the first intermediate value and the second intermediate value.

### Claim 3 (depends on 2)

The method of claim 2, wherein the first intermediate value is determined approximately according to the following equation:
dpi=|p2i−2p1i+p0i|,
wherein dpi is the first intermediate value, wherein p2i, p1i, and p0i are sample values included in the first set of sample values, wherein the second intermediate value is determined approximately according to the following equation:
dqi=|q0i−2q1i+q2i|,
wherein dqi is the second intermediate value, wherein q0i, q1i, and q2i are sample values included in the second set of sample values, wherein the first value is determined approximately according to the following equation:
di=(dpi+dqi), and
wherein di is the first value.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining that the first value satisfies at least one threshold comprises:
determining that the first value is greater than a first threshold and lesser than a second threshold.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining the second value for the line of the first plurality of lines comprises:
determining a second value for each line of the first plurality of lines; and
determining a sum of the second values for each line of the first plurality of lines, wherein determining the second value for the line of the second plurality of lines comprises:
determining a second value for each line of the second plurality of lines; and
determining a sum of the second values for each line of the second plurality of lines, wherein determining the average value comprises:
determining, based on the sum of the second values for each line of the first plurality of lines and the sum of the second values for each line of the second plurality of lines, the average value.

### Claim 6 (depends on 5)

The method of claim 5, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, wherein the second edge is the border between the first block and a third block, wherein a third edge is the border between the first block and a fourth block, wherein a fourth edge is the border between the first block and a fifth block, wherein the third edge is parallel to the first edge, wherein the fourth edge is parallel to the second edge, the method further comprising:
determining a second value for each line of a third plurality of lines, wherein the third plurality of lines are perpendicular to the third edge;
determining a sum of the second values for each lines of the third plurality of lines;
determining a second value for each line of a fourth plurality of lines, wherein the fourth plurality of lines are perpendicular to the fourth edge; and
determining a sum of the second values for each lines of the fourth plurality of lines, wherein determining the average value comprises:
determining, based on the sum of the second values for each line of the first plurality of lines, the sum of the second values for each line of the second plurality of lines, the sum of the second values for each line of the third plurality of lines, the sum of the second values for each line of the fourth plurality of lines, the average value.

### Claim 7 (depends on 1)

The method of claim 1, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, wherein the second edge is the border between the first block and a third block, wherein determining the second value for the line of the first plurality of lines comprises:
determining the second value for the line of the first plurality of lines based on a first sample of video data included in the first block and a second sample of video data included in the second block,
wherein determining the second value for the line of the second plurality of lines comprises:
determining the second value for the line of the second plurality of lines based on a third sample of video data included in the first block and a fourth sample of video data included in the third block.

### Claim 8 (depends on 1)

The method of claim 1, wherein the block of video data is included in a slice of video data, the method further comprising:
if the first edge is a horizontal edge:
adjusting, based on a quantity of horizontal edges of the slice and a width of the slice, the second value for the line of the first plurality of lines; and
adjusting, based on a quantity of vertical edges of the slice and a height of the slice, the second value for the line of the second plurality of lines; or
if the first edge is a vertical edge:
adjusting, based on the quantity of vertical edges of the slice and the height of the slice, the second value for the line of the first plurality of lines; and
adjusting, based on the quantity of horizontal edges of the slice and the width of the slice, the second value for the line of the second plurality of lines,
wherein determining the average value comprises:
determining, based on the adjusted second value for the line of the first plurality of lines and the adjusted second value for the line of the second plurality of lines, the average value.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining, based on the average value, whether or not to determine the one or more deblocking parameter offsets comprises:
if the average value is greater than a threshold, determining the one or more deblocking parameter offsets based on the average value; and
if the average value is not greater than the threshold, not determining the one or more deblocking parameter offsets based on the average value.

### Claim 10 (depends on 1)

The method of claim 1, wherein the one or more deblocking parameter offsets comprise a tc offset value and a beta offset value, wherein the tc offset value and the beta offset value are determined approximately according to the following equations:
tc offset=2*Clip3(threshold3,threshold4,avg/value2); and
beta offset=2*Clip3(threshold5,threshold6,avg/value3),
wherein:
avg is the average value,
threshold3, threshold4, threshold5, and threshold6 are threshold values,
value2, and value3 are scaling values, and
the function Clip3 is defined as follows:
Clip


3

(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
else
.

### Claim 11

A device for encoding video data comprising one or more processors configured to:
determine a first value for a line of a first plurality of lines, wherein the first plurality of lines are perpendicular to a first edge of a block of the video data;
in response to determining that the first value satisfies at least one threshold:
determine a second value for the line of the first plurality of lines; and
determine a second value for a line of a second plurality of lines, wherein the second plurality of lines are perpendicular to a second edge of the block of video data, and wherein the first edge is a vertical edge or a horizontal edge and wherein the second edge is a different edge of the vertical edge or the horizontal edge;
determine, based on the second value for the line of the first plurality of lines and the second value for the line of the second plurality of lines, an average value; and
determine, based on the average value, whether or not to encode one or more deblocking parameter offsets.

### Claim 12 (depends on 11)

The device of claim 11, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, and wherein the one or more processors are configured to determine the first value for the line of the plurality of lines by at least:
determining a first intermediate value based on a first set of sample values of video data corresponding to the line of the first plurality of lines, wherein the first set of sample values are included in the first block;
determining a second intermediate value based on a second set of sample values of video data corresponding to the line of the first plurality of lines, wherein the second set of sample values are included in the second block; and
determining the first value based on the first intermediate value and the second intermediate value.

### Claim 13 (depends on 12)

The device of claim 12, wherein the one or more processors are configured to determine the first intermediate value approximately according to the following equation:
dpi=|p2i−2p1i+p0i|,
wherein dpi is the first intermediate value, wherein p2i, p1i, and p0i are sample values included in the first set of sample values, wherein the one or more processors are configured to determine the second intermediate value approximately according to the following equation:
dqi=|q0i−2q1i+q2i|
wherein dqi is the second intermediate value, wherein q0i, q11, and q2i are sample values included in the second set of sample values, wherein the one or more processors are configured to determine the first value approximately according to the following equation:
di=(dpi+dqi), and
wherein di is the first value.

### Claim 14 (depends on 11)

The device of claim 11, wherein the one or more processors are configured to determine that the first value satisfies at least one threshold by at least:
determining that the first value is greater than a first threshold and lesser than a second threshold.

### Claim 15 (depends on 11)

The device of claim 11, wherein the one or more processors are configured to determine the second value for the line of the first plurality of lines by at least:
determining a second value for each line of the first plurality of lines; and
determining a sum of the second values for each line of the first plurality of lines, wherein the one or more processors are configured to determine the second value for the line of the second plurality of lines by at least:
determining a second value for each line of the second plurality of lines; and
determining a sum of the second values for each line of the second plurality of lines, wherein the one or more processors are configured to determine the average value by at least:
determining, based on the sum of the second values for each line of the first plurality of lines and the sum of the second values for each line of the second plurality of lines, the average value.

### Claim 16 (depends on 15)

The device of claim 15, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, wherein the second edge is the border between the first block and a third block, wherein a third edge is the border between the first block and a fourth block, wherein a fourth edge is the border between the first block and a fifth block, wherein the third edge is parallel to the first edge, wherein the fourth edge is parallel to the second edge, wherein the one or more processors are further configured to:
determine a second value for each line of a third plurality of lines, wherein the third plurality of lines are perpendicular to the third edge;
determine a sum of the second values for each lines of the third plurality of lines;
determine a second value for each line of a fourth plurality of lines, wherein the fourth plurality of lines are perpendicular to the fourth edge; and
determine a sum of the second values for each lines of the fourth plurality of lines, wherein determining the average value comprises:
determine, based on the sum of the second values for each line of the first plurality of lines, the sum of the second values for each line of the second plurality of lines, the sum of the second values for each line of the third plurality of lines, the sum of the second values for each line of the fourth plurality of lines, the average value.

### Claim 17 (depends on 11)

The device of claim 11, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, wherein the second edge is the border between the first block and a third block, wherein the one or more processors are configured to determine the second value for the line of the first plurality of lines by at least:
determining the second value for the line of the first plurality of lines based on a first sample of video data included in the first block and a second sample of video data included in the second block,
wherein the one or more processors are configured to determine the second value for the line of the second plurality of lines by at least:
determining the second value for the line of the second plurality of lines based on a third sample of video data included in the first block and a fourth sample of video data included in the third block.

### Claim 18 (depends on 11)

The device of claim 11, wherein the block of video data is included in a slice of video data, wherein the one or more processors are further configured to:
if the first edge is a horizontal edge:
adjust, based on a quantity of horizontal edges of the slice and a width of the slice, the second value for the line of the first plurality of lines; and
adjust, based on a quantity of vertical edges of the slice and a height of the slice, the second value for the line of the second plurality of lines; or
if the first edge is a vertical edge:
adjust, based on the quantity of vertical edges of the slice and the height of the slice, the second value for the line of the first plurality of lines; and
adjust, based on the quantity of horizontal edges of the slice and the width of the slice, the second value for the line of the second plurality of lines,
wherein the one or more processors are configured to determine the average value by at least:
determining, based on the adjusted second value for the line of the first plurality of lines and the adjusted second value for the line of the second plurality of lines, the average value.

### Claim 19 (depends on 11)

The device of claim 11, wherein the one or more processors are configured to determine, based on the average value, whether or not to determine the one or more deblocking parameter offsets by at least:
determining, if the average value is greater than a threshold, the one or more deblocking parameter offsets based on the average value; and
not determining, if the average value is not greater than the threshold, the one or more deblocking parameter offsets based on the average value.

### Claim 20 (depends on 11)

The device of claim 11, wherein the one or more deblocking parameter offsets comprise a tc offset value and a beta offset value, wherein the one or more processors are further configured to determine the tc offset value and the beta offset value approximately according to the following equations:
tc offset=2*Clip3(threshold3,threshold4,avg/value2); and
beta offset=2*Clip3(threshold5,threshold6,avg/value3),
wherein:
avg is the average value,
threshold3, threshold4, threshold5, and threshold6 are threshold values,
value2, and value3 are scaling values, and
the function Clip3 is defined as follows:
Clip


3

(
x
,
y
,
z
)
=
{
x
;
z
<
x
y
;
z
>
y
z
;
else
.

### Claim 21

A device for encoding video data, the device comprising:
means for determining a first value for a line of a first plurality of lines, wherein the first plurality of lines are perpendicular to a first edge of a block of the video data;
means for determining, in response to determining that the first value satisfies at least one threshold, a second value for the line of the first plurality of lines;
means for determining, in response to determining that the value satisfies the at least one threshold, a second value for a line of a second plurality of lines, wherein the second plurality of lines are perpendicular to a second edge of the block of video data, and wherein the first edge is a vertical edge or a horizontal edge and wherein the second edge is a different edge of the vertical edge or the horizontal edge;
means for determining, based on the second value for the line of the first plurality of lines and the second value for the line of the second plurality of lines, an average value; and
means for determining, based on the average value, whether or not to encode one or more deblocking parameter offsets.

### Claim 22 (depends on 21)

The device of claim 21, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, and wherein the means for determining the first value for the line of the plurality of lines comprise:
means for determining a first intermediate value based on a first set of sample values of video data corresponding to the line of the first plurality of lines, wherein the first set of sample values are included in the first block;
means for determining a second intermediate value based on a second set of sample values of video data corresponding to the line of the first plurality of lines, wherein the second set of sample values are included in the second block; and
means for determining the first value based on the first intermediate value and the second intermediate value.

### Claim 23 (depends on 21)

The device of claim 21, wherein the means for determining the second value for the line of the first plurality of lines comprise:
means for determining a second value for each line of the first plurality of lines; and
means for determining a sum of the second values for each line of the first plurality of lines, wherein the means for determining the second value for the line of the second plurality of lines comprise:
means for determining a second value for each line of the second plurality of lines; and
means for determining a sum of the second values for each line of the second plurality of lines, wherein the means for determining the average value comprise:
means for determining, based on the sum of the second values for each line of the first plurality of lines and the sum of the second values for each line of the second plurality of lines, the average value.

### Claim 24 (depends on 21)

The device of claim 21, wherein the block of video data is included in a slice of video data, the device further comprising:
means for adjusting, if the first edge is a horizontal edge, the second value for the line of the first plurality of lines based on a quantity of horizontal edges of the slice and a width of the slice;
means for adjusting, if the first edge is a horizontal edge, the second value for the line of the second plurality of lines based on a quantity of vertical edges of the slice and a height of the slice;
means for adjusting, if the first edge is a vertical edge, the second value for the line of the first plurality of lines based on the quantity of vertical edges of the slice and the height of the slice; and
means for adjusting, if the first edge is a vertical edge, the second value for the line of the second plurality of lines based on the quantity of horizontal edges of the slice and the width of the slice,
wherein the means for determining the average value comprise:
means for determining, based on the adjusted second value for the line of the first plurality of lines and the adjusted second value for the line of the second plurality of lines, the average value.

### Claim 25 (depends on 21)

The device of claim 21, wherein the means for determining, based on the average value, whether or not to determine the one or more deblocking parameter offsets comprise:
means for determining, if the average value is greater than a threshold, the one or more deblocking parameter offsets based on the average value; and
means for not determining, if the average value is not greater than the threshold, the one or more deblocking parameter offsets based on the average value.

### Claim 26

A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to encode video data, wherein the instructions that cause the one or more processors to encode the video data comprise instructions that cause the one or more processors to:
determine a first value for a line of a first plurality of lines, wherein the first plurality of lines are perpendicular to a first edge of a block of the video data;
in response to determining that the first value satisfies at least one threshold:
determine a second value for the line of the first plurality of lines;
determine a second value for a line of a second plurality of lines, wherein the second plurality of lines are perpendicular to a second edge of the block of video data, and wherein the first edge is a vertical edge or a horizontal edge and wherein the second edge is a different edge of the vertical edge or the horizontal edge;
determine, based on the second value for the line of the first plurality of lines and the second value for the line of the second plurality of lines, an average value; and
determine, based on the average value, whether or not to encode one or more deblocking parameter offsets.

### Claim 27 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the block is a first block, wherein the first edge is the border between the first block and a second block, and wherein the instructions that cause the one or more processors to determine the first value for the line of the plurality of lines comprise instructions that cause the one or more processors to:
determine a first intermediate value based on a first set of sample values of video data corresponding to the line of the first plurality of lines, wherein the first set of sample values are included in the first block;
determine a second intermediate value based on a second set of sample values of video data corresponding to the line of the first plurality of lines, wherein the second set of sample values are included in the second block; and
determine the first value based on the first intermediate value and the second intermediate value.

### Claim 28 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the instructions that cause the one or more processors to determine the second value for the line of the first plurality of lines comprise instructions that cause the one or more processors to:
determine a second value for each line of the first plurality of lines; and
determine a sum of the second values for each line of the first plurality of lines, wherein the instructions that cause the one or more processors to determine the second value for the line of the second plurality of lines comprise instructions that cause the one or more processors to:
determine a second value for each line of the second plurality of lines; and
determine a sum of the second values for each line of the second plurality of lines, wherein the instructions that cause the one or more processors to determine the average value comprise instructions that cause the one or more processors to:
determine, based on the sum of the second values for each line of the first plurality of lines and the sum of the second values for each line of the second plurality of lines, the average value.

### Claim 29 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the block of video data is included in a slice of video data, further comprising instructions that cause the one or more processors to:
adjust, if the first edge is a horizontal edge, the second value for the line of the first plurality of lines based on a quantity of horizontal edges of the slice and a width of the slice;
adjust, if the first edge is a horizontal edge, the second value for the line of the second plurality of lines based on a quantity of vertical edges of the slice and a height of the slice;
adjust, if the first edge is a vertical edge, the second value for the line of the first plurality of lines based on a quantity of vertical edges of the slice and a height of the slice; and
adjust, if the first edge is a vertical edge, the second value for the line of the second plurality of lines based on a quantity of horizontal edges of the slice and a width of the slice,
wherein the instructions that cause the one or more processors to determine the average value comprise instructions that cause the one or more processors to:
determine, based on the adjusted second value for the line of the first plurality of lines and the adjusted second value for the line of the second plurality of lines, the average value.

### Claim 30 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the instructions that cause the one or more processors to determine, based on the average value, whether or not to determine the one or more deblocking parameter offsets comprise instructions that cause the one or more processors to:
determine, if the average value is greater than a threshold, the one or more deblocking parameter offsets based on the average value; and
not determine, if the average value is not greater than the threshold, the one or more deblocking parameter offsets based on the average value.
