OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 }; | 146 }; |
147 | 147 |
148 for (int i = 0; i < static_cast<int>(sizeof(files) / sizeof(files[0])); ++i) { | 148 for (int i = 0; i < static_cast<int>(sizeof(files) / sizeof(files[0])); ++i) { |
149 for (int t = 2; t <= 8; ++t) { | 149 for (int t = 2; t <= 8; ++t) { |
150 EXPECT_STREQ(files[i].expected_md5, DecodeFile(files[i].name, t).c_str()) | 150 EXPECT_STREQ(files[i].expected_md5, DecodeFile(files[i].name, t).c_str()) |
151 << "threads = " << t; | 151 << "threads = " << t; |
152 } | 152 } |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
| 156 // Test tile quantity changes within one file. |
| 157 TEST(VP9DecodeMTTest, MTDecode3) { |
| 158 static const struct { |
| 159 const char *name; |
| 160 const char *expected_md5; |
| 161 } files[] = { |
| 162 { "vp90-2-14-resize-fp-tiles-1-16.webm", |
| 163 "0cd5e632c326297e975f38949c31ea94" }, |
| 164 { "vp90-2-14-resize-fp-tiles-1-2-4-8-16.webm", |
| 165 "5c78a96a42e7f4a4f6b2edcdb791e44c" }, |
| 166 { "vp90-2-14-resize-fp-tiles-1-2.webm", |
| 167 "e030450ae85c3277be2a418769df98e2" }, |
| 168 { "vp90-2-14-resize-fp-tiles-1-4.webm", |
| 169 "312eed4e2b64eb7a4e7f18916606a430" }, |
| 170 { "vp90-2-14-resize-fp-tiles-16-1.webm", |
| 171 "1755c16d8af16a9cb3fe7338d90abe52" }, |
| 172 { "vp90-2-14-resize-fp-tiles-16-2.webm", |
| 173 "500300592d3fcb6f12fab25e48aaf4df" }, |
| 174 { "vp90-2-14-resize-fp-tiles-16-4.webm", |
| 175 "47c48379fa6331215d91c67648e1af6e" }, |
| 176 { "vp90-2-14-resize-fp-tiles-16-8-4-2-1.webm", |
| 177 "eecf17290739bc708506fa4827665989" }, |
| 178 { "vp90-2-14-resize-fp-tiles-16-8.webm", |
| 179 "29b6bb54e4c26b5ca85d5de5fed94e76" }, |
| 180 { "vp90-2-14-resize-fp-tiles-1-8.webm", |
| 181 "1b6f175e08cd82cf84bb800ac6d1caa3" }, |
| 182 { "vp90-2-14-resize-fp-tiles-2-16.webm", |
| 183 "ca3b03e4197995d8d5444ede7a6c0804" }, |
| 184 { "vp90-2-14-resize-fp-tiles-2-1.webm", |
| 185 "99aec065369d70bbb78ccdff65afed3f" }, |
| 186 { "vp90-2-14-resize-fp-tiles-2-4.webm", |
| 187 "22d0ebdb49b87d2920a85aea32e1afd5" }, |
| 188 { "vp90-2-14-resize-fp-tiles-2-8.webm", |
| 189 "c2115cf051c62e0f7db1d4a783831541" }, |
| 190 { "vp90-2-14-resize-fp-tiles-4-16.webm", |
| 191 "c690d7e1719b31367564cac0af0939cb" }, |
| 192 { "vp90-2-14-resize-fp-tiles-4-1.webm", |
| 193 "a926020b2cc3e15ad4cc271853a0ff26" }, |
| 194 { "vp90-2-14-resize-fp-tiles-4-2.webm", |
| 195 "42699063d9e581f1993d0cf890c2be78" }, |
| 196 { "vp90-2-14-resize-fp-tiles-4-8.webm", |
| 197 "7f76d96036382f45121e3d5aa6f8ec52" }, |
| 198 { "vp90-2-14-resize-fp-tiles-8-16.webm", |
| 199 "76a43fcdd7e658542913ea43216ec55d" }, |
| 200 { "vp90-2-14-resize-fp-tiles-8-1.webm", |
| 201 "8e3fbe89486ca60a59299dea9da91378" }, |
| 202 { "vp90-2-14-resize-fp-tiles-8-2.webm", |
| 203 "ae96f21f21b6370cc0125621b441fc52" }, |
| 204 { "vp90-2-14-resize-fp-tiles-8-4.webm", |
| 205 "3eb4f24f10640d42218f7fd7b9fd30d4" }, |
| 206 }; |
| 207 |
| 208 for (int i = 0; i < static_cast<int>(sizeof(files) / sizeof(files[0])); ++i) { |
| 209 for (int t = 2; t <= 8; ++t) { |
| 210 EXPECT_STREQ(files[i].expected_md5, DecodeFile(files[i].name, t).c_str()) |
| 211 << "threads = " << t; |
| 212 } |
| 213 } |
| 214 } |
| 215 |
156 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool()); | 216 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool()); |
157 | 217 |
158 } // namespace | 218 } // namespace |
OLD | NEW |