OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 int ni_av_qi; | 93 int ni_av_qi; |
94 int ni_tot_qi; | 94 int ni_tot_qi; |
95 int ni_frames; | 95 int ni_frames; |
96 int avg_frame_qindex[FRAME_TYPES]; | 96 int avg_frame_qindex[FRAME_TYPES]; |
97 double tot_q; | 97 double tot_q; |
98 double avg_q; | 98 double avg_q; |
99 | 99 |
100 int64_t buffer_level; | 100 int64_t buffer_level; |
101 int64_t bits_off_target; | 101 int64_t bits_off_target; |
102 int64_t vbr_bits_off_target; | 102 int64_t vbr_bits_off_target; |
| 103 int64_t vbr_bits_off_target_fast; |
103 | 104 |
104 int decimation_factor; | 105 int decimation_factor; |
105 int decimation_count; | 106 int decimation_count; |
106 | 107 |
107 int rolling_target_bits; | 108 int rolling_target_bits; |
108 int rolling_actual_bits; | 109 int rolling_actual_bits; |
109 | 110 |
110 int long_rolling_target_bits; | 111 int long_rolling_target_bits; |
111 int long_rolling_actual_bits; | 112 int long_rolling_actual_bits; |
112 | 113 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 146 |
146 void vp9_rc_init(const struct VP9EncoderConfig *oxcf, int pass, | 147 void vp9_rc_init(const struct VP9EncoderConfig *oxcf, int pass, |
147 RATE_CONTROL *rc); | 148 RATE_CONTROL *rc); |
148 | 149 |
149 int vp9_estimate_bits_at_q(FRAME_TYPE frame_kind, int q, int mbs, | 150 int vp9_estimate_bits_at_q(FRAME_TYPE frame_kind, int q, int mbs, |
150 double correction_factor, | 151 double correction_factor, |
151 vpx_bit_depth_t bit_depth); | 152 vpx_bit_depth_t bit_depth); |
152 | 153 |
153 double vp9_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth); | 154 double vp9_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth); |
154 | 155 |
155 void vp9_rc_init_minq_luts(); | 156 void vp9_rc_init_minq_luts(void); |
156 | 157 |
157 // Generally at the high level, the following flow is expected | 158 // Generally at the high level, the following flow is expected |
158 // to be enforced for rate control: | 159 // to be enforced for rate control: |
159 // First call per frame, one of: | 160 // First call per frame, one of: |
160 // vp9_rc_get_one_pass_vbr_params() | 161 // vp9_rc_get_one_pass_vbr_params() |
161 // vp9_rc_get_one_pass_cbr_params() | 162 // vp9_rc_get_one_pass_cbr_params() |
162 // vp9_rc_get_svc_params() | 163 // vp9_rc_get_svc_params() |
163 // vp9_rc_get_first_pass_params() | 164 // vp9_rc_get_first_pass_params() |
164 // vp9_rc_get_second_pass_params() | 165 // vp9_rc_get_second_pass_params() |
165 // depending on the usage to set the rate control encode parameters desired. | 166 // depending on the usage to set the rate control encode parameters desired. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 void vp9_rc_set_gf_interval_range(const struct VP9_COMP *const cpi, | 243 void vp9_rc_set_gf_interval_range(const struct VP9_COMP *const cpi, |
243 RATE_CONTROL *const rc); | 244 RATE_CONTROL *const rc); |
244 | 245 |
245 void vp9_set_target_rate(struct VP9_COMP *cpi); | 246 void vp9_set_target_rate(struct VP9_COMP *cpi); |
246 | 247 |
247 #ifdef __cplusplus | 248 #ifdef __cplusplus |
248 } // extern "C" | 249 } // extern "C" |
249 #endif | 250 #endif |
250 | 251 |
251 #endif // VP9_ENCODER_VP9_RATECTRL_H_ | 252 #endif // VP9_ENCODER_VP9_RATECTRL_H_ |
OLD | NEW |