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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 static void ARGBTestRotate(int src_width, int src_height, | 87 static void ARGBTestRotate(int src_width, int src_height, |
88 int dst_width, int dst_height, | 88 int dst_width, int dst_height, |
89 libyuv::RotationMode mode, | 89 libyuv::RotationMode mode, |
90 int benchmark_iterations, int disable_cpu_flags) { | 90 int benchmark_iterations, int disable_cpu_flags) { |
91 TestRotateBpp(src_width, src_height, | 91 TestRotateBpp(src_width, src_height, |
92 dst_width, dst_height, | 92 dst_width, dst_height, |
93 mode, benchmark_iterations, disable_cpu_flags, 4); | 93 mode, benchmark_iterations, disable_cpu_flags, 4); |
94 } | 94 } |
95 | 95 |
96 TEST_F(libyuvTest, ARGBRotate0) { | 96 TEST_F(LibYUVRotateTest, ARGBRotate0) { |
97 ARGBTestRotate(benchmark_width_, benchmark_height_, | 97 ARGBTestRotate(benchmark_width_, benchmark_height_, |
98 benchmark_width_, benchmark_height_, | 98 benchmark_width_, benchmark_height_, |
99 kRotate0, benchmark_iterations_, disable_cpu_flags_); | 99 kRotate0, benchmark_iterations_, disable_cpu_flags_); |
100 } | 100 } |
101 | 101 |
102 TEST_F(libyuvTest, ARGBRotate90) { | 102 TEST_F(LibYUVRotateTest, ARGBRotate90) { |
103 ARGBTestRotate(benchmark_width_, benchmark_height_, | 103 ARGBTestRotate(benchmark_width_, benchmark_height_, |
104 benchmark_height_, benchmark_width_, | 104 benchmark_height_, benchmark_width_, |
105 kRotate90, benchmark_iterations_, disable_cpu_flags_); | 105 kRotate90, benchmark_iterations_, disable_cpu_flags_); |
106 } | 106 } |
107 | 107 |
108 TEST_F(libyuvTest, ARGBRotate180) { | 108 TEST_F(LibYUVRotateTest, ARGBRotate180) { |
109 ARGBTestRotate(benchmark_width_, benchmark_height_, | 109 ARGBTestRotate(benchmark_width_, benchmark_height_, |
110 benchmark_width_, benchmark_height_, | 110 benchmark_width_, benchmark_height_, |
111 kRotate180, benchmark_iterations_, disable_cpu_flags_); | 111 kRotate180, benchmark_iterations_, disable_cpu_flags_); |
112 } | 112 } |
113 | 113 |
114 TEST_F(libyuvTest, ARGBRotate270) { | 114 TEST_F(LibYUVRotateTest, ARGBRotate270) { |
115 ARGBTestRotate(benchmark_width_, benchmark_height_, | 115 ARGBTestRotate(benchmark_width_, benchmark_height_, |
116 benchmark_height_, benchmark_width_, | 116 benchmark_height_, benchmark_width_, |
117 kRotate270, benchmark_iterations_, disable_cpu_flags_); | 117 kRotate270, benchmark_iterations_, disable_cpu_flags_); |
118 } | 118 } |
119 | 119 |
120 TEST_F(libyuvTest, ARGBRotate0_Odd) { | 120 TEST_F(LibYUVRotateTest, ARGBRotate0_Odd) { |
121 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | 121 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, |
122 benchmark_width_ - 3, benchmark_height_ - 1, | 122 benchmark_width_ - 3, benchmark_height_ - 1, |
123 kRotate0, benchmark_iterations_, disable_cpu_flags_); | 123 kRotate0, benchmark_iterations_, disable_cpu_flags_); |
124 } | 124 } |
125 | 125 |
126 TEST_F(libyuvTest, ARGBRotate90_Odd) { | 126 TEST_F(LibYUVRotateTest, ARGBRotate90_Odd) { |
127 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | 127 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, |
128 benchmark_height_ - 1, benchmark_width_ - 3, | 128 benchmark_height_ - 1, benchmark_width_ - 3, |
129 kRotate90, benchmark_iterations_, disable_cpu_flags_); | 129 kRotate90, benchmark_iterations_, disable_cpu_flags_); |
130 } | 130 } |
131 | 131 |
132 TEST_F(libyuvTest, ARGBRotate180_Odd) { | 132 TEST_F(LibYUVRotateTest, ARGBRotate180_Odd) { |
133 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | 133 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, |
134 benchmark_width_ - 3, benchmark_height_ - 1, | 134 benchmark_width_ - 3, benchmark_height_ - 1, |
135 kRotate180, benchmark_iterations_, disable_cpu_flags_); | 135 kRotate180, benchmark_iterations_, disable_cpu_flags_); |
136 } | 136 } |
137 | 137 |
138 TEST_F(libyuvTest, ARGBRotate270_Odd) { | 138 TEST_F(LibYUVRotateTest, ARGBRotate270_Odd) { |
139 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, | 139 ARGBTestRotate(benchmark_width_ - 3, benchmark_height_ - 1, |
140 benchmark_height_ - 1, benchmark_width_ - 3, | 140 benchmark_height_ - 1, benchmark_width_ - 3, |
141 kRotate270, benchmark_iterations_, disable_cpu_flags_); | 141 kRotate270, benchmark_iterations_, disable_cpu_flags_); |
142 } | 142 } |
143 | 143 |
144 static void TestRotatePlane(int src_width, int src_height, | 144 static void TestRotatePlane(int src_width, int src_height, |
145 int dst_width, int dst_height, | 145 int dst_width, int dst_height, |
146 libyuv::RotationMode mode, | 146 libyuv::RotationMode mode, |
147 int benchmark_iterations, int disable_cpu_flags) { | 147 int benchmark_iterations, int disable_cpu_flags) { |
148 TestRotateBpp(src_width, src_height, | 148 TestRotateBpp(src_width, src_height, |
149 dst_width, dst_height, | 149 dst_width, dst_height, |
150 mode, benchmark_iterations, disable_cpu_flags, 1); | 150 mode, benchmark_iterations, disable_cpu_flags, 1); |
151 } | 151 } |
152 | 152 |
153 TEST_F(libyuvTest, RotatePlane0) { | 153 TEST_F(LibYUVRotateTest, RotatePlane0) { |
154 TestRotatePlane(benchmark_width_, benchmark_height_, | 154 TestRotatePlane(benchmark_width_, benchmark_height_, |
155 benchmark_width_, benchmark_height_, | 155 benchmark_width_, benchmark_height_, |
156 kRotate0, benchmark_iterations_, disable_cpu_flags_); | 156 kRotate0, benchmark_iterations_, disable_cpu_flags_); |
157 } | 157 } |
158 | 158 |
159 TEST_F(libyuvTest, RotatePlane90) { | 159 TEST_F(LibYUVRotateTest, RotatePlane90) { |
160 TestRotatePlane(benchmark_width_, benchmark_height_, | 160 TestRotatePlane(benchmark_width_, benchmark_height_, |
161 benchmark_height_, benchmark_width_, | 161 benchmark_height_, benchmark_width_, |
162 kRotate90, benchmark_iterations_, disable_cpu_flags_); | 162 kRotate90, benchmark_iterations_, disable_cpu_flags_); |
163 } | 163 } |
164 | 164 |
165 TEST_F(libyuvTest, RotatePlane180) { | 165 TEST_F(LibYUVRotateTest, RotatePlane180) { |
166 TestRotatePlane(benchmark_width_, benchmark_height_, | 166 TestRotatePlane(benchmark_width_, benchmark_height_, |
167 benchmark_width_, benchmark_height_, | 167 benchmark_width_, benchmark_height_, |
168 kRotate180, benchmark_iterations_, disable_cpu_flags_); | 168 kRotate180, benchmark_iterations_, disable_cpu_flags_); |
169 } | 169 } |
170 | 170 |
171 TEST_F(libyuvTest, RotatePlane270) { | 171 TEST_F(LibYUVRotateTest, RotatePlane270) { |
172 TestRotatePlane(benchmark_width_, benchmark_height_, | 172 TestRotatePlane(benchmark_width_, benchmark_height_, |
173 benchmark_height_, benchmark_width_, | 173 benchmark_height_, benchmark_width_, |
174 kRotate270, benchmark_iterations_, disable_cpu_flags_); | 174 kRotate270, benchmark_iterations_, disable_cpu_flags_); |
175 } | 175 } |
176 | 176 |
177 TEST_F(libyuvTest, RotatePlane0_Odd) { | 177 TEST_F(LibYUVRotateTest, RotatePlane0_Odd) { |
178 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 178 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
179 benchmark_width_ - 3, benchmark_height_ - 1, | 179 benchmark_width_ - 3, benchmark_height_ - 1, |
180 kRotate0, benchmark_iterations_, disable_cpu_flags_); | 180 kRotate0, benchmark_iterations_, disable_cpu_flags_); |
181 } | 181 } |
182 | 182 |
183 TEST_F(libyuvTest, RotatePlane90_Odd) { | 183 TEST_F(LibYUVRotateTest, RotatePlane90_Odd) { |
184 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 184 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
185 benchmark_height_ - 1, benchmark_width_ - 3, | 185 benchmark_height_ - 1, benchmark_width_ - 3, |
186 kRotate90, benchmark_iterations_, disable_cpu_flags_); | 186 kRotate90, benchmark_iterations_, disable_cpu_flags_); |
187 } | 187 } |
188 | 188 |
189 TEST_F(libyuvTest, RotatePlane180_Odd) { | 189 TEST_F(LibYUVRotateTest, RotatePlane180_Odd) { |
190 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 190 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
191 benchmark_width_ - 3, benchmark_height_ - 1, | 191 benchmark_width_ - 3, benchmark_height_ - 1, |
192 kRotate180, benchmark_iterations_, disable_cpu_flags_); | 192 kRotate180, benchmark_iterations_, disable_cpu_flags_); |
193 } | 193 } |
194 | 194 |
195 TEST_F(libyuvTest, RotatePlane270_Odd) { | 195 TEST_F(LibYUVRotateTest, RotatePlane270_Odd) { |
196 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, | 196 TestRotatePlane(benchmark_width_ - 3, benchmark_height_ - 1, |
197 benchmark_height_ - 1, benchmark_width_ - 3, | 197 benchmark_height_ - 1, benchmark_width_ - 3, |
198 kRotate270, benchmark_iterations_, disable_cpu_flags_); | 198 kRotate270, benchmark_iterations_, disable_cpu_flags_); |
199 } | 199 } |
200 | 200 |
201 } // namespace libyuv | 201 } // namespace libyuv |
OLD | NEW |