diff options
author | Frank Barchard <fbarchard@google.com> | 2017-03-08 09:49:02 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2017-03-08 18:50:12 +0000 |
commit | 73a603e1204e6eed1eeb1448051b8099aa67cf71 (patch) | |
tree | 6253cd6d67ba5c8a07f7087e542b27a7e3f9d718 | |
parent | 27acadbf9d59efb39c8f644ab8d24c7b3b290f63 (diff) | |
download | libyuv-73a603e1204e6eed1eeb1448051b8099aa67cf71.tar.gz |
clang-format 5.0 applied to libyuv
BUG=None
TEST=try bots and lint test
Change-Id: I1ab462adf2d309117862c5eb4b244a61ae202951
Reviewed-on: https://chromium-review.googlesource.com/450658
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
-rw-r--r-- | source/convert.cc | 2 | ||||
-rw-r--r-- | source/convert_from.cc | 2 | ||||
-rw-r--r-- | source/planar_functions.cc | 18 | ||||
-rw-r--r-- | source/rotate.cc | 2 | ||||
-rw-r--r-- | source/rotate_argb.cc | 2 | ||||
-rw-r--r-- | source/rotate_common.cc | 2 | ||||
-rw-r--r-- | source/rotate_dspr2.cc | 2 | ||||
-rw-r--r-- | source/rotate_gcc.cc | 2 | ||||
-rw-r--r-- | source/rotate_neon.cc | 2 | ||||
-rw-r--r-- | source/rotate_neon64.cc | 2 | ||||
-rw-r--r-- | source/rotate_win.cc | 2 | ||||
-rw-r--r-- | source/scale.cc | 31 | ||||
-rw-r--r-- | source/scale_argb.cc | 14 | ||||
-rw-r--r-- | source/scale_common.cc | 4 | ||||
-rw-r--r-- | source/scale_neon64.cc | 2 | ||||
-rw-r--r-- | unit_test/planar_test.cc | 2 | ||||
-rw-r--r-- | util/psnr_main.cc | 14 |
17 files changed, 54 insertions, 51 deletions
diff --git a/source/convert.cc b/source/convert.cc index f79acaca..f9b67e5e 100644 --- a/source/convert.cc +++ b/source/convert.cc @@ -14,8 +14,8 @@ #include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" #include "libyuv/rotate.h" -#include "libyuv/scale.h" // For ScalePlane() #include "libyuv/row.h" +#include "libyuv/scale.h" // For ScalePlane() #ifdef __cplusplus namespace libyuv { diff --git a/source/convert_from.cc b/source/convert_from.cc index e6ff5243..ab5afc06 100644 --- a/source/convert_from.cc +++ b/source/convert_from.cc @@ -15,9 +15,9 @@ #include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" #include "libyuv/rotate.h" +#include "libyuv/row.h" #include "libyuv/scale.h" // For ScalePlane() #include "libyuv/video_common.h" -#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 3e0600b2..b8a53e85 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -1541,7 +1541,7 @@ void SetPlane(uint8* dst_y, int height, uint32 value) { int y; - void (*SetRow)(uint8* dst, uint8 value, int width) = SetRow_C; + void (*SetRow)(uint8 * dst, uint8 value, int width) = SetRow_C; if (height < 0) { height = -height; dst_y = dst_y + (height - 1) * dst_stride_y; @@ -1624,7 +1624,7 @@ int ARGBRect(uint8* dst_argb, int height, uint32 value) { int y; - void (*ARGBSetRow)(uint8* dst_argb, uint32 value, int width) = ARGBSetRow_C; + void (*ARGBSetRow)(uint8 * dst_argb, uint32 value, int width) = ARGBSetRow_C; if (!dst_argb || width <= 0 || height == 0 || dst_x < 0 || dst_y < 0) { return -1; } @@ -1902,7 +1902,7 @@ int ARGBSepia(uint8* dst_argb, int width, int height) { int y; - void (*ARGBSepiaRow)(uint8* dst_argb, int width) = ARGBSepiaRow_C; + void (*ARGBSepiaRow)(uint8 * dst_argb, int width) = ARGBSepiaRow_C; uint8* dst = dst_argb + dst_y * dst_stride_argb + dst_x * 4; if (!dst_argb || width <= 0 || height <= 0 || dst_x < 0 || dst_y < 0) { return -1; @@ -2030,7 +2030,7 @@ int ARGBColorTable(uint8* dst_argb, int width, int height) { int y; - void (*ARGBColorTableRow)(uint8* dst_argb, const uint8* table_argb, + void (*ARGBColorTableRow)(uint8 * dst_argb, const uint8* table_argb, int width) = ARGBColorTableRow_C; uint8* dst = dst_argb + dst_y * dst_stride_argb + dst_x * 4; if (!dst_argb || !table_argb || width <= 0 || height <= 0 || dst_x < 0 || @@ -2066,7 +2066,7 @@ int RGBColorTable(uint8* dst_argb, int width, int height) { int y; - void (*RGBColorTableRow)(uint8* dst_argb, const uint8* table_argb, + void (*RGBColorTableRow)(uint8 * dst_argb, const uint8* table_argb, int width) = RGBColorTableRow_C; uint8* dst = dst_argb + dst_y * dst_stride_argb + dst_x * 4; if (!dst_argb || !table_argb || width <= 0 || height <= 0 || dst_x < 0 || @@ -2111,7 +2111,7 @@ int ARGBQuantize(uint8* dst_argb, int width, int height) { int y; - void (*ARGBQuantizeRow)(uint8* dst_argb, int scale, int interval_size, + void (*ARGBQuantizeRow)(uint8 * dst_argb, int scale, int interval_size, int interval_offset, int width) = ARGBQuantizeRow_C; uint8* dst = dst_argb + dst_y * dst_stride_argb + dst_x * 4; if (!dst_argb || width <= 0 || height <= 0 || dst_x < 0 || dst_y < 0 || @@ -2348,7 +2348,7 @@ int InterpolatePlane(const uint8* src0, int height, int interpolation) { int y; - void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, + void (*InterpolateRow)(uint8 * dst_ptr, const uint8* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; if (!src0 || !src1 || !dst || width <= 0 || height == 0) { @@ -3124,7 +3124,7 @@ int YUY2ToNV12(const uint8* src_yuy2, int halfwidth = (width + 1) >> 1; void (*SplitUVRow)(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width) = SplitUVRow_C; - void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, + void (*InterpolateRow)(uint8 * dst_ptr, const uint8* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; if (!src_yuy2 || !dst_y || !dst_uv || width <= 0 || height == 0) { @@ -3232,7 +3232,7 @@ int UYVYToNV12(const uint8* src_uyvy, int halfwidth = (width + 1) >> 1; void (*SplitUVRow)(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width) = SplitUVRow_C; - void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, + void (*InterpolateRow)(uint8 * dst_ptr, const uint8* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; if (!src_uyvy || !dst_y || !dst_uv || width <= 0 || height == 0) { diff --git a/source/rotate.cc b/source/rotate.cc index 277c53b2..4330884c 100644 --- a/source/rotate.cc +++ b/source/rotate.cc @@ -10,8 +10,8 @@ #include "libyuv/rotate.h" -#include "libyuv/cpu_id.h" #include "libyuv/convert.h" +#include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" #include "libyuv/rotate_row.h" #include "libyuv/row.h" diff --git a/source/rotate_argb.cc b/source/rotate_argb.cc index b458d8fa..ede4eafa 100644 --- a/source/rotate_argb.cc +++ b/source/rotate_argb.cc @@ -10,8 +10,8 @@ #include "libyuv/rotate.h" -#include "libyuv/cpu_id.h" #include "libyuv/convert.h" +#include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" #include "libyuv/row.h" diff --git a/source/rotate_common.cc b/source/rotate_common.cc index cdd231fa..89357e73 100644 --- a/source/rotate_common.cc +++ b/source/rotate_common.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/rotate_dspr2.cc b/source/rotate_dspr2.cc index 2dce9107..5d2338de 100644 --- a/source/rotate_dspr2.cc +++ b/source/rotate_dspr2.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #include "libyuv/basic_types.h" diff --git a/source/rotate_gcc.cc b/source/rotate_gcc.cc index 85b41dd8..74b48ac4 100644 --- a/source/rotate_gcc.cc +++ b/source/rotate_gcc.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/rotate_neon.cc b/source/rotate_neon.cc index 41ec34ec..ef5c2356 100644 --- a/source/rotate_neon.cc +++ b/source/rotate_neon.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #include "libyuv/basic_types.h" diff --git a/source/rotate_neon64.cc b/source/rotate_neon64.cc index 3cf17930..f52b0ed0 100644 --- a/source/rotate_neon64.cc +++ b/source/rotate_neon64.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #include "libyuv/basic_types.h" diff --git a/source/rotate_win.cc b/source/rotate_win.cc index 201643e7..044048d3 100644 --- a/source/rotate_win.cc +++ b/source/rotate_win.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/row.h" #include "libyuv/rotate_row.h" +#include "libyuv/row.h" #ifdef __cplusplus namespace libyuv { diff --git a/source/scale.cc b/source/scale.cc index d2bd2532..010ad9d4 100644 --- a/source/scale.cc +++ b/source/scale.cc @@ -45,9 +45,10 @@ static void ScalePlaneDown2(int src_width, int y; void (*ScaleRowDown2)(const uint8* src_ptr, ptrdiff_t src_stride, uint8* dst_ptr, int dst_width) = - filtering == kFilterNone ? ScaleRowDown2_C : (filtering == kFilterLinear - ? ScaleRowDown2Linear_C - : ScaleRowDown2Box_C); + filtering == kFilterNone + ? ScaleRowDown2_C + : (filtering == kFilterLinear ? ScaleRowDown2Linear_C + : ScaleRowDown2Box_C); int row_stride = src_stride << 1; (void)src_width; (void)src_height; @@ -1014,10 +1015,10 @@ void ScalePlaneBilinearDown(int src_width, const int max_y = (src_height - 1) << 16; int j; - void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr, int dst_width, + void (*ScaleFilterCols)(uint8 * dst_ptr, const uint8* src_ptr, int dst_width, int x, int dx) = (src_width >= 32768) ? ScaleFilterCols64_C : ScaleFilterCols_C; - void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, + void (*InterpolateRow)(uint8 * dst_ptr, const uint8* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y, @@ -1121,10 +1122,10 @@ void ScalePlaneBilinearDown_16(int src_width, const int max_y = (src_height - 1) << 16; int j; - void (*ScaleFilterCols)(uint16* dst_ptr, const uint16* src_ptr, int dst_width, - int x, int dx) = + void (*ScaleFilterCols)(uint16 * dst_ptr, const uint16* src_ptr, + int dst_width, int x, int dx) = (src_width >= 32768) ? ScaleFilterCols64_16_C : ScaleFilterCols_16_C; - void (*InterpolateRow)(uint16* dst_ptr, const uint16* src_ptr, + void (*InterpolateRow)(uint16 * dst_ptr, const uint16* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_16_C; ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y, @@ -1217,10 +1218,10 @@ void ScalePlaneBilinearUp(int src_width, int dx = 0; int dy = 0; const int max_y = (src_height - 1) << 16; - void (*InterpolateRow)(uint8* dst_ptr, const uint8* src_ptr, + void (*InterpolateRow)(uint8 * dst_ptr, const uint8* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; - void (*ScaleFilterCols)(uint8* dst_ptr, const uint8* src_ptr, int dst_width, + void (*ScaleFilterCols)(uint8 * dst_ptr, const uint8* src_ptr, int dst_width, int x, int dx) = filtering ? ScaleFilterCols_C : ScaleCols_C; ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y, @@ -1352,11 +1353,11 @@ void ScalePlaneBilinearUp_16(int src_width, int dx = 0; int dy = 0; const int max_y = (src_height - 1) << 16; - void (*InterpolateRow)(uint16* dst_ptr, const uint16* src_ptr, + void (*InterpolateRow)(uint16 * dst_ptr, const uint16* src_ptr, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_16_C; - void (*ScaleFilterCols)(uint16* dst_ptr, const uint16* src_ptr, int dst_width, - int x, int dx) = + void (*ScaleFilterCols)(uint16 * dst_ptr, const uint16* src_ptr, + int dst_width, int x, int dx) = filtering ? ScaleFilterCols_16_C : ScaleCols_16_C; ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y, &dx, &dy); @@ -1485,7 +1486,7 @@ static void ScalePlaneSimple(int src_width, const uint8* src_ptr, uint8* dst_ptr) { int i; - void (*ScaleCols)(uint8* dst_ptr, const uint8* src_ptr, int dst_width, int x, + void (*ScaleCols)(uint8 * dst_ptr, const uint8* src_ptr, int dst_width, int x, int dx) = ScaleCols_C; // Initial source x/y coordinate and step values as 16.16 fixed point. int x = 0; @@ -1521,7 +1522,7 @@ static void ScalePlaneSimple_16(int src_width, const uint16* src_ptr, uint16* dst_ptr) { int i; - void (*ScaleCols)(uint16* dst_ptr, const uint16* src_ptr, int dst_width, + void (*ScaleCols)(uint16 * dst_ptr, const uint16* src_ptr, int dst_width, int x, int dx) = ScaleCols_16_C; // Initial source x/y coordinate and step values as 16.16 fixed point. int x = 0; diff --git a/source/scale_argb.cc b/source/scale_argb.cc index 35178e95..1ea28f0d 100644 --- a/source/scale_argb.cc +++ b/source/scale_argb.cc @@ -263,10 +263,10 @@ static void ScaleARGBBilinearDown(int src_width, int dy, enum FilterMode filtering) { int j; - void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, + void (*InterpolateRow)(uint8 * dst_argb, const uint8* src_argb, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; - void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb, + void (*ScaleARGBFilterCols)(uint8 * dst_argb, const uint8* src_argb, int dst_width, int x, int dx) = (src_width >= 32768) ? ScaleARGBFilterCols64_C : ScaleARGBFilterCols_C; int64 xlast = x + (int64)(dst_width - 1) * dx; @@ -380,10 +380,10 @@ static void ScaleARGBBilinearUp(int src_width, int dy, enum FilterMode filtering) { int j; - void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, + void (*InterpolateRow)(uint8 * dst_argb, const uint8* src_argb, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; - void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb, + void (*ScaleARGBFilterCols)(uint8 * dst_argb, const uint8* src_argb, int dst_width, int x, int dx) = filtering ? ScaleARGBFilterCols_C : ScaleARGBCols_C; const int max_y = (src_height - 1) << 16; @@ -581,7 +581,7 @@ static void ScaleYUVToARGBBilinearUp(int src_width, } #endif - void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, + void (*InterpolateRow)(uint8 * dst_argb, const uint8* src_argb, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; #if defined(HAS_INTERPOLATEROW_SSSE3) @@ -623,7 +623,7 @@ static void ScaleYUVToARGBBilinearUp(int src_width, } #endif - void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb, + void (*ScaleARGBFilterCols)(uint8 * dst_argb, const uint8* src_argb, int dst_width, int x, int dx) = filtering ? ScaleARGBFilterCols_C : ScaleARGBCols_C; if (src_width >= 32768) { @@ -762,7 +762,7 @@ static void ScaleARGBSimple(int src_width, int y, int dy) { int j; - void (*ScaleARGBCols)(uint8* dst_argb, const uint8* src_argb, int dst_width, + void (*ScaleARGBCols)(uint8 * dst_argb, const uint8* src_argb, int dst_width, int x, int dx) = (src_width >= 32768) ? ScaleARGBCols64_C : ScaleARGBCols_C; (void)src_height; diff --git a/source/scale_common.cc b/source/scale_common.cc index a39ee05a..1bef39df 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -1029,7 +1029,7 @@ void ScalePlaneVertical(int src_height, enum FilterMode filtering) { // TODO(fbarchard): Allow higher bpp. int dst_width_bytes = dst_width * bpp; - void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, + void (*InterpolateRow)(uint8 * dst_argb, const uint8* src_argb, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_C; const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0; @@ -1109,7 +1109,7 @@ void ScalePlaneVertical_16(int src_height, enum FilterMode filtering) { // TODO(fbarchard): Allow higher wpp. int dst_width_words = dst_width * wpp; - void (*InterpolateRow)(uint16* dst_argb, const uint16* src_argb, + void (*InterpolateRow)(uint16 * dst_argb, const uint16* src_argb, ptrdiff_t src_stride, int dst_width, int source_y_fraction) = InterpolateRow_16_C; const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0; diff --git a/source/scale_neon64.cc b/source/scale_neon64.cc index a98b9d03..1ff5f2bf 100644 --- a/source/scale_neon64.cc +++ b/source/scale_neon64.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "libyuv/scale.h" #include "libyuv/row.h" +#include "libyuv/scale.h" #include "libyuv/scale_row.h" #ifdef __cplusplus diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc index 2d53cc02..28d557a5 100644 --- a/unit_test/planar_test.cc +++ b/unit_test/planar_test.cc @@ -11,6 +11,7 @@ #include <stdlib.h> #include <time.h> +#include "../unit_test/unit_test.h" #include "libyuv/compare.h" #include "libyuv/convert.h" #include "libyuv/convert_argb.h" @@ -19,7 +20,6 @@ #include "libyuv/cpu_id.h" #include "libyuv/planar_functions.h" #include "libyuv/rotate.h" -#include "../unit_test/unit_test.h" namespace libyuv { diff --git a/util/psnr_main.cc b/util/psnr_main.cc index 01e87774..4d930be4 100644 --- a/util/psnr_main.cc +++ b/util/psnr_main.cc @@ -356,17 +356,19 @@ int main(int argc, const char* argv[]) { const int uv_size = ((image_width + 1) / 2) * ((image_height + 1) / 2); const size_t total_size = y_size + 2 * uv_size; // NOLINT #if defined(_MSC_VER) - _fseeki64(file_org, static_cast<__int64>(num_skip_org) * - static_cast<__int64>(total_size), - SEEK_SET); + _fseeki64( + file_org, + static_cast<__int64>(num_skip_org) * static_cast<__int64>(total_size), + SEEK_SET); #else fseek(file_org, num_skip_org * total_size, SEEK_SET); #endif for (int cur_rec = 0; cur_rec < num_rec; ++cur_rec) { #if defined(_MSC_VER) - _fseeki64(file_rec[cur_rec], static_cast<__int64>(num_skip_rec) * - static_cast<__int64>(total_size), - SEEK_SET); + _fseeki64( + file_rec[cur_rec], + static_cast<__int64>(num_skip_rec) * static_cast<__int64>(total_size), + SEEK_SET); #else fseek(file_rec[cur_rec], num_skip_rec * total_size, SEEK_SET); #endif |