From 142f6c4ed5eaeec0176f255e64bac8d8c70b42e1 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 18 Sep 2012 20:56:51 +0000 Subject: [PATCH] Move row.h to include and remove rotate_priv.h BUG=93 TESTED=try server Review URL: https://webrtc-codereview.appspot.com/811004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@360 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/rotate.h | 44 ++++++++++++++++++++ {source => include/libyuv}/row.h | 8 ++-- include/libyuv/version.h | 2 +- libyuv.gyp | 5 +-- source/compare.cc | 2 +- source/convert.cc | 2 +- source/convert_argb.cc | 2 +- source/convert_from.cc | 2 +- source/format_conversion.cc | 2 +- source/planar_functions.cc | 2 +- source/rotate.cc | 3 +- source/rotate_argb.cc | 2 +- source/rotate_neon.cc | 2 +- source/rotate_priv.h | 70 -------------------------------- source/row_common.cc | 2 +- source/row_neon.cc | 2 +- source/row_posix.cc | 2 +- source/row_win.cc | 2 +- source/scale.cc | 2 +- source/scale_argb.cc | 2 +- unit_test/rotate_test.cc | 1 - 22 files changed, 67 insertions(+), 96 deletions(-) rename {source => include/libyuv}/row.h (99%) delete mode 100644 source/rotate_priv.h diff --git a/README.chromium b/README.chromium index a6f7c5f4a..71583cc4d 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 359 +Version: 360 License: BSD License File: LICENSE diff --git a/include/libyuv/rotate.h b/include/libyuv/rotate.h index 94a7b1746..2aa0e6e92 100644 --- a/include/libyuv/rotate.h +++ b/include/libyuv/rotate.h @@ -48,6 +48,50 @@ int NV12ToI420Rotate(const uint8* src_y, int src_stride_y, uint8* dst_v, int dst_stride_v, int src_width, int src_height, RotationMode mode); +// Rotate planes by 90, 180, 270 +void RotatePlane90(const uint8* src, int src_stride, + uint8* dst, int dst_stride, + int width, int height); + +void RotatePlane180(const uint8* src, int src_stride, + uint8* dst, int dst_stride, + int width, int height); + +void RotatePlane270(const uint8* src, int src_stride, + uint8* dst, int dst_stride, + int width, int height); + +void RotateUV90(const uint8* src, int src_stride, + uint8* dst_a, int dst_stride_a, + uint8* dst_b, int dst_stride_b, + int width, int height); + +// Rotations for when U and V are interleaved. +// These functions take one input pointer and +// split the data into two buffers while +// rotating them. +void RotateUV180(const uint8* src, int src_stride, + uint8* dst_a, int dst_stride_a, + uint8* dst_b, int dst_stride_b, + int width, int height); + +void RotateUV270(const uint8* src, int src_stride, + uint8* dst_a, int dst_stride_a, + uint8* dst_b, int dst_stride_b, + int width, int height); + +// 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. +void TransposePlane(const uint8* src, int src_stride, + uint8* dst, int dst_stride, + int width, int height); + +void TransposeUV(const uint8* src, int src_stride, + uint8* dst_a, int dst_stride_a, + uint8* dst_b, int dst_stride_b, + int width, int height); + #ifdef __cplusplus } // extern "C" } // namespace libyuv diff --git a/source/row.h b/include/libyuv/row.h similarity index 99% rename from source/row.h rename to include/libyuv/row.h index fb833bf8e..01f78599d 100644 --- a/source/row.h +++ b/include/libyuv/row.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef SOURCE_ROW_H_ -#define SOURCE_ROW_H_ +#ifndef INCLUDE_LIBYUV_ROW_H_ // NOLINT +#define INCLUDE_LIBYUV_ROW_H_ #include "libyuv/basic_types.h" @@ -614,4 +614,6 @@ void ARGBInterpolateRow_SSSE3(uint8* dst_ptr, const uint8* src_ptr, } // namespace libyuv #endif -#endif // SOURCE_ROW_H_ +#endif // INCLUDE_LIBYUV_ROW_H_ + + diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 8e4218354..f1e328280 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 359 +#define LIBYUV_VERSION 360 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/libyuv.gyp b/libyuv.gyp index f399adf91..feaddb541 100644 --- a/libyuv.gyp +++ b/libyuv.gyp @@ -54,15 +54,12 @@ 'include/libyuv/planar_functions.h', 'include/libyuv/rotate.h', 'include/libyuv/rotate_argb.h', + 'include/libyuv/row.h', 'include/libyuv/scale.h', 'include/libyuv/scale_argb.h', 'include/libyuv/version.h', 'include/libyuv/video_common.h', - # private includes. - 'source/rotate_priv.h', - 'source/row.h', - # sources. 'source/compare.cc', 'source/convert.cc', diff --git a/source/compare.cc b/source/compare.cc index d645ddcb0..3349afed5 100644 --- a/source/compare.cc +++ b/source/compare.cc @@ -18,7 +18,7 @@ #include "libyuv/basic_types.h" #include "libyuv/cpu_id.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/convert.cc b/source/convert.cc index e1d83d7fd..a13e11f5d 100644 --- a/source/convert.cc +++ b/source/convert.cc @@ -19,7 +19,7 @@ #include "libyuv/planar_functions.h" #include "libyuv/rotate.h" #include "libyuv/video_common.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/convert_argb.cc b/source/convert_argb.cc index 61d024195..5e624eb68 100644 --- a/source/convert_argb.cc +++ b/source/convert_argb.cc @@ -19,7 +19,7 @@ #endif #include "libyuv/rotate_argb.h" #include "libyuv/video_common.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/convert_from.cc b/source/convert_from.cc index 138516d71..0abbd6855 100644 --- a/source/convert_from.cc +++ b/source/convert_from.cc @@ -17,7 +17,7 @@ #include "libyuv/planar_functions.h" #include "libyuv/rotate.h" #include "libyuv/video_common.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/format_conversion.cc b/source/format_conversion.cc index 7d19c5d47..235e0f8f6 100644 --- a/source/format_conversion.cc +++ b/source/format_conversion.cc @@ -13,7 +13,7 @@ #include "libyuv/basic_types.h" #include "libyuv/cpu_id.h" #include "libyuv/video_common.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 565df1c28..54ff4614b 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -16,7 +16,7 @@ #ifdef HAVE_JPEG #include "libyuv/mjpeg_decoder.h" #endif -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/rotate.cc b/source/rotate.cc index 047e1f4e9..07c2687a5 100644 --- a/source/rotate.cc +++ b/source/rotate.cc @@ -13,8 +13,7 @@ #include "libyuv/cpu_id.h" #include "libyuv/convert.h" #include "libyuv/planar_functions.h" -#include "source/rotate_priv.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/rotate_argb.cc b/source/rotate_argb.cc index 2202e3b7d..277b6cb7f 100644 --- a/source/rotate_argb.cc +++ b/source/rotate_argb.cc @@ -13,7 +13,7 @@ #include "libyuv/cpu_id.h" #include "libyuv/convert.h" #include "libyuv/planar_functions.h" -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/rotate_neon.cc b/source/rotate_neon.cc index 05562cc19..f8a0c8e7f 100644 --- a/source/rotate_neon.cc +++ b/source/rotate_neon.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "source/row.h" +#include "libyuv/row.h" #include "libyuv/basic_types.h" diff --git a/source/rotate_priv.h b/source/rotate_priv.h deleted file mode 100644 index 193faf103..000000000 --- a/source/rotate_priv.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * 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 - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef SOURCE_ROTATE_PRIV_H_ -#define SOURCE_ROTATE_PRIV_H_ - -#include "libyuv/basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Rotate planes by 90, 180, 270 -void RotatePlane90(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -void RotatePlane180(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -void RotatePlane270(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -void RotateUV90(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -// Rotations for when U and V are interleaved. -// These functions take one input pointer and -// split the data into two buffers while -// rotating them. -void RotateUV180(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -void RotateUV270(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -// 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. -void TransposePlane(const uint8* src, int src_stride, - uint8* dst, int dst_stride, - int width, int height); - -void TransposeUV(const uint8* src, int src_stride, - uint8* dst_a, int dst_stride_a, - uint8* dst_b, int dst_stride_b, - int width, int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // SOURCE_ROTATE_PRIV_H_ diff --git a/source/row_common.cc b/source/row_common.cc index cd8d163cb..b84bc142d 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "source/row.h" +#include "libyuv/row.h" #include // For memcpy diff --git a/source/row_neon.cc b/source/row_neon.cc index a44bda0f0..2eaf073dd 100644 --- a/source/row_neon.cc +++ b/source/row_neon.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/row_posix.cc b/source/row_posix.cc index 2da4dfad7..444065836 100644 --- a/source/row_posix.cc +++ b/source/row_posix.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "source/row.h" +#include "libyuv/row.h" #include "libyuv/basic_types.h" diff --git a/source/row_win.cc b/source/row_win.cc index ec37db9b0..301387cc7 100644 --- a/source/row_win.cc +++ b/source/row_win.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/scale.cc b/source/scale.cc index bafbe1dda..877d8d93e 100644 --- a/source/scale.cc +++ b/source/scale.cc @@ -16,7 +16,7 @@ #include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" // For CopyPlane -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/scale_argb.cc b/source/scale_argb.cc index 8887018a8..e264a01b5 100644 --- a/source/scale_argb.cc +++ b/source/scale_argb.cc @@ -16,7 +16,7 @@ #include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" // For CopyARGB -#include "source/row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/unit_test/rotate_test.cc b/unit_test/rotate_test.cc index c363700c7..65e35b4c4 100644 --- a/unit_test/rotate_test.cc +++ b/unit_test/rotate_test.cc @@ -11,7 +11,6 @@ #include #include -#include "../source/rotate_priv.h" #include "libyuv/rotate.h" #include "unit_test/unit_test.h"