Commit e6fec061 authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

lint cleanup for convert RGB24ToI420

RGB24, RAW, RGB565, ARGB1555 and ARGB4444 have conditional
2 pass versus direct path.  2 pass method requires a buffer that
is conditionally allocated.  ifdef's were confusing lint.
simplifed ifdefs to clean up lint warning

BUG=libyuv:692
TEST=lint source/convert.cc

Change-Id: If868718af30b48824a5e3d28f0d7d01d4609ad55
Reviewed-on: https://chromium-review.googlesource.com/451552Reviewed-by: 's avatarHenrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
parent 73a603e1
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1648
Version: 1649
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1648
#define LIBYUV_VERSION 1649
#endif // INCLUDE_LIBYUV_VERSION_H_
......@@ -1018,7 +1018,10 @@ int RGB24ToI420(const uint8* src_rgb24,
}
}
#endif
#endif
{
#if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA))
// Allocate 2 rows of ARGB.
const int kRowSize = (width * 4 + 31) & ~31;
align_buffer_64(row, kRowSize * 2);
......@@ -1053,9 +1056,9 @@ int RGB24ToI420(const uint8* src_rgb24,
}
#if !(defined(HAS_RGB24TOYROW_NEON) || defined(HAS_RGB24TOYROW_MSA))
free_aligned_buffer_64(row);
}
#endif
return 0;
}
return 0;
}
// Convert RAW to I420.
......@@ -1145,15 +1148,10 @@ int RAWToI420(const uint8* src_raw,
}
}
#endif
#if defined(HAS_RAWTOARGBROW_DSPR2)
if (TestCpuFlag(kCpuHasDSPR2)) {
RAWToARGBRow = RAWToARGBRow_Any_DSPR2;
if (IS_ALIGNED(width, 4)) {
RAWToARGBRow = RAWToARGBRow_DSPR2;
}
}
#endif
{
#if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA))
// Allocate 2 rows of ARGB.
const int kRowSize = (width * 4 + 31) & ~31;
align_buffer_64(row, kRowSize * 2);
......@@ -1188,9 +1186,9 @@ int RAWToI420(const uint8* src_raw,
}
#if !(defined(HAS_RAWTOYROW_NEON) || defined(HAS_RAWTOYROW_MSA))
free_aligned_buffer_64(row);
}
#endif
return 0;
}
return 0;
}
// Convert RGB565 to I420.
......@@ -1296,13 +1294,14 @@ int RGB565ToI420(const uint8* src_rgb565,
RGB565ToARGBRow = RGB565ToARGBRow_DSPR2;
}
}
#endif
#endif
{
#if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA))
// Allocate 2 rows of ARGB.
const int kRowSize = (width * 4 + 31) & ~31;
align_buffer_64(row, kRowSize * 2);
#endif
for (y = 0; y < height - 1; y += 2) {
#if (defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA))
RGB565ToUVRow(src_rgb565, src_stride_rgb565, dst_u, dst_v, width);
......@@ -1332,9 +1331,9 @@ int RGB565ToI420(const uint8* src_rgb565,
}
#if !(defined(HAS_RGB565TOYROW_NEON) || defined(HAS_RGB565TOYROW_MSA))
free_aligned_buffer_64(row);
}
#endif
return 0;
}
return 0;
}
// Convert ARGB1555 to I420.
......@@ -1433,8 +1432,10 @@ int ARGB1555ToI420(const uint8* src_argb1555,
ARGBToYRow = ARGBToYRow_AVX2;
}
}
#endif
#endif
{
#if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA))
// Allocate 2 rows of ARGB.
const int kRowSize = (width * 4 + 31) & ~31;
align_buffer_64(row, kRowSize * 2);
......@@ -1471,9 +1472,9 @@ int ARGB1555ToI420(const uint8* src_argb1555,
}
#if !(defined(HAS_ARGB1555TOYROW_NEON) || defined(HAS_ARGB1555TOYROW_MSA))
free_aligned_buffer_64(row);
}
#endif
return 0;
}
return 0;
}
// Convert ARGB4444 to I420.
......@@ -1584,7 +1585,10 @@ int ARGB4444ToI420(const uint8* src_argb4444,
}
}
#endif
#endif
{
#if !defined(HAS_ARGB4444TOYROW_NEON)
// Allocate 2 rows of ARGB.
const int kRowSize = (width * 4 + 31) & ~31;
align_buffer_64(row, kRowSize * 2);
......@@ -1621,9 +1625,9 @@ int ARGB4444ToI420(const uint8* src_argb4444,
}
#if !defined(HAS_ARGB4444TOYROW_NEON)
free_aligned_buffer_64(row);
}
#endif
return 0;
}
return 0;
}
static void SplitPixels(const uint8* src_u,
......
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