| OLD | NEW |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 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 // YUV to RGB upsampling functions. | 10 // YUV to RGB upsampling functions. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 208 } |
| 209 upsampling_last_cpuinfo_used1 = VP8GetCPUInfo; | 209 upsampling_last_cpuinfo_used1 = VP8GetCPUInfo; |
| 210 } | 210 } |
| 211 | 211 |
| 212 //------------------------------------------------------------------------------ | 212 //------------------------------------------------------------------------------ |
| 213 // Main calls | 213 // Main calls |
| 214 | 214 |
| 215 extern void WebPInitUpsamplersSSE2(void); | 215 extern void WebPInitUpsamplersSSE2(void); |
| 216 extern void WebPInitUpsamplersNEON(void); | 216 extern void WebPInitUpsamplersNEON(void); |
| 217 extern void WebPInitUpsamplersMIPSdspR2(void); | 217 extern void WebPInitUpsamplersMIPSdspR2(void); |
| 218 extern void WebPInitUpsamplersMSA(void); |
| 218 | 219 |
| 219 static volatile VP8CPUInfo upsampling_last_cpuinfo_used2 = | 220 static volatile VP8CPUInfo upsampling_last_cpuinfo_used2 = |
| 220 (VP8CPUInfo)&upsampling_last_cpuinfo_used2; | 221 (VP8CPUInfo)&upsampling_last_cpuinfo_used2; |
| 221 | 222 |
| 222 WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { | 223 WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { |
| 223 if (upsampling_last_cpuinfo_used2 == VP8GetCPUInfo) return; | 224 if (upsampling_last_cpuinfo_used2 == VP8GetCPUInfo) return; |
| 224 | 225 |
| 225 #ifdef FANCY_UPSAMPLING | 226 #ifdef FANCY_UPSAMPLING |
| 226 WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; | 227 WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair; |
| 227 WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; | 228 WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 245 #if defined(WEBP_USE_NEON) | 246 #if defined(WEBP_USE_NEON) |
| 246 if (VP8GetCPUInfo(kNEON)) { | 247 if (VP8GetCPUInfo(kNEON)) { |
| 247 WebPInitUpsamplersNEON(); | 248 WebPInitUpsamplersNEON(); |
| 248 } | 249 } |
| 249 #endif | 250 #endif |
| 250 #if defined(WEBP_USE_MIPS_DSP_R2) | 251 #if defined(WEBP_USE_MIPS_DSP_R2) |
| 251 if (VP8GetCPUInfo(kMIPSdspR2)) { | 252 if (VP8GetCPUInfo(kMIPSdspR2)) { |
| 252 WebPInitUpsamplersMIPSdspR2(); | 253 WebPInitUpsamplersMIPSdspR2(); |
| 253 } | 254 } |
| 254 #endif | 255 #endif |
| 256 #if defined(WEBP_USE_MSA) |
| 257 if (VP8GetCPUInfo(kMSA)) { |
| 258 WebPInitUpsamplersMSA(); |
| 259 } |
| 260 #endif |
| 255 } | 261 } |
| 256 #endif // FANCY_UPSAMPLING | 262 #endif // FANCY_UPSAMPLING |
| 257 upsampling_last_cpuinfo_used2 = VP8GetCPUInfo; | 263 upsampling_last_cpuinfo_used2 = VP8GetCPUInfo; |
| 258 } | 264 } |
| 259 | 265 |
| 260 //------------------------------------------------------------------------------ | 266 //------------------------------------------------------------------------------ |
| OLD | NEW |