| OLD | NEW |
| 1 // VERSION 2 | 1 // VERSION 2 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 3 * Copyright 2011 The LibYuv Project Authors. All rights reserved. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license | 5 * Use of this source code is governed by a BSD-style license |
| 6 * that can be found in the LICENSE file in the root of the source | 6 * that can be found in the LICENSE file in the root of the source |
| 7 * tree. An additional intellectual property rights grant can be found | 7 * tree. An additional intellectual property rights grant can be found |
| 8 * in the file PATENTS. All contributing project authors may | 8 * in the file PATENTS. All contributing project authors may |
| 9 * be found in the AUTHORS file in the root of the source tree. | 9 * be found in the AUTHORS file in the root of the source tree. |
| 10 */ | 10 */ |
| (...skipping 5392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5403 : "+r"(src), // %0 | 5403 : "+r"(src), // %0 |
| 5404 "+r"(dst), // %1 | 5404 "+r"(dst), // %1 |
| 5405 "+r"(width) // %2 | 5405 "+r"(width) // %2 |
| 5406 : "x"(scale) // %3 | 5406 : "x"(scale) // %3 |
| 5407 : "memory", "cc", | 5407 : "memory", "cc", |
| 5408 "xmm2", "xmm3", "xmm4" | 5408 "xmm2", "xmm3", "xmm4" |
| 5409 ); | 5409 ); |
| 5410 } | 5410 } |
| 5411 #endif // HAS_HALFFLOATROW_F16C | 5411 #endif // HAS_HALFFLOATROW_F16C |
| 5412 | 5412 |
| 5413 #ifdef HAS_HALFFLOATROW_F16C |
| 5414 void HalfFloat1Row_F16C(const uint16* src, uint16* dst, float, int width) { |
| 5415 asm volatile ( |
| 5416 // 16 pixel loop. |
| 5417 LABELALIGN |
| 5418 "1: \n" |
| 5419 "vpmovzxwd " MEMACCESS(0) ",%%ymm2 \n" // 16 shorts -> 16 ints |
| 5420 "vpmovzxwd " MEMACCESS2(0x10,0) ",%%ymm3 \n" |
| 5421 "lea " MEMLEA(0x20,0) ",%0 \n" |
| 5422 "vcvtdq2ps %%ymm2,%%ymm2 \n" |
| 5423 "vcvtdq2ps %%ymm3,%%ymm3 \n" |
| 5424 "vcvtps2ph $3, %%ymm2, %%xmm2 \n" |
| 5425 "vcvtps2ph $3, %%ymm3, %%xmm3 \n" |
| 5426 "vmovdqu %%xmm2," MEMACCESS(1) " \n" |
| 5427 "vmovdqu %%xmm3," MEMACCESS2(0x10,1) " \n" |
| 5428 "lea " MEMLEA(0x20,1) ",%1 \n" |
| 5429 "sub $0x10,%2 \n" |
| 5430 "jg 1b \n" |
| 5431 |
| 5432 "vzeroupper \n" |
| 5433 : "+r"(src), // %0 |
| 5434 "+r"(dst), // %1 |
| 5435 "+r"(width) // %2 |
| 5436 : |
| 5437 : "memory", "cc", |
| 5438 "xmm2", "xmm3" |
| 5439 ); |
| 5440 } |
| 5441 #endif // HAS_HALFFLOATROW_F16C |
| 5442 |
| 5413 #ifdef HAS_ARGBCOLORTABLEROW_X86 | 5443 #ifdef HAS_ARGBCOLORTABLEROW_X86 |
| 5414 // Tranform ARGB pixels with color table. | 5444 // Tranform ARGB pixels with color table. |
| 5415 void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, | 5445 void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, |
| 5416 int width) { | 5446 int width) { |
| 5417 uintptr_t pixel_temp; | 5447 uintptr_t pixel_temp; |
| 5418 asm volatile ( | 5448 asm volatile ( |
| 5419 // 1 pixel loop. | 5449 // 1 pixel loop. |
| 5420 LABELALIGN | 5450 LABELALIGN |
| 5421 "1: \n" | 5451 "1: \n" |
| 5422 "movzb " MEMACCESS(0) ",%1 \n" | 5452 "movzb " MEMACCESS(0) ",%1 \n" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5569 ); | 5599 ); |
| 5570 } | 5600 } |
| 5571 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 | 5601 #endif // HAS_ARGBLUMACOLORTABLEROW_SSSE3 |
| 5572 | 5602 |
| 5573 #endif // defined(__x86_64__) || defined(__i386__) | 5603 #endif // defined(__x86_64__) || defined(__i386__) |
| 5574 | 5604 |
| 5575 #ifdef __cplusplus | 5605 #ifdef __cplusplus |
| 5576 } // extern "C" | 5606 } // extern "C" |
| 5577 } // namespace libyuv | 5607 } // namespace libyuv |
| 5578 #endif | 5608 #endif |
| OLD | NEW |