Commit 2457ec8c authored by Sebastien Alaiwan's avatar Sebastien Alaiwan
Browse files

Remove dead functions

Change-Id: Idcb0a6660ac3b34eb79c216d71c8a71ffb863669
parent a2285696
......@@ -91,60 +91,6 @@ static const int error_measure_lut[512] = {
};
/* clang-format on */
void project_points_translation(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y) {
int i;
for (i = 0; i < n; ++i) {
const int x = *(points++), y = *(points++);
if (subsampling_x)
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
((x * (1 << (WARPEDMODEL_PREC_BITS + 1))) + mat[0]),
WARPEDDIFF_PREC_BITS + 1);
else
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
((x * (1 << WARPEDMODEL_PREC_BITS)) + mat[0]), WARPEDDIFF_PREC_BITS);
if (subsampling_y)
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
((y * (1 << (WARPEDMODEL_PREC_BITS + 1))) + mat[1]),
WARPEDDIFF_PREC_BITS + 1);
else
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
((y * (1 << WARPEDMODEL_PREC_BITS))) + mat[1], WARPEDDIFF_PREC_BITS);
points += stride_points - 2;
proj += stride_proj - 2;
}
}
void project_points_rotzoom(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y) {
int i;
for (i = 0; i < n; ++i) {
const int x = *(points++), y = *(points++);
if (subsampling_x)
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
mat[2] * 2 * x + mat[3] * 2 * y + mat[0] +
(mat[2] + mat[3] - (1 << WARPEDMODEL_PREC_BITS)) / 2,
WARPEDDIFF_PREC_BITS + 1);
else
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(mat[2] * x + mat[3] * y + mat[0],
WARPEDDIFF_PREC_BITS);
if (subsampling_y)
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(
-mat[3] * 2 * x + mat[2] * 2 * y + mat[1] +
(-mat[3] + mat[2] - (1 << WARPEDMODEL_PREC_BITS)) / 2,
WARPEDDIFF_PREC_BITS + 1);
else
*(proj++) = ROUND_POWER_OF_TWO_SIGNED(-mat[3] * x + mat[2] * y + mat[1],
WARPEDDIFF_PREC_BITS);
points += stride_points - 2;
proj += stride_proj - 2;
}
}
void project_points_affine(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
......@@ -173,105 +119,6 @@ void project_points_affine(const int32_t *mat, int *points, int *proj,
}
}
void project_points_hortrapezoid(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y) {
int i;
int64_t x, y, Z;
int64_t xp, yp;
for (i = 0; i < n; ++i) {
x = *(points++), y = *(points++);
x = (subsampling_x ? 4 * x + 1 : 2 * x);
y = (subsampling_y ? 4 * y + 1 : 2 * y);
Z = (mat[7] * y + (1 << (WARPEDMODEL_ROW3HOMO_PREC_BITS + 1)));
xp = (mat[2] * x + mat[3] * y + 2 * mat[0]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
yp = (mat[5] * y + 2 * mat[1]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
xp = xp > 0 ? (xp + Z / 2) / Z : (xp - Z / 2) / Z;
yp = yp > 0 ? (yp + Z / 2) / Z : (yp - Z / 2) / Z;
if (subsampling_x) xp = (xp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
if (subsampling_y) yp = (yp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
*(proj++) = (int)xp;
*(proj++) = (int)yp;
points += stride_points - 2;
proj += stride_proj - 2;
}
}
void project_points_vertrapezoid(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y) {
int i;
int64_t x, y, Z;
int64_t xp, yp;
for (i = 0; i < n; ++i) {
x = *(points++), y = *(points++);
x = (subsampling_x ? 4 * x + 1 : 2 * x);
y = (subsampling_y ? 4 * y + 1 : 2 * y);
Z = (mat[6] * x + (1 << (WARPEDMODEL_ROW3HOMO_PREC_BITS + 1)));
xp = (mat[2] * x + 2 * mat[0]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
yp = (mat[4] * x + mat[5] * y + 2 * mat[1]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
xp = xp > 0 ? (xp + Z / 2) / Z : (xp - Z / 2) / Z;
yp = yp > 0 ? (yp + Z / 2) / Z : (yp - Z / 2) / Z;
if (subsampling_x) xp = (xp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
if (subsampling_y) yp = (yp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
*(proj++) = (int)xp;
*(proj++) = (int)yp;
points += stride_points - 2;
proj += stride_proj - 2;
}
}
void project_points_homography(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y) {
int i;
int64_t x, y, Z;
int64_t xp, yp;
for (i = 0; i < n; ++i) {
x = *(points++), y = *(points++);
x = (subsampling_x ? 4 * x + 1 : 2 * x);
y = (subsampling_y ? 4 * y + 1 : 2 * y);
Z = (mat[6] * x + mat[7] * y + (1 << (WARPEDMODEL_ROW3HOMO_PREC_BITS + 1)));
xp = (mat[2] * x + mat[3] * y + 2 * mat[0]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
yp = (mat[4] * x + mat[5] * y + 2 * mat[1]) *
(1 << (WARPEDPIXEL_PREC_BITS + WARPEDMODEL_ROW3HOMO_PREC_BITS -
WARPEDMODEL_PREC_BITS));
xp = xp > 0 ? (xp + Z / 2) / Z : (xp - Z / 2) / Z;
yp = yp > 0 ? (yp + Z / 2) / Z : (yp - Z / 2) / Z;
if (subsampling_x) xp = (xp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
if (subsampling_y) yp = (yp - (1 << (WARPEDPIXEL_PREC_BITS - 1))) / 2;
*(proj++) = (int)xp;
*(proj++) = (int)yp;
points += stride_points - 2;
proj += stride_proj - 2;
}
}
// For warping, we really use a 6-tap filter, but we do blocks of 8 pixels
// at a time. The zoom/rotation/shear in the model are applied to the
// "fractional" position of each pixel, which therefore varies within
......
......@@ -46,40 +46,11 @@
extern const int16_t warped_filter[WARPEDPIXEL_PREC_SHIFTS * 3 + 1][8];
typedef void (*ProjectPointsFunc)(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj,
const int subsampling_x,
const int subsampling_y);
void project_points_translation(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
void project_points_rotzoom(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
void project_points_affine(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
void project_points_hortrapezoid(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
void project_points_vertrapezoid(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
void project_points_homography(const int32_t *mat, int *points, int *proj,
const int n, const int stride_points,
const int stride_proj, const int subsampling_x,
const int subsampling_y);
// Returns the error between the result of applying motion 'wm' to the frame
// described by 'ref' and the frame described by 'dst'.
int64_t av1_warp_error(WarpedMotionParams *wm,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment