tokenize.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef VP8_ENCODER_TOKENIZE_H_
  11. #define VP8_ENCODER_TOKENIZE_H_
  12. #include "vp8/common/entropy.h"
  13. #include "block.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. void vp8_tokenize_initialize();
  18. typedef struct {
  19. short Token;
  20. short Extra;
  21. } TOKENVALUE;
  22. typedef struct {
  23. const vp8_prob *context_tree;
  24. short Extra;
  25. unsigned char Token;
  26. unsigned char skip_eob_node;
  27. } TOKENEXTRA;
  28. int rd_cost_mby(MACROBLOCKD *);
  29. #ifdef VP8_ENTROPY_STATS
  30. void init_context_counters();
  31. void print_context_counters();
  32. extern _int64 context_counters[BLOCK_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS]
  33. [MAX_ENTROPY_TOKENS];
  34. #endif
  35. extern const short *const vp8_dct_value_cost_ptr;
  36. /* TODO: The Token field should be broken out into a separate char array to
  37. * improve cache locality, since it's needed for costing when the rest of the
  38. * fields are not.
  39. */
  40. extern const TOKENVALUE *const vp8_dct_value_tokens_ptr;
  41. #ifdef __cplusplus
  42. } // extern "C"
  43. #endif
  44. #endif // VP8_ENCODER_TOKENIZE_H_