summaryrefslogtreecommitdiff
path: root/test/vp9_ext_ratectrl_test.cc
diff options
context:
space:
mode:
authorCheng Chen <chengchen@google.com>2021-02-01 16:57:09 -0800
committerCheng Chen <chengchen@google.com>2021-02-03 11:29:06 -0800
commit557368a8fa9f839afd7a6ded6a95f18829ff3365 (patch)
tree65c3e3e8ef36625cefb349947dec8005bb3e4ff3 /test/vp9_ext_ratectrl_test.cc
parent61edec1efbea1c02d71857e2aff9426d9cd2df4e (diff)
downloadlibvpx-557368a8fa9f839afd7a6ded6a95f18829ff3365.tar
libvpx-557368a8fa9f839afd7a6ded6a95f18829ff3365.tar.gz
libvpx-557368a8fa9f839afd7a6ded6a95f18829ff3365.tar.bz2
libvpx-557368a8fa9f839afd7a6ded6a95f18829ff3365.zip
L2E: let external rate control pass in a max frame size
And allow the frame to recode when the frame size is larger than the input max frame size. If the max frame size is not specified, let vp9 decide whether to recode. The recode follows the vp9's current recoding mechanism. The rate control api will return the new qindex back to the external model. Change-Id: I796fbf713ad50a5b413b0e2501583b565ed2343f
Diffstat (limited to 'test/vp9_ext_ratectrl_test.cc')
-rw-r--r--test/vp9_ext_ratectrl_test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/vp9_ext_ratectrl_test.cc b/test/vp9_ext_ratectrl_test.cc
index 4b3693a34..b6b5b2eae 100644
--- a/test/vp9_ext_ratectrl_test.cc
+++ b/test/vp9_ext_ratectrl_test.cc
@@ -128,6 +128,7 @@ vpx_rc_status_t rc_get_encodeframe_decision(
} else {
frame_decision->q_index = 100;
}
+ frame_decision->max_frame_size = 0;
return VPX_RC_OK;
}
@@ -143,6 +144,11 @@ vpx_rc_status_t rc_update_encodeframe_result(
if (toy_rate_ctrl->coding_index == kLosslessCodingIndex) {
EXPECT_EQ(encode_frame_result->sse, 0);
}
+ if (toy_rate_ctrl->coding_index == kLosslessCodingIndex) {
+ EXPECT_EQ(encode_frame_result->actual_encoding_qindex, 0);
+ } else {
+ EXPECT_EQ(encode_frame_result->actual_encoding_qindex, 100);
+ }
return VPX_RC_OK;
}