History

display: add matrix flip api

Vittorio Giovara committed 12 years ago

Commit a54f03b1 parent 33a7b454 files · +24 −2Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavutil/display.c +10 −0
  3. libavutil/display.h +9 −0
  4. libavutil/version.h +2 −2
doc/APIchanges+3−0
@@ -13,6 +13,9 @@ libavutil: 2013-12-xx · 12 unmodified lines
1313
1414 API changes, most recent first:
1515
16+2014-07-xx - xxxxxxx - lavu 53.18.0 - display.h
17+ Add av_display_matrix_flip() to flip the transformation matrix.
18+
1619 2014-07-xx - xxxxxxx - lavc 55.56.0 - dv_profile.h
1720 Add a public API for DV profile handling.
1821
libavutil/display.c+10−0
@@ -63,3 +63,13 @@ void av_display_rotation_set(int32_t matrix[9], double angle) · 62 unmodified lines
6363 matrix[4] = CONV_DB(c);
6464 matrix[8] = 1 << 30;
6565 }
66+
67+void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip)
68+{
69+ int i;
70+ const int flip[] = { 1 - 2 * (!!hflip), 1 - 2 * (!!vflip), 1 };
71+
72+ if (hflip || vflip)
73+ for (i = 0; i < 9; i++)
74+ matrix[i] *= flip[i % 3];
75+}
libavutil/display.h+9−0
@@ -74,4 +74,13 @@ double av_display_rotation_get(const int32_t matrix[9]); · 73 unmodified lines
7474 */
7575 void av_display_rotation_set(int32_t matrix[9], double angle);
7676
77+/**
78+ * Flip the input matrix horizontally and/or vertically.
79+ *
80+ * @param matrix an allocated transformation matrix
81+ * @param hflip whether the matrix should be flipped horizontally
82+ * @param vflip whether the matrix should be flipped vertically
83+ */
84+void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip);
85+
7786 #endif /* AVUTIL_DISPLAY_H */
libavutil/version.h+2−2
@@ -54,8 +54,8 @@ · 53 unmodified lines
5454 */
5555
5656 #define LIBAVUTIL_VERSION_MAJOR 53
57−#define LIBAVUTIL_VERSION_MINOR 17
58−#define LIBAVUTIL_VERSION_MICRO 1
57+#define LIBAVUTIL_VERSION_MINOR 18
58+#define LIBAVUTIL_VERSION_MICRO 0
5959
6060 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
6161 LIBAVUTIL_VERSION_MINOR, \

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