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 14 matching lines...) Expand all Loading... |
25 #ifdef __cplusplus | 25 #ifdef __cplusplus |
26 extern "C" { | 26 extern "C" { |
27 #endif | 27 #endif |
28 | 28 |
29 //------------------------------------------------------------------------------ | 29 //------------------------------------------------------------------------------ |
30 // Various defines and enums | 30 // Various defines and enums |
31 | 31 |
32 // version numbers | 32 // version numbers |
33 #define ENC_MAJ_VERSION 0 | 33 #define ENC_MAJ_VERSION 0 |
34 #define ENC_MIN_VERSION 5 | 34 #define ENC_MIN_VERSION 5 |
35 #define ENC_REV_VERSION 1 | 35 #define ENC_REV_VERSION 2 |
36 | 36 |
37 enum { MAX_LF_LEVELS = 64, // Maximum loop filter level | 37 enum { MAX_LF_LEVELS = 64, // Maximum loop filter level |
38 MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost | 38 MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost |
39 MAX_LEVEL = 2047 // max level (note: max codable is 2047 + 67) | 39 MAX_LEVEL = 2047 // max level (note: max codable is 2047 + 67) |
40 }; | 40 }; |
41 | 41 |
42 typedef enum { // Rate-distortion optimization levels | 42 typedef enum { // Rate-distortion optimization levels |
43 RD_OPT_NONE = 0, // no rd-opt | 43 RD_OPT_NONE = 0, // no rd-opt |
44 RD_OPT_BASIC = 1, // basic scoring (no trellis) | 44 RD_OPT_BASIC = 1, // basic scoring (no trellis) |
45 RD_OPT_TRELLIS = 2, // perform trellis-quant on the final decision only | 45 RD_OPT_TRELLIS = 2, // perform trellis-quant on the final decision only |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void VP8TBufferClear(VP8TBuffer* const b); // de-allocate pages memory | 318 void VP8TBufferClear(VP8TBuffer* const b); // de-allocate pages memory |
319 | 319 |
320 #if !defined(DISABLE_TOKEN_BUFFER) | 320 #if !defined(DISABLE_TOKEN_BUFFER) |
321 | 321 |
322 // Finalizes bitstream when probabilities are known. | 322 // Finalizes bitstream when probabilities are known. |
323 // Deletes the allocated token memory if final_pass is true. | 323 // Deletes the allocated token memory if final_pass is true. |
324 int VP8EmitTokens(VP8TBuffer* const b, VP8BitWriter* const bw, | 324 int VP8EmitTokens(VP8TBuffer* const b, VP8BitWriter* const bw, |
325 const uint8_t* const probas, int final_pass); | 325 const uint8_t* const probas, int final_pass); |
326 | 326 |
327 // record the coding of coefficients without knowing the probabilities yet | 327 // record the coding of coefficients without knowing the probabilities yet |
328 int VP8RecordCoeffTokens(const int ctx, const int coeff_type, | 328 int VP8RecordCoeffTokens(int ctx, const struct VP8Residual* const res, |
329 int first, int last, | |
330 const int16_t* const coeffs, | |
331 VP8TBuffer* const tokens); | 329 VP8TBuffer* const tokens); |
332 | 330 |
333 // Estimate the final coded size given a set of 'probas'. | 331 // Estimate the final coded size given a set of 'probas'. |
334 size_t VP8EstimateTokenSize(VP8TBuffer* const b, const uint8_t* const probas); | 332 size_t VP8EstimateTokenSize(VP8TBuffer* const b, const uint8_t* const probas); |
335 | 333 |
336 // unused for now | 334 // unused for now |
337 void VP8TokenToStats(const VP8TBuffer* const b, proba_t* const stats); | 335 void VP8TokenToStats(const VP8TBuffer* const b, proba_t* const stats); |
338 | 336 |
339 #endif // !DISABLE_TOKEN_BUFFER | 337 #endif // !DISABLE_TOKEN_BUFFER |
340 | 338 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 uint32_t* argb, uint32_t* argb_scratch, | 520 uint32_t* argb, uint32_t* argb_scratch, |
523 const uint32_t* const transform_data, | 521 const uint32_t* const transform_data, |
524 int quality, int subtract_green); | 522 int quality, int subtract_green); |
525 //------------------------------------------------------------------------------ | 523 //------------------------------------------------------------------------------ |
526 | 524 |
527 #ifdef __cplusplus | 525 #ifdef __cplusplus |
528 } // extern "C" | 526 } // extern "C" |
529 #endif | 527 #endif |
530 | 528 |
531 #endif /* WEBP_ENC_VP8ENCI_H_ */ | 529 #endif /* WEBP_ENC_VP8ENCI_H_ */ |
OLD | NEW |