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

Side by Side Diff: third_party/libwebp/dec/quant_dec.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/dec/quant.c ('k') | third_party/libwebp/dec/tree.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 2010 Google Inc. All Rights Reserved. 1 // Copyright 2010 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 // Quantizer initialization 10 // Quantizer initialization
11 // 11 //
12 // Author: Skal (pascal.massimino@gmail.com) 12 // Author: Skal (pascal.massimino@gmail.com)
13 13
14 #include "./vp8i.h" 14 #include "./vp8i_dec.h"
15 15
16 static WEBP_INLINE int clip(int v, int M) { 16 static WEBP_INLINE int clip(int v, int M) {
17 return v < 0 ? 0 : v > M ? M : v; 17 return v < 0 ? 0 : v > M ? M : v;
18 } 18 }
19 19
20 // Paragraph 14.1 20 // Paragraph 14.1
21 static const uint8_t kDcTable[128] = { 21 static const uint8_t kDcTable[128] = {
22 4, 5, 6, 7, 8, 9, 10, 10, 22 4, 5, 6, 7, 8, 9, 10, 10,
23 11, 12, 13, 14, 15, 16, 17, 17, 23 11, 12, 13, 14, 15, 16, 17, 17,
24 18, 19, 20, 20, 21, 21, 22, 22, 24 18, 19, 20, 20, 21, 21, 22, 22,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 m->uv_mat_[0] = kDcTable[clip(q + dquv_dc, 117)]; 101 m->uv_mat_[0] = kDcTable[clip(q + dquv_dc, 117)];
102 m->uv_mat_[1] = kAcTable[clip(q + dquv_ac, 127)]; 102 m->uv_mat_[1] = kAcTable[clip(q + dquv_ac, 127)];
103 103
104 m->uv_quant_ = q + dquv_ac; // for dithering strength evaluation 104 m->uv_quant_ = q + dquv_ac; // for dithering strength evaluation
105 } 105 }
106 } 106 }
107 } 107 }
108 108
109 //------------------------------------------------------------------------------ 109 //------------------------------------------------------------------------------
110 110
OLDNEW
« no previous file with comments | « third_party/libwebp/dec/quant.c ('k') | third_party/libwebp/dec/tree.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698