History

lavfi: modify avfilter_get_matrix to support separate scale factors

Jarek Samic committed 7 years ago

Commit 5b5746b1 parent d3cd33a3 files · +34 −16Browse files

Showing the changes to libavfilter/transform.c (1 of 3 files). Show all

Unified · Split

libavfilter/transform.c+10−3
@@ -103,12 +103,19 @@ INTERPOLATE_METHOD(interpolate_biquadratic) · 102 unmodified lines
103 }103 }
104}104}
105 105
106void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix) {106void ff_get_matrix(
107 matrix[0] = zoom * cos(angle);107 float x_shift,
108 float y_shift,
109 float angle,
110 float scale_x,
111 float scale_y,
112 float *matrix
113) {
114 matrix[0] = scale_x * cos(angle);
108 matrix[1] = -sin(angle);115 matrix[1] = -sin(angle);
109 matrix[2] = x_shift;116 matrix[2] = x_shift;
110 matrix[3] = -matrix[1];117 matrix[3] = -matrix[1];
111 matrix[4] = matrix[0];118 matrix[4] = scale_y * cos(angle);
112 matrix[5] = y_shift;119 matrix[5] = y_shift;
113 matrix[6] = 0;120 matrix[6] = 0;
114 matrix[7] = 0;121 matrix[7] = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t