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

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

Issue 872923002: libwebp: cherry-pick lossless decoding fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/README.chromium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 Google Inc. All Rights Reserved. 1 // Copyright 2012 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 // main entry for the decoder 10 // main entry for the decoder
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 src += length; 893 src += length;
894 } 894 }
895 col += length; 895 col += length;
896 while (col >= width) { 896 while (col >= width) {
897 col -= width; 897 col -= width;
898 ++row; 898 ++row;
899 if ((row % NUM_ARGB_CACHE_ROWS == 0) && (process_func != NULL)) { 899 if ((row % NUM_ARGB_CACHE_ROWS == 0) && (process_func != NULL)) {
900 process_func(dec, row); 900 process_func(dec, row);
901 } 901 }
902 } 902 }
903 if (src < src_last) { 903 if (src < src_end) {
904 if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row); 904 if (col & mask) htree_group = GetHtreeGroupForPos(hdr, col, row);
905 if (color_cache != NULL) { 905 if (color_cache != NULL) {
906 while (last_cached < src) { 906 while (last_cached < src) {
907 VP8LColorCacheInsert(color_cache, *last_cached++); 907 VP8LColorCacheInsert(color_cache, *last_cached++);
908 } 908 }
909 } 909 }
910 } 910 }
911 } else if (code < color_cache_limit) { // Color cache 911 } else if (code < color_cache_limit) { // Color cache
912 const int key = code - len_code_limit; 912 const int key = code - len_code_limit;
913 assert(color_cache != NULL); 913 assert(color_cache != NULL);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 VP8LClear(dec); 1395 VP8LClear(dec);
1396 return 1; 1396 return 1;
1397 1397
1398 Err: 1398 Err:
1399 VP8LClear(dec); 1399 VP8LClear(dec);
1400 assert(dec->status_ != VP8_STATUS_OK); 1400 assert(dec->status_ != VP8_STATUS_OK);
1401 return 0; 1401 return 0;
1402 } 1402 }
1403 1403
1404 //------------------------------------------------------------------------------ 1404 //------------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698