1 /* 2 * Copyright (c) 2011 The LibYuv project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef INCLUDE_LIBYUV_ROTATE_H_ 12 #define INCLUDE_LIBYUV_ROTATE_H_ 13 14 #include "libyuv/basic_types.h" 15 16 namespace libyuv { 17 18 // Supported rotation 19 enum RotationMode { 20 kRotate0 = 0, // No rotation 21 kRotate90 = 90, // Rotate 90 degrees clockwise 22 kRotate180 = 180, // Rotate 180 degrees 23 kRotate270 = 270, // Rotate 270 degrees clockwise 24 25 // Deprecated 26 kRotateNone = 0, 27 kRotateClockwise = 90, 28 kRotateCounterClockwise = 270, 29 }; 30 31 // Rotate I420 frame 32 int I420Rotate(const uint8* src_y, int src_stride_y, 33 const uint8* src_u, int src_stride_u, 34 const uint8* src_v, int src_stride_v, 35 uint8* dst_y, int dst_stride_y, 36 uint8* dst_u, int dst_stride_u, 37 uint8* dst_v, int dst_stride_v, 38 int width, int height, 39 RotationMode mode); 40 41 // Rotate NV12 input and store in I420 42 int NV12ToI420Rotate(const uint8* src_y, int src_stride_y, 43 const uint8* src_uv, int src_stride_uv, 44 uint8* dst_y, int dst_stride_y, 45 uint8* dst_u, int dst_stride_u, 46 uint8* dst_v, int dst_stride_v, 47 int width, int height, 48 RotationMode mode); 49 50 } // namespace libyuv 51 52 #endif // INCLUDE_LIBYUV_ROTATE_H_ 53