| 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 rescaling functions | 10 // MIPS version of rescaling functions |
| 11 // | 11 // |
| 12 // Author(s): Djordje Pesut (djordje.pesut@imgtec.com) | 12 // Author(s): Djordje Pesut (djordje.pesut@imgtec.com) |
| 13 | 13 |
| 14 #include "./dsp.h" | 14 #include "./dsp.h" |
| 15 | 15 |
| 16 #if defined(WEBP_USE_MIPS_DSP_R2) | 16 #if defined(WEBP_USE_MIPS_DSP_R2) |
| 17 | 17 |
| 18 #include <assert.h> | 18 #include <assert.h> |
| 19 #include "../utils/rescaler.h" | 19 #include "../utils/rescaler_utils.h" |
| 20 | 20 |
| 21 #define ROUNDER (WEBP_RESCALER_ONE >> 1) | 21 #define ROUNDER (WEBP_RESCALER_ONE >> 1) |
| 22 #define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) | 22 #define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) |
| 23 | 23 |
| 24 //------------------------------------------------------------------------------ | 24 //------------------------------------------------------------------------------ |
| 25 // Row export | 25 // Row export |
| 26 | 26 |
| 27 static void ExportRowShrink(WebPRescaler* const wrk) { | 27 static void ExportRowShrink(WebPRescaler* const wrk) { |
| 28 int i; | 28 int i; |
| 29 const int x_out_max = wrk->dst_width * wrk->num_channels; | 29 const int x_out_max = wrk->dst_width * wrk->num_channels; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMIPSdspR2(void) { | 305 WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMIPSdspR2(void) { |
| 306 WebPRescalerExportRowExpand = ExportRowExpand; | 306 WebPRescalerExportRowExpand = ExportRowExpand; |
| 307 WebPRescalerExportRowShrink = ExportRowShrink; | 307 WebPRescalerExportRowShrink = ExportRowShrink; |
| 308 } | 308 } |
| 309 | 309 |
| 310 #else // !WEBP_USE_MIPS_DSP_R2 | 310 #else // !WEBP_USE_MIPS_DSP_R2 |
| 311 | 311 |
| 312 WEBP_DSP_INIT_STUB(WebPRescalerDspInitMIPSdspR2) | 312 WEBP_DSP_INIT_STUB(WebPRescalerDspInitMIPSdspR2) |
| 313 | 313 |
| 314 #endif // WEBP_USE_MIPS_DSP_R2 | 314 #endif // WEBP_USE_MIPS_DSP_R2 |
| OLD | NEW |