OLD | NEW |
1 // Copyright 2014 Google Inc. All Rights Reserved. | 1 // Copyright 2014 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 // MIPS version of YUV to RGB upsampling functions. | 10 // MIPS version of YUV to RGB upsampling functions. |
11 // | 11 // |
12 // Author(s): Djordje Pesut (djordje.pesut@imgtec.com) | 12 // Author(s): Djordje Pesut (djordje.pesut@imgtec.com) |
13 // Jovan Zelincevic (jovan.zelincevic@imgtec.com) | 13 // Jovan Zelincevic (jovan.zelincevic@imgtec.com) |
14 | 14 |
15 #include "./dsp.h" | 15 #include "./dsp.h" |
16 | 16 |
17 #if defined(WEBP_USE_MIPS32) | 17 // Code is disabled for now, in favor of the plain-C version |
| 18 #if 0 // defined(WEBP_USE_MIPS32) |
18 | 19 |
19 #include "./yuv.h" | 20 #include "./yuv.h" |
20 | 21 |
21 //------------------------------------------------------------------------------ | 22 //------------------------------------------------------------------------------ |
22 // simple point-sampling | 23 // simple point-sampling |
23 | 24 |
24 #define ROW_FUNC(FUNC_NAME, XSTEP, R, G, B, A) \ | 25 #define ROW_FUNC(FUNC_NAME, XSTEP, R, G, B, A) \ |
25 static void FUNC_NAME(const uint8_t* y, \ | 26 static void FUNC_NAME(const uint8_t* y, \ |
26 const uint8_t* u, const uint8_t* v, \ | 27 const uint8_t* u, const uint8_t* v, \ |
27 uint8_t* dst, int len) { \ | 28 uint8_t* dst, int len) { \ |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } \ | 78 } \ |
78 } | 79 } |
79 | 80 |
80 ROW_FUNC(YuvToRgbRow, 3, 0, 1, 2, 0) | 81 ROW_FUNC(YuvToRgbRow, 3, 0, 1, 2, 0) |
81 ROW_FUNC(YuvToRgbaRow, 4, 0, 1, 2, 3) | 82 ROW_FUNC(YuvToRgbaRow, 4, 0, 1, 2, 3) |
82 ROW_FUNC(YuvToBgrRow, 3, 2, 1, 0, 0) | 83 ROW_FUNC(YuvToBgrRow, 3, 2, 1, 0, 0) |
83 ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3) | 84 ROW_FUNC(YuvToBgraRow, 4, 2, 1, 0, 3) |
84 | 85 |
85 #undef ROW_FUNC | 86 #undef ROW_FUNC |
86 | 87 |
87 #endif // WEBP_USE_MIPS32 | |
88 | |
89 //------------------------------------------------------------------------------ | 88 //------------------------------------------------------------------------------ |
| 89 // Entry point |
90 | 90 |
91 extern void WebPInitSamplersMIPS32(void); | 91 extern void WebPInitSamplersMIPS32(void); |
92 | 92 |
93 void WebPInitSamplersMIPS32(void) { | 93 WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPS32(void) { |
94 #if defined(WEBP_USE_MIPS32) | |
95 WebPSamplers[MODE_RGB] = YuvToRgbRow; | 94 WebPSamplers[MODE_RGB] = YuvToRgbRow; |
96 WebPSamplers[MODE_RGBA] = YuvToRgbaRow; | 95 WebPSamplers[MODE_RGBA] = YuvToRgbaRow; |
97 WebPSamplers[MODE_BGR] = YuvToBgrRow; | 96 WebPSamplers[MODE_BGR] = YuvToBgrRow; |
98 WebPSamplers[MODE_BGRA] = YuvToBgraRow; | 97 WebPSamplers[MODE_BGRA] = YuvToBgraRow; |
| 98 } |
| 99 |
| 100 #else // !WEBP_USE_MIPS32 |
| 101 |
| 102 WEBP_DSP_INIT_STUB(WebPInitSamplersMIPS32) |
| 103 |
99 #endif // WEBP_USE_MIPS32 | 104 #endif // WEBP_USE_MIPS32 |
100 } | |
OLD | NEW |