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

Side by Side Diff: third_party/libwebp/dec/frame.c

Issue 653803003: libwebp: update to 0.4.2-rc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/README.chromium ('k') | third_party/libwebp/dec/idec.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 // Frame-reconstruction function. Memory allocation. 10 // Frame-reconstruction function. Memory allocation.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const int idx = (dqm->uv_quant_ < 0) ? 0 : dqm->uv_quant_; 170 const int idx = (dqm->uv_quant_ < 0) ? 0 : dqm->uv_quant_;
171 dqm->dither_ = (f * kQuantToDitherAmp[idx]) >> 3; 171 dqm->dither_ = (f * kQuantToDitherAmp[idx]) >> 3;
172 } 172 }
173 all_amp |= dqm->dither_; 173 all_amp |= dqm->dither_;
174 } 174 }
175 if (all_amp != 0) { 175 if (all_amp != 0) {
176 VP8InitRandom(&dec->dithering_rg_, 1.0f); 176 VP8InitRandom(&dec->dithering_rg_, 1.0f);
177 dec->dither_ = 1; 177 dec->dither_ = 1;
178 } 178 }
179 } 179 }
180 #if WEBP_DECODER_ABI_VERSION > 0x0203 180 #if WEBP_DECODER_ABI_VERSION > 0x0204
181 // potentially allow alpha dithering 181 // potentially allow alpha dithering
182 dec->alpha_dithering_ = options->alpha_dithering_strength; 182 dec->alpha_dithering_ = options->alpha_dithering_strength;
183 if (dec->alpha_dithering_ > 100) { 183 if (dec->alpha_dithering_ > 100) {
184 dec->alpha_dithering_ = 100; 184 dec->alpha_dithering_ = 100;
185 } else if (dec->alpha_dithering_ < 0) { 185 } else if (dec->alpha_dithering_ < 0) {
186 dec->alpha_dithering_ = 0; 186 dec->alpha_dithering_ = 0;
187 } 187 }
188 #endif 188 #endif
189 } 189 }
190 } 190 }
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 for (j = 0; j < 8; ++j) { 819 for (j = 0; j < 8; ++j) {
820 memcpy(u_out + j * dec->cache_uv_stride_, u_dst + j * BPS, 8); 820 memcpy(u_out + j * dec->cache_uv_stride_, u_dst + j * BPS, 8);
821 memcpy(v_out + j * dec->cache_uv_stride_, v_dst + j * BPS, 8); 821 memcpy(v_out + j * dec->cache_uv_stride_, v_dst + j * BPS, 8);
822 } 822 }
823 } 823 }
824 } 824 }
825 } 825 }
826 826
827 //------------------------------------------------------------------------------ 827 //------------------------------------------------------------------------------
828 828
OLDNEW
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | third_party/libwebp/dec/idec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698