OLD | NEW |
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 // WebP encoder: internal header. | 10 // WebP encoder: internal header. |
(...skipping 12 matching lines...) Expand all Loading... |
23 #ifdef __cplusplus | 23 #ifdef __cplusplus |
24 extern "C" { | 24 extern "C" { |
25 #endif | 25 #endif |
26 | 26 |
27 //------------------------------------------------------------------------------ | 27 //------------------------------------------------------------------------------ |
28 // Various defines and enums | 28 // Various defines and enums |
29 | 29 |
30 // version numbers | 30 // version numbers |
31 #define ENC_MAJ_VERSION 0 | 31 #define ENC_MAJ_VERSION 0 |
32 #define ENC_MIN_VERSION 4 | 32 #define ENC_MIN_VERSION 4 |
33 #define ENC_REV_VERSION 1 | 33 #define ENC_REV_VERSION 2 |
34 | 34 |
35 // intra prediction modes | 35 // intra prediction modes |
36 enum { B_DC_PRED = 0, // 4x4 modes | 36 enum { B_DC_PRED = 0, // 4x4 modes |
37 B_TM_PRED = 1, | 37 B_TM_PRED = 1, |
38 B_VE_PRED = 2, | 38 B_VE_PRED = 2, |
39 B_HE_PRED = 3, | 39 B_HE_PRED = 3, |
40 B_RD_PRED = 4, | 40 B_RD_PRED = 4, |
41 B_VR_PRED = 5, | 41 B_VR_PRED = 5, |
42 B_LD_PRED = 6, | 42 B_LD_PRED = 6, |
43 B_VL_PRED = 7, | 43 B_VL_PRED = 7, |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 VP8RDLevel rd_opt_level_; // Deduced from method_. | 450 VP8RDLevel rd_opt_level_; // Deduced from method_. |
451 int max_i4_header_bits_; // partition #0 safeness factor | 451 int max_i4_header_bits_; // partition #0 safeness factor |
452 int thread_level_; // derived from config->thread_level | 452 int thread_level_; // derived from config->thread_level |
453 int do_search_; // derived from config->target_XXX | 453 int do_search_; // derived from config->target_XXX |
454 int use_tokens_; // if true, use token buffer | 454 int use_tokens_; // if true, use token buffer |
455 | 455 |
456 // Memory | 456 // Memory |
457 VP8MBInfo* mb_info_; // contextual macroblock infos (mb_w_ + 1) | 457 VP8MBInfo* mb_info_; // contextual macroblock infos (mb_w_ + 1) |
458 uint8_t* preds_; // predictions modes: (4*mb_w+1) * (4*mb_h+1) | 458 uint8_t* preds_; // predictions modes: (4*mb_w+1) * (4*mb_h+1) |
459 uint32_t* nz_; // non-zero bit context: mb_w+1 | 459 uint32_t* nz_; // non-zero bit context: mb_w+1 |
460 uint8_t *y_top_; // top luma samples. | 460 uint8_t* y_top_; // top luma samples. |
461 uint8_t *uv_top_; // top u/v samples. | 461 uint8_t* uv_top_; // top u/v samples. |
462 // U and V are packed into 16 bytes (8 U + 8 V) | 462 // U and V are packed into 16 bytes (8 U + 8 V) |
463 LFStats *lf_stats_; // autofilter stats (if NULL, autofilter is off) | 463 LFStats* lf_stats_; // autofilter stats (if NULL, autofilter is off) |
464 }; | 464 }; |
465 | 465 |
466 //------------------------------------------------------------------------------ | 466 //------------------------------------------------------------------------------ |
467 // internal functions. Not public. | 467 // internal functions. Not public. |
468 | 468 |
469 // in tree.c | 469 // in tree.c |
470 extern const uint8_t VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; | 470 extern const uint8_t VP8CoeffsProba0[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; |
471 extern const uint8_t | 471 extern const uint8_t |
472 VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; | 472 VP8CoeffsUpdateProba[NUM_TYPES][NUM_BANDS][NUM_CTX][NUM_PROBAS]; |
473 // Reset the token probabilities to their initial (default) values | 473 // Reset the token probabilities to their initial (default) values |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 int WebPPictureAllocARGB(WebPPicture* const picture, int width, int height); | 564 int WebPPictureAllocARGB(WebPPicture* const picture, int width, int height); |
565 | 565 |
566 // Allocates YUVA buffer of given dimension (previous one is always free'd). | 566 // Allocates YUVA buffer of given dimension (previous one is always free'd). |
567 // Uses picture->csp to determine whether an alpha buffer is needed. | 567 // Uses picture->csp to determine whether an alpha buffer is needed. |
568 // Preserves the ARGB buffer. | 568 // Preserves the ARGB buffer. |
569 // Returns false in case of error (invalid param, out-of-memory). | 569 // Returns false in case of error (invalid param, out-of-memory). |
570 int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height); | 570 int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height); |
571 | 571 |
572 //------------------------------------------------------------------------------ | 572 //------------------------------------------------------------------------------ |
573 | 573 |
574 #if WEBP_ENCODER_ABI_VERSION <= 0x0202 | 574 #if WEBP_ENCODER_ABI_VERSION <= 0x0203 |
575 void WebPMemoryWriterClear(WebPMemoryWriter* writer); | 575 void WebPMemoryWriterClear(WebPMemoryWriter* writer); |
576 #endif | 576 #endif |
577 | 577 |
578 #ifdef __cplusplus | 578 #ifdef __cplusplus |
579 } // extern "C" | 579 } // extern "C" |
580 #endif | 580 #endif |
581 | 581 |
582 #endif /* WEBP_ENC_VP8ENCI_H_ */ | 582 #endif /* WEBP_ENC_VP8ENCI_H_ */ |
OLD | NEW |