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

Side by Side Diff: source/row_win.cc

Issue 1515503005: add ifdef for AVX2 so vs2010 can still compile (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: 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 | « no previous file | no next file » | 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 jg convertloop 2293 jg convertloop
2294 2294
2295 pop ebx 2295 pop ebx
2296 pop esi 2296 pop esi
2297 vzeroupper 2297 vzeroupper
2298 ret 2298 ret
2299 } 2299 }
2300 } 2300 }
2301 #endif // HAS_NV21TOARGBROW_AVX2 2301 #endif // HAS_NV21TOARGBROW_AVX2
2302 2302
2303 #ifdef HAS_YUY2TOARGBROW_AVX2
2303 // 16 pixels. 2304 // 16 pixels.
2304 // 8 YUY2 values with 16 Y and 8 UV producing 16 ARGB (64 bytes). 2305 // 8 YUY2 values with 16 Y and 8 UV producing 16 ARGB (64 bytes).
2305 __declspec(naked) 2306 __declspec(naked)
2306 void YUY2ToARGBRow_AVX2(const uint8* src_yuy2, 2307 void YUY2ToARGBRow_AVX2(const uint8* src_yuy2,
2307 uint8* dst_argb, 2308 uint8* dst_argb,
2308 const struct YuvConstants* yuvconstants, 2309 const struct YuvConstants* yuvconstants,
2309 int width) { 2310 int width) {
2310 __asm { 2311 __asm {
2311 push ebx 2312 push ebx
2312 mov eax, [esp + 4 + 4] // yuy2 2313 mov eax, [esp + 4 + 4] // yuy2
2313 mov edx, [esp + 4 + 8] // argb 2314 mov edx, [esp + 4 + 8] // argb
2314 mov ebx, [esp + 4 + 12] // yuvconstants 2315 mov ebx, [esp + 4 + 12] // yuvconstants
2315 mov ecx, [esp + 4 + 16] // width 2316 mov ecx, [esp + 4 + 16] // width
2316 vpcmpeqb ymm5, ymm5, ymm5 // generate 0xffffffffffffffff for alpha 2317 vpcmpeqb ymm5, ymm5, ymm5 // generate 0xffffffffffffffff for alpha
2317 2318
2318 convertloop: 2319 convertloop:
2319 READYUY2_AVX2 2320 READYUY2_AVX2
2320 YUVTORGB_AVX2(ebx) 2321 YUVTORGB_AVX2(ebx)
2321 STOREARGB_AVX2 2322 STOREARGB_AVX2
2322 2323
2323 sub ecx, 16 2324 sub ecx, 16
2324 jg convertloop 2325 jg convertloop
2325 2326
2326 pop ebx 2327 pop ebx
2327 vzeroupper 2328 vzeroupper
2328 ret 2329 ret
2329 } 2330 }
2330 } 2331 }
2332 #endif // HAS_YUY2TOARGBROW_AVX2
2331 2333
2334 #ifdef HAS_UYVYTOARGBROW_AVX2
2332 // 16 pixels. 2335 // 16 pixels.
2333 // 8 UYVY values with 16 Y and 8 UV producing 16 ARGB (64 bytes). 2336 // 8 UYVY values with 16 Y and 8 UV producing 16 ARGB (64 bytes).
2334 __declspec(naked) 2337 __declspec(naked)
2335 void UYVYToARGBRow_AVX2(const uint8* src_uyvy, 2338 void UYVYToARGBRow_AVX2(const uint8* src_uyvy,
2336 uint8* dst_argb, 2339 uint8* dst_argb,
2337 const struct YuvConstants* yuvconstants, 2340 const struct YuvConstants* yuvconstants,
2338 int width) { 2341 int width) {
2339 __asm { 2342 __asm {
2340 push ebx 2343 push ebx
2341 mov eax, [esp + 4 + 4] // uyvy 2344 mov eax, [esp + 4 + 4] // uyvy
2342 mov edx, [esp + 4 + 8] // argb 2345 mov edx, [esp + 4 + 8] // argb
2343 mov ebx, [esp + 4 + 12] // yuvconstants 2346 mov ebx, [esp + 4 + 12] // yuvconstants
2344 mov ecx, [esp + 4 + 16] // width 2347 mov ecx, [esp + 4 + 16] // width
2345 vpcmpeqb ymm5, ymm5, ymm5 // generate 0xffffffffffffffff for alpha 2348 vpcmpeqb ymm5, ymm5, ymm5 // generate 0xffffffffffffffff for alpha
2346 2349
2347 convertloop: 2350 convertloop:
2348 READUYVY_AVX2 2351 READUYVY_AVX2
2349 YUVTORGB_AVX2(ebx) 2352 YUVTORGB_AVX2(ebx)
2350 STOREARGB_AVX2 2353 STOREARGB_AVX2
2351 2354
2352 sub ecx, 16 2355 sub ecx, 16
2353 jg convertloop 2356 jg convertloop
2354 2357
2355 pop ebx 2358 pop ebx
2356 vzeroupper 2359 vzeroupper
2357 ret 2360 ret
2358 } 2361 }
2359 } 2362 }
2363 #endif // HAS_UYVYTOARGBROW_AVX2
2360 2364
2361 #ifdef HAS_I422TORGBAROW_AVX2 2365 #ifdef HAS_I422TORGBAROW_AVX2
2362 // 16 pixels 2366 // 16 pixels
2363 // 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 RGBA (64 bytes). 2367 // 8 UV values upsampled to 16 UV, mixed with 16 Y producing 16 RGBA (64 bytes).
2364 __declspec(naked) 2368 __declspec(naked)
2365 void I422ToRGBARow_AVX2(const uint8* y_buf, 2369 void I422ToRGBARow_AVX2(const uint8* y_buf,
2366 const uint8* u_buf, 2370 const uint8* u_buf,
2367 const uint8* v_buf, 2371 const uint8* v_buf,
2368 uint8* dst_argb, 2372 uint8* dst_argb,
2369 const struct YuvConstants* yuvconstants, 2373 const struct YuvConstants* yuvconstants,
(...skipping 3997 matching lines...) Expand 10 before | Expand all | Expand 10 after
6367 } 6371 }
6368 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 6372 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3
6369 6373
6370 #endif // defined(_M_X64) 6374 #endif // defined(_M_X64)
6371 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) 6375 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64))
6372 6376
6373 #ifdef __cplusplus 6377 #ifdef __cplusplus
6374 } // extern "C" 6378 } // extern "C"
6375 } // namespace libyuv 6379 } // namespace libyuv
6376 #endif 6380 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698