mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
Revert "tidy applied with readability-*"
This reverts commit 7b9ff4a0355c778f2cf03bdb15029d60a1259061. 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/912175 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
7b9ff4a035
commit
9a765f01bc
@ -1445,10 +1445,11 @@ void Convert16To8Row_Any_AVX2(const uint16_t* src_ptr,
|
|||||||
int scale,
|
int scale,
|
||||||
int width);
|
int width);
|
||||||
|
|
||||||
void CopyRow_SSE2(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 width);
|
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_ERMS(const uint8_t* src, uint8_t* dst, int width);
|
||||||
void CopyRow_NEON(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_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_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);
|
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,
|
void ARGB4444ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_ptr,
|
||||||
int width);
|
int width);
|
||||||
void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
|
void RGB565ToARGBRow_Any_AVX2(const uint8_t* src_rgb565,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_argb,
|
||||||
int width);
|
int width);
|
||||||
void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
|
void ARGB1555ToARGBRow_Any_AVX2(const uint8_t* src_argb1555,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_argb,
|
||||||
int width);
|
int width);
|
||||||
void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
|
void ARGB4444ToARGBRow_Any_AVX2(const uint8_t* src_argb4444,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_argb,
|
||||||
int width);
|
int width);
|
||||||
|
|
||||||
void RGB24ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
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,
|
void J400ToARGBRow_Any_SSE2(const uint8_t* src_ptr,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_ptr,
|
||||||
int width);
|
int width);
|
||||||
void J400ToARGBRow_Any_AVX2(const uint8_t* src_ptr,
|
void J400ToARGBRow_Any_AVX2(const uint8_t* src_y, uint8_t* dst_argb, int width);
|
||||||
uint8_t* dst_ptr,
|
|
||||||
int width);
|
|
||||||
void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
void J400ToARGBRow_Any_NEON(const uint8_t* src_ptr,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_ptr,
|
||||||
int width);
|
int width);
|
||||||
@ -2431,14 +2430,14 @@ void ARGBToRGB565DitherRow_Any_AVX2(const uint8_t* src_ptr,
|
|||||||
const uint32_t param,
|
const uint32_t param,
|
||||||
int width);
|
int width);
|
||||||
|
|
||||||
void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_ptr,
|
void ARGBToRGB565Row_Any_AVX2(const uint8_t* src_argb,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_rgb,
|
||||||
int width);
|
int width);
|
||||||
void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_ptr,
|
void ARGBToARGB1555Row_Any_AVX2(const uint8_t* src_argb,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_rgb,
|
||||||
int width);
|
int width);
|
||||||
void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_ptr,
|
void ARGBToARGB4444Row_Any_AVX2(const uint8_t* src_argb,
|
||||||
uint8_t* dst_ptr,
|
uint8_t* dst_rgb,
|
||||||
int width);
|
int width);
|
||||||
void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
|
void ABGRToAR30Row_Any_AVX2(const uint8_t* src_ptr,
|
||||||
uint8_t* dst_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);
|
CopyPlane(src_v, src_stride_v, dst_v, dst_stride_v, halfwidth, halfheight);
|
||||||
return 0;
|
return 0;
|
||||||
// Split UV planes - NV21
|
// Split UV planes - NV21
|
||||||
}
|
} else if (src_pixel_stride_uv == 2 && vu_off == -1 &&
|
||||||
if (src_pixel_stride_uv == 2 && vu_off == -1 &&
|
src_stride_u == src_stride_v) {
|
||||||
src_stride_u == src_stride_v) {
|
|
||||||
SplitUVPlane(src_v, src_stride_v, dst_v, dst_stride_v, dst_u, dst_stride_u,
|
SplitUVPlane(src_v, src_stride_v, dst_v, dst_stride_v, dst_u, dst_stride_u,
|
||||||
halfwidth, halfheight);
|
halfwidth, halfheight);
|
||||||
return 0;
|
return 0;
|
||||||
// Split UV planes - NV12
|
// Split UV planes - NV12
|
||||||
}
|
} else if (src_pixel_stride_uv == 2 && vu_off == 1 &&
|
||||||
if (src_pixel_stride_uv == 2 && vu_off == 1 && src_stride_u == src_stride_v) {
|
src_stride_u == src_stride_v) {
|
||||||
SplitUVPlane(src_u, src_stride_u, dst_u, dst_stride_u, dst_v, dst_stride_v,
|
SplitUVPlane(src_u, src_stride_u, dst_u, dst_stride_u, dst_v, dst_stride_v,
|
||||||
halfwidth, halfheight);
|
halfwidth, halfheight);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -1944,14 +1944,13 @@ int Android420ToARGBMatrix(const uint8_t* src_y,
|
|||||||
src_stride_v, dst_argb, dst_stride_argb,
|
src_stride_v, dst_argb, dst_stride_argb,
|
||||||
yuvconstants, width, height);
|
yuvconstants, width, height);
|
||||||
// NV21
|
// NV21
|
||||||
}
|
} else if (src_pixel_stride_uv == 2 && vu_off == -1 &&
|
||||||
if (src_pixel_stride_uv == 2 && vu_off == -1 &&
|
src_stride_u == src_stride_v) {
|
||||||
src_stride_u == src_stride_v) {
|
|
||||||
return NV21ToARGBMatrix(src_y, src_stride_y, src_v, src_stride_v, dst_argb,
|
return NV21ToARGBMatrix(src_y, src_stride_y, src_v, src_stride_v, dst_argb,
|
||||||
dst_stride_argb, yuvconstants, width, height);
|
dst_stride_argb, yuvconstants, width, height);
|
||||||
// NV12
|
// NV12
|
||||||
}
|
} else if (src_pixel_stride_uv == 2 && vu_off == 1 &&
|
||||||
if (src_pixel_stride_uv == 2 && vu_off == 1 && src_stride_u == src_stride_v) {
|
src_stride_u == src_stride_v) {
|
||||||
return NV12ToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, dst_argb,
|
return NV12ToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, dst_argb,
|
||||||
dst_stride_argb, yuvconstants, width, height);
|
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 &&
|
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) {
|
subsample_y[1] == 2 && subsample_x[2] == 2 && subsample_y[2] == 2) {
|
||||||
return kJpegYuv420;
|
return kJpegYuv420;
|
||||||
}
|
} else if (subsample_x[0] == 1 && subsample_y[0] == 1 &&
|
||||||
if (subsample_x[0] == 1 && subsample_y[0] == 1 && subsample_x[1] == 2 &&
|
subsample_x[1] == 2 && subsample_y[1] == 1 &&
|
||||||
subsample_y[1] == 1 && subsample_x[2] == 2 && subsample_y[2] == 1) {
|
subsample_x[2] == 2 && subsample_y[2] == 1) {
|
||||||
return kJpegYuv422;
|
return kJpegYuv422;
|
||||||
}
|
} else if (subsample_x[0] == 1 && subsample_y[0] == 1 &&
|
||||||
if (subsample_x[0] == 1 && subsample_y[0] == 1 && subsample_x[1] == 1 &&
|
subsample_x[1] == 1 && subsample_y[1] == 1 &&
|
||||||
subsample_y[1] == 1 && subsample_x[2] == 1 && subsample_y[2] == 1) {
|
subsample_x[2] == 1 && subsample_y[2] == 1) {
|
||||||
return kJpegYuv444;
|
return kJpegYuv444;
|
||||||
}
|
}
|
||||||
} else if (number_of_components == 1) { // Grey-scale images.
|
} 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(src_argb_alpha);
|
||||||
free_aligned_buffer_page_end(dst_argb_c);
|
free_aligned_buffer_page_end(dst_argb_c);
|
||||||
free_aligned_buffer_page_end(dst_argb_opt);
|
free_aligned_buffer_page_end(dst_argb_opt);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LibYUVPlanarTest, BlendPlane_Opt) {
|
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_y_opt);
|
||||||
free_aligned_buffer_page_end(dst_u_opt);
|
free_aligned_buffer_page_end(dst_u_opt);
|
||||||
free_aligned_buffer_page_end(dst_v_opt);
|
free_aligned_buffer_page_end(dst_v_opt);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LibYUVPlanarTest, I420Blend_Opt) {
|
TEST_F(LibYUVPlanarTest, I420Blend_Opt) {
|
||||||
|
|||||||
@ -19,8 +19,11 @@ namespace libyuv {
|
|||||||
// Tests FourCC codes in video common, which are used for ConvertToI420().
|
// Tests FourCC codes in video common, which are used for ConvertToI420().
|
||||||
|
|
||||||
static bool TestValidChar(uint32_t onecc) {
|
static bool TestValidChar(uint32_t onecc) {
|
||||||
return (onecc >= '0' && onecc <= '9') || (onecc >= 'A' && onecc <= 'Z') ||
|
if ((onecc >= '0' && onecc <= '9') || (onecc >= 'A' && onecc <= 'Z') ||
|
||||||
(onecc >= 'a' && onecc <= 'z') || (onecc == ' ') || (onecc == 0xff);
|
(onecc >= 'a' && onecc <= 'z') || (onecc == ' ') || (onecc == 0xff)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool TestValidFourCC(uint32_t fourcc, int bpp) {
|
static bool TestValidFourCC(uint32_t fourcc, int bpp) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user