diff options
author | Cheng Chen <chengchen@google.com> | 2021-02-03 23:57:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-02-03 23:57:00 +0000 |
commit | 5a4cfa95630ee3ebb5d74cd6c21336492e8707a4 (patch) | |
tree | a9bc0a5b97d2ca6dbdb45918faaf1eebc897ce93 /vpx | |
parent | 7cbe65b6f4d616bfe27436b8882510e88f9fb9b0 (diff) | |
parent | 557368a8fa9f839afd7a6ded6a95f18829ff3365 (diff) | |
download | libvpx-5a4cfa95630ee3ebb5d74cd6c21336492e8707a4.tar libvpx-5a4cfa95630ee3ebb5d74cd6c21336492e8707a4.tar.gz libvpx-5a4cfa95630ee3ebb5d74cd6c21336492e8707a4.tar.bz2 libvpx-5a4cfa95630ee3ebb5d74cd6c21336492e8707a4.zip |
Merge "L2E: let external rate control pass in a max frame size"
Diffstat (limited to 'vpx')
-rw-r--r-- | vpx/vpx_ext_ratectrl.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vpx/vpx_ext_ratectrl.h b/vpx/vpx_ext_ratectrl.h index dc4d856a8..a193e5595 100644 --- a/vpx/vpx_ext_ratectrl.h +++ b/vpx/vpx_ext_ratectrl.h @@ -38,9 +38,15 @@ typedef void *vpx_rc_model_t; * * The encoder will receive the decision from the external rate control model * through get_encodeframe_decision() defined in vpx_rc_funcs_t. + * + * If max_frame_size = 0, the encoding ignores max frame size limit. + * If max_frame_size = -1, the encoding uses VP9's max frame size as the limit. + * If the encoded frame size is larger than max_frame_size, the frame is + * recoded to meet the size limit, following VP9's recoding principles. */ typedef struct vpx_rc_encodeframe_decision { - int q_index; /**< Quantizer step index [0..255]*/ + int q_index; /**< Quantizer step index [0..255]*/ + int max_frame_size; /**< Maximal frame size allowed to encode a frame*/ } vpx_rc_encodeframe_decision_t; /*!\brief Information for the frame to be encoded. @@ -82,6 +88,7 @@ typedef struct vpx_rc_encodeframe_result { int64_t sse; /**< sum of squared error of the reconstructed frame */ int64_t bit_count; /**< number of bits spent on coding the frame*/ int64_t pixel_count; /**< number of pixels in YUV planes of the frame*/ + int actual_encoding_qindex; /**< the actual qindex used to encode the frame*/ } vpx_rc_encodeframe_result_t; /*!\brief Status returned by rate control callback functions. |