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 #ifndef TOOLS_COMMON_H_ | 10 #ifndef TOOLS_COMMON_H_ |
11 #define TOOLS_COMMON_H_ | 11 #define TOOLS_COMMON_H_ |
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 | 14 |
15 #include "./vpx_config.h" | 15 #include "./vpx_config.h" |
16 #include "vpx/vpx_codec.h" | 16 #include "vpx/vpx_codec.h" |
17 #include "vpx/vpx_image.h" | 17 #include "vpx/vpx_image.h" |
18 #include "vpx/vpx_integer.h" | 18 #include "vpx/vpx_integer.h" |
19 | 19 |
20 #if CONFIG_ENCODERS | 20 #if CONFIG_ENCODERS |
21 #include "./y4minput.h" | 21 #include "./y4minput.h" |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(_MSC_VER) | 24 #if defined(_MSC_VER) |
25 /* MSVS doesn't define off_t, and uses _f{seek,tell}i64. */ | 25 /* MSVS uses _f{seek,tell}i64. */ |
26 typedef __int64 off_t; | |
27 #define fseeko _fseeki64 | 26 #define fseeko _fseeki64 |
28 #define ftello _ftelli64 | 27 #define ftello _ftelli64 |
| 28 typedef long _off_t; // NOLINT - MSVS compatible type |
| 29 typedef __int64 off_t; // fseeki64 compatible type |
| 30 #define _OFF_T_DEFINED |
29 #elif defined(_WIN32) | 31 #elif defined(_WIN32) |
30 /* MinGW defines off_t as long and uses f{seek,tell}o64/off64_t for large | 32 /* MinGW defines off_t as long and uses f{seek,tell}o64/off64_t for large |
31 * files. */ | 33 * files. */ |
32 #define fseeko fseeko64 | 34 #define fseeko fseeko64 |
33 #define ftello ftello64 | 35 #define ftello ftello64 |
34 #define off_t off64_t | 36 #define off_t off64_t |
35 #endif /* _WIN32 */ | 37 #endif /* _WIN32 */ |
36 | 38 |
37 #if CONFIG_OS_SUPPORT | 39 #if CONFIG_OS_SUPPORT |
38 #if defined(_MSC_VER) | 40 #if defined(_MSC_VER) |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void vpx_img_write(const vpx_image_t *img, FILE *file); | 144 void vpx_img_write(const vpx_image_t *img, FILE *file); |
143 int vpx_img_read(vpx_image_t *img, FILE *file); | 145 int vpx_img_read(vpx_image_t *img, FILE *file); |
144 | 146 |
145 double sse_to_psnr(double samples, double peak, double mse); | 147 double sse_to_psnr(double samples, double peak, double mse); |
146 | 148 |
147 #ifdef __cplusplus | 149 #ifdef __cplusplus |
148 } /* extern "C" */ | 150 } /* extern "C" */ |
149 #endif | 151 #endif |
150 | 152 |
151 #endif // TOOLS_COMMON_H_ | 153 #endif // TOOLS_COMMON_H_ |
OLD | NEW |