# US 9,521,408 B2 · Method and apparatus for rounding coordinate value of non-integer pixel position motion vector

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

- Number: US 9,521,408 B2
- Document ID: US9521408B2
- Status: Granted
- Kind: B2
- Application number: 13/946,705
- Filed: 2013-07-19
- Published: 2013-11-28
- Granted: 2016-12-13
- Earliest claimed: 2011-01-21
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Mingyuan Yang; Sixin Lin; Jiantong Zhou; Haoping Yu
- Web page: https://patentgrep.com/patent/US9521408B2

## CPC

- H04N 19/51: Motion estimation or motion compensation
- H04N 19/513: Processing of motion vectors
- H04N 19/523: with sub-pixel accuracy
- H04N 19/533: Motion estimation using multistep search, e.g. two-dimensional [2D]-log search or one-at-a-time search [OTS]
- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present disclosure provides a method and an apparatus for rounding a coordinate value of a non-integer pixel position motion vector. The method includes: rounding a coordinate value of a non-integer pixel position motion vector, which includes: for each dimension of coordinates of the non-integer pixel position motion vector, when a coordinate in the dimension is a non-integer pixel position, rounding the coordinate value of the non-integer pixel position motion vector in the dimension to one of integer pixel coordinate positions A and B if distances from the coordinate of the non-integer pixel position motion vector in the dimension to the integer pixel coordinate positions A and B adjacent to the non-integer pixel position in the dimension are the same, where an integer pixel coordinate position is determined by a sign of the coordinate value of the non-integer pixel position motion vector in the dimension.

## Claims

### Claim 1

A method for rounding a coordinate value of a non-integer pixel position motion vector of a frame of digital video data, the method comprising:
performing a rounding operation, by a computer device, on a coordinate value of a non-integer pixel position motion vector of the frame of digital video data, wherein the rounding operation comprises:
for each dimension of coordinates of the non-integer pixel position motion vector, when a coordinate in the dimension is a non-integer pixel position, rounding the coordinate value of the non-integer pixel position motion vector in the dimension to one of integer pixel coordinate positions A and B if distances from the coordinate of the non-integer pixel position motion vector in the dimension to the integer pixel coordinate positions A and B adjacent to the non-integer pixel position in the dimension are the same,
wherein an integer pixel coordinate position is determined by a sign of the coordinate value of the non-integer pixel position motion vector in the dimension.

### Claim 2 (depends on 1)

The method according to claim 1, wherein determining the integer pixel coordinate position by the sign of the coordinate value of the non-integer pixel position motion vector in the dimension comprises:
when the sign of the coordinate value of the non-integer pixel position motion vector is positive, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a smaller absolute value from A and B; when the sign of the coordinate value of the non-integer pixel position motion vector is negative, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a larger absolute value from A and B; or
when the sign of the coordinate value of the non-integer pixel position motion vector is negative, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a smaller absolute value from A and B; when the sign of the coordinate value of the non-integer pixel position motion vector is positive, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a larger absolute value from A and B.

### Claim 3 (depends on 1)

The method according to claim 1, wherein before rounding the coordinate value of the non-integer pixel position motion vector, the method further comprises:
acquiring a candidate motion vector set of a current coding or decoding block, adding a reverse motion vector for a motion vector in the initial candidate motion vector set, and generating a new candidate motion vector set according to the reverse motion vector and the motion vector in the initial candidate motion vector set, to perform the rounding operation.

### Claim 4 (depends on 1)

The method according to claim 1, wherein rounding the coordinate value of the non-integer pixel position motion vector in the dimension to one of the integer pixel coordinate positions A and B comprises:
shifting the coordinate value of the non-integer position motion vector in the dimension right by two bits in the dimension, shifting the same left by two bits, and rounding the coordinate value of the non-integer position motion vector to one of the integer pixel coordinate positions A and B.

### Claim 5 (depends on 1)

The method according to claim 1, wherein rounding the coordinate value of the non-integer pixel position motion vector further comprises:
if the coordinate position of the non-integer pixel position motion vector in the dimension is a ¼ pixel position, rounding the coordinate value of the non-integer pixel position motion vector in the dimension to a closest integer pixel coordinate position.

### Claim 6 (depends on 5)

The method according to claim 5, wherein rounding a coordinate value of the ¼ pixel position motion vector comprises:
calculating an absolute value of the coordinate in the dimension of the coordinate value of the ¼ pixel position motion vector, adding 2 to the calculated absolute value, shifting the same right by two bits and then left by two bits, and acquiring an absolute value of the rounded coordinate in the dimension, wherein a sign of the coordinate value in the dimension remains unchanged.

### Claim 7 (depends on 3)

The method according to claim 3, wherein after rounding the coordinate value of the non-integer pixel position motion vector, the method further comprises:
selecting, from the candidate motion vector set after the rounding, a motion vector for coding or decoding, to perform coding and decoding.

### Claim 8 (depends on 1)

The method according to claim 1, wherein rounding the coordinate value of the non-integer pixel position motion vector comprises:
setting an integer pixel position as a rounding target, and rounding a ½ pixel position and/or a ¼ pixel position to the integer pixel position; or setting an integer pixel position and a ½ pixel position as rounding targets, regarding the ½ pixel position as an integer pixel position, and rounding a ¼ pixel position and/or a ⅛ pixel position to the integer pixel position and the ½ pixel position.

### Claim 9

An apparatus for rounding a coordinate value of a non-integer pixel position motion vector of a frame of digital video data, comprising:
a rounding unit, configured to: perform a rounding operation on a coordinate value of a non-integer pixel position motion vector of the frame of digital video data, wherein the rounding operation comprises:
for each dimension of coordinates of the non-integer pixel position motion vector, when a coordinate in the dimension is a non-integer pixel position, rounding the coordinate value of the non-integer pixel position motion vector in the dimension to one of integer pixel coordinate positions A and B if distances from the coordinate of the non-integer pixel position motion vector in the dimension to the integer pixel coordinate positions A and B adjacent to the non-integer pixel position in the dimension are the same,
wherein an integer pixel coordinate position is determined by a sign of the coordinate value of the non-integer pixel position motion vector in the dimension.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein determining the integer pixel coordinate position by the sign of the coordinate value of the non-integer pixel position motion vector in the dimension comprises:
when the sign of the coordinate value of the non-integer pixel position motion vector is positive, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a smaller absolute value from A and B; when the sign of the coordinate value of the non-integer pixel position motion vector is negative, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a larger absolute value from A and B; or
when the sign of the coordinate value of the non-integer pixel position motion vector is negative, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a smaller absolute value from A and B; when the sign of the coordinate value of the non-integer pixel position motion vector is positive, the integer pixel coordinate position acquired by rounding the coordinate value of the non-integer pixel position motion vector being a position with a larger absolute value from A and B.

### Claim 11 (depends on 9)

The apparatus according to claim 9, further comprising:
an acquiring unit, configured to acquire a candidate motion vector set of a current coding or decoding block;
an adding unit, configured to add a reverse motion vector for a motion vector in the initial candidate motion vector set; and
a generating unit, configured to generate a new candidate motion vector set according to the reverse motion vector and the motion vector in the initial candidate motion vector set, to perform the rounding operation.

### Claim 12 (depends on 11)

The apparatus according to claim 11, further comprising:
a coding unit, configured to select, from the candidate motion vector set after the rounding, a motion vector for coding or decoding, to perform coding and decoding.
