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

Side by Side Diff: include/libyuv/row.h

Issue 1505433002: AVX2 YUV alpha blender and improved unittests (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: off by 1 fix on win Created 5 years 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 unified diff | Download patch
« no previous file with comments | « include/libyuv/planar_functions.h ('k') | include/libyuv/version.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 #define HAS_YUY2TOUV422ROW_AVX2 226 #define HAS_YUY2TOUV422ROW_AVX2
227 #define HAS_YUY2TOUVROW_AVX2 227 #define HAS_YUY2TOUVROW_AVX2
228 #define HAS_YUY2TOYROW_AVX2 228 #define HAS_YUY2TOYROW_AVX2
229 229
230 // Effects: 230 // Effects:
231 #define HAS_ARGBADDROW_AVX2 231 #define HAS_ARGBADDROW_AVX2
232 #define HAS_ARGBATTENUATEROW_AVX2 232 #define HAS_ARGBATTENUATEROW_AVX2
233 #define HAS_ARGBMULTIPLYROW_AVX2 233 #define HAS_ARGBMULTIPLYROW_AVX2
234 #define HAS_ARGBSUBTRACTROW_AVX2 234 #define HAS_ARGBSUBTRACTROW_AVX2
235 #define HAS_ARGBUNATTENUATEROW_AVX2 235 #define HAS_ARGBUNATTENUATEROW_AVX2
236 #define HAS_BLENDPLANEROW_AVX2
236 #endif 237 #endif
237 238
238 // The following are available for AVX2 Visual C and clangcl 32 bit: 239 // The following are available for AVX2 Visual C and clangcl 32 bit:
239 // TODO(fbarchard): Port to gcc. 240 // TODO(fbarchard): Port to gcc.
240 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ 241 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
241 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) 242 (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
242 #define HAS_ARGB1555TOARGBROW_AVX2 243 #define HAS_ARGB1555TOARGBROW_AVX2
243 #define HAS_ARGB4444TOARGBROW_AVX2 244 #define HAS_ARGB4444TOARGBROW_AVX2
244 #define HAS_ARGBTOARGB1555ROW_AVX2 245 #define HAS_ARGBTOARGB1555ROW_AVX2
245 #define HAS_ARGBTOARGB4444ROW_AVX2 246 #define HAS_ARGBTOARGB4444ROW_AVX2
246 #define HAS_ARGBTORGB565ROW_AVX2 247 #define HAS_ARGBTORGB565ROW_AVX2
247 #define HAS_I411TOARGBROW_AVX2 248 #define HAS_I411TOARGBROW_AVX2
248 #define HAS_I422TOARGB1555ROW_AVX2 249 #define HAS_I422TOARGB1555ROW_AVX2
249 #define HAS_I422TOARGB4444ROW_AVX2 250 #define HAS_I422TOARGB4444ROW_AVX2
250 #define HAS_I422TORGB565ROW_AVX2 251 #define HAS_I422TORGB565ROW_AVX2
251 #define HAS_J400TOARGBROW_AVX2 252 #define HAS_J400TOARGBROW_AVX2
252 #define HAS_NV12TORGB565ROW_AVX2 253 #define HAS_NV12TORGB565ROW_AVX2
253 #define HAS_RGB565TOARGBROW_AVX2 254 #define HAS_RGB565TOARGBROW_AVX2
254 #endif 255 #endif
255 256
256 // The following are available for 32 bit Visual C and clangcl 32 bit:
257 // TODO(fbarchard): Port to gcc.
258 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86)
259 #define HAS_BLENDPLANEROW_SSSE3
260 #endif
261
262 // The following are also available on x64 Visual C. 257 // The following are also available on x64 Visual C.
263 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \ 258 #if !defined(LIBYUV_DISABLE_X86) && defined (_M_X64) && \
264 (!defined(__clang__) || defined(__SSSE3__)) 259 (!defined(__clang__) || defined(__SSSE3__))
265 #define HAS_I422ALPHATOARGBROW_SSSE3 260 #define HAS_I422ALPHATOARGBROW_SSSE3
266 #define HAS_I422TOARGBROW_SSSE3 261 #define HAS_I422TOARGBROW_SSSE3
267 #endif 262 #endif
268 263
269 // The following are available on Neon platforms: 264 // The following are available on Neon platforms:
270 #if !defined(LIBYUV_DISABLE_NEON) && \ 265 #if !defined(LIBYUV_DISABLE_NEON) && \
271 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) 266 (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON))
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1, 1452 void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
1458 uint8* dst_argb, int width); 1453 uint8* dst_argb, int width);
1459 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1, 1454 void ARGBBlendRow_NEON(const uint8* src_argb, const uint8* src_argb1,
1460 uint8* dst_argb, int width); 1455 uint8* dst_argb, int width);
1461 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1, 1456 void ARGBBlendRow_C(const uint8* src_argb, const uint8* src_argb1,
1462 uint8* dst_argb, int width); 1457 uint8* dst_argb, int width);
1463 1458
1464 // Unattenuated planar alpha blend. 1459 // Unattenuated planar alpha blend.
1465 void BlendPlaneRow_SSSE3(const uint8* src0, const uint8* src1, 1460 void BlendPlaneRow_SSSE3(const uint8* src0, const uint8* src1,
1466 const uint8* alpha, uint8* dst, int width); 1461 const uint8* alpha, uint8* dst, int width);
1462 void BlendPlaneRow_Any_SSSE3(const uint8* src0, const uint8* src1,
1463 const uint8* alpha, uint8* dst, int width);
1464 void BlendPlaneRow_AVX2(const uint8* src0, const uint8* src1,
1465 const uint8* alpha, uint8* dst, int width);
1466 void BlendPlaneRow_Any_AVX2(const uint8* src0, const uint8* src1,
1467 const uint8* alpha, uint8* dst, int width);
1467 void BlendPlaneRow_C(const uint8* src0, const uint8* src1, 1468 void BlendPlaneRow_C(const uint8* src0, const uint8* src1,
1468 const uint8* alpha, uint8* dst, int width); 1469 const uint8* alpha, uint8* dst, int width);
1469 1470
1470 // ARGB multiply images. Same API as Blend, but these require 1471 // ARGB multiply images. Same API as Blend, but these require
1471 // pointer and width alignment for SSE2. 1472 // pointer and width alignment for SSE2.
1472 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1, 1473 void ARGBMultiplyRow_C(const uint8* src_argb, const uint8* src_argb1,
1473 uint8* dst_argb, int width); 1474 uint8* dst_argb, int width);
1474 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1, 1475 void ARGBMultiplyRow_SSE2(const uint8* src_argb, const uint8* src_argb1,
1475 uint8* dst_argb, int width); 1476 uint8* dst_argb, int width);
1476 void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1, 1477 void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, const uint8* src_argb1,
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb, 1931 void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, uint8* dst_argb,
1931 int width, 1932 int width,
1932 const uint8* luma, uint32 lumacoeff); 1933 const uint8* luma, uint32 lumacoeff);
1933 1934
1934 #ifdef __cplusplus 1935 #ifdef __cplusplus
1935 } // extern "C" 1936 } // extern "C"
1936 } // namespace libyuv 1937 } // namespace libyuv
1937 #endif 1938 #endif
1938 1939
1939 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT 1940 #endif // INCLUDE_LIBYUV_ROW_H_ NOLINT
OLDNEW
« no previous file with comments | « include/libyuv/planar_functions.h ('k') | include/libyuv/version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698