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 
11 #ifndef RATE_HIST_H_
12 #define RATE_HIST_H_
13 
14 #include "vpx/vpx_encoder.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 struct rate_hist;
21 
22 struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg,
23                                       const vpx_rational_t *fps);
24 
25 void destroy_rate_histogram(struct rate_hist *hist);
26 
27 void update_rate_histogram(struct rate_hist *hist,
28                            const vpx_codec_enc_cfg_t *cfg,
29                            const vpx_codec_cx_pkt_t *pkt);
30 
31 void show_q_histogram(const int counts[64], int max_buckets);
32 
33 void show_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg,
34                          int max_buckets);
35 
36 #ifdef __cplusplus
37 }  // extern "C"
38 #endif
39 
40 #endif  // RATE_HIST_H_
41