| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 static void update_image_md5(const vpx_image_t *img, const int planes[3], | 271 static void update_image_md5(const vpx_image_t *img, const int planes[3], |
| 272 MD5Context *md5) { | 272 MD5Context *md5) { |
| 273 int i, y; | 273 int i, y; |
| 274 | 274 |
| 275 for (i = 0; i < 3; ++i) { | 275 for (i = 0; i < 3; ++i) { |
| 276 const int plane = planes[i]; | 276 const int plane = planes[i]; |
| 277 const unsigned char *buf = img->planes[plane]; | 277 const unsigned char *buf = img->planes[plane]; |
| 278 const int stride = img->stride[plane]; | 278 const int stride = img->stride[plane]; |
| 279 const int w = vpx_img_plane_width(img, plane); | 279 const int w = vpx_img_plane_width(img, plane) * |
| 280 ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); |
| 280 const int h = vpx_img_plane_height(img, plane); | 281 const int h = vpx_img_plane_height(img, plane); |
| 281 | 282 |
| 282 for (y = 0; y < h; ++y) { | 283 for (y = 0; y < h; ++y) { |
| 283 MD5Update(md5, buf, w); | 284 MD5Update(md5, buf, w); |
| 284 buf += stride; | 285 buf += stride; |
| 285 } | 286 } |
| 286 } | 287 } |
| 287 } | 288 } |
| 288 | 289 |
| 289 static void write_image_file(const vpx_image_t *img, const int planes[3], | 290 static void write_image_file(const vpx_image_t *img, const int planes[3], |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 if (arg_match(&arg, &looparg, argi)) { | 1128 if (arg_match(&arg, &looparg, argi)) { |
| 1128 loops = arg_parse_uint(&arg); | 1129 loops = arg_parse_uint(&arg); |
| 1129 break; | 1130 break; |
| 1130 } | 1131 } |
| 1131 } | 1132 } |
| 1132 free(argv); | 1133 free(argv); |
| 1133 for (i = 0; !error && i < loops; i++) | 1134 for (i = 0; !error && i < loops; i++) |
| 1134 error = main_loop(argc, argv_); | 1135 error = main_loop(argc, argv_); |
| 1135 return error; | 1136 return error; |
| 1136 } | 1137 } |
| OLD | NEW |