Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: third_party/libwebp/dsp/cost_mips_dsp_r2.c

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libwebp/dsp/cost_mips32.c ('k') | third_party/libwebp/dsp/cost_sse2.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Author: Djordje Pesut (djordje.pesut@imgtec.com) 10 // Author: Djordje Pesut (djordje.pesut@imgtec.com)
11 11
12 #include "./dsp.h" 12 #include "./dsp.h"
13 13
14 #if defined(WEBP_USE_MIPS_DSP_R2) 14 #if defined(WEBP_USE_MIPS_DSP_R2)
15 15
16 #include "../enc/cost.h" 16 #include "../enc/cost_enc.h"
17 17
18 static int GetResidualCost(int ctx0, const VP8Residual* const res) { 18 static int GetResidualCost(int ctx0, const VP8Residual* const res) {
19 int temp0, temp1; 19 int temp0, temp1;
20 int v_reg, ctx_reg; 20 int v_reg, ctx_reg;
21 int n = res->first; 21 int n = res->first;
22 // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1 22 // should be prob[VP8EncBands[n]], but it's equivalent for n=0 or 1
23 int p0 = res->prob[n][ctx0][0]; 23 int p0 = res->prob[n][ctx0][0];
24 CostArrayPtr const costs = res->costs; 24 CostArrayPtr const costs = res->costs;
25 const uint16_t* t = costs[n][ctx0]; 25 const uint16_t* t = costs[n][ctx0];
26 // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0 26 // bit_cost(1, p0) is already incorporated in t[] tables, but only if ctx != 0
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) { 99 WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInitMIPSdspR2(void) {
100 VP8GetResidualCost = GetResidualCost; 100 VP8GetResidualCost = GetResidualCost;
101 } 101 }
102 102
103 #else // !WEBP_USE_MIPS_DSP_R2 103 #else // !WEBP_USE_MIPS_DSP_R2
104 104
105 WEBP_DSP_INIT_STUB(VP8EncDspCostInitMIPSdspR2) 105 WEBP_DSP_INIT_STUB(VP8EncDspCostInitMIPSdspR2)
106 106
107 #endif // WEBP_USE_MIPS_DSP_R2 107 #endif // WEBP_USE_MIPS_DSP_R2
OLDNEW
« no previous file with comments | « third_party/libwebp/dsp/cost_mips32.c ('k') | third_party/libwebp/dsp/cost_sse2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698