A non-transitory computer-readable storage medium encoded with instructions for causing a programmable processor of a video processing device to:
- determine for a plurality of coded units of a portion of a video frame, wherein the coded units are arranged in a plurality of vectors, a first set of horizontal parameter candidates for a first horizontal parameter of a global motion model for the portion of the video frame without requiring access to pixel values of the video frame, wherein each of the horizontal parameter candidates of the first set of horizontal parameter candidates corresponds to one of a first subset of the plurality of vectors;
- select a median value from the first set of horizontal parameter candidates as the first horizontal parameter of the global motion model for the portion of the video frame;
- determine a first set of vertical parameter candidates for a first vertical parameter of the global motion model for the portion of the video frame without requiring access to the pixel values of the video frame, wherein each of the vertical parameter candidates of the first set of vertical parameter candidates corresponds to one of a second subset of the plurality of vectors;
- select a median value from the first set of vertical parameter candidates as the first vertical parameter of the global motion model for the portion of the video frame;
- and
- determine a second set of horizontal parameter candidates for a second horizontal parameter of the global motion model, wherein each of the horizontal parameter candidates of the second set of horizontal parameter candidates corresponds to one of the first subset of the plurality of vectors;
- select a median value from the second set of horizontal parameter candidates as the second horizontal parameter of the global motion model for the portion of the video frame;
- determine a second set of vertical parameter candidates for a second vertical parameter of the global motion model, wherein each of the vertical parameter candidates of the second set of vertical parameter candidates corresponds to one of the second subset of the plurality of vectors;
- select a median value from the second set of vertical parameter candidates as the second vertical parameter of the global motion model for the portion of the video frame;
- and
- process at least one of the plurality of coded units according to the first and second horizontal parameters and the first and second vertical parameters,
- wherein the global motion model comprises an affine model that is expressed as:
- MV—xi=b2*xi+b1,
- and
- MV—yj=c2*yj+c1,
- wherein the first horizontal parameter comprises b1, the first vertical parameter comprises c1, the second horizontal parameter comprises b2, the second vertical parameter comprises c2, xi comprises a row index, yj comprises a column index, MV_x, comprises a horizontal motion vector component, and MV_yj comprises a vertical motion vector component, wherein determining the first set of horizontal parameter candidates and determining the second set of horizontal parameter candidates comprises calculating, for each vector i, a value for
- Bi, where Bi comprises a matrix
- [
- b
- 2
- vector
- -
- i
- b
- 1
- vector
- -
- i
- ]
- ,
- wherein the first set of horizontal parameter candidates comprises b1—vector-i for each vector i, wherein the second set of horizontal parameter candidates comprises b2—vector-i for each vector i, and wherein calculating the value of Bi comprises calculating (XTX)−1XTMVx, wherein X comprises a matrix
- [
- 1
- i
- 2
- i
- …
- …
- C
- i
- ]
- ,
- wherein C corresponds to a number of vectors in the second subset of the plurality of vectors, wherein XT comprises a transpose matrix of X, and wherein MVx comprises a matrix
- [
- 1
- *
- b
- 2
-
- _vector
- -
- i
- +
- b
- 1
-
- _vector
- -
- i
- 2
- *
- b
- 2
-
- _vector
- -
- i
- +
- b
- 1
-
- _vector
- -
- i
- …
- C
- *
- b
- 2
-
- _vector
- -
- i
- +
- b
- 1
-
- _vector
- -
- i
- ]
- ,
- and
- wherein determining the first set of vertical parameter candidates and determining the second set of vertical parameter candidates comprises calculating, for each vector j, a value for Cj, where Cj comprises a matrix
- [
- c
- 2
- vector
- -
- j
- c
- 1
- vector
- -
- j
- ]
- ,
- wherein the first set of vertical parameter candidates comprises c1—vector-j for each vector j, wherein the second set of vertical parameter candidates comprises c2—vector-j for each vector j, and wherein calculating the value of Cj comprises calculating (YTY)−1YTMVy, wherein Y comprises a matrix
- [
- 1
- i
- 2
- i
- …
- …
- R
- i
- ]
- ,
- wherein R corresponds to a number of vectors in the first subset of the plurality of vectors, wherein YT comprises a transpose matrix of Y, and wherein MVy comprises a matrix
- [
- 1
- *
- c
- 2
-
- _vector
- -
- j
- +
- c
- 1
-
- _vector
- -
- j
- 2
- *
- c
- 2
-
- _vector
- -
- j
- +
- c
- 1
-
- _vector
- -
- j
- …
- R
- *
- c
- 2
-
- _vector
- -
- j
- +
- c
- 1
-
- _vector
- -
- j
- ]
- .