From e68df118a9855657f79e599e749b68e711708839 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 20 Nov 2001 18:07:13 +0000 Subject: oops, too much cleanup ;) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3033 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/postprocess.c | 140 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) (limited to 'postproc/postprocess.c') diff --git a/postproc/postprocess.c b/postproc/postprocess.c index 353e0da4a0..96a7d5e0fd 100644 --- a/postproc/postprocess.c +++ b/postproc/postprocess.c @@ -859,6 +859,43 @@ static inline void vertX1Filter(uint8_t *src, int stride, int QP) #endif } +/** + * Experimental Filter 1 (Horizontal) + * will not damage linear gradients + * Flat blocks should look like they where passed through the (1,1,2,2,4,2,2,1,1) 9-Tap filter + * can only smooth blocks at the expected locations (it cant smooth them if they did move) + * MMX2 version does correct clipping C version doesnt + * not identical with the vertical one + */ +static inline void horizX1Filter(uint8_t *src, int stride, int QP) +{ + int y; +//FIXME (has little in common with the mmx2 version) + for(y=0; y hFlatnessThreshold; +} + +static inline int isHorizMinMaxOk(uint8_t src[], int stride, int QP) +{ + if(abs(src[0] - src[7]) > 2*QP) return 0; + + return 1; +} + +static inline void doHorizDefFilter(uint8_t dst[], int stride, int QP) +{ + int y; + for(y=0; y> 6; + d*= SIGN(-middleEnergy); + + if(q>0) + { + d= d<0 ? 0 : d; + d= d>q ? q : d; + } + else + { + d= d>0 ? 0 : d; + d= d>4; + dst[1]= ((dst[1]<<2) + ((first + sums[0] + sums[3])<<1) + sums[5] + 8)>>4; + dst[2]= ((dst[2]<<2) + ((first + sums[1] + sums[4])<<1) + sums[6] + 8)>>4; + dst[3]= ((dst[3]<<2) + ((sums[2] + sums[5])<<1) + sums[0] + sums[7] + 8)>>4; + dst[4]= ((dst[4]<<2) + ((sums[3] + sums[6])<<1) + sums[1] + sums[8] + 8)>>4; + dst[5]= ((dst[5]<<2) + ((last + sums[7] + sums[4])<<1) + sums[2] + 8)>>4; + dst[6]= (((last + dst[6])<<2) + ((dst[7] + sums[5])<<1) + sums[3] + 8)>>4; + dst[7]= ((sums[8]<<2) + ((last + sums[6])<<1) + sums[4] + 8)>>4; + + dst+= stride; + } +} + + static inline void dering(uint8_t src[], int stride, int QP) { #if defined (HAVE_MMX2) || defined (HAVE_3DNOW) -- cgit v1.2.3