bit_cost.c 813 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright 2013 Google Inc. All Rights Reserved.
  2. Distributed under MIT license.
  3. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
  4. */
  5. /* Functions to estimate the bit cost of Huffman trees. */
  6. #include "bit_cost.h"
  7. #include <brotli/types.h>
  8. #include "../common/constants.h"
  9. #include "../common/platform.h"
  10. #include "fast_log.h"
  11. #include "histogram.h"
  12. #if defined(__cplusplus) || defined(c_plusplus)
  13. extern "C" {
  14. #endif
  15. #define FN(X) X ## Literal
  16. #include "bit_cost_inc.h" /* NOLINT(build/include) */
  17. #undef FN
  18. #define FN(X) X ## Command
  19. #include "bit_cost_inc.h" /* NOLINT(build/include) */
  20. #undef FN
  21. #define FN(X) X ## Distance
  22. #include "bit_cost_inc.h" /* NOLINT(build/include) */
  23. #undef FN
  24. #if defined(__cplusplus) || defined(c_plusplus)
  25. } /* extern "C" */
  26. #endif