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

Side by Side Diff: third_party/libwebp/enc/layer.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/iterator.c ('k') | third_party/libwebp/enc/picture.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 // Enhancement layer (for YUV444/422) 10 // Enhancement layer (for YUV444/422)
11 // 11 //
12 // Author: Skal (pascal.massimino@gmail.com) 12 // Author: Skal (pascal.massimino@gmail.com)
13 13
14 #include <stdlib.h> 14 #include <stdlib.h>
15 15
16 #include "./vp8enci.h" 16 #include "./vp8enci.h"
17 17
18 #if defined(__cplusplus) || defined(c_plusplus)
19 extern "C" {
20 #endif
21
22 //------------------------------------------------------------------------------ 18 //------------------------------------------------------------------------------
23 19
24 void VP8EncInitLayer(VP8Encoder* const enc) { 20 void VP8EncInitLayer(VP8Encoder* const enc) {
25 enc->use_layer_ = (enc->pic_->u0 != NULL); 21 enc->use_layer_ = (enc->pic_->u0 != NULL);
26 enc->layer_data_size_ = 0; 22 enc->layer_data_size_ = 0;
27 enc->layer_data_ = NULL; 23 enc->layer_data_ = NULL;
28 if (enc->use_layer_) { 24 if (enc->use_layer_) {
29 VP8BitWriterInit(&enc->layer_bw_, enc->mb_w_ * enc->mb_h_ * 3); 25 VP8BitWriterInit(&enc->layer_bw_, enc->mb_w_ * enc->mb_h_ * 3);
30 } 26 }
31 } 27 }
32 28
33 void VP8EncCodeLayerBlock(VP8EncIterator* it) { 29 void VP8EncCodeLayerBlock(VP8EncIterator* it) {
34 (void)it; // remove a warning 30 (void)it; // remove a warning
35 } 31 }
36 32
37 int VP8EncFinishLayer(VP8Encoder* const enc) { 33 int VP8EncFinishLayer(VP8Encoder* const enc) {
38 if (enc->use_layer_) { 34 if (enc->use_layer_) {
39 enc->layer_data_ = VP8BitWriterFinish(&enc->layer_bw_); 35 enc->layer_data_ = VP8BitWriterFinish(&enc->layer_bw_);
40 enc->layer_data_size_ = VP8BitWriterSize(&enc->layer_bw_); 36 enc->layer_data_size_ = VP8BitWriterSize(&enc->layer_bw_);
41 } 37 }
42 return 1; 38 return 1;
43 } 39 }
44 40
45 void VP8EncDeleteLayer(VP8Encoder* enc) { 41 void VP8EncDeleteLayer(VP8Encoder* enc) {
46 free(enc->layer_data_); 42 free(enc->layer_data_);
47 } 43 }
48 44
49 #if defined(__cplusplus) || defined(c_plusplus)
50 } // extern "C"
51 #endif
OLDNEW
« no previous file with comments | « third_party/libwebp/enc/iterator.c ('k') | third_party/libwebp/enc/picture.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698