diff options
author | Jarek Samic <cldfire3@gmail.com> | 2019-08-08 09:24:31 -0400 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2019-08-22 23:11:27 +0100 |
commit | 5b5746b1e0d2cfef307e3f7c8edec5876eca53dc (patch) | |
tree | 4ff56171e4ca91eb5feda34dc4619d9f0247ab8d /libavfilter/transform.c | |
parent | d3cd33ab1b23fb459e25ae92a0cd7fbfe7c1c169 (diff) |
lavfi: modify avfilter_get_matrix to support separate scale factors
Diffstat (limited to 'libavfilter/transform.c')
-rw-r--r-- | libavfilter/transform.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavfilter/transform.c b/libavfilter/transform.c index f92fc4d42f..f4f9e0a47d 100644 --- a/libavfilter/transform.c +++ b/libavfilter/transform.c @@ -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; |