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
35 SliceModeEnum slices;35 SliceModeEnum slices;
36 bool denoise;36 bool denoise;
37 int layers;37 int layers;
38 bool isLossless;
39 bool enableLtr;
38};40};
39 41
40class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>,42class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>,
@@ -59,9 +61,9 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 18 unmodified lines
59 EncodeFileParam p = GetParam();61 EncodeFileParam p = GetParam();
60#if defined(ANDROID_NDK)62#if defined(ANDROID_NDK)
61 std::string filename = std::string ("/sdcard/") + p.fileName;63 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);
63#else65#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);
65#endif67#endif
66 //will remove this after screen content algorithms are ready,68 //will remove this after screen content algorithms are ready,
67 //because the bitstream output will vary when the different algorithms are added.69 //because the bitstream output will vary when the different algorithms are added.
@@ -74,51 +76,56 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 6 unmodified lines
74static const EncodeFileParam kFileParamArray[] = {76static const EncodeFileParam kFileParamArray[] = {
75 {77 {
76 "res/CiscoVT2people_320x192_12fps.yuv",78 "res/CiscoVT2people_320x192_12fps.yuv",
77 "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 179 "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false
78 },80 },
79 {81 {
80 "res/CiscoVT2people_160x96_6fps.yuv",82 "res/CiscoVT2people_160x96_6fps.yuv",
81 "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 183 "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
82 },84 },
83 {85 {
84 "res/Static_152_100.yuv",86 "res/Static_152_100.yuv",
85 "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 187 "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
86 },88 },
87 {89 {
88 "res/CiscoVT2people_320x192_12fps.yuv",90 "res/CiscoVT2people_320x192_12fps.yuv",
89 "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1 // One slice per MB row91 "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false // One slice per MB row
90 },92 },
91 {93 {
92 "res/CiscoVT2people_320x192_12fps.yuv",94 "res/CiscoVT2people_320x192_12fps.yuv",
93 "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 195 "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false
94 },96 },
95 {97 {
96 "res/CiscoVT2people_320x192_12fps.yuv",98 "res/CiscoVT2people_320x192_12fps.yuv",
97 "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 299 "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false
98 },100 },
99 {101 {
100 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",102 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
101 "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1103 "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false
102 },104 },
103 {105 {
104 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",106 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
105 "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4107 "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false
106 },108 },
107 {109 {
108 "res/CiscoVT2people_320x192_12fps.yuv",110 "res/CiscoVT2people_320x192_12fps.yuv",
109 "030d0e2d742ac039c2ab6333fe7cb18623c0d283", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1111 "030d0e2d742ac039c2ab6333fe7cb18623c0d283", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false
110 },112 },
111 {113 {
112 "res/CiscoVT2people_160x96_6fps.yuv",114 "res/CiscoVT2people_160x96_6fps.yuv",
113 "40aa19d4b2684a59e689860d2a793876f33904f7", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1115 "40aa19d4b2684a59e689860d2a793876f33904f7", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
114 },116 },
115 {117 {
116 "res/Static_152_100.yuv",118 "res/Static_152_100.yuv",
117 "494068b59aa9ed9118a9f33174b732024effc870", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1119 "494068b59aa9ed9118a9f33174b732024effc870", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false
118 },120 },
119 {121 {
120 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",122 "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
121 "7a0be680c2c89cda208fb5890e64867f3787491e", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1123 "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
122 },129 },
123};130};
124 131

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