mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
clang-tidy and clang-format applied reland
row_neon.cc manually editted for clang format bugs TBR=braveyao@chromium.org Bug: None Test: local arm builds still pass Change-Id: Ida4aac2f4ee354e2c1bd354b06e76a26b3c0becc Reviewed-on: https://chromium-review.googlesource.com/930165 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
9c0663d7ce
commit
5f0354bde5
@ -547,7 +547,6 @@ int ARGB4444ToARGB(const uint8_t* src_argb4444,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
|
||||
// Aliases
|
||||
#define AB30ToARGB AR30ToABGR
|
||||
#define AB30ToABGR AR30ToARGB
|
||||
@ -562,7 +561,6 @@ int AR30ToARGB(const uint8_t* src_ar30,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
|
||||
// Convert AR30 To ABGR.
|
||||
LIBYUV_API
|
||||
int AR30ToABGR(const uint8_t* src_ar30,
|
||||
|
||||
@ -512,8 +512,8 @@ int I010ToAB30(const uint16_t* src_y,
|
||||
int dst_stride_ab30,
|
||||
int width,
|
||||
int height) {
|
||||
return I010ToAR30Matrix(src_y, src_stride_y, src_v,
|
||||
src_stride_v, src_u, src_stride_u, dst_ab30, dst_stride_ab30,
|
||||
return I010ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u,
|
||||
src_stride_u, dst_ab30, dst_stride_ab30,
|
||||
&kYvuI601Constants, width, height);
|
||||
}
|
||||
|
||||
@ -529,8 +529,8 @@ int H010ToAB30(const uint16_t* src_y,
|
||||
int dst_stride_ab30,
|
||||
int width,
|
||||
int height) {
|
||||
return I010ToAR30Matrix(src_y, src_stride_y, src_v,
|
||||
src_stride_v, src_u, src_stride_u, dst_ab30, dst_stride_ab30,
|
||||
return I010ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u,
|
||||
src_stride_u, dst_ab30, dst_stride_ab30,
|
||||
&kYvuH709Constants, width, height);
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include "libyuv/cpu_id.h"
|
||||
#include "libyuv/planar_functions.h"
|
||||
#include "libyuv/row.h"
|
||||
#include "libyuv/scale_row.h" /* for ScaleARGBRowDownEven_ */
|
||||
#include "libyuv/scale_row.h" /* for ScaleARGBRowDownEven_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace libyuv {
|
||||
@ -29,9 +29,9 @@ static void ARGBTranspose(const uint8_t* src_argb,
|
||||
int height) {
|
||||
int i;
|
||||
int src_pixel_step = src_stride_argb >> 2;
|
||||
void (*ScaleARGBRowDownEven)(const uint8_t* src_argb, ptrdiff_t src_stride_argb,
|
||||
int src_step, uint8_t* dst_argb, int dst_width) =
|
||||
ScaleARGBRowDownEven_C;
|
||||
void (*ScaleARGBRowDownEven)(
|
||||
const uint8_t* src_argb, ptrdiff_t src_stride_argb, int src_step,
|
||||
uint8_t* dst_argb, int dst_width) = ScaleARGBRowDownEven_C;
|
||||
#if defined(HAS_SCALEARGBROWDOWNEVEN_SSE2)
|
||||
if (TestCpuFlag(kCpuHasSSE2)) {
|
||||
ScaleARGBRowDownEven = ScaleARGBRowDownEven_Any_SSE2;
|
||||
@ -75,7 +75,8 @@ void ARGBRotate90(const uint8_t* src_argb,
|
||||
// of the buffer and flip the sign of the source stride.
|
||||
src_argb += src_stride_argb * (height - 1);
|
||||
src_stride_argb = -src_stride_argb;
|
||||
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, height);
|
||||
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width,
|
||||
height);
|
||||
}
|
||||
|
||||
void ARGBRotate270(const uint8_t* src_argb,
|
||||
@ -89,7 +90,8 @@ void ARGBRotate270(const uint8_t* src_argb,
|
||||
// of the buffer and flip the sign of the destination stride.
|
||||
dst_argb += dst_stride_argb * (width - 1);
|
||||
dst_stride_argb = -dst_stride_argb;
|
||||
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, height);
|
||||
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width,
|
||||
height);
|
||||
}
|
||||
|
||||
void ARGBRotate180(const uint8_t* src_argb,
|
||||
@ -106,7 +108,8 @@ void ARGBRotate180(const uint8_t* src_argb,
|
||||
int y;
|
||||
void (*ARGBMirrorRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
|
||||
ARGBMirrorRow_C;
|
||||
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = CopyRow_C;
|
||||
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
|
||||
CopyRow_C;
|
||||
#if defined(HAS_ARGBMIRRORROW_NEON)
|
||||
if (TestCpuFlag(kCpuHasNEON)) {
|
||||
ARGBMirrorRow = ARGBMirrorRow_Any_NEON;
|
||||
@ -164,7 +167,7 @@ void ARGBRotate180(const uint8_t* src_argb,
|
||||
for (y = 0; y < half_height; ++y) {
|
||||
ARGBMirrorRow(src_argb, row, width); // Mirror first row into a buffer
|
||||
ARGBMirrorRow(src_bot, dst_argb, width); // Mirror last row into first row
|
||||
CopyRow(row, dst_bot, width * 4); // Copy first mirrored row into last
|
||||
CopyRow(row, dst_bot, width * 4); // Copy first mirrored row into last
|
||||
src_argb += src_stride_argb;
|
||||
dst_argb += dst_stride_argb;
|
||||
src_bot -= src_stride_argb;
|
||||
|
||||
@ -196,8 +196,7 @@ void I422ToRGBARow_NEON(const uint8_t* src_y,
|
||||
YUVTORGB_SETUP
|
||||
"1: \n" READYUV422 YUVTORGB
|
||||
"subs %4, %4, #8 \n"
|
||||
"vmov.u8 d19, #255 \n" // d19 modified by
|
||||
// YUVTORGB
|
||||
"vmov.u8 d19, #255 \n" // YUVTORGB modified d19
|
||||
"vst4.8 {d19, d20, d21, d22}, [%3]! \n"
|
||||
"bgt 1b \n"
|
||||
: "+r"(src_y), // %0
|
||||
@ -291,7 +290,6 @@ void I422ToARGB1555Row_NEON(const uint8_t* src_y,
|
||||
"subs %4, %4, #8 \n"
|
||||
"vmov.u8 d23, #255 \n" ARGBTOARGB1555
|
||||
"vst1.8 {q0}, [%3]! \n" // store 8 pixels
|
||||
// ARGB1555.
|
||||
"bgt 1b \n"
|
||||
: "+r"(src_y), // %0
|
||||
"+r"(src_u), // %1
|
||||
@ -323,13 +321,13 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y,
|
||||
int width) {
|
||||
asm volatile(
|
||||
YUVTORGB_SETUP
|
||||
"vmov.u8 d4, #0x0f \n" // bits to clear with
|
||||
// vbic.
|
||||
"1: \n" READYUV422 YUVTORGB
|
||||
"vmov.u8 d4, #0x0f \n" // vbic bits to clear
|
||||
"1: \n"
|
||||
|
||||
READYUV422 YUVTORGB
|
||||
"subs %4, %4, #8 \n"
|
||||
"vmov.u8 d23, #255 \n" ARGBTOARGB4444
|
||||
"vst1.8 {q0}, [%3]! \n" // store 8 pixels
|
||||
// ARGB4444.
|
||||
"bgt 1b \n"
|
||||
: "+r"(src_y), // %0
|
||||
"+r"(src_u), // %1
|
||||
|
||||
@ -526,8 +526,8 @@ TESTBIPLANARTOP(NV21, 2, 2, I420, 2, 2)
|
||||
} \
|
||||
double time2 = get_time(); \
|
||||
printf(" %8d us C - %8d us OPT\n", \
|
||||
static_cast<int>((time1 - time0) * 1e6), \
|
||||
static_cast<int>((time2 - time1) * 1e6 / benchmark_iterations_)); \
|
||||
static_cast<int>((time1 - time0) * 1e6), \
|
||||
static_cast<int>((time2 - time1) * 1e6 / benchmark_iterations_)); \
|
||||
int max_diff = 0; \
|
||||
/* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \
|
||||
align_buffer_page_end(dst_argb32_c, kWidth* BPP_C* kHeight); \
|
||||
|
||||
@ -126,9 +126,9 @@ class LibYUVColorTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVColorTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -138,9 +138,9 @@ class LibYUVConvertTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVConvertTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -150,9 +150,9 @@ class LibYUVScaleTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVScaleTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -162,9 +162,9 @@ class LibYUVRotateTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVRotateTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -174,9 +174,9 @@ class LibYUVPlanarTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVPlanarTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -186,9 +186,9 @@ class LibYUVBaseTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVBaseTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
@ -198,9 +198,9 @@ class LibYUVCompareTest : public ::testing::Test {
|
||||
protected:
|
||||
LibYUVCompareTest();
|
||||
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
|
||||
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
|
||||
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
|
||||
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
|
||||
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
|
||||
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user