| OLD | NEW |
| 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 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 | 2260 |
| 2261 pop ebx | 2261 pop ebx |
| 2262 pop edi | 2262 pop edi |
| 2263 pop esi | 2263 pop esi |
| 2264 vzeroupper | 2264 vzeroupper |
| 2265 ret | 2265 ret |
| 2266 } | 2266 } |
| 2267 } | 2267 } |
| 2268 #endif // HAS_I444TOARGBROW_AVX2 | 2268 #endif // HAS_I444TOARGBROW_AVX2 |
| 2269 | 2269 |
| 2270 #ifdef HAS_I444TOABGRROW_AVX2 | |
| 2271 // 16 pixels | |
| 2272 // 16 UV values with 16 Y producing 16 ABGR (64 bytes). | |
| 2273 __declspec(naked) | |
| 2274 void I444ToABGRRow_AVX2(const uint8* y_buf, | |
| 2275 const uint8* u_buf, | |
| 2276 const uint8* v_buf, | |
| 2277 uint8* dst_abgr, | |
| 2278 const struct YuvConstants* yuvconstants, | |
| 2279 int width) { | |
| 2280 __asm { | |
| 2281 push esi | |
| 2282 push edi | |
| 2283 push ebx | |
| 2284 mov eax, [esp + 12 + 4] // Y | |
| 2285 mov esi, [esp + 12 + 8] // U | |
| 2286 mov edi, [esp + 12 + 12] // V | |
| 2287 mov edx, [esp + 12 + 16] // abgr | |
| 2288 mov ebx, [esp + 12 + 20] // yuvconstants | |
| 2289 mov ecx, [esp + 12 + 24] // width | |
| 2290 sub edi, esi | |
| 2291 vpcmpeqb ymm5, ymm5, ymm5 // generate 0xffffffffffffffff for alpha | |
| 2292 convertloop: | |
| 2293 READYUV444_AVX2 | |
| 2294 YUVTORGB_AVX2(ebx) | |
| 2295 STOREABGR_AVX2 | |
| 2296 | |
| 2297 sub ecx, 16 | |
| 2298 jg convertloop | |
| 2299 | |
| 2300 pop ebx | |
| 2301 pop edi | |
| 2302 pop esi | |
| 2303 vzeroupper | |
| 2304 ret | |
| 2305 } | |
| 2306 } | |
| 2307 #endif // HAS_I444TOABGRROW_AVX2 | |
| 2308 | |
| 2309 #ifdef HAS_I411TOARGBROW_AVX2 | 2270 #ifdef HAS_I411TOARGBROW_AVX2 |
| 2310 // 16 pixels | 2271 // 16 pixels |
| 2311 // 4 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes). | 2272 // 4 UV values upsampled to 16 UV, mixed with 16 Y producing 16 ARGB (64 bytes). |
| 2312 __declspec(naked) | 2273 __declspec(naked) |
| 2313 void I411ToARGBRow_AVX2(const uint8* y_buf, | 2274 void I411ToARGBRow_AVX2(const uint8* y_buf, |
| 2314 const uint8* u_buf, | 2275 const uint8* u_buf, |
| 2315 const uint8* v_buf, | 2276 const uint8* v_buf, |
| 2316 uint8* dst_argb, | 2277 uint8* dst_argb, |
| 2317 const struct YuvConstants* yuvconstants, | 2278 const struct YuvConstants* yuvconstants, |
| 2318 int width) { | 2279 int width) { |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2864 jg convertloop | 2825 jg convertloop |
| 2865 | 2826 |
| 2866 pop ebx | 2827 pop ebx |
| 2867 pop edi | 2828 pop edi |
| 2868 pop esi | 2829 pop esi |
| 2869 ret | 2830 ret |
| 2870 } | 2831 } |
| 2871 } | 2832 } |
| 2872 | 2833 |
| 2873 // 8 pixels. | 2834 // 8 pixels. |
| 2874 // 8 UV values, mixed with 8 Y producing 8 ABGR (32 bytes). | |
| 2875 __declspec(naked) | |
| 2876 void I444ToABGRRow_SSSE3(const uint8* y_buf, | |
| 2877 const uint8* u_buf, | |
| 2878 const uint8* v_buf, | |
| 2879 uint8* dst_abgr, | |
| 2880 const struct YuvConstants* yuvconstants, | |
| 2881 int width) { | |
| 2882 __asm { | |
| 2883 push esi | |
| 2884 push edi | |
| 2885 push ebx | |
| 2886 mov eax, [esp + 12 + 4] // Y | |
| 2887 mov esi, [esp + 12 + 8] // U | |
| 2888 mov edi, [esp + 12 + 12] // V | |
| 2889 mov edx, [esp + 12 + 16] // abgr | |
| 2890 mov ebx, [esp + 12 + 20] // yuvconstants | |
| 2891 mov ecx, [esp + 12 + 24] // width | |
| 2892 sub edi, esi | |
| 2893 pcmpeqb xmm5, xmm5 // generate 0xffffffff for alpha | |
| 2894 | |
| 2895 convertloop: | |
| 2896 READYUV444 | |
| 2897 YUVTORGB(ebx) | |
| 2898 STOREABGR | |
| 2899 | |
| 2900 sub ecx, 8 | |
| 2901 jg convertloop | |
| 2902 | |
| 2903 pop ebx | |
| 2904 pop edi | |
| 2905 pop esi | |
| 2906 ret | |
| 2907 } | |
| 2908 } | |
| 2909 | |
| 2910 // 8 pixels. | |
| 2911 // 4 UV values upsampled to 8 UV, mixed with 8 Y producing 8 RGB24 (24 bytes). | 2835 // 4 UV values upsampled to 8 UV, mixed with 8 Y producing 8 RGB24 (24 bytes). |
| 2912 __declspec(naked) | 2836 __declspec(naked) |
| 2913 void I422ToRGB24Row_SSSE3(const uint8* y_buf, | 2837 void I422ToRGB24Row_SSSE3(const uint8* y_buf, |
| 2914 const uint8* u_buf, | 2838 const uint8* u_buf, |
| 2915 const uint8* v_buf, | 2839 const uint8* v_buf, |
| 2916 uint8* dst_rgb24, | 2840 uint8* dst_rgb24, |
| 2917 const struct YuvConstants* yuvconstants, | 2841 const struct YuvConstants* yuvconstants, |
| 2918 int width) { | 2842 int width) { |
| 2919 __asm { | 2843 __asm { |
| 2920 push esi | 2844 push esi |
| (...skipping 3717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6638 } | 6562 } |
| 6639 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 | 6563 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 |
| 6640 | 6564 |
| 6641 #endif // defined(_M_X64) | 6565 #endif // defined(_M_X64) |
| 6642 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) | 6566 #endif // !defined(LIBYUV_DISABLE_X86) && (defined(_M_IX86) || defined(_M_X64)) |
| 6643 | 6567 |
| 6644 #ifdef __cplusplus | 6568 #ifdef __cplusplus |
| 6645 } // extern "C" | 6569 } // extern "C" |
| 6646 } // namespace libyuv | 6570 } // namespace libyuv |
| 6647 #endif | 6571 #endif |
| OLD | NEW |