| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include <ctype.h> | 29 #include <ctype.h> |
| 30 #include <errno.h> | 30 #include <errno.h> |
| 31 #include <inttypes.h> | 31 #include <inttypes.h> |
| 32 #include <limits.h> | 32 #include <limits.h> |
| 33 #include <math.h> | 33 #include <math.h> |
| 34 #include <stdio.h> | 34 #include <stdio.h> |
| 35 #include <stdlib.h> | 35 #include <stdlib.h> |
| 36 #include <string.h> | 36 #include <string.h> |
| 37 #include "attributes.h" | 37 #include "attributes.h" |
| 38 #include "libavutil/avconfig.h" |
| 39 |
| 40 #if AV_HAVE_BIGENDIAN |
| 41 # define AV_NE(be, le) (be) |
| 42 #else |
| 43 # define AV_NE(be, le) (le) |
| 44 #endif |
| 38 | 45 |
| 39 //rounded division & shift | 46 //rounded division & shift |
| 40 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)
-1)>>(b)) | 47 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)
-1)>>(b)) |
| 41 /* assume b>0 */ | 48 /* assume b>0 */ |
| 42 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) | 49 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
| 43 #define FFABS(a) ((a) >= 0 ? (a) : (-(a))) | 50 #define FFABS(a) ((a) >= 0 ? (a) : (-(a))) |
| 44 #define FFSIGN(a) ((a) > 0 ? 1 : -1) | 51 #define FFSIGN(a) ((a) > 0 ? 1 : -1) |
| 45 | 52 |
| 46 #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) | 53 #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) |
| 47 #define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c) | 54 #define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c) |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 #endif | 344 #endif |
| 338 #ifndef av_clip_int16 | 345 #ifndef av_clip_int16 |
| 339 # define av_clip_int16 av_clip_int16_c | 346 # define av_clip_int16 av_clip_int16_c |
| 340 #endif | 347 #endif |
| 341 #ifndef av_clipl_int32 | 348 #ifndef av_clipl_int32 |
| 342 # define av_clipl_int32 av_clipl_int32_c | 349 # define av_clipl_int32 av_clipl_int32_c |
| 343 #endif | 350 #endif |
| 344 #ifndef av_clipf | 351 #ifndef av_clipf |
| 345 # define av_clipf av_clipf_c | 352 # define av_clipf av_clipf_c |
| 346 #endif | 353 #endif |
| OLD | NEW |