1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/transform: Stop exporting internal functions

avfilter_transform, avfilter_(add|sub|mult)_matrix are not part of the
public API (transform.h is not a public header), yet they are currently
exported because of their name. This commit changes this:
avfilter_transform is renamed to ff_affine_transform; the other
functions are just removed as they have never been used at all.

Found-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-02-24 14:52:04 +01:00 committed by James Almer
parent 930391e598
commit 7c4287b276
3 changed files with 5 additions and 52 deletions

View File

@ -122,28 +122,7 @@ void ff_get_matrix(
matrix[8] = 1;
}
void avfilter_add_matrix(const float *m1, const float *m2, float *result)
{
int i;
for (i = 0; i < 9; i++)
result[i] = m1[i] + m2[i];
}
void avfilter_sub_matrix(const float *m1, const float *m2, float *result)
{
int i;
for (i = 0; i < 9; i++)
result[i] = m1[i] - m2[i];
}
void avfilter_mul_matrix(const float *m1, float scalar, float *result)
{
int i;
for (i = 0; i < 9; i++)
result[i] = m1[i] * scalar;
}
int avfilter_transform(const uint8_t *src, uint8_t *dst,
int ff_affine_transform(const uint8_t *src, uint8_t *dst,
int src_stride, int dst_stride,
int width, int height, const float *matrix,
enum InterpolateMethod interpolate,

View File

@ -83,33 +83,6 @@ void ff_get_matrix(
float *matrix
);
/**
* Add two matrices together. result = m1 + m2.
*
* @param m1 9-item transformation matrix
* @param m2 9-item transformation matrix
* @param result 9-item transformation matrix
*/
void avfilter_add_matrix(const float *m1, const float *m2, float *result);
/**
* Subtract one matrix from another. result = m1 - m2.
*
* @param m1 9-item transformation matrix
* @param m2 9-item transformation matrix
* @param result 9-item transformation matrix
*/
void avfilter_sub_matrix(const float *m1, const float *m2, float *result);
/**
* Multiply a matrix by a scalar value. result = m1 * scalar.
*
* @param m1 9-item transformation matrix
* @param scalar a number
* @param result 9-item transformation matrix
*/
void avfilter_mul_matrix(const float *m1, float scalar, float *result);
/**
* Do an affine transformation with the given interpolation method. This
* multiplies each vector [x,y,1] by the matrix and then interpolates to
@ -126,7 +99,7 @@ void avfilter_mul_matrix(const float *m1, float scalar, float *result);
* @param fill edge fill method
* @return negative on error
*/
int avfilter_transform(const uint8_t *src, uint8_t *dst,
int ff_affine_transform(const uint8_t *src, uint8_t *dst,
int src_stride, int dst_stride,
int width, int height, const float *matrix,
enum InterpolateMethod interpolate,

View File

@ -330,8 +330,9 @@ static int deshake_transform_c(AVFilterContext *ctx,
for (i = 0; i < 3; i++) {
// Transform the luma and chroma planes
ret = avfilter_transform(in->data[i], out->data[i], in->linesize[i], out->linesize[i],
plane_w[i], plane_h[i], matrixs[i], interpolate, fill);
ret = ff_affine_transform(in->data[i], out->data[i], in->linesize[i],
out->linesize[i], plane_w[i], plane_h[i],
matrixs[i], interpolate, fill);
if (ret < 0)
return ret;
}