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
103103 }
104104 }
105105
106−void avfilter_get_matrix(float x_shift, float y_shift, float angle, float zoom, float *matrix) {
107− matrix[0] = zoom * cos(angle);
106+void ff_get_matrix(
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);
108115 matrix[1] = -sin(angle);
109116 matrix[2] = x_shift;
110117 matrix[3] = -matrix[1];
111− matrix[4] = matrix[0];
118+ matrix[4] = scale_y * cos(angle);
112119 matrix[5] = y_shift;
113120 matrix[6] = 0;
114121 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