lavfi: modify avfilter_get_matrix to support separate scale factors

This commit is contained in:
Jarek Samic
2019-08-08 09:24:31 -04:00
committed by Mark Thompson
parent d3cd33ab1b
commit 5b5746b1e0
3 changed files with 34 additions and 16 deletions

View File

@@ -103,12 +103,19 @@ INTERPOLATE_METHOD(interpolate_biquadratic)
}
}
void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix) {
matrix[0] = zoom * cos(angle);
void ff_get_matrix(
float x_shift,
float y_shift,
float angle,
float scale_x,
float scale_y,
float *matrix
) {
matrix[0] = scale_x * cos(angle);
matrix[1] = -sin(angle);
matrix[2] = x_shift;
matrix[3] = -matrix[1];
matrix[4] = matrix[0];
matrix[4] = scale_y * cos(angle);
matrix[5] = y_shift;
matrix[6] = 0;
matrix[7] = 0;