Mercurial > libavcodec.hg
comparison libpostproc/postprocess.c @ 1071:0a48dd404167 libavcodec
* update cleanup rules (Steven M. Schultz)
* memaling check (Steven M. Schultz)
* unused var removed
| author | kabi |
|---|---|
| date | Tue, 18 Feb 2003 09:33:21 +0000 |
| parents | 8528d0b9e508 |
| children | 7f5587a7dd10 |
comparison
equal
deleted
inserted
replaced
| 1070:6da5ae9ee199 | 1071:0a48dd404167 |
|---|---|
| 80 #endif | 80 #endif |
| 81 #include "postprocess.h" | 81 #include "postprocess.h" |
| 82 #include "postprocess_internal.h" | 82 #include "postprocess_internal.h" |
| 83 | 83 |
| 84 #include "mangle.h" //FIXME should be supressed | 84 #include "mangle.h" //FIXME should be supressed |
| 85 | |
| 86 #ifndef HAVE_MEMALIGN | |
| 87 #define memalign(a,b) malloc(b) | |
| 88 #endif | |
| 85 | 89 |
| 86 #define MIN(a,b) ((a) > (b) ? (b) : (a)) | 90 #define MIN(a,b) ((a) > (b) ? (b) : (a)) |
| 87 #define MAX(a,b) ((a) < (b) ? (b) : (a)) | 91 #define MAX(a,b) ((a) < (b) ? (b) : (a)) |
| 88 #define ABS(a) ((a) > 0 ? (a) : (-(a))) | 92 #define ABS(a) ((a) > 0 ? (a) : (-(a))) |
| 89 #define SIGN(a) ((a) > 0 ? 1 : -1) | 93 #define SIGN(a) ((a) > 0 ? 1 : -1) |
| 747 reallocAlign((void **)&c->forcedQPTable, 8, mbWidth*sizeof(QP_STORE_T)); | 751 reallocAlign((void **)&c->forcedQPTable, 8, mbWidth*sizeof(QP_STORE_T)); |
| 748 } | 752 } |
| 749 | 753 |
| 750 pp_context_t *pp_get_context(int width, int height, int cpuCaps){ | 754 pp_context_t *pp_get_context(int width, int height, int cpuCaps){ |
| 751 PPContext *c= memalign(32, sizeof(PPContext)); | 755 PPContext *c= memalign(32, sizeof(PPContext)); |
| 752 int i; | |
| 753 int stride= (width+15)&(~15); //assumed / will realloc if needed | 756 int stride= (width+15)&(~15); //assumed / will realloc if needed |
| 754 | 757 |
| 755 memset(c, 0, sizeof(PPContext)); | 758 memset(c, 0, sizeof(PPContext)); |
| 756 c->cpuCaps= cpuCaps; | 759 c->cpuCaps= cpuCaps; |
| 757 if(cpuCaps&PP_FORMAT){ | 760 if(cpuCaps&PP_FORMAT){ |
