OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2012 The LibYuv 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 libyuv::RotationMode mode, | 91 libyuv::RotationMode mode, |
92 int benchmark_iterations, | 92 int benchmark_iterations, |
93 int disable_cpu_flags, | 93 int disable_cpu_flags, |
94 int benchmark_cpu_info) { | 94 int benchmark_cpu_info) { |
95 TestRotateBpp(src_width, src_height, | 95 TestRotateBpp(src_width, src_height, |
96 dst_width, dst_height, | 96 dst_width, dst_height, |
97 mode, benchmark_iterations, | 97 mode, benchmark_iterations, |
98 disable_cpu_flags, benchmark_cpu_info, 4); | 98 disable_cpu_flags, benchmark_cpu_info, 4); |
99 } | 99 } |
100 | 100 |
101 TEST_F(LibYUVRotateTest, ARGBRotate0) { | 101 TEST_F(LibYUVRotateTest, ARGBRotate0_Opt) { |
102 ARGBTestRotate(benchmark_width_, benchmark_height_, | 102 ARGBTestRotate(benchmark_width_, benchmark_height_, |
103 benchmark_width_, benchmark_height_, | 103 benchmark_width_, benchmark_height_, |
104 kRotate0, benchmark_iterations_, | 104 kRotate0, benchmark_iterations_, |
105 disable_cpu_flags_, benchmark_cpu_info_); | 105 disable_cpu_flags_, benchmark_cpu_info_); |
106 } | 106 } |
107 | 107 |
108 TEST_F(LibYUVRotateTest, ARGBRotate90) { | 108 TEST_F(LibYUVRotateTest, ARGBRotate90_Opt) { |
109 ARGBTestRotate(benchmark_width_, benchmark_height_, | 109 ARGBTestRotate(benchmark_width_, benchmark_height_, |
110 benchmark_height_, benchmark_width_, | 110 benchmark_height_, benchmark_width_, |
111 kRotate90, benchmark_iterations_, | 111 kRotate90, benchmark_iterations_, |
112 disable_cpu_flags_, benchmark_cpu_info_); | 112 disable_cpu_flags_, benchmark_cpu_info_); |
113 } | 113 } |
114 | 114 |
115 TEST_F(LibYUVRotateTest, ARGBRotate180) { | 115 TEST_F(LibYUVRotateTest, ARGBRotate180_Opt) { |
116 ARGBTestRotate(benchmark_width_, benchmark_height_, | 116 ARGBTestRotate(benchmark_width_, benchmark_height_, |
117 benchmark_width_, benchmark_height_, | 117 benchmark_width_, benchmark_height_, |
118 kRotate180, benchmark_iterations_, | 118 kRotate180, benchmark_iterations_, |
119 disable_cpu_flags_, benchmark_cpu_info_); | 119 disable_cpu_flags_, benchmark_cpu_info_); |
120 } | 120 } |
121 | 121 |
122 TEST_F(LibYUVRotateTest, ARGBRotate270) { | 122 TEST_F(LibYUVRotateTest, ARGBRotate270_Opt) { |
123 ARGBTestRotate(benchmark_width_, benchmark_height_, | 123 ARGBTestRotate(benchmark_width_, benchmark_height_, |
124 benchmark_height_, benchmark_width_, | 124 benchmark_height_, benchmark_width_, |
125 kRotate270, benchmark_iterations_, | 125 kRotate270, benchmark_iterations_, |
126 disable_cpu_flags_, benchmark_cpu_info_); | 126 disable_cpu_flags_, benchmark_cpu_info_); |
127 } | 127 } |
128 | 128 |
129 TEST_F(LibYUVRotateTest, ARGBRotate0_Odd) { | |
130 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | |
131 benchmark_width_ - 3, benchmark_height_ - 1, | |
132 kRotate0, benchmark_iterations_, | |
133 disable_cpu_flags_, benchmark_cpu_info_); | |
134 } | |
135 | |
136 TEST_F(LibYUVRotateTest, ARGBRotate90_Odd) { | |
137 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | |
138 benchmark_height_ - 1, benchmark_width_ - 3, | |
139 kRotate90, benchmark_iterations_, | |
140 disable_cpu_flags_, benchmark_cpu_info_); | |
141 } | |
142 | |
143 TEST_F(LibYUVRotateTest, ARGBRotate180_Odd) { | |
144 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | |
145 benchmark_width_ - 3, benchmark_height_ - 1, | |
146 kRotate180, benchmark_iterations_, | |
147 disable_cpu_flags_, benchmark_cpu_info_); | |
148 } | |
149 | |
150 TEST_F(LibYUVRotateTest, ARGBRotate270_Odd) { | |
151 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | |
152 benchmark_height_ - 1, benchmark_width_ - 3, | |
153 kRotate270, benchmark_iterations_, | |
154 disable_cpu_flags_, benchmark_cpu_info_); | |
155 } | |
156 | |
157 static void TestRotatePlane(int src_width, int src_height, | 129 static void TestRotatePlane(int src_width, int src_height, |
158 int dst_width, int dst_height, | 130 int dst_width, int dst_height, |
159 libyuv::RotationMode mode, | 131 libyuv::RotationMode mode, |
160 int benchmark_iterations, | 132 int benchmark_iterations, |
161 int disable_cpu_flags, | 133 int disable_cpu_flags, |
162 int benchmark_cpu_info) { | 134 int benchmark_cpu_info) { |
163 TestRotateBpp(src_width, src_height, | 135 TestRotateBpp(src_width, src_height, |
164 dst_width, dst_height, | 136 dst_width, dst_height, |
165 mode, benchmark_iterations, | 137 mode, benchmark_iterations, |
166 disable_cpu_flags, benchmark_cpu_info, 1); | 138 disable_cpu_flags, benchmark_cpu_info, 1); |
167 } | 139 } |
168 | 140 |
169 TEST_F(LibYUVRotateTest, RotatePlane0) { | 141 TEST_F(LibYUVRotateTest, RotatePlane0_Opt) { |
170 TestRotatePlane(benchmark_width_, benchmark_height_, | 142 TestRotatePlane(benchmark_width_, benchmark_height_, |
171 benchmark_width_, benchmark_height_, | 143 benchmark_width_, benchmark_height_, |
172 kRotate0, benchmark_iterations_, | 144 kRotate0, benchmark_iterations_, |
173 disable_cpu_flags_, benchmark_cpu_info_); | 145 disable_cpu_flags_, benchmark_cpu_info_); |
174 } | 146 } |
175 | 147 |
176 TEST_F(LibYUVRotateTest, RotatePlane90) { | 148 TEST_F(LibYUVRotateTest, RotatePlane90_Opt) { |
177 TestRotatePlane(benchmark_width_, benchmark_height_, | 149 TestRotatePlane(benchmark_width_, benchmark_height_, |
178 benchmark_height_, benchmark_width_, | 150 benchmark_height_, benchmark_width_, |
179 kRotate90, benchmark_iterations_, | 151 kRotate90, benchmark_iterations_, |
180 disable_cpu_flags_, benchmark_cpu_info_); | 152 disable_cpu_flags_, benchmark_cpu_info_); |
181 } | 153 } |
182 | 154 |
183 TEST_F(LibYUVRotateTest, RotatePlane180) { | 155 TEST_F(LibYUVRotateTest, RotatePlane180_Opt) { |
184 TestRotatePlane(benchmark_width_, benchmark_height_, | 156 TestRotatePlane(benchmark_width_, benchmark_height_, |
185 benchmark_width_, benchmark_height_, | 157 benchmark_width_, benchmark_height_, |
186 kRotate180, benchmark_iterations_, | 158 kRotate180, benchmark_iterations_, |
187 disable_cpu_flags_, benchmark_cpu_info_); | 159 disable_cpu_flags_, benchmark_cpu_info_); |
188 } | 160 } |
189 | 161 |
190 TEST_F(LibYUVRotateTest, RotatePlane270) { | 162 TEST_F(LibYUVRotateTest, RotatePlane270_Opt) { |
191 TestRotatePlane(benchmark_width_, benchmark_height_, | 163 TestRotatePlane(benchmark_width_, benchmark_height_, |
192 benchmark_height_, benchmark_width_, | 164 benchmark_height_, benchmark_width_, |
193 kRotate270, benchmark_iterations_, | 165 kRotate270, benchmark_iterations_, |
194 disable_cpu_flags_, benchmark_cpu_info_); | 166 disable_cpu_flags_, benchmark_cpu_info_); |
195 } | 167 } |
196 | 168 |
197 TEST_F(LibYUVRotateTest, RotatePlane0_Odd) { | 169 TEST_F(LibYUVRotateTest, DISABLED_RotatePlane0_Odd) { |
198 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 170 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
199 benchmark_width_ - 3, benchmark_height_ - 1, | 171 benchmark_width_ - 3, benchmark_height_ - 1, |
200 kRotate0, benchmark_iterations_, | 172 kRotate0, benchmark_iterations_, |
201 disable_cpu_flags_, benchmark_cpu_info_); | 173 disable_cpu_flags_, benchmark_cpu_info_); |
202 } | 174 } |
203 | 175 |
204 TEST_F(LibYUVRotateTest, RotatePlane90_Odd) { | 176 TEST_F(LibYUVRotateTest, DISABLED_RotatePlane90_Odd) { |
205 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 177 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
206 benchmark_height_ - 1, benchmark_width_ - 3, | 178 benchmark_height_ - 1, benchmark_width_ - 3, |
207 kRotate90, benchmark_iterations_, | 179 kRotate90, benchmark_iterations_, |
208 disable_cpu_flags_, benchmark_cpu_info_); | 180 disable_cpu_flags_, benchmark_cpu_info_); |
209 } | 181 } |
210 | 182 |
211 TEST_F(LibYUVRotateTest, RotatePlane180_Odd) { | 183 TEST_F(LibYUVRotateTest, DISABLED_RotatePlane180_Odd) { |
212 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 184 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
213 benchmark_width_ - 3, benchmark_height_ - 1, | 185 benchmark_width_ - 3, benchmark_height_ - 1, |
214 kRotate180, benchmark_iterations_, | 186 kRotate180, benchmark_iterations_, |
215 disable_cpu_flags_, benchmark_cpu_info_); | 187 disable_cpu_flags_, benchmark_cpu_info_); |
216 } | 188 } |
217 | 189 |
218 TEST_F(LibYUVRotateTest, RotatePlane270_Odd) { | 190 TEST_F(LibYUVRotateTest, DISABLED_RotatePlane270_Odd) { |
219 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 191 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
220 benchmark_height_ - 1, benchmark_width_ - 3, | 192 benchmark_height_ - 1, benchmark_width_ - 3, |
221 kRotate270, benchmark_iterations_, | 193 kRotate270, benchmark_iterations_, |
222 disable_cpu_flags_, benchmark_cpu_info_); | 194 disable_cpu_flags_, benchmark_cpu_info_); |
223 } | 195 } |
224 | 196 |
225 } // namespace libyuv | 197 } // namespace libyuv |
OLD | NEW |