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/enc/layer.c

Issue 10832153: libwebp: update snapshot to v0.2.0-rc1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright 2011 Google Inc. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // 2 //
3 // This code is licensed under the same terms as WebM: 3 // This code is licensed under the same terms as WebM:
4 // Software License Agreement: http://www.webmproject.org/license/software/ 4 // Software License Agreement: http://www.webmproject.org/license/software/
5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/
6 // ----------------------------------------------------------------------------- 6 // -----------------------------------------------------------------------------
7 // 7 //
8 // Enhancement layer (for YUV444/422) 8 // Enhancement layer (for YUV444/422)
9 // 9 //
10 // Author: Skal (pascal.massimino@gmail.com) 10 // Author: Skal (pascal.massimino@gmail.com)
11 11
12 #include <assert.h>
13 #include <stdlib.h> 12 #include <stdlib.h>
14 #include "vp8enci.h" 13
14 #include "./vp8enci.h"
15 15
16 #if defined(__cplusplus) || defined(c_plusplus) 16 #if defined(__cplusplus) || defined(c_plusplus)
17 extern "C" { 17 extern "C" {
18 #endif 18 #endif
19 19
20 #ifdef WEBP_EXPERIMENTAL_FEATURES
21
22 #endif /* WEBP_EXPERIMENTAL_FEATURES */
23
24 //------------------------------------------------------------------------------ 20 //------------------------------------------------------------------------------
25 21
26 void VP8EncInitLayer(VP8Encoder* const enc) { 22 void VP8EncInitLayer(VP8Encoder* const enc) {
27 enc->use_layer_ = (enc->pic_->u0 != NULL); 23 enc->use_layer_ = (enc->pic_->u0 != NULL);
28 enc->layer_data_size_ = 0; 24 enc->layer_data_size_ = 0;
29 enc->layer_data_ = NULL; 25 enc->layer_data_ = NULL;
30 if (enc->use_layer_) { 26 if (enc->use_layer_) {
31 VP8BitWriterInit(&enc->layer_bw_, enc->mb_w_ * enc->mb_h_ * 3); 27 VP8BitWriterInit(&enc->layer_bw_, enc->mb_w_ * enc->mb_h_ * 3);
32 } 28 }
33 } 29 }
34 30
35 void VP8EncCodeLayerBlock(VP8EncIterator* it) { 31 void VP8EncCodeLayerBlock(VP8EncIterator* it) {
36 (void)it; // remove a warning 32 (void)it; // remove a warning
37 #ifdef WEBP_EXPERIMENTAL_FEATURES
38 #endif /* WEBP_EXPERIMENTAL_FEATURES */
39 } 33 }
40 34
41 int VP8EncFinishLayer(VP8Encoder* const enc) { 35 int VP8EncFinishLayer(VP8Encoder* const enc) {
42 if (enc->use_layer_) { 36 if (enc->use_layer_) {
43 enc->layer_data_ = VP8BitWriterFinish(&enc->layer_bw_); 37 enc->layer_data_ = VP8BitWriterFinish(&enc->layer_bw_);
44 enc->layer_data_size_ = VP8BitWriterSize(&enc->layer_bw_); 38 enc->layer_data_size_ = VP8BitWriterSize(&enc->layer_bw_);
45 } 39 }
46 return 1; 40 return 1;
47 } 41 }
48 42
49 void VP8EncDeleteLayer(VP8Encoder* enc) { 43 void VP8EncDeleteLayer(VP8Encoder* enc) {
50 free(enc->layer_data_); 44 free(enc->layer_data_);
51 } 45 }
52 46
53 #if defined(__cplusplus) || defined(c_plusplus) 47 #if defined(__cplusplus) || defined(c_plusplus)
54 } // extern "C" 48 } // extern "C"
55 #endif 49 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698