OLD | NEW |
---|---|
1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // ARM NEON version of speed-critical encoding functions. | 10 // ARM NEON version of speed-critical encoding functions. |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1006 { 18, 19, 24, 25, 26, 27, 20, 21 }, | 1006 { 18, 19, 24, 25, 26, 27, 20, 21 }, |
1007 { 14, 15, 22, 23, 28, 29, 30, 31 } | 1007 { 14, 15, 22, 23, 28, 29, 30, 31 } |
1008 }; | 1008 }; |
1009 | 1009 |
1010 static int QuantizeBlock(int16_t in[16], int16_t out[16], | 1010 static int QuantizeBlock(int16_t in[16], int16_t out[16], |
1011 const VP8Matrix* const mtx) { | 1011 const VP8Matrix* const mtx) { |
1012 const int16x8_t out0 = Quantize(in, mtx, 0); | 1012 const int16x8_t out0 = Quantize(in, mtx, 0); |
1013 const int16x8_t out1 = Quantize(in, mtx, 8); | 1013 const int16x8_t out1 = Quantize(in, mtx, 8); |
1014 uint8x8x4_t shuffles; | 1014 uint8x8x4_t shuffles; |
1015 // vtbl4_u8 is marked unavailable for iOS arm64, use wider versions there. | 1015 // vtbl4_u8 is marked unavailable for iOS arm64, use wider versions there. |
1016 #if defined(__APPLE__) && defined(__aarch64__) | 1016 #if defined(__APPLE__) && defined(__aarch64__) && \ |
1017 defined(__apple_build_version__) | |
fbarchard
2014/12/11 18:00:58
curious what this tests? maybe worth a comment
| |
1017 uint8x16x2_t all_out; | 1018 uint8x16x2_t all_out; |
1018 INIT_VECTOR2(all_out, vreinterpretq_u8_s16(out0), vreinterpretq_u8_s16(out1)); | 1019 INIT_VECTOR2(all_out, vreinterpretq_u8_s16(out0), vreinterpretq_u8_s16(out1)); |
1019 INIT_VECTOR4(shuffles, | 1020 INIT_VECTOR4(shuffles, |
1020 vtbl2q_u8(all_out, vld1_u8(kShuffles[0])), | 1021 vtbl2q_u8(all_out, vld1_u8(kShuffles[0])), |
1021 vtbl2q_u8(all_out, vld1_u8(kShuffles[1])), | 1022 vtbl2q_u8(all_out, vld1_u8(kShuffles[1])), |
1022 vtbl2q_u8(all_out, vld1_u8(kShuffles[2])), | 1023 vtbl2q_u8(all_out, vld1_u8(kShuffles[2])), |
1023 vtbl2q_u8(all_out, vld1_u8(kShuffles[3]))); | 1024 vtbl2q_u8(all_out, vld1_u8(kShuffles[3]))); |
1024 #else | 1025 #else |
1025 uint8x8x4_t all_out; | 1026 uint8x8x4_t all_out; |
1026 INIT_VECTOR4(all_out, | 1027 INIT_VECTOR4(all_out, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1068 VP8CollectHistogram = CollectHistogram; | 1069 VP8CollectHistogram = CollectHistogram; |
1069 VP8SSE16x16 = SSE16x16; | 1070 VP8SSE16x16 = SSE16x16; |
1070 VP8SSE16x8 = SSE16x8; | 1071 VP8SSE16x8 = SSE16x8; |
1071 VP8SSE8x8 = SSE8x8; | 1072 VP8SSE8x8 = SSE8x8; |
1072 VP8SSE4x4 = SSE4x4; | 1073 VP8SSE4x4 = SSE4x4; |
1073 #if !defined(WORK_AROUND_GCC) | 1074 #if !defined(WORK_AROUND_GCC) |
1074 VP8EncQuantizeBlock = QuantizeBlock; | 1075 VP8EncQuantizeBlock = QuantizeBlock; |
1075 #endif | 1076 #endif |
1076 #endif // WEBP_USE_NEON | 1077 #endif // WEBP_USE_NEON |
1077 } | 1078 } |
OLD | NEW |