| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 int last_boost; | 48 int last_boost; |
| 49 int kf_boost; | 49 int kf_boost; |
| 50 | 50 |
| 51 double rate_correction_factors[RATE_FACTOR_LEVELS]; | 51 double rate_correction_factors[RATE_FACTOR_LEVELS]; |
| 52 | 52 |
| 53 int frames_since_golden; | 53 int frames_since_golden; |
| 54 int frames_till_gf_update_due; | 54 int frames_till_gf_update_due; |
| 55 int max_gf_interval; | 55 int max_gf_interval; |
| 56 int static_scene_max_gf_interval; | 56 int static_scene_max_gf_interval; |
| 57 int baseline_gf_interval; | 57 int baseline_gf_interval; |
| 58 int constrained_gf_group; | |
| 59 int frames_to_key; | 58 int frames_to_key; |
| 60 int frames_since_key; | 59 int frames_since_key; |
| 61 int this_key_frame_forced; | 60 int this_key_frame_forced; |
| 62 int next_key_frame_forced; | 61 int next_key_frame_forced; |
| 63 int source_alt_ref_pending; | 62 int source_alt_ref_pending; |
| 64 int source_alt_ref_active; | 63 int source_alt_ref_active; |
| 65 int is_src_frame_alt_ref; | 64 int is_src_frame_alt_ref; |
| 66 | 65 |
| 67 int avg_frame_bandwidth; // Average frame size target for clip | 66 int avg_frame_bandwidth; // Average frame size target for clip |
| 68 int min_frame_bandwidth; // Minimum allocation used for any frame | 67 int min_frame_bandwidth; // Minimum allocation used for any frame |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void vp9_rc_get_svc_params(struct VP9_COMP *cpi); | 152 void vp9_rc_get_svc_params(struct VP9_COMP *cpi); |
| 154 | 153 |
| 155 // Post encode update of the rate control parameters based | 154 // Post encode update of the rate control parameters based |
| 156 // on bytes used | 155 // on bytes used |
| 157 void vp9_rc_postencode_update(struct VP9_COMP *cpi, uint64_t bytes_used); | 156 void vp9_rc_postencode_update(struct VP9_COMP *cpi, uint64_t bytes_used); |
| 158 // Post encode update of the rate control parameters for dropped frames | 157 // Post encode update of the rate control parameters for dropped frames |
| 159 void vp9_rc_postencode_update_drop_frame(struct VP9_COMP *cpi); | 158 void vp9_rc_postencode_update_drop_frame(struct VP9_COMP *cpi); |
| 160 | 159 |
| 161 // Updates rate correction factors | 160 // Updates rate correction factors |
| 162 // Changes only the rate correction factors in the rate control structure. | 161 // Changes only the rate correction factors in the rate control structure. |
| 163 void vp9_rc_update_rate_correction_factors(struct VP9_COMP *cpi); | 162 void vp9_rc_update_rate_correction_factors(struct VP9_COMP *cpi, int damp_var); |
| 164 | 163 |
| 165 // Decide if we should drop this frame: For 1-pass CBR. | 164 // Decide if we should drop this frame: For 1-pass CBR. |
| 166 // Changes only the decimation count in the rate control structure | 165 // Changes only the decimation count in the rate control structure |
| 167 int vp9_rc_drop_frame(struct VP9_COMP *cpi); | 166 int vp9_rc_drop_frame(struct VP9_COMP *cpi); |
| 168 | 167 |
| 169 // Computes frame size bounds. | 168 // Computes frame size bounds. |
| 170 void vp9_rc_compute_frame_size_bounds(const struct VP9_COMP *cpi, | 169 void vp9_rc_compute_frame_size_bounds(const struct VP9_COMP *cpi, |
| 171 int this_frame_target, | 170 int this_frame_target, |
| 172 int *frame_under_shoot_limit, | 171 int *frame_under_shoot_limit, |
| 173 int *frame_over_shoot_limit); | 172 int *frame_over_shoot_limit); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 void vp9_rc_set_gf_max_interval(const struct VP9_COMP *const cpi, | 209 void vp9_rc_set_gf_max_interval(const struct VP9_COMP *const cpi, |
| 211 RATE_CONTROL *const rc); | 210 RATE_CONTROL *const rc); |
| 212 | 211 |
| 213 void vp9_set_target_rate(struct VP9_COMP *cpi); | 212 void vp9_set_target_rate(struct VP9_COMP *cpi); |
| 214 | 213 |
| 215 #ifdef __cplusplus | 214 #ifdef __cplusplus |
| 216 } // extern "C" | 215 } // extern "C" |
| 217 #endif | 216 #endif |
| 218 | 217 |
| 219 #endif // VP9_ENCODER_VP9_RATECTRL_H_ | 218 #endif // VP9_ENCODER_VP9_RATECTRL_H_ |
| OLD | NEW |