OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if (mode == kTwoPassGood || mode == kTwoPassBest) | 107 if (mode == kTwoPassGood || mode == kTwoPassBest) |
108 passes_ = 2; | 108 passes_ = 2; |
109 else | 109 else |
110 passes_ = 1; | 110 passes_ = 1; |
111 } | 111 } |
112 // The function should return "true" most of the time, therefore no early | 112 // The function should return "true" most of the time, therefore no early |
113 // break-out is implemented within the match checking process. | 113 // break-out is implemented within the match checking process. |
114 static bool compare_img(const vpx_image_t *img1, | 114 static bool compare_img(const vpx_image_t *img1, |
115 const vpx_image_t *img2) { | 115 const vpx_image_t *img2) { |
116 bool match = (img1->fmt == img2->fmt) && | 116 bool match = (img1->fmt == img2->fmt) && |
| 117 (img1->cs == img2->cs) && |
117 (img1->d_w == img2->d_w) && | 118 (img1->d_w == img2->d_w) && |
118 (img1->d_h == img2->d_h); | 119 (img1->d_h == img2->d_h); |
119 | 120 |
120 const unsigned int width_y = img1->d_w; | 121 const unsigned int width_y = img1->d_w; |
121 const unsigned int height_y = img1->d_h; | 122 const unsigned int height_y = img1->d_h; |
122 unsigned int i; | 123 unsigned int i; |
123 for (i = 0; i < height_y; ++i) | 124 for (i = 0; i < height_y; ++i) |
124 match = (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y], | 125 match = (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y], |
125 img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y], | 126 img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y], |
126 width_y) == 0) && match; | 127 width_y) == 0) && match; |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 if (decoder) | 243 if (decoder) |
243 delete decoder; | 244 delete decoder; |
244 delete encoder; | 245 delete encoder; |
245 | 246 |
246 if (!Continue()) | 247 if (!Continue()) |
247 break; | 248 break; |
248 } | 249 } |
249 } | 250 } |
250 | 251 |
251 } // namespace libvpx_test | 252 } // namespace libvpx_test |
OLD | NEW |