mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 17:26:49 +08:00
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>
This commit is contained in:
parent
27acadbf9d
commit
73a603e120
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user