Commit 9c0663d7 authored by Frank Barchard's avatar Frank Barchard

Revert "clang-tidy and clang-format applied"

This reverts commit cfff527a.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> clang-tidy and clang-format applied
> 
> TBR=braveyao@chromium.org
> Bug: None
> Test: local arm builds still pass
> Change-Id: Iac042fbaad940e01fc4ce228a104d3d561b80f92
> Reviewed-on: https://chromium-review.googlesource.com/929999
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,braveyao@chromium.org

Change-Id: I4ee92ceeaa3c34bce3f20bf759dd30593807ad3f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/930141Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
parent cfff527a
...@@ -547,6 +547,7 @@ int ARGB4444ToARGB(const uint8_t* src_argb4444, ...@@ -547,6 +547,7 @@ int ARGB4444ToARGB(const uint8_t* src_argb4444,
int width, int width,
int height); int height);
// Aliases // Aliases
#define AB30ToARGB AR30ToABGR #define AB30ToARGB AR30ToABGR
#define AB30ToABGR AR30ToARGB #define AB30ToABGR AR30ToARGB
...@@ -561,6 +562,7 @@ int AR30ToARGB(const uint8_t* src_ar30, ...@@ -561,6 +562,7 @@ int AR30ToARGB(const uint8_t* src_ar30,
int width, int width,
int height); int height);
// Convert AR30 To ABGR. // Convert AR30 To ABGR.
LIBYUV_API LIBYUV_API
int AR30ToABGR(const uint8_t* src_ar30, int AR30ToABGR(const uint8_t* src_ar30,
......
...@@ -512,8 +512,8 @@ int I010ToAB30(const uint16_t* src_y, ...@@ -512,8 +512,8 @@ int I010ToAB30(const uint16_t* src_y,
int dst_stride_ab30, int dst_stride_ab30,
int width, int width,
int height) { int height) {
return I010ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u, return I010ToAR30Matrix(src_y, src_stride_y, src_v,
src_stride_u, dst_ab30, dst_stride_ab30, src_stride_v, src_u, src_stride_u, dst_ab30, dst_stride_ab30,
&kYvuI601Constants, width, height); &kYvuI601Constants, width, height);
} }
...@@ -529,8 +529,8 @@ int H010ToAB30(const uint16_t* src_y, ...@@ -529,8 +529,8 @@ int H010ToAB30(const uint16_t* src_y,
int dst_stride_ab30, int dst_stride_ab30,
int width, int width,
int height) { int height) {
return I010ToAR30Matrix(src_y, src_stride_y, src_v, src_stride_v, src_u, return I010ToAR30Matrix(src_y, src_stride_y, src_v,
src_stride_u, dst_ab30, dst_stride_ab30, src_stride_v, src_u, src_stride_u, dst_ab30, dst_stride_ab30,
&kYvuH709Constants, width, height); &kYvuH709Constants, width, height);
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "libyuv/cpu_id.h" #include "libyuv/cpu_id.h"
#include "libyuv/planar_functions.h" #include "libyuv/planar_functions.h"
#include "libyuv/row.h" #include "libyuv/row.h"
#include "libyuv/scale_row.h" /* for ScaleARGBRowDownEven_ */ #include "libyuv/scale_row.h" /* for ScaleARGBRowDownEven_ */
#ifdef __cplusplus #ifdef __cplusplus
namespace libyuv { namespace libyuv {
...@@ -29,9 +29,9 @@ static void ARGBTranspose(const uint8_t* src_argb, ...@@ -29,9 +29,9 @@ static void ARGBTranspose(const uint8_t* src_argb,
int height) { int height) {
int i; int i;
int src_pixel_step = src_stride_argb >> 2; int src_pixel_step = src_stride_argb >> 2;
void (*ScaleARGBRowDownEven)( void (*ScaleARGBRowDownEven)(const uint8_t* src_argb, ptrdiff_t src_stride_argb,
const uint8_t* src_argb, ptrdiff_t src_stride_argb, int src_step, int src_step, uint8_t* dst_argb, int dst_width) =
uint8_t* dst_argb, int dst_width) = ScaleARGBRowDownEven_C; ScaleARGBRowDownEven_C;
#if defined(HAS_SCALEARGBROWDOWNEVEN_SSE2) #if defined(HAS_SCALEARGBROWDOWNEVEN_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) { if (TestCpuFlag(kCpuHasSSE2)) {
ScaleARGBRowDownEven = ScaleARGBRowDownEven_Any_SSE2; ScaleARGBRowDownEven = ScaleARGBRowDownEven_Any_SSE2;
...@@ -75,8 +75,7 @@ void ARGBRotate90(const uint8_t* src_argb, ...@@ -75,8 +75,7 @@ void ARGBRotate90(const uint8_t* src_argb,
// of the buffer and flip the sign of the source stride. // of the buffer and flip the sign of the source stride.
src_argb += src_stride_argb * (height - 1); src_argb += src_stride_argb * (height - 1);
src_stride_argb = -src_stride_argb; src_stride_argb = -src_stride_argb;
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, height);
height);
} }
void ARGBRotate270(const uint8_t* src_argb, void ARGBRotate270(const uint8_t* src_argb,
...@@ -90,8 +89,7 @@ void ARGBRotate270(const uint8_t* src_argb, ...@@ -90,8 +89,7 @@ void ARGBRotate270(const uint8_t* src_argb,
// of the buffer and flip the sign of the destination stride. // of the buffer and flip the sign of the destination stride.
dst_argb += dst_stride_argb * (width - 1); dst_argb += dst_stride_argb * (width - 1);
dst_stride_argb = -dst_stride_argb; dst_stride_argb = -dst_stride_argb;
ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, ARGBTranspose(src_argb, src_stride_argb, dst_argb, dst_stride_argb, width, height);
height);
} }
void ARGBRotate180(const uint8_t* src_argb, void ARGBRotate180(const uint8_t* src_argb,
...@@ -108,8 +106,7 @@ void ARGBRotate180(const uint8_t* src_argb, ...@@ -108,8 +106,7 @@ void ARGBRotate180(const uint8_t* src_argb,
int y; int y;
void (*ARGBMirrorRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = void (*ARGBMirrorRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
ARGBMirrorRow_C; ARGBMirrorRow_C;
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) = CopyRow_C;
CopyRow_C;
#if defined(HAS_ARGBMIRRORROW_NEON) #if defined(HAS_ARGBMIRRORROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) { if (TestCpuFlag(kCpuHasNEON)) {
ARGBMirrorRow = ARGBMirrorRow_Any_NEON; ARGBMirrorRow = ARGBMirrorRow_Any_NEON;
...@@ -167,7 +164,7 @@ void ARGBRotate180(const uint8_t* src_argb, ...@@ -167,7 +164,7 @@ void ARGBRotate180(const uint8_t* src_argb,
for (y = 0; y < half_height; ++y) { for (y = 0; y < half_height; ++y) {
ARGBMirrorRow(src_argb, row, width); // Mirror first row into a buffer ARGBMirrorRow(src_argb, row, width); // Mirror first row into a buffer
ARGBMirrorRow(src_bot, dst_argb, width); // Mirror last row into first row 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; src_argb += src_stride_argb;
dst_argb += dst_stride_argb; dst_argb += dst_stride_argb;
src_bot -= src_stride_argb; src_bot -= src_stride_argb;
......
...@@ -113,12 +113,9 @@ void I444ToARGBRow_NEON(const uint8_t* src_y, ...@@ -113,12 +113,9 @@ void I444ToARGBRow_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n"
"1: \n" "1: \n" READYUV444 YUVTORGB
READYUV444 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vst4.8 {d20, d21, d22, d23}, [%3]! \n" "vst4.8 {d20, d21, d22, d23}, [%3]! \n"
"bgt 1b \n" "bgt 1b \n"
...@@ -142,12 +139,9 @@ void I422ToARGBRow_NEON(const uint8_t* src_y, ...@@ -142,12 +139,9 @@ void I422ToARGBRow_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n"
"1: \n" "1: \n" READYUV422 YUVTORGB
READYUV422 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vst4.8 {d20, d21, d22, d23}, [%3]! \n" "vst4.8 {d20, d21, d22, d23}, [%3]! \n"
"bgt 1b \n" "bgt 1b \n"
...@@ -172,12 +166,8 @@ void I422AlphaToARGBRow_NEON(const uint8_t* src_y, ...@@ -172,12 +166,8 @@ void I422AlphaToARGBRow_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" READYUV422 YUVTORGB
"1: \n"
READYUV422 YUVTORGB
"subs %5, %5, #8 \n" "subs %5, %5, #8 \n"
"vld1.8 {d23}, [%3]! \n" "vld1.8 {d23}, [%3]! \n"
"vst4.8 {d20, d21, d22, d23}, [%4]! \n" "vst4.8 {d20, d21, d22, d23}, [%4]! \n"
...@@ -204,9 +194,7 @@ void I422ToRGBARow_NEON(const uint8_t* src_y, ...@@ -204,9 +194,7 @@ void I422ToRGBARow_NEON(const uint8_t* src_y,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" "1: \n" READYUV422 YUVTORGB
READYUV422 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vmov.u8 d19, #255 \n" // d19 modified by "vmov.u8 d19, #255 \n" // d19 modified by
// YUVTORGB // YUVTORGB
...@@ -232,12 +220,8 @@ void I422ToRGB24Row_NEON(const uint8_t* src_y, ...@@ -232,12 +220,8 @@ void I422ToRGB24Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" READYUV422 YUVTORGB
"1: \n"
READYUV422 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vst3.8 {d20, d21, d22}, [%3]! \n" "vst3.8 {d20, d21, d22}, [%3]! \n"
"bgt 1b \n" "bgt 1b \n"
...@@ -269,13 +253,8 @@ void I422ToRGB565Row_NEON(const uint8_t* src_y, ...@@ -269,13 +253,8 @@ void I422ToRGB565Row_NEON(const uint8_t* src_y,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" "1: \n" READYUV422 YUVTORGB
"subs %4, %4, #8 \n" ARGBTORGB565
READYUV422 YUVTORGB
"subs %4, %4, #8 \n"
ARGBTORGB565
"vst1.8 {q0}, [%3]! \n" // store 8 pixels RGB565. "vst1.8 {q0}, [%3]! \n" // store 8 pixels RGB565.
"bgt 1b \n" "bgt 1b \n"
: "+r"(src_y), // %0 : "+r"(src_y), // %0
...@@ -307,15 +286,10 @@ void I422ToARGB1555Row_NEON(const uint8_t* src_y, ...@@ -307,15 +286,10 @@ void I422ToARGB1555Row_NEON(const uint8_t* src_y,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" "1: \n" READYUV422 YUVTORGB
READYUV422 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n" ARGBTOARGB1555
ARGBTOARGB1555
"vst1.8 {q0}, [%3]! \n" // store 8 pixels "vst1.8 {q0}, [%3]! \n" // store 8 pixels
// ARGB1555. // ARGB1555.
"bgt 1b \n" "bgt 1b \n"
...@@ -351,13 +325,9 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y, ...@@ -351,13 +325,9 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y,
YUVTORGB_SETUP YUVTORGB_SETUP
"vmov.u8 d4, #0x0f \n" // bits to clear with "vmov.u8 d4, #0x0f \n" // bits to clear with
// vbic. // vbic.
"1: \n" "1: \n" READYUV422 YUVTORGB
READYUV422 YUVTORGB
"subs %4, %4, #8 \n" "subs %4, %4, #8 \n"
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n" ARGBTOARGB4444
ARGBTOARGB4444
"vst1.8 {q0}, [%3]! \n" // store 8 pixels "vst1.8 {q0}, [%3]! \n" // store 8 pixels
// ARGB4444. // ARGB4444.
"bgt 1b \n" "bgt 1b \n"
...@@ -376,12 +346,9 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y, ...@@ -376,12 +346,9 @@ void I422ToARGB4444Row_NEON(const uint8_t* src_y,
void I400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) { void I400ToARGBRow_NEON(const uint8_t* src_y, uint8_t* dst_argb, int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n"
"1: \n" "1: \n" READYUV400 YUVTORGB
READYUV400 YUVTORGB
"subs %2, %2, #8 \n" "subs %2, %2, #8 \n"
"vst4.8 {d20, d21, d22, d23}, [%1]! \n" "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
"bgt 1b \n" "bgt 1b \n"
...@@ -418,27 +385,22 @@ void NV12ToARGBRow_NEON(const uint8_t* src_y, ...@@ -418,27 +385,22 @@ void NV12ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb, uint8_t* dst_argb,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(YUVTORGB_SETUP
"vmov.u8 d23, #255 \n"
YUVTORGB_SETUP "1: \n" READNV12 YUVTORGB
"vmov.u8 d23, #255 \n" "subs %3, %3, #8 \n"
"vst4.8 {d20, d21, d22, d23}, [%2]! \n"
"1: \n" "bgt 1b \n"
: "+r"(src_y), // %0
READNV12 YUVTORGB "+r"(src_uv), // %1
"subs %3, %3, #8 \n" "+r"(dst_argb), // %2
"vst4.8 {d20, d21, d22, d23}, [%2]! \n" "+r"(width) // %3
"bgt 1b \n" : [kUVToRB] "r"(&yuvconstants->kUVToRB),
: "+r"(src_y), // %0 [kUVToG] "r"(&yuvconstants->kUVToG),
"+r"(src_uv), // %1 [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
"+r"(dst_argb), // %2 [kYToRgb] "r"(&yuvconstants->kYToRgb)
"+r"(width) // %3 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
: [kUVToRB] "r"(&yuvconstants->kUVToRB), "q10", "q11", "q12", "q13", "q14", "q15");
[kUVToG] "r"(&yuvconstants->kUVToG),
[kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
[kYToRgb] "r"(&yuvconstants->kYToRgb)
: "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
"q12", "q13", "q14", "q15");
} }
void NV21ToARGBRow_NEON(const uint8_t* src_y, void NV21ToARGBRow_NEON(const uint8_t* src_y,
...@@ -446,27 +408,22 @@ void NV21ToARGBRow_NEON(const uint8_t* src_y, ...@@ -446,27 +408,22 @@ void NV21ToARGBRow_NEON(const uint8_t* src_y,
uint8_t* dst_argb, uint8_t* dst_argb,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(YUVTORGB_SETUP
"vmov.u8 d23, #255 \n"
YUVTORGB_SETUP "1: \n" READNV21 YUVTORGB
"vmov.u8 d23, #255 \n" "subs %3, %3, #8 \n"
"vst4.8 {d20, d21, d22, d23}, [%2]! \n"
"1: \n" "bgt 1b \n"
: "+r"(src_y), // %0
READNV21 YUVTORGB "+r"(src_vu), // %1
"subs %3, %3, #8 \n" "+r"(dst_argb), // %2
"vst4.8 {d20, d21, d22, d23}, [%2]! \n" "+r"(width) // %3
"bgt 1b \n" : [kUVToRB] "r"(&yuvconstants->kUVToRB),
: "+r"(src_y), // %0 [kUVToG] "r"(&yuvconstants->kUVToG),
"+r"(src_vu), // %1 [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
"+r"(dst_argb), // %2 [kYToRgb] "r"(&yuvconstants->kYToRgb)
"+r"(width) // %3 : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
: [kUVToRB] "r"(&yuvconstants->kUVToRB), "q10", "q11", "q12", "q13", "q14", "q15");
[kUVToG] "r"(&yuvconstants->kUVToG),
[kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
[kYToRgb] "r"(&yuvconstants->kYToRgb)
: "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
"q12", "q13", "q14", "q15");
} }
void NV12ToRGB565Row_NEON(const uint8_t* src_y, void NV12ToRGB565Row_NEON(const uint8_t* src_y,
...@@ -476,13 +433,8 @@ void NV12ToRGB565Row_NEON(const uint8_t* src_y, ...@@ -476,13 +433,8 @@ void NV12ToRGB565Row_NEON(const uint8_t* src_y,
int width) { int width) {
asm volatile( asm volatile(
YUVTORGB_SETUP YUVTORGB_SETUP
"1: \n" "1: \n" READNV12 YUVTORGB
"subs %3, %3, #8 \n" ARGBTORGB565
READNV12 YUVTORGB
"subs %3, %3, #8 \n"
ARGBTORGB565
"vst1.8 {q0}, [%2]! \n" // store 8 pixels RGB565. "vst1.8 {q0}, [%2]! \n" // store 8 pixels RGB565.
"bgt 1b \n" "bgt 1b \n"
: "+r"(src_y), // %0 : "+r"(src_y), // %0
...@@ -501,50 +453,42 @@ void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2, ...@@ -501,50 +453,42 @@ void YUY2ToARGBRow_NEON(const uint8_t* src_yuy2,
uint8_t* dst_argb, uint8_t* dst_argb,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(YUVTORGB_SETUP
"vmov.u8 d23, #255 \n"
YUVTORGB_SETUP "1: \n" READYUY2 YUVTORGB
"vmov.u8 d23, #255 \n" "subs %2, %2, #8 \n"
"1: \n" "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
"bgt 1b \n"
READYUY2 YUVTORGB : "+r"(src_yuy2), // %0
"subs %2, %2, #8 \n" "+r"(dst_argb), // %1
"vst4.8 {d20, d21, d22, d23}, [%1]! \n" "+r"(width) // %2
"bgt 1b \n" : [kUVToRB] "r"(&yuvconstants->kUVToRB),
: "+r"(src_yuy2), // %0 [kUVToG] "r"(&yuvconstants->kUVToG),
"+r"(dst_argb), // %1 [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
"+r"(width) // %2 [kYToRgb] "r"(&yuvconstants->kYToRgb)
: [kUVToRB] "r"(&yuvconstants->kUVToRB), : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
[kUVToG] "r"(&yuvconstants->kUVToG), "q10", "q11", "q12", "q13", "q14", "q15");
[kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
[kYToRgb] "r"(&yuvconstants->kYToRgb)
: "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
"q12", "q13", "q14", "q15");
} }
void UYVYToARGBRow_NEON(const uint8_t* src_uyvy, void UYVYToARGBRow_NEON(const uint8_t* src_uyvy,
uint8_t* dst_argb, uint8_t* dst_argb,
const struct YuvConstants* yuvconstants, const struct YuvConstants* yuvconstants,
int width) { int width) {
asm volatile( asm volatile(YUVTORGB_SETUP
"vmov.u8 d23, #255 \n"
YUVTORGB_SETUP "1: \n" READUYVY YUVTORGB
"vmov.u8 d23, #255 \n" "subs %2, %2, #8 \n"
"1: \n" "vst4.8 {d20, d21, d22, d23}, [%1]! \n"
"bgt 1b \n"
READUYVY YUVTORGB : "+r"(src_uyvy), // %0
"subs %2, %2, #8 \n" "+r"(dst_argb), // %1
"vst4.8 {d20, d21, d22, d23}, [%1]! \n" "+r"(width) // %2
"bgt 1b \n" : [kUVToRB] "r"(&yuvconstants->kUVToRB),
: "+r"(src_uyvy), // %0 [kUVToG] "r"(&yuvconstants->kUVToG),
"+r"(dst_argb), // %1 [kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
"+r"(width) // %2 [kYToRgb] "r"(&yuvconstants->kYToRgb)
: [kUVToRB] "r"(&yuvconstants->kUVToRB), : "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9",
[kUVToG] "r"(&yuvconstants->kUVToG), "q10", "q11", "q12", "q13", "q14", "q15");
[kUVBiasBGR] "r"(&yuvconstants->kUVBiasBGR),
[kYToRgb] "r"(&yuvconstants->kYToRgb)
: "cc", "memory", "q0", "q1", "q2", "q3", "q4", "q8", "q9", "q10", "q11",
"q12", "q13", "q14", "q15");
} }
// Reads 16 pairs of UV and write even values to dst_u and odd to dst_v. // Reads 16 pairs of UV and write even values to dst_u and odd to dst_v.
......
...@@ -526,8 +526,8 @@ TESTBIPLANARTOP(NV21, 2, 2, I420, 2, 2) ...@@ -526,8 +526,8 @@ TESTBIPLANARTOP(NV21, 2, 2, I420, 2, 2)
} \ } \
double time2 = get_time(); \ double time2 = get_time(); \
printf(" %8d us C - %8d us OPT\n", \ printf(" %8d us C - %8d us OPT\n", \
static_cast<int>((time1 - time0) * 1e6), \ static_cast<int>((time1 - time0) * 1e6), \
static_cast<int>((time2 - time1) * 1e6 / benchmark_iterations_)); \ static_cast<int>((time2 - time1) * 1e6 / benchmark_iterations_)); \
int max_diff = 0; \ int max_diff = 0; \
/* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \ /* Convert to ARGB so 565 is expanded to bytes that can be compared. */ \
align_buffer_page_end(dst_argb32_c, kWidth* BPP_C* kHeight); \ align_buffer_page_end(dst_argb32_c, kWidth* BPP_C* kHeight); \
......
...@@ -126,9 +126,9 @@ class LibYUVColorTest : public ::testing::Test { ...@@ -126,9 +126,9 @@ class LibYUVColorTest : public ::testing::Test {
protected: protected:
LibYUVColorTest(); LibYUVColorTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -138,9 +138,9 @@ class LibYUVConvertTest : public ::testing::Test { ...@@ -138,9 +138,9 @@ class LibYUVConvertTest : public ::testing::Test {
protected: protected:
LibYUVConvertTest(); LibYUVConvertTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -150,9 +150,9 @@ class LibYUVScaleTest : public ::testing::Test { ...@@ -150,9 +150,9 @@ class LibYUVScaleTest : public ::testing::Test {
protected: protected:
LibYUVScaleTest(); LibYUVScaleTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -162,9 +162,9 @@ class LibYUVRotateTest : public ::testing::Test { ...@@ -162,9 +162,9 @@ class LibYUVRotateTest : public ::testing::Test {
protected: protected:
LibYUVRotateTest(); LibYUVRotateTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -174,9 +174,9 @@ class LibYUVPlanarTest : public ::testing::Test { ...@@ -174,9 +174,9 @@ class LibYUVPlanarTest : public ::testing::Test {
protected: protected:
LibYUVPlanarTest(); LibYUVPlanarTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -186,9 +186,9 @@ class LibYUVBaseTest : public ::testing::Test { ...@@ -186,9 +186,9 @@ class LibYUVBaseTest : public ::testing::Test {
protected: protected:
LibYUVBaseTest(); LibYUVBaseTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
...@@ -198,9 +198,9 @@ class LibYUVCompareTest : public ::testing::Test { ...@@ -198,9 +198,9 @@ class LibYUVCompareTest : public ::testing::Test {
protected: protected:
LibYUVCompareTest(); LibYUVCompareTest();
int benchmark_iterations_; // Default 1. Use 1000 for benchmarking. int benchmark_iterations_; // Default 1. Use 1000 for benchmarking.
int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA. int benchmark_width_; // Default 1280. Use 640 for benchmarking VGA.
int benchmark_height_; // Default 720. Use 360 for benchmarking VGA. int benchmark_height_; // Default 720. Use 360 for benchmarking VGA.
int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280. int benchmark_pixels_div1280_; // Total pixels to benchmark / 1280.
int disable_cpu_flags_; // Default 1. Use -1 for benchmarking. int disable_cpu_flags_; // Default 1. Use -1 for benchmarking.
int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD. int benchmark_cpu_info_; // Default -1. Use 1 to disable SIMD.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment