| OLD | NEW |
| 1 /* | 1 /* |
| 2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> | 2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "timer.h" | 39 #include "timer.h" |
| 40 | 40 |
| 41 #ifndef attribute_align_arg | 41 #ifndef attribute_align_arg |
| 42 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,2) | 42 #if (!defined(__ICC) || __ICC > 1110) && AV_GCC_VERSION_AT_LEAST(4,2) |
| 43 # define attribute_align_arg __attribute__((force_align_arg_pointer)) | 43 # define attribute_align_arg __attribute__((force_align_arg_pointer)) |
| 44 #else | 44 #else |
| 45 # define attribute_align_arg | 45 # define attribute_align_arg |
| 46 #endif | 46 #endif |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 |
| 50 /** |
| 51 * Marks a variable as used and prevents the compiler from optimizing it away. |
| 52 * This is usefull for asm that accesses varibles in ways that the compiler does
nt |
| 53 * understand |
| 54 */ |
| 49 #ifndef attribute_used | 55 #ifndef attribute_used |
| 50 #if AV_GCC_VERSION_AT_LEAST(3,1) | 56 #if AV_GCC_VERSION_AT_LEAST(3,1) |
| 51 # define attribute_used __attribute__((used)) | 57 # define attribute_used __attribute__((used)) |
| 52 #else | 58 #else |
| 53 # define attribute_used | 59 # define attribute_used |
| 54 #endif | 60 #endif |
| 55 #endif | 61 #endif |
| 56 | 62 |
| 57 #ifndef INT16_MIN | 63 #ifndef INT16_MIN |
| 58 #define INT16_MIN (-0x7fff - 1) | 64 #define INT16_MIN (-0x7fff - 1) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 * Returns NULL if CONFIG_SMALL is true, otherwise the argument | 195 * Returns NULL if CONFIG_SMALL is true, otherwise the argument |
| 190 * without modification. Used to disable the definition of strings | 196 * without modification. Used to disable the definition of strings |
| 191 * (for example AVCodec long_names). | 197 * (for example AVCodec long_names). |
| 192 */ | 198 */ |
| 193 #if CONFIG_SMALL | 199 #if CONFIG_SMALL |
| 194 # define NULL_IF_CONFIG_SMALL(x) NULL | 200 # define NULL_IF_CONFIG_SMALL(x) NULL |
| 195 #else | 201 #else |
| 196 # define NULL_IF_CONFIG_SMALL(x) x | 202 # define NULL_IF_CONFIG_SMALL(x) x |
| 197 #endif | 203 #endif |
| 198 | 204 |
| 205 /** |
| 206 * Create a non default alias for a function with specified version. |
| 207 * This is needed when symbols are moved from a lib to a dependancy of the lib |
| 208 * because the gnu linker as of 2010 is buggy and fails to dynamicaly link if a
symbol |
| 209 * is not found in the lib in which it was during link time with enabled version
ing |
| 210 * even if a correctly versioned and matching symbol exists in another lib and |
| 211 * even if it did find that would it not contain an explicit check to fail |
| 212 */ |
| 213 #if HAVE_SYMVER_ASM_LABEL |
| 214 # define FF_SYMVER(type, name, args, ver) \ |
| 215 type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \ |
| 216 type ff_##name args |
| 217 #elif HAVE_SYMVER_GNU_ASM |
| 218 # define FF_SYMVER(type, name, args, ver) \ |
| 219 __asm__ (".symver ff_" #name "," EXTERN_PREFIX #name "@" ver); \ |
| 220 type ff_##name args; \ |
| 221 type ff_##name args |
| 222 #endif |
| 223 |
| 224 /** |
| 225 * Returns NULL if a threading library has not been enabled. |
| 226 * Used to disable threading functions in AVCodec definitions |
| 227 * when not needed. |
| 228 */ |
| 199 #if HAVE_THREADS | 229 #if HAVE_THREADS |
| 200 # define ONLY_IF_THREADS_ENABLED(x) x | 230 # define ONLY_IF_THREADS_ENABLED(x) x |
| 201 #else | 231 #else |
| 202 # define ONLY_IF_THREADS_ENABLED(x) NULL | 232 # define ONLY_IF_THREADS_ENABLED(x) NULL |
| 203 #endif | 233 #endif |
| 204 | 234 |
| 205 #endif /* AVUTIL_INTERNAL_H */ | 235 #endif /* AVUTIL_INTERNAL_H */ |
| OLD | NEW |