Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: source/convert_from_argb.cc

Issue 2277603004: Add SplitUVPlanes and MergeUVPlanes (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: source/convert_from_argb.cc
diff --git a/source/convert_from_argb.cc b/source/convert_from_argb.cc
index 2a8682b7eb42f17642d27ea5ff1cfd7759d4ddae..efc8e70f73ceceb229d3b5dc1040d396d5f37f4c 100644
--- a/source/convert_from_argb.cc
+++ b/source/convert_from_argb.cc
@@ -265,8 +265,7 @@ int ARGBToNV12(const uint8* src_argb, int src_stride_argb,
uint8* dst_u, uint8* dst_v, int width) = ARGBToUVRow_C;
void (*ARGBToYRow)(const uint8* src_argb, uint8* dst_y, int width) =
ARGBToYRow_C;
- void (*MergeUVRow_)(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
- int width) = MergeUVRow_C;
+ MergeUVRowFunction MergeUVRow_ = GetOptimizedMergeUVRowFunction(width);
fbarchard1 2016/08/24 23:04:11 prefer no getter for consistency.
fbarchard1 2016/08/24 23:11:50 Done.
if (!src_argb ||
!dst_y || !dst_uv ||
width <= 0 || height == 0) {
@@ -314,30 +313,6 @@ int ARGBToNV12(const uint8* src_argb, int src_stride_argb,
}
}
#endif
-#if defined(HAS_MERGEUVROW_SSE2)
- if (TestCpuFlag(kCpuHasSSE2)) {
- MergeUVRow_ = MergeUVRow_Any_SSE2;
- if (IS_ALIGNED(halfwidth, 16)) {
- MergeUVRow_ = MergeUVRow_SSE2;
- }
- }
-#endif
-#if defined(HAS_MERGEUVROW_AVX2)
- if (TestCpuFlag(kCpuHasAVX2)) {
- MergeUVRow_ = MergeUVRow_Any_AVX2;
- if (IS_ALIGNED(halfwidth, 32)) {
- MergeUVRow_ = MergeUVRow_AVX2;
- }
- }
-#endif
-#if defined(HAS_MERGEUVROW_NEON)
- if (TestCpuFlag(kCpuHasNEON)) {
- MergeUVRow_ = MergeUVRow_Any_NEON;
- if (IS_ALIGNED(halfwidth, 16)) {
- MergeUVRow_ = MergeUVRow_NEON;
- }
- }
-#endif
{
// Allocate a rows of uv.
align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2);

Powered by Google App Engine
This is Rietveld 408576698