summaryrefslogtreecommitdiff
path: root/test/simple_encode_test.cc
diff options
context:
space:
mode:
authorangiebird <angiebird@google.com>2019-11-11 17:33:46 -0800
committerangiebird <angiebird@google.com>2019-11-18 11:37:24 -0800
commit56735c3fdb8401fb052f69cdaf2ebf16714bd21d (patch)
tree93c0d6da1e5045ca2c3f90b9676d7ae1154ed7b5 /test/simple_encode_test.cc
parent6956e393c710fab99833500a57062862e97096b6 (diff)
downloadlibvpx-56735c3fdb8401fb052f69cdaf2ebf16714bd21d.tar
libvpx-56735c3fdb8401fb052f69cdaf2ebf16714bd21d.tar.gz
libvpx-56735c3fdb8401fb052f69cdaf2ebf16714bd21d.tar.bz2
libvpx-56735c3fdb8401fb052f69cdaf2ebf16714bd21d.zip
Add psnr and sse to EncodeFrameResult
Change-Id: I33c410a14b86f95278eff8d1d0e6992f1b82a17d
Diffstat (limited to 'test/simple_encode_test.cc')
-rw-r--r--test/simple_encode_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/simple_encode_test.cc b/test/simple_encode_test.cc
index 30970514f..3184d0058 100644
--- a/test/simple_encode_test.cc
+++ b/test/simple_encode_test.cc
@@ -54,7 +54,7 @@ TEST(SimpleEncode, EncodeFrame) {
int h = 288;
int frame_rate_num = 30;
int frame_rate_den = 1;
- int target_bitrate = 200;
+ int target_bitrate = 1000;
int num_frames = 17;
// TODO(angiebird): Figure out how to upload test video to our codebase
FILE *file = fopen("bus_352x288_420_f20_b8.yuv", "r");
@@ -83,8 +83,11 @@ TEST(SimpleEncode, EncodeFrame) {
EXPECT_LT(encode_frame_result.show_idx, num_frames);
if (i == num_coding_frames - 1) {
EXPECT_EQ(encode_frame_result.show_idx, num_frames - 1)
- << "The last coding frame should should be the last display order";
+ << "The last coding frame should be the last display order";
}
+ EXPECT_GE(encode_frame_result.psnr, 34)
+ << "The psnr is supposed to be greater than 34 given the "
+ "target_bitrate 1000 kbps";
}
EXPECT_EQ(num_alternate_refereces, ref_num_alternate_refereces);
simple_encode.EndEncode();