blob: 55b8c5d4391340fe31bf043bad4a9134feb9e07d [file] [log] [blame]
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -08001/*
Yaowu Xu9c01aa12016-09-01 14:32:49 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -08003 *
Yaowu Xu9c01aa12016-09-01 14:32:49 -07004 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080010 */
11
James Zerne1cbb132018-08-22 14:10:36 -070012#ifndef AOM_STATS_RATE_HIST_H_
13#define AOM_STATS_RATE_HIST_H_
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080014
Yaowu Xuf883b422016-08-30 14:01:10 -070015#include "aom/aom_encoder.h"
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080016
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21struct rate_hist;
22
Yaowu Xuf883b422016-08-30 14:01:10 -070023struct rate_hist *init_rate_histogram(const aom_codec_enc_cfg_t *cfg,
24 const aom_rational_t *fps);
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080025
26void destroy_rate_histogram(struct rate_hist *hist);
27
28void update_rate_histogram(struct rate_hist *hist,
Yaowu Xuf883b422016-08-30 14:01:10 -070029 const aom_codec_enc_cfg_t *cfg,
30 const aom_codec_cx_pkt_t *pkt);
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080031
32void show_q_histogram(const int counts[64], int max_buckets);
33
Yaowu Xuf883b422016-08-30 14:01:10 -070034void show_rate_histogram(struct rate_hist *hist, const aom_codec_enc_cfg_t *cfg,
Dmitry Kovalevf11da2b2014-01-29 12:28:29 -080035 int max_buckets);
36
37#ifdef __cplusplus
38} // extern "C"
39#endif
40
James Zerne1cbb132018-08-22 14:10:36 -070041#endif // AOM_STATS_RATE_HIST_H_