# HG changeset patch # User arpi # Date 1002988404 0 # Node ID 82556b3a12284f740f417632aa89ae2de54cc956 # Parent 1e6ea72b9b87a95fab0f884ac8215110678495df Cleanup: - TIMEING && MORE_TIMEING disabled by default - private stuff moved to postprocess.c to avoid possible conflicts diff -r 1e6ea72b9b87 -r 82556b3a1228 postproc/postprocess.c --- a/postproc/postprocess.c Sat Oct 13 15:45:01 2001 +0000 +++ b/postproc/postprocess.c Sat Oct 13 15:53:24 2001 +0000 @@ -90,6 +90,16 @@ //#undef HAVE_MMX #include "postprocess.h" +#define MIN(a,b) ((a) > (b) ? (b) : (a)) +#define MAX(a,b) ((a) < (b) ? (b) : (a)) +#define ABS(a) ((a) > 0 ? (a) : (-(a))) +#define SIGN(a) ((a) > 0 ? 1 : -1) + +#ifdef HAVE_MMX2 +#define PAVGB(a,b) "pavgb " #a ", " #b " \n\t" +#elif defined (HAVE_3DNOW) +#define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" +#endif static uint64_t packedYOffset= 0x0000000000000000LL; static uint64_t packedYScale= 0x0100010001000100LL; diff -r 1e6ea72b9b87 -r 82556b3a1228 postproc/postprocess.h --- a/postproc/postprocess.h Sat Oct 13 15:45:01 2001 +0000 +++ b/postproc/postprocess.h Sat Oct 13 15:53:24 2001 +0000 @@ -46,23 +46,13 @@ #define H_RK1_FILTER 0x1000 // 4096 #define H_X1_FILTER 0x2000 // 8192 - -#define TIMEING -#define MORE_TIMEING +#define GET_PP_QUALITY_MAX 6 -#define MIN(a,b) ((a) > (b) ? (b) : (a)) -#define MAX(a,b) ((a) < (b) ? (b) : (a)) -#define ABS(a) ((a) > 0 ? (a) : (-(a))) -#define SIGN(a) ((a) > 0 ? 1 : -1) +//#define TIMEING +//#define MORE_TIMEING #define QP_STORE_T int -#ifdef HAVE_MMX2 -#define PAVGB(a,b) "pavgb " #a ", " #b " \n\t" -#elif defined (HAVE_3DNOW) -#define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" -#endif - //#ifdef __cplusplus //#include @@ -74,15 +64,16 @@ //extern "C" //{ //#endif + void postprocess(unsigned char * src[], int src_stride, unsigned char * dst[], int dst_stride, int horizontal_size, int vertical_size, QP_STORE_T *QP_store, int QP_stride, int mode); + int getPpModeForQuality(int quality); + //#ifdef __cplusplus //} //#endif -#define GET_PP_QUALITY_MAX 6 - #endif diff -r 1e6ea72b9b87 -r 82556b3a1228 postproc/postprocess_template.c --- a/postproc/postprocess_template.c Sat Oct 13 15:45:01 2001 +0000 +++ b/postproc/postprocess_template.c Sat Oct 13 15:53:24 2001 +0000 @@ -90,6 +90,16 @@ //#undef HAVE_MMX #include "postprocess.h" +#define MIN(a,b) ((a) > (b) ? (b) : (a)) +#define MAX(a,b) ((a) < (b) ? (b) : (a)) +#define ABS(a) ((a) > 0 ? (a) : (-(a))) +#define SIGN(a) ((a) > 0 ? 1 : -1) + +#ifdef HAVE_MMX2 +#define PAVGB(a,b) "pavgb " #a ", " #b " \n\t" +#elif defined (HAVE_3DNOW) +#define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" +#endif static uint64_t packedYOffset= 0x0000000000000000LL; static uint64_t packedYScale= 0x0100010001000100LL;