Showing the changes to test/api/encoder_test.cpp (1 of 38 files). Show all
Unified · Split
| @@ -37,6 +37,7 @@ struct EncodeFileParam { · 36 unmodified lines | |||
| 37 | int layers; | 37 | int layers; |
| 38 | bool isLossless; | 38 | bool isLossless; |
| 39 | bool enableLtr; | 39 | bool enableLtr; |
| 40 | bool cabac; | ||
| 40 | }; | 41 | }; |
| 41 | 42 | ||
| 42 | class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>, | 43 | class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>, |
| @@ -62,10 +63,10 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 19 unmodified lines | |||
| 62 | #if defined(ANDROID_NDK) | 63 | #if defined(ANDROID_NDK) |
| 63 | std::string filename = std::string ("/sdcard/") + p.fileName; | 64 | std::string filename = std::string ("/sdcard/") + p.fileName; |
| 64 | EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, | 65 | EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, |
| 65 | p.enableLtr, this); | 66 | p.enableLtr,p.cabac, this); |
| 66 | #else | 67 | #else |
| 67 | EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, | 68 | EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, |
| 68 | p.enableLtr, this); | 69 | p.enableLtr, p.cabac, this); |
| 69 | #endif | 70 | #endif |
| 70 | //will remove this after screen content algorithms are ready, | 71 | //will remove this after screen content algorithms are ready, |
| 71 | //because the bitstream output will vary when the different algorithms are added. | 72 | //because the bitstream output will vary when the different algorithms are added. |
| @@ -78,57 +79,65 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 6 unmodified lines | |||
| 78 | static const EncodeFileParam kFileParamArray[] = { | 79 | static const EncodeFileParam kFileParamArray[] = { |
| 79 | { | 80 | { |
| 80 | "res/CiscoVT2people_320x192_12fps.yuv", | 81 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 81 | "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false | 82 | "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 82 | }, | 83 | }, |
| 83 | { | 84 | { |
| 84 | "res/CiscoVT2people_160x96_6fps.yuv", | 85 | "res/CiscoVT2people_160x96_6fps.yuv", |
| 85 | "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 86 | "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 86 | }, | 87 | }, |
| 87 | { | 88 | { |
| 88 | "res/Static_152_100.yuv", | 89 | "res/Static_152_100.yuv", |
| 89 | "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 90 | "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 90 | }, | 91 | }, |
| 91 | { | 92 | { |
| 92 | "res/CiscoVT2people_320x192_12fps.yuv", | 93 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 93 | "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false // One slice per MB row | 94 | "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false, false // One slice per MB row |
| 94 | }, | 95 | }, |
| 95 | { | 96 | { |
| 96 | "res/CiscoVT2people_320x192_12fps.yuv", | 97 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 97 | "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false | 98 | "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false, false |
| 98 | }, | 99 | }, |
| 99 | { | 100 | { |
| 100 | "res/CiscoVT2people_320x192_12fps.yuv", | 101 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 101 | "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false | 102 | "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false, false |
| 102 | }, | 103 | }, |
| 103 | { | 104 | { |
| 104 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 105 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 105 | "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false | 106 | "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, false |
| 106 | }, | 107 | }, |
| 107 | { | 108 | { |
| 108 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 109 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 109 | "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false | 110 | "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false, false |
| 110 | }, | 111 | }, |
| 111 | // the following values may be adjusted for times since we start tuning the strategy | 112 | // the following values may be adjusted for times since we start tuning the strategy |
| 112 | { | 113 | { |
| 113 | "res/CiscoVT2people_320x192_12fps.yuv", | 114 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 114 | "3ce65d9c326657b845cd00b22ce76128c29f8347", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false | 115 | "3ce65d9c326657b845cd00b22ce76128c29f8347", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 115 | }, | 116 | }, |
| 116 | { | 117 | { |
| 117 | "res/CiscoVT2people_160x96_6fps.yuv", | 118 | "res/CiscoVT2people_160x96_6fps.yuv", |
| 118 | "2b57e1cc7a4db6258116c302eada3bf870ee94a1", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 119 | "2b57e1cc7a4db6258116c302eada3bf870ee94a1", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 119 | }, | 120 | }, |
| 120 | { | 121 | { |
| 121 | "res/Static_152_100.yuv", | 122 | "res/Static_152_100.yuv", |
| 122 | "bad065da4564d0580a1722d91463fa0f9fd947c8", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 123 | "bad065da4564d0580a1722d91463fa0f9fd947c8", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 123 | }, | 124 | }, |
| 124 | { | 125 | { |
| 125 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 126 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 126 | "8ee6cd375b58e9877f6145fb72da844e65162b14", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false | 127 | "8ee6cd375b58e9877f6145fb72da844e65162b14", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, false |
| 127 | }, | 128 | }, |
| 128 | //for different strategy | 129 | //for different strategy |
| 129 | { | 130 | { |
| 130 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 131 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 131 | "868f327765dc8e705ad6a9a942bfc7e32c03c791", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, true, true | 132 | "868f327765dc8e705ad6a9a942bfc7e32c03c791", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, true, true, false |
| 133 | }, | ||
| 134 | { | ||
| 135 | "res/CiscoVT2people_320x192_12fps.yuv", | ||
| 136 | "fc6faa6409150cce304bcdefb486fee4b4a70e1d", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, true //turn on cabac | ||
| 137 | }, | ||
| 138 | { | ||
| 139 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | ||
| 140 | "7b166367ece61cf489c793872c40c37d4047b7aa", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, true | ||
| 132 | }, | 141 | }, |
| 133 | }; | 142 | }; |
| 134 | 143 | ||