History

add usagetype parameter in encoder unit test to test screen content

ruil2 committed 12 years ago

Commit a15e6401 parent 9b032235 files · +37 −17Browse files

Showing the changes to test/api/encoder_test.cpp (1 of 5 files). Show all

Unified · Split

test/api/encoder_test.cpp+24−7
@@ -28,6 +28,7 @@ TEST_F(EncoderInitTest, JustInit) {} · 27 unmodified lines
2828 struct EncodeFileParam {
2929 const char* fileName;
3030 const char* hashStr;
31+ EUsageType usageType;
3132 int width;
3233 int height;
3334 float frameRate;
@@ -56,8 +57,12 @@ class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>, · 22 unmodified lines
5657
5758 TEST_P(EncoderOutputTest, CompareOutput) {
5859 EncodeFileParam p = GetParam();
59− EncodeFile(p.fileName, p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, this);
60+ EncodeFile(p.fileName, p.usageType ,p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, this);
6061
62+ //will remove this after screen content algorithms are ready,
63+ //because the bitstream output will vary when the different algorithms are added.
64+ if(p.usageType == SCREEN_CONTENT_REAL_TIME)
65+ return;
6166 unsigned char digest[SHA_DIGEST_LENGTH];
6267 SHA1Result(&ctx_, digest);
6368 if (!HasFatalFailure()) {
@@ -68,28 +73,40 @@ TEST_P(EncoderOutputTest, CompareOutput) { · 4 unmodified lines
6873 static const EncodeFileParam kFileParamArray[] = {
6974 {
7075 "res/CiscoVT2people_320x192_12fps.yuv",
71− "8d4c87f48e8a679c1ccbf5fe1ee040fed4776b30", 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1
76+ "8d4c87f48e8a679c1ccbf5fe1ee040fed4776b30", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1
7277 },
7378 {
7479 "res/CiscoVT2people_160x96_6fps.yuv",
75− "75334dc69d95b8ac2e0a52977bba0179df4f151f", 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1
80+ "75334dc69d95b8ac2e0a52977bba0179df4f151f", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1
7681 },
7782 {
7883 "res/Static_152_100.yuv",
79− "3467201e18a934e7f8c50f3c8f3e05f4334ad12c", 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1
84+ "3467201e18a934e7f8c50f3c8f3e05f4334ad12c", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1
8085 },
8186 {
8287 "res/CiscoVT2people_320x192_12fps.yuv",
83− "a57c7cc8a00ffe8d8ca5527a13af1683a41b5150", 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1 // One slice per MB row
88+ "a57c7cc8a00ffe8d8ca5527a13af1683a41b5150", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1 // One slice per MB row
8489 },
8590 {
8691 "res/CiscoVT2people_320x192_12fps.yuv",
87− "bc9b203c1b031299df7981201c2af393994d876f", 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1
92+ "bc9b203c1b031299df7981201c2af393994d876f", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1
8893 },
8994 {
9095 "res/CiscoVT2people_320x192_12fps.yuv",
91− "ba81a0f1a14214e6d3c7f1608991b3ac97789370", 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2
96+ "ba81a0f1a14214e6d3c7f1608991b3ac97789370", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2
9297 },
98+ {
99+ "res/CiscoVT2people_320x192_12fps.yuv",
100+ "", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1
101+ },
102+ {
103+ "res/CiscoVT2people_160x96_6fps.yuv",
104+ "", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1
105+ },
106+ {
107+ "res/Static_152_100.yuv",
108+ "", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1
109+ }
93110 };
94111
95112 INSTANTIATE_TEST_CASE_P(EncodeFile, EncoderOutputTest,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t