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

Revert "tidy applied with readability-*"

This reverts commit 7b9ff4a0.

Reason for revert: ios build bots are red

Original change's description:
> tidy applied with readability-*
> 
> TBR=braveyao@chromium.org
> Bug: libyuv:750
> Test: builds and runs and passes more tidy tests
> Change-Id: I316822f7d13b370b88b92a693912e880b21f92c8
> Reviewed-on: https://chromium-review.googlesource.com/907371
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: libyuv:750
Change-Id: I4a73ffee2b71664c6cb93f38f2b5d70ebd76953e
Reviewed-on: https://chromium-review.googlesource.com/912175Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
parent 7b9ff4a0
......@@ -1445,10 +1445,11 @@ void Convert16To8Row_Any_AVX2(const uint16_t* src_ptr,
int scale,
int width);
void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int width);
void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width);
void CopyRow_SSE2(const uint8_t* src, uint8_t* dst, int count);
void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int count);
void CopyRow_ERMS(const uint8_t* src, uint8_t* dst, int width);
void CopyRow_NEON(const uint8_t* src, uint8_t* dst, int width);
void CopyRow_MIPS(const uint8_t* src, uint8_t* dst, int count);
void CopyRow_C(const uint8_t* src, uint8_t* dst, int count);
void CopyRow_Any_SSE2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
void CopyRow_Any_AVX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width);
......@@ -1630,14 +1631,14 @@ void ARGB1555ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
void ARGB4444ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int width);
void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_rgb565,
uint8_t* dst_argb,
int width);
void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_argb1555,
uint8_t* dst_argb,
int width);
void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_argb4444,
uint8_t* dst_argb,
int width);
void RGB24ToARGBRow_Any_NEON(const uint8_t* src_ptr,
......@@ -1751,9 +1752,7 @@ void J400ToARGBRow_C(const uint8_t* src_y, uint8_t* dst_argb, int width);
void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int width);
void J400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int width);
void J400ToARGBRow_Any_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
uint8_t* dst_ptr,
int width);
......@@ -2431,14 +2430,14 @@ void ARGBToRGB565DitherRow_Any_AVX2(const uint8_t* src_ptr,
const uint32_t param,
int width);
void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_argb,
uint8_t* dst_rgb,
int width);
void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_argb,
uint8_t* dst_rgb,
int width);
void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_argb,
uint8_t* dst_rgb,
int width);
void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
uint8_t* dst_ptr,
......
......@@ -1709,15 +1709,14 @@ int Android420ToI420(const uint8_t* src_y,
CopyPlane(src_v, src_stride_v, dst_v, dst_stride_v, halfwidth, halfheight);
return 0;
// Split UV planes - NV21
}
if (src_pixel_stride_uv == 2 && vu_off == -1 &&
src_stride_u == src_stride_v) {
} else if (src_pixel_stride_uv == 2 && vu_off == -1 &&
src_stride_u == src_stride_v) {
SplitUVPlane(src_v, src_stride_v, dst_v, dst_stride_v, dst_u, dst_stride_u,
halfwidth, halfheight);
return 0;
// Split UV planes - NV12
}
if (src_pixel_stride_uv == 2 && vu_off == 1 && src_stride_u == src_stride_v) {
} else if (src_pixel_stride_uv == 2 && vu_off == 1 &&
src_stride_u == src_stride_v) {
SplitUVPlane(src_u, src_stride_u, dst_u, dst_stride_u, dst_v, dst_stride_v,
halfwidth, halfheight);
return 0;
......
......@@ -1944,14 +1944,13 @@ int Android420ToARGBMatrix(const uint8_t* src_y,
src_stride_v, dst_argb, dst_stride_argb,
yuvconstants, width, height);
// NV21
}
if (src_pixel_stride_uv == 2 && vu_off == -1 &&
src_stride_u == src_stride_v) {
} else if (src_pixel_stride_uv == 2 && vu_off == -1 &&
src_stride_u == src_stride_v) {
return NV21ToARGBMatrix(src_y, src_stride_y, src_v, src_stride_v, dst_argb,
dst_stride_argb, yuvconstants, width, height);
// NV12
}
if (src_pixel_stride_uv == 2 && vu_off == 1 && src_stride_u == src_stride_v) {
} else if (src_pixel_stride_uv == 2 && vu_off == 1 &&
src_stride_u == src_stride_v) {
return NV12ToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, dst_argb,
dst_stride_argb, yuvconstants, width, height);
}
......
......@@ -552,13 +552,13 @@ JpegSubsamplingType MJpegDecoder::JpegSubsamplingTypeHelper(
if (subsample_x[0] == 1 && subsample_y[0] == 1 && subsample_x[1] == 2 &&
subsample_y[1] == 2 && subsample_x[2] == 2 && subsample_y[2] == 2) {
return kJpegYuv420;
}
if (subsample_x[0] == 1 && subsample_y[0] == 1 && subsample_x[1] == 2 &&
subsample_y[1] == 1 && subsample_x[2] == 2 && subsample_y[2] == 1) {
} else if (subsample_x[0] == 1 && subsample_y[0] == 1 &&
subsample_x[1] == 2 && subsample_y[1] == 1 &&
subsample_x[2] == 2 && subsample_y[2] == 1) {
return kJpegYuv422;
}
if (subsample_x[0] == 1 && subsample_y[0] == 1 && subsample_x[1] == 1 &&
subsample_y[1] == 1 && subsample_x[2] == 1 && subsample_y[2] == 1) {
} else if (subsample_x[0] == 1 && subsample_y[0] == 1 &&
subsample_x[1] == 1 && subsample_y[1] == 1 &&
subsample_x[2] == 1 && subsample_y[2] == 1) {
return kJpegYuv444;
}
} else if (number_of_components == 1) { // Grey-scale images.
......
......@@ -1192,6 +1192,7 @@ static void TestBlendPlane(int width,
free_aligned_buffer_page_end(src_argb_alpha);
free_aligned_buffer_page_end(dst_argb_c);
free_aligned_buffer_page_end(dst_argb_opt);
return;
}
TEST_F(LibYUVPlanarTest, BlendPlane_Opt) {
......@@ -1285,6 +1286,7 @@ static void TestI420Blend(int width,
free_aligned_buffer_page_end(dst_y_opt);
free_aligned_buffer_page_end(dst_u_opt);
free_aligned_buffer_page_end(dst_v_opt);
return;
}
TEST_F(LibYUVPlanarTest, I420Blend_Opt) {
......
......@@ -19,8 +19,11 @@ namespace libyuv {
// Tests FourCC codes in video common, which are used for ConvertToI420().
static bool TestValidChar(uint32_t onecc) {
return (onecc >= '0' && onecc <= '9') || (onecc >= 'A' && onecc <= 'Z') ||
(onecc >= 'a' && onecc <= 'z') || (onecc == ' ') || (onecc == 0xff);
if ((onecc >= '0' && onecc <= '9') || (onecc >= 'A' && onecc <= 'Z') ||
(onecc >= 'a' && onecc <= 'z') || (onecc == ' ') || (onecc == 0xff)) {
return true;
}
return false;
}
static bool TestValidFourCC(uint32_t fourcc, int bpp) {
......
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