From: angiebird Date: Tue, 4 Aug 2020 02:52:31 +0000 (-0700) Subject: Cosmetic changes for rate_ctrl experiment X-Git-Tag: v1.10.0-rc1~88^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e0967af8fda2c67266a6c594b713cae0353954d;p=libvpx Cosmetic changes for rate_ctrl experiment Change-Id: I133c93c2ad4c824fc97a18de3ac2cb2aedac9013 --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 68669ebf6..560bde382 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -4257,8 +4257,7 @@ static int guess_q_index_linear(int prev_q_index, int target_bits, static double get_bits_percent_diff(int target_bits, int actual_bits) { double diff = abs(target_bits - actual_bits) * 1. / target_bits; - diff *= 100; - return diff; + return diff * 100; } static int rq_model_predict_q_index(const RATE_QSTEP_MODEL *rq_model, diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index 31fbce24f..9d2c8414b 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -588,7 +588,7 @@ get_encode_frame_type(FRAME_UPDATE_TYPE update_type) { } typedef struct RATE_QSTEP_MODEL { - // The rq model predict the bit usage as follows. + // The rq model predicts the bit usage as follows. // rate = bias - ratio * log2(q_step) int ready; double bias;