History

add parameter and one case in UT

Sijia Chen committed 12 years ago

Commit 84ca6591 parent 25cad575 files · +35 −23Browse files

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

Unified · Split

test/api/encoder_test.cpp+21−14
@@ -35,6 +35,8 @@ struct EncodeFileParam { · 34 unmodified lines
3535 SliceModeEnum slices;
3636 bool denoise;
3737 int layers;
38+ bool isLossless;
39+ bool enableLtr;
3840 };
3941
4042 class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>,
@@ -59,9 +61,9 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 18 unmodified lines
5961 EncodeFileParam p = GetParam();
6062 #if defined(ANDROID_NDK)
6163 std::string filename = std::string ("/sdcard/") + p.fileName;
62− EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, this);
64+ EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, p.enableLtr, this);
6365 #else
64− EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, this);
66+ EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, p.enableLtr, this);
6567 #endif
6668 //will remove this after screen content algorithms are ready,
6769 //because the bitstream output will vary when the different algorithms are added.
@@ -74,51 +76,56 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 6 unmodified lines
7476 static const EncodeFileParam kFileParamArray[] = {
7577 {
7678 "res/CiscoVT2people_320x192_12fps.yuv",
77− "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1
79+ "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false
7880 },
7981 {
8082 "res/CiscoVT2people_160x96_6fps.yuv",
81− "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1
83+ "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
8284 },
8385 {
8486 "res/Static_152_100.yuv",
85− "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1
87+ "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
8688 },
8789 {
8890 "res/CiscoVT2people_320x192_12fps.yuv",
89− "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1 // One slice per MB row
91+ "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false // One slice per MB row
9092 },
9193 {
9294 "res/CiscoVT2people_320x192_12fps.yuv",
93− "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1
95+ "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false
9496 },
9597 {
9698 "res/CiscoVT2people_320x192_12fps.yuv",
97− "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2
99+ "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false
98100 },
99101 {
100102 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
101− "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1
103+ "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false
102104 },
103105 {
104106 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
105− "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4
107+ "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false
106108 },
107109 {
108110 "res/CiscoVT2people_320x192_12fps.yuv",
109− "030d0e2d742ac039c2ab6333fe7cb18623c0d283", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1
111+ "030d0e2d742ac039c2ab6333fe7cb18623c0d283", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false
110112 },
111113 {
112114 "res/CiscoVT2people_160x96_6fps.yuv",
113− "40aa19d4b2684a59e689860d2a793876f33904f7", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1
115+ "40aa19d4b2684a59e689860d2a793876f33904f7", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
114116 },
115117 {
116118 "res/Static_152_100.yuv",
117− "494068b59aa9ed9118a9f33174b732024effc870", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1
119+ "494068b59aa9ed9118a9f33174b732024effc870", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
118120 },
119121 {
120122 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
121− "7a0be680c2c89cda208fb5890e64867f3787491e", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1
123+ "7a0be680c2c89cda208fb5890e64867f3787491e", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false
124+ },
125+ //for different strategy
126+ {
127+ "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
128+ "868f327765dc8e705ad6a9a942bfc7e32c03c791", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, true, true
122129 },
123130 };
124131

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