ref: cb544f1990dc502b87d75a1da6aa43e649bd45d1
parent: a2192701b1ff5f79bc53f75199f2d9e3bc42df12
author: Jingning Han <[email protected]>
date: Tue Sep 11 06:50:49 EDT 2018
Simplify vp9_frame_type_qdelta() Make direct use of frame type in the available VP9_COMMON structure. Eliminate the need to map through rf_level to fetch the frame type. This change doesn't alter the coding stats. It simplifies the vp9_frame_type_qdelta() function logic and removes unnecessary reference to rf_level. Change-Id: I1a7b2f5abcae39aa4a60d08a6011dde38ecf3b58
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1188,13 +1188,10 @@
1.75, // GF_ARF_STD
2.00, // KF_STD
};
- static const FRAME_TYPE frame_type[RATE_FACTOR_LEVELS] = {
- INTER_FRAME, INTER_FRAME, INTER_FRAME, INTER_FRAME, KEY_FRAME
- };
const VP9_COMMON *const cm = &cpi->common;
- int qdelta =
- vp9_compute_qdelta_by_rate(&cpi->rc, frame_type[rf_level], q,
- rate_factor_deltas[rf_level], cm->bit_depth);
+
+ int qdelta = vp9_compute_qdelta_by_rate(
+ &cpi->rc, cm->frame_type, q, rate_factor_deltas[rf_level], cm->bit_depth);
return qdelta;
}