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

Side by Side Diff: third_party/libwebp/enc/syntax.c

Issue 116213006: Update libwebp to 0.4.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: After Blink Roll Created 6 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 | Annotate | Revision Log
« no previous file with comments | « third_party/libwebp/enc/quant.c ('k') | third_party/libwebp/enc/token.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 // Header syntax writing 10 // Header syntax writing
11 // 11 //
12 // Author: Skal (pascal.massimino@gmail.com) 12 // Author: Skal (pascal.massimino@gmail.com)
13 13
14 #include <assert.h> 14 #include <assert.h>
15 15
16 #include "../utils/utils.h" 16 #include "../utils/utils.h"
17 #include "../webp/format_constants.h" // RIFF constants 17 #include "../webp/format_constants.h" // RIFF constants
18 #include "../webp/mux_types.h" // ALPHA_FLAG 18 #include "../webp/mux_types.h" // ALPHA_FLAG
19 #include "./vp8enci.h" 19 #include "./vp8enci.h"
20 20
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24
25 //------------------------------------------------------------------------------ 21 //------------------------------------------------------------------------------
26 // Helper functions 22 // Helper functions
27 23
28 static int IsVP8XNeeded(const VP8Encoder* const enc) { 24 static int IsVP8XNeeded(const VP8Encoder* const enc) {
29 return !!enc->has_alpha_; // Currently the only case when VP8X is needed. 25 return !!enc->has_alpha_; // Currently the only case when VP8X is needed.
30 // This could change in the future. 26 // This could change in the future.
31 } 27 }
32 28
33 static int PutPaddingByte(const WebPPicture* const pic) { 29 static int PutPaddingByte(const WebPPicture* const pic) {
34 const uint8_t pad_byte[1] = { 0 }; 30 const uint8_t pad_byte[1] = { 0 };
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 ok = PutPaddingByte(pic); 414 ok = PutPaddingByte(pic);
419 } 415 }
420 416
421 enc->coded_size_ = (int)(CHUNK_HEADER_SIZE + riff_size); 417 enc->coded_size_ = (int)(CHUNK_HEADER_SIZE + riff_size);
422 ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_); 418 ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_);
423 return ok; 419 return ok;
424 } 420 }
425 421
426 //------------------------------------------------------------------------------ 422 //------------------------------------------------------------------------------
427 423
428 #if defined(__cplusplus) || defined(c_plusplus)
429 } // extern "C"
430 #endif
OLDNEW
« no previous file with comments | « third_party/libwebp/enc/quant.c ('k') | third_party/libwebp/enc/token.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698