aboutsummaryrefslogtreecommitdiff
path: root/files/include/libyuv/rotate.h
diff options
context:
space:
mode:
Diffstat (limited to 'files/include/libyuv/rotate.h')
-rw-r--r--files/include/libyuv/rotate.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/files/include/libyuv/rotate.h b/files/include/libyuv/rotate.h
index e7608a2d..8af60b89 100644
--- a/files/include/libyuv/rotate.h
+++ b/files/include/libyuv/rotate.h
@@ -4,7 +4,7 @@
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
+ * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
@@ -19,7 +19,7 @@ extern "C" {
#endif
// Supported rotation.
-enum RotationMode {
+typedef enum RotationMode {
kRotate0 = 0, // No rotation.
kRotate90 = 90, // Rotate 90 degrees clockwise.
kRotate180 = 180, // Rotate 180 degrees.
@@ -29,7 +29,7 @@ enum RotationMode {
kRotateNone = 0,
kRotateClockwise = 90,
kRotateCounterClockwise = 270,
-};
+} RotationModeEnum;
// Rotate I420 frame.
LIBYUV_API
@@ -39,7 +39,7 @@ int I420Rotate(const uint8* src_y, int src_stride_y,
uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
- int src_width, int src_height, RotationMode mode);
+ int src_width, int src_height, enum RotationMode mode);
// Rotate NV12 input and store in I420.
LIBYUV_API
@@ -48,9 +48,15 @@ int NV12ToI420Rotate(const uint8* src_y, int src_stride_y,
uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
- int src_width, int src_height, RotationMode mode);
+ int src_width, int src_height, enum RotationMode mode);
-// Rotate planes by 90, 180, 270
+// Rotate a plane by 0, 90, 180, or 270.
+LIBYUV_API
+int RotatePlane(const uint8* src, int src_stride,
+ uint8* dst, int dst_stride,
+ int src_width, int src_height, enum RotationMode mode);
+
+// Rotate planes by 90, 180, 270. Deprecated.
LIBYUV_API
void RotatePlane90(const uint8* src, int src_stride,
uint8* dst, int dst_stride,
@@ -75,7 +81,7 @@ void RotateUV90(const uint8* src, int src_stride,
// Rotations for when U and V are interleaved.
// These functions take one input pointer and
// split the data into two buffers while
-// rotating them.
+// rotating them. Deprecated.
LIBYUV_API
void RotateUV180(const uint8* src, int src_stride,
uint8* dst_a, int dst_stride_a,
@@ -91,6 +97,7 @@ void RotateUV270(const uint8* src, int src_stride,
// The 90 and 270 functions are based on transposes.
// Doing a transpose with reversing the read/write
// order will result in a rotation by +- 90 degrees.
+// Deprecated.
LIBYUV_API
void TransposePlane(const uint8* src, int src_stride,
uint8* dst, int dst_stride,