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 SOURCE_ROTATE_PRIV_H_ 12#define SOURCE_ROTATE_PRIV_H_ 13 14#include "libyuv/basic_types.h" 15 16namespace libyuv { 17 18// Rotate planes by 90, 180, 270 19void 20RotatePlane90(const uint8* src, int src_stride, 21 uint8* dst, int dst_stride, 22 int width, int height); 23 24void 25RotatePlane180(const uint8* src, int src_stride, 26 uint8* dst, int dst_stride, 27 int width, int height); 28 29void 30RotatePlane270(const uint8* src, int src_stride, 31 uint8* dst, int dst_stride, 32 int width, int height); 33 34void 35RotateUV90(const uint8* src, int src_stride, 36 uint8* dst_a, int dst_stride_a, 37 uint8* dst_b, int dst_stride_b, 38 int width, int height); 39 40// Rotations for when U and V are interleaved. 41// These functions take one input pointer and 42// split the data into two buffers while 43// rotating them. 44void 45RotateUV180(const uint8* src, int src_stride, 46 uint8* dst_a, int dst_stride_a, 47 uint8* dst_b, int dst_stride_b, 48 int width, int height); 49 50void 51RotateUV270(const uint8* src, int src_stride, 52 uint8* dst_a, int dst_stride_a, 53 uint8* dst_b, int dst_stride_b, 54 int width, int height); 55 56// The 90 and 270 functions are based on transposes. 57// Doing a transpose with reversing the read/write 58// order will result in a rotation by +- 90 degrees. 59void 60TransposePlane(const uint8* src, int src_stride, 61 uint8* dst, int dst_stride, 62 int width, int height); 63 64void 65TransposeUV(const uint8* src, int src_stride, 66 uint8* dst_a, int dst_stride_a, 67 uint8* dst_b, int dst_stride_b, 68 int width, int height); 69 70} // namespace libyuv 71 72#endif // SOURCE_ROTATE_PRIV_H_ 73