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

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

Issue 1546003002: libwebp: update to 0.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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/dec.c ('k') | third_party/libwebp/dsp/dec_mips32.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 // Clipping tables for filtering 10 // Clipping tables for filtering
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // and make sure it's set to true _last_ (so as to be thread-safe) 337 // and make sure it's set to true _last_ (so as to be thread-safe)
338 static volatile int tables_ok = 0; 338 static volatile int tables_ok = 0;
339 339
340 #endif 340 #endif
341 341
342 const int8_t* const VP8ksclip1 = &sclip1[1020]; 342 const int8_t* const VP8ksclip1 = &sclip1[1020];
343 const int8_t* const VP8ksclip2 = &sclip2[112]; 343 const int8_t* const VP8ksclip2 = &sclip2[112];
344 const uint8_t* const VP8kclip1 = &clip1[255]; 344 const uint8_t* const VP8kclip1 = &clip1[255];
345 const uint8_t* const VP8kabs0 = &abs0[255]; 345 const uint8_t* const VP8kabs0 = &abs0[255];
346 346
347 void VP8InitClipTables(void) { 347 WEBP_TSAN_IGNORE_FUNCTION void VP8InitClipTables(void) {
348 #if !defined(USE_STATIC_TABLES) 348 #if !defined(USE_STATIC_TABLES)
349 int i; 349 int i;
350 if (!tables_ok) { 350 if (!tables_ok) {
351 for (i = -255; i <= 255; ++i) { 351 for (i = -255; i <= 255; ++i) {
352 abs0[255 + i] = (i < 0) ? -i : i; 352 abs0[255 + i] = (i < 0) ? -i : i;
353 } 353 }
354 for (i = -1020; i <= 1020; ++i) { 354 for (i = -1020; i <= 1020; ++i) {
355 sclip1[1020 + i] = (i < -128) ? -128 : (i > 127) ? 127 : i; 355 sclip1[1020 + i] = (i < -128) ? -128 : (i > 127) ? 127 : i;
356 } 356 }
357 for (i = -112; i <= 112; ++i) { 357 for (i = -112; i <= 112; ++i) {
358 sclip2[112 + i] = (i < -16) ? -16 : (i > 15) ? 15 : i; 358 sclip2[112 + i] = (i < -16) ? -16 : (i > 15) ? 15 : i;
359 } 359 }
360 for (i = -255; i <= 255 + 255; ++i) { 360 for (i = -255; i <= 255 + 255; ++i) {
361 clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i; 361 clip1[255 + i] = (i < 0) ? 0 : (i > 255) ? 255 : i;
362 } 362 }
363 tables_ok = 1; 363 tables_ok = 1;
364 } 364 }
365 #endif // USE_STATIC_TABLES 365 #endif // USE_STATIC_TABLES
366 } 366 }
OLDNEW
« no previous file with comments | « third_party/libwebp/dsp/dec.c ('k') | third_party/libwebp/dsp/dec_mips32.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698