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

Side by Side Diff: third_party/libwebp/dec/idec.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/dec/frame.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 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 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 // Incremental decoding 10 // Incremental decoding
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 const size_t curr_size = MemDataSize(&idec->mem_); 522 const size_t curr_size = MemDataSize(&idec->mem_);
523 assert(idec->is_lossless_); 523 assert(idec->is_lossless_);
524 524
525 // At present Lossless decoder can't decode image incrementally. So wait till 525 // At present Lossless decoder can't decode image incrementally. So wait till
526 // all the image data is aggregated before image can be decoded. 526 // all the image data is aggregated before image can be decoded.
527 if (curr_size < idec->chunk_size_) { 527 if (curr_size < idec->chunk_size_) {
528 return VP8_STATUS_SUSPENDED; 528 return VP8_STATUS_SUSPENDED;
529 } 529 }
530 530
531 if (!VP8LDecodeImage(dec)) { 531 if (!VP8LDecodeImage(dec)) {
532 // The decoding is called after all the data-bytes are aggregated. Change
533 // the error to VP8_BITSTREAM_ERROR in case lossless decoder fails to decode
534 // all the pixels (VP8_STATUS_SUSPENDED).
535 if (dec->status_ == VP8_STATUS_SUSPENDED) {
536 dec->status_ = VP8_STATUS_BITSTREAM_ERROR;
537 }
532 return ErrorStatusLossless(idec, dec->status_); 538 return ErrorStatusLossless(idec, dec->status_);
533 } 539 }
534 540
535 return FinishDecoding(idec); 541 return FinishDecoding(idec);
536 } 542 }
537 543
538 // Main decoding loop 544 // Main decoding loop
539 static VP8StatusCode IDecode(WebPIDecoder* idec) { 545 static VP8StatusCode IDecode(WebPIDecoder* idec) {
540 VP8StatusCode status = VP8_STATUS_SUSPENDED; 546 VP8StatusCode status = VP8_STATUS_SUSPENDED;
541 547
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 } 848 }
843 849
844 idec->io_.put = put; 850 idec->io_.put = put;
845 idec->io_.setup = setup; 851 idec->io_.setup = setup;
846 idec->io_.teardown = teardown; 852 idec->io_.teardown = teardown;
847 idec->io_.opaque = user_data; 853 idec->io_.opaque = user_data;
848 854
849 return 1; 855 return 1;
850 } 856 }
851 857
OLDNEW
« no previous file with comments | « third_party/libwebp/dec/frame.c ('k') | third_party/libwebp/dec/tree.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698