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 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 | 23 |
24 #define VIDEO_NAME 0 | 24 #define VIDEO_NAME 0 |
25 #define THREADS 1 | 25 #define THREADS 1 |
26 | 26 |
27 const double kUsecsInSec = 1000000.0; | 27 const double kUsecsInSec = 1000000.0; |
28 | 28 |
29 /* | 29 /* |
30 DecodePerfTest takes a tuple of filename + number of threads to decode with | 30 DecodePerfTest takes a tuple of filename + number of threads to decode with |
31 */ | 31 */ |
32 typedef std::tr1::tuple<const char *, unsigned> decode_perf_param_t; | 32 typedef std::tr1::tuple<const char *, unsigned> DecodePerfParam; |
33 | 33 |
34 const decode_perf_param_t kVP9DecodePerfVectors[] = { | 34 const DecodePerfParam kVP9DecodePerfVectors[] = { |
35 make_tuple("vp90-2-bbb_426x240_tile_1x1_180kbps.webm", 1), | 35 make_tuple("vp90-2-bbb_426x240_tile_1x1_180kbps.webm", 1), |
36 make_tuple("vp90-2-bbb_640x360_tile_1x2_337kbps.webm", 2), | 36 make_tuple("vp90-2-bbb_640x360_tile_1x2_337kbps.webm", 2), |
37 make_tuple("vp90-2-bbb_854x480_tile_1x2_651kbps.webm", 2), | 37 make_tuple("vp90-2-bbb_854x480_tile_1x2_651kbps.webm", 2), |
38 make_tuple("vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm", 4), | 38 make_tuple("vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm", 4), |
39 make_tuple("vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm", 1), | 39 make_tuple("vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm", 1), |
40 make_tuple("vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm", 4), | 40 make_tuple("vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm", 4), |
41 make_tuple("vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm", 4), | 41 make_tuple("vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm", 4), |
42 make_tuple("vp90-2-sintel_426x182_tile_1x1_171kbps.webm", 1), | 42 make_tuple("vp90-2-sintel_426x182_tile_1x1_171kbps.webm", 1), |
43 make_tuple("vp90-2-sintel_640x272_tile_1x2_318kbps.webm", 2), | 43 make_tuple("vp90-2-sintel_640x272_tile_1x2_318kbps.webm", 2), |
44 make_tuple("vp90-2-sintel_854x364_tile_1x2_621kbps.webm", 2), | 44 make_tuple("vp90-2-sintel_854x364_tile_1x2_621kbps.webm", 2), |
45 make_tuple("vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm", 4), | 45 make_tuple("vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm", 4), |
46 make_tuple("vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm", 4), | 46 make_tuple("vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm", 4), |
47 make_tuple("vp90-2-tos_426x178_tile_1x1_181kbps.webm", 1), | 47 make_tuple("vp90-2-tos_426x178_tile_1x1_181kbps.webm", 1), |
48 make_tuple("vp90-2-tos_640x266_tile_1x2_336kbps.webm", 2), | 48 make_tuple("vp90-2-tos_640x266_tile_1x2_336kbps.webm", 2), |
49 make_tuple("vp90-2-tos_854x356_tile_1x2_656kbps.webm", 2), | 49 make_tuple("vp90-2-tos_854x356_tile_1x2_656kbps.webm", 2), |
| 50 make_tuple("vp90-2-tos_854x356_tile_1x2_fpm_546kbps.webm", 2), |
50 make_tuple("vp90-2-tos_1280x534_tile_1x4_1306kbps.webm", 4), | 51 make_tuple("vp90-2-tos_1280x534_tile_1x4_1306kbps.webm", 4), |
| 52 make_tuple("vp90-2-tos_1280x534_tile_1x4_fpm_952kbps.webm", 4), |
51 make_tuple("vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm", 4), | 53 make_tuple("vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm", 4), |
52 }; | 54 }; |
53 | 55 |
54 /* | 56 /* |
55 In order to reflect real world performance as much as possible, Perf tests | 57 In order to reflect real world performance as much as possible, Perf tests |
56 *DO NOT* do any correctness checks. Please run them alongside correctness | 58 *DO NOT* do any correctness checks. Please run them alongside correctness |
57 tests to ensure proper codec integrity. Furthermore, in this test we | 59 tests to ensure proper codec integrity. Furthermore, in this test we |
58 deliberately limit the amount of system calls we make to avoid OS | 60 deliberately limit the amount of system calls we make to avoid OS |
59 preemption. | 61 preemption. |
60 | 62 |
61 TODO(joshualitt) create a more detailed perf measurement test to collect | 63 TODO(joshualitt) create a more detailed perf measurement test to collect |
62 power/temp/min max frame decode times/etc | 64 power/temp/min max frame decode times/etc |
63 */ | 65 */ |
64 | 66 |
65 class DecodePerfTest : public ::testing::TestWithParam<decode_perf_param_t> { | 67 class DecodePerfTest : public ::testing::TestWithParam<DecodePerfParam> { |
66 }; | 68 }; |
67 | 69 |
68 TEST_P(DecodePerfTest, PerfTest) { | 70 TEST_P(DecodePerfTest, PerfTest) { |
69 const char *const video_name = GET_PARAM(VIDEO_NAME); | 71 const char *const video_name = GET_PARAM(VIDEO_NAME); |
70 const unsigned threads = GET_PARAM(THREADS); | 72 const unsigned threads = GET_PARAM(THREADS); |
71 | 73 |
72 libvpx_test::WebMVideoSource video(video_name); | 74 libvpx_test::WebMVideoSource video(video_name); |
73 video.Init(); | 75 video.Init(); |
74 | 76 |
75 vpx_codec_dec_cfg_t cfg = {0}; | 77 vpx_codec_dec_cfg_t cfg = {0}; |
(...skipping 20 matching lines...) Expand all Loading... |
96 printf("\t\"decodeTimeSecs\" : %f,\n", elapsed_secs); | 98 printf("\t\"decodeTimeSecs\" : %f,\n", elapsed_secs); |
97 printf("\t\"totalFrames\" : %u,\n", frames); | 99 printf("\t\"totalFrames\" : %u,\n", frames); |
98 printf("\t\"framesPerSecond\" : %f\n", fps); | 100 printf("\t\"framesPerSecond\" : %f\n", fps); |
99 printf("}\n"); | 101 printf("}\n"); |
100 } | 102 } |
101 | 103 |
102 INSTANTIATE_TEST_CASE_P(VP9, DecodePerfTest, | 104 INSTANTIATE_TEST_CASE_P(VP9, DecodePerfTest, |
103 ::testing::ValuesIn(kVP9DecodePerfVectors)); | 105 ::testing::ValuesIn(kVP9DecodePerfVectors)); |
104 | 106 |
105 } // namespace | 107 } // namespace |
OLD | NEW |