Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 1 | /* |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 3 | * |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 4 | * 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 Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 10 | */ |
| 11 | |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 12 | #ifndef AOM_STATS_RATE_HIST_H_ |
| 13 | #define AOM_STATS_RATE_HIST_H_ |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 14 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 15 | #include "aom/aom_encoder.h" |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 16 | |
| 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | struct rate_hist; |
| 22 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 23 | struct rate_hist *init_rate_histogram(const aom_codec_enc_cfg_t *cfg, |
| 24 | const aom_rational_t *fps); |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 25 | |
| 26 | void destroy_rate_histogram(struct rate_hist *hist); |
| 27 | |
| 28 | void update_rate_histogram(struct rate_hist *hist, |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 29 | const aom_codec_enc_cfg_t *cfg, |
| 30 | const aom_codec_cx_pkt_t *pkt); |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 31 | |
| 32 | void show_q_histogram(const int counts[64], int max_buckets); |
| 33 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 34 | void show_rate_histogram(struct rate_hist *hist, const aom_codec_enc_cfg_t *cfg, |
Dmitry Kovalev | f11da2b | 2014-01-29 12:28:29 -0800 | [diff] [blame] | 35 | int max_buckets); |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } // extern "C" |
| 39 | #endif |
| 40 | |
James Zern | e1cbb13 | 2018-08-22 14:10:36 -0700 | [diff] [blame] | 41 | #endif // AOM_STATS_RATE_HIST_H_ |