| OLD | NEW |
| 1 // Copyright 2010 Google Inc. All Rights Reserved. | 1 // Copyright 2010 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // This code is licensed under the same terms as WebM: | 3 // Use of this source code is governed by a BSD-style license |
| 4 // Software License Agreement: http://www.webmproject.org/license/software/ | 4 // that can be found in the COPYING file in the root of the source |
| 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ | 5 // tree. An additional intellectual property rights grant can be found |
| 6 // in the file PATENTS. All contributing project authors may |
| 7 // be found in the AUTHORS file in the root of the source tree. |
| 6 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
| 7 // | 9 // |
| 8 // VP8 decoder: internal header. | 10 // VP8 decoder: internal header. |
| 9 // | 11 // |
| 10 // Author: Skal (pascal.massimino@gmail.com) | 12 // Author: Skal (pascal.massimino@gmail.com) |
| 11 | 13 |
| 12 #ifndef WEBP_DEC_VP8I_H_ | 14 #ifndef WEBP_DEC_VP8I_H_ |
| 13 #define WEBP_DEC_VP8I_H_ | 15 #define WEBP_DEC_VP8I_H_ |
| 14 | 16 |
| 15 #include <string.h> // for memcpy() | 17 #include <string.h> // for memcpy() |
| 16 #include "./vp8li.h" | 18 #include "./vp8li.h" |
| 17 #include "../utils/bit_reader.h" | 19 #include "../utils/bit_reader.h" |
| 18 #include "../utils/thread.h" | 20 #include "../utils/thread.h" |
| 19 #include "../dsp/dsp.h" | 21 #include "../dsp/dsp.h" |
| 20 | 22 |
| 21 #if defined(__cplusplus) || defined(c_plusplus) | 23 #if defined(__cplusplus) || defined(c_plusplus) |
| 22 extern "C" { | 24 extern "C" { |
| 23 #endif | 25 #endif |
| 24 | 26 |
| 25 //------------------------------------------------------------------------------ | 27 //------------------------------------------------------------------------------ |
| 26 // Various defines and enums | 28 // Various defines and enums |
| 27 | 29 |
| 28 // version numbers | 30 // version numbers |
| 29 #define DEC_MAJ_VERSION 0 | 31 #define DEC_MAJ_VERSION 0 |
| 30 #define DEC_MIN_VERSION 3 | 32 #define DEC_MIN_VERSION 3 |
| 31 #define DEC_REV_VERSION 0 | 33 #define DEC_REV_VERSION 1 |
| 32 | 34 |
| 33 #define ONLY_KEYFRAME_CODE // to remove any code related to P-Frames | 35 #define ONLY_KEYFRAME_CODE // to remove any code related to P-Frames |
| 34 | 36 |
| 35 // intra prediction modes | 37 // intra prediction modes |
| 36 enum { B_DC_PRED = 0, // 4x4 modes | 38 enum { B_DC_PRED = 0, // 4x4 modes |
| 37 B_TM_PRED, | 39 B_TM_PRED, |
| 38 B_VE_PRED, | 40 B_VE_PRED, |
| 39 B_HE_PRED, | 41 B_HE_PRED, |
| 40 B_RD_PRED, | 42 B_RD_PRED, |
| 41 B_VR_PRED, | 43 B_VR_PRED, |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 uint32_t non_zero_ac_; | 271 uint32_t non_zero_ac_; |
| 270 | 272 |
| 271 // Filtering side-info | 273 // Filtering side-info |
| 272 int filter_type_; // 0=off, 1=simple, 2=complex | 274 int filter_type_; // 0=off, 1=simple, 2=complex |
| 273 int filter_row_; // per-row flag | 275 int filter_row_; // per-row flag |
| 274 VP8FInfo fstrengths_[NUM_MB_SEGMENTS][2]; // precalculated per-segment/type | 276 VP8FInfo fstrengths_[NUM_MB_SEGMENTS][2]; // precalculated per-segment/type |
| 275 | 277 |
| 276 // extensions | 278 // extensions |
| 277 const uint8_t* alpha_data_; // compressed alpha data (if present) | 279 const uint8_t* alpha_data_; // compressed alpha data (if present) |
| 278 size_t alpha_data_size_; | 280 size_t alpha_data_size_; |
| 281 int is_alpha_decoded_; // true if alpha_data_ is decoded in alpha_plane_ |
| 279 uint8_t* alpha_plane_; // output. Persistent, contains the whole data. | 282 uint8_t* alpha_plane_; // output. Persistent, contains the whole data. |
| 280 | 283 |
| 281 int layer_colorspace_; | 284 int layer_colorspace_; |
| 282 const uint8_t* layer_data_; // compressed layer data (if present) | 285 const uint8_t* layer_data_; // compressed layer data (if present) |
| 283 size_t layer_data_size_; | 286 size_t layer_data_size_; |
| 284 }; | 287 }; |
| 285 | 288 |
| 286 //------------------------------------------------------------------------------ | 289 //------------------------------------------------------------------------------ |
| 287 // internal functions. Not public. | 290 // internal functions. Not public. |
| 288 | 291 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // in layer.c | 327 // in layer.c |
| 325 int VP8DecodeLayer(VP8Decoder* const dec); | 328 int VP8DecodeLayer(VP8Decoder* const dec); |
| 326 | 329 |
| 327 //------------------------------------------------------------------------------ | 330 //------------------------------------------------------------------------------ |
| 328 | 331 |
| 329 #if defined(__cplusplus) || defined(c_plusplus) | 332 #if defined(__cplusplus) || defined(c_plusplus) |
| 330 } // extern "C" | 333 } // extern "C" |
| 331 #endif | 334 #endif |
| 332 | 335 |
| 333 #endif /* WEBP_DEC_VP8I_H_ */ | 336 #endif /* WEBP_DEC_VP8I_H_ */ |
| OLD | NEW |