Mercurial > libavcodec.hg
comparison common.h @ 753:8e1f0939d15d libavcodec
complete mpeg4 GMC decoding support
author | michaelni |
---|---|
date | Wed, 16 Oct 2002 19:55:49 +0000 |
parents | 1aa1cbb8c3c1 |
children | 5344ecb2c677 |
comparison
equal
deleted
inserted
replaced
752:97077dd24bfa | 753:8e1f0939d15d |
---|---|
155 | 155 |
156 # endif /* !CONFIG_WIN32 */ | 156 # endif /* !CONFIG_WIN32 */ |
157 | 157 |
158 # define av_abort() do { fprintf(stderr, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) | 158 # define av_abort() do { fprintf(stderr, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) |
159 | 159 |
160 //rounded divison & shift | |
161 #define RSHIFT(a,b) ((a) > 0 ? ((a) + (1<<((b)-1)))>>(b) : ((a) + (1<<((b)-1))-1)>>(b)) | |
160 /* assume b>0 */ | 162 /* assume b>0 */ |
161 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) | 163 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
162 #define ABS(a) ((a) >= 0 ? (a) : (-(a))) | 164 #define ABS(a) ((a) >= 0 ? (a) : (-(a))) |
163 #define MAX(a,b) ((a) > (b) ? (a) : (b)) | 165 #define MAX(a,b) ((a) > (b) ? (a) : (b)) |
164 #define MIN(a,b) ((a) > (b) ? (b) : (a)) | 166 #define MIN(a,b) ((a) > (b) ? (b) : (a)) |