From ec910d81405c736a4490383a250299a7837c2e64 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 21:53:44 -0500 Subject: Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614 --- third_party/aom/av1/encoder/ratectrl.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'third_party/aom/av1/encoder/ratectrl.h') diff --git a/third_party/aom/av1/encoder/ratectrl.h b/third_party/aom/av1/encoder/ratectrl.h index 4ebdfadd6..8b410e778 100644 --- a/third_party/aom/av1/encoder/ratectrl.h +++ b/third_party/aom/av1/encoder/ratectrl.h @@ -49,6 +49,14 @@ typedef enum { } RATE_FACTOR_LEVEL; #endif // CONFIG_EXT_REFS +typedef struct { + int resize_width; + int resize_height; +#if CONFIG_FRAME_SUPERRES + uint8_t superres_denom; +#endif // CONFIG_FRAME_SUPERRES +} size_params_type; + typedef struct { // Rate targetting variables int base_frame_target; // A baseline frame target before adjustment @@ -189,10 +197,6 @@ int av1_rc_get_default_max_gf_interval(double framerate, int min_frame_rate); void av1_rc_get_one_pass_vbr_params(struct AV1_COMP *cpi); void av1_rc_get_one_pass_cbr_params(struct AV1_COMP *cpi); -// How many times less pixels there are to encode given the current scaling. -// Temporary replacement for rcf_mult and rate_thresh_mult. -double av1_resize_rate_factor(const struct AV1_COMP *cpi); - // Post encode update of the rate control parameters based // on bytes used void av1_rc_postencode_update(struct AV1_COMP *cpi, uint64_t bytes_used); @@ -201,7 +205,8 @@ void av1_rc_postencode_update_drop_frame(struct AV1_COMP *cpi); // Updates rate correction factors // Changes only the rate correction factors in the rate control structure. -void av1_rc_update_rate_correction_factors(struct AV1_COMP *cpi); +void av1_rc_update_rate_correction_factors(struct AV1_COMP *cpi, int width, + int height); // Decide if we should drop this frame: For 1-pass CBR. // Changes only the decimation count in the rate control structure @@ -214,12 +219,13 @@ void av1_rc_compute_frame_size_bounds(const struct AV1_COMP *cpi, int *frame_over_shoot_limit); // Picks q and q bounds given the target for bits -int av1_rc_pick_q_and_bounds(const struct AV1_COMP *cpi, int *bottom_index, - int *top_index); +int av1_rc_pick_q_and_bounds(const struct AV1_COMP *cpi, int width, int height, + int *bottom_index, int *top_index); // Estimates q to achieve a target bits per frame int av1_rc_regulate_q(const struct AV1_COMP *cpi, int target_bits_per_frame, - int active_best_quality, int active_worst_quality); + int active_best_quality, int active_worst_quality, + int width, int height); // Estimates bits per mb for a given qindex and correction factor. int av1_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, @@ -247,20 +253,15 @@ int av1_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type, int av1_frame_type_qdelta(const struct AV1_COMP *cpi, int rf_level, int q); -void av1_rc_update_framerate(struct AV1_COMP *cpi); +void av1_rc_update_framerate(struct AV1_COMP *cpi, int width, int height); void av1_rc_set_gf_interval_range(const struct AV1_COMP *const cpi, RATE_CONTROL *const rc); -void av1_set_target_rate(struct AV1_COMP *cpi); +void av1_set_target_rate(struct AV1_COMP *cpi, int width, int height); int av1_resize_one_pass_cbr(struct AV1_COMP *cpi); -uint8_t av1_calculate_next_resize_scale(const struct AV1_COMP *cpi); -#if CONFIG_FRAME_SUPERRES -uint8_t av1_calculate_next_superres_scale(const struct AV1_COMP *cpi, int width, - int height); -#endif // CONFIG_FRAME_SUPERRES #ifdef __cplusplus } // extern "C" #endif -- cgit v1.2.3