rate_hist.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2014 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 RATE_HIST_H_
  11. #define RATE_HIST_H_
  12. #include "vpx/vpx_encoder.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. struct rate_hist;
  17. struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg,
  18. const vpx_rational_t *fps);
  19. void destroy_rate_histogram(struct rate_hist *hist);
  20. void update_rate_histogram(struct rate_hist *hist,
  21. const vpx_codec_enc_cfg_t *cfg,
  22. const vpx_codec_cx_pkt_t *pkt);
  23. void show_q_histogram(const int counts[64], int max_buckets);
  24. void show_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg,
  25. int max_buckets);
  26. #ifdef __cplusplus
  27. } // extern "C"
  28. #endif
  29. #endif // RATE_HIST_H_