From 5486f774bd4a6a92ce4423ae3897c1ac34dcf238 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 19 Oct 2001 17:03:51 +0000 Subject: [PATCH] more logic behavior if the altenative deblock filters are used (turning a alt filter on without turning the deblock filter on uses the alt filter instead of using no filter now) Originally committed as revision 2301 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc --- postproc/postprocess.c | 42 ++++++++++++++++++----------------------- postproc/postprocess_template.c | 42 ++++++++++++++++++----------------------- 2 files changed, 36 insertions(+), 48 deletions(-) diff --git a/postproc/postprocess.c b/postproc/postprocess.c index c4c1665..2146269 100644 --- a/postproc/postprocess.c +++ b/postproc/postprocess.c @@ -2603,22 +2603,19 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri memcpyTime+= T1-T0; T0=T1; #endif - if(mode & V_DEBLOCK) + if(mode & V_RK1_FILTER) + vertRK1Filter(dstBlock, stride, QP); + else if(mode & V_X1_FILTER) + vertX1Filter(dstBlock, stride, QP); + else if(mode & V_DEBLOCK) { - if(mode & V_RK1_FILTER) - vertRK1Filter(dstBlock, stride, QP); - else if(mode & V_X1_FILTER) - vertX1Filter(dstBlock, stride, QP); - else + if( isVertDC(dstBlock, stride)) { - if( isVertDC(dstBlock, stride)) - { - if(isVertMinMaxOk(dstBlock, stride, QP)) - doVertLowPass(dstBlock, stride, QP); - } - else - doVertDefFilter(dstBlock, stride, QP); + if(isVertMinMaxOk(dstBlock, stride, QP)) + doVertLowPass(dstBlock, stride, QP); } + else + doVertDefFilter(dstBlock, stride, QP); } #ifdef MORE_TIMING T1= rdtsc(); @@ -2633,20 +2630,17 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri #ifdef MORE_TIMING T0= rdtsc(); #endif - if(mode & H_DEBLOCK) + if(mode & H_X1_FILTER) + horizX1Filter(dstBlock-4, stride, QP); + else if(mode & H_DEBLOCK) { - if(mode & H_X1_FILTER) - horizX1Filter(dstBlock-4, stride, QP); - else + if( isHorizDCAndCopy2Temp(dstBlock-4, stride)) { - if( isHorizDCAndCopy2Temp(dstBlock-4, stride)) - { - if(isHorizMinMaxOk(tempBlock, TEMP_STRIDE, QP)) - doHorizLowPassAndCopyBack(dstBlock-4, stride, QP); - } - else - doHorizDefFilterAndCopyBack(dstBlock-4, stride, QP); + if(isHorizMinMaxOk(tempBlock, TEMP_STRIDE, QP)) + doHorizLowPassAndCopyBack(dstBlock-4, stride, QP); } + else + doHorizDefFilterAndCopyBack(dstBlock-4, stride, QP); } #ifdef MORE_TIMING T1= rdtsc(); diff --git a/postproc/postprocess_template.c b/postproc/postprocess_template.c index c4c1665..2146269 100644 --- a/postproc/postprocess_template.c +++ b/postproc/postprocess_template.c @@ -2603,22 +2603,19 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri memcpyTime+= T1-T0; T0=T1; #endif - if(mode & V_DEBLOCK) + if(mode & V_RK1_FILTER) + vertRK1Filter(dstBlock, stride, QP); + else if(mode & V_X1_FILTER) + vertX1Filter(dstBlock, stride, QP); + else if(mode & V_DEBLOCK) { - if(mode & V_RK1_FILTER) - vertRK1Filter(dstBlock, stride, QP); - else if(mode & V_X1_FILTER) - vertX1Filter(dstBlock, stride, QP); - else + if( isVertDC(dstBlock, stride)) { - if( isVertDC(dstBlock, stride)) - { - if(isVertMinMaxOk(dstBlock, stride, QP)) - doVertLowPass(dstBlock, stride, QP); - } - else - doVertDefFilter(dstBlock, stride, QP); + if(isVertMinMaxOk(dstBlock, stride, QP)) + doVertLowPass(dstBlock, stride, QP); } + else + doVertDefFilter(dstBlock, stride, QP); } #ifdef MORE_TIMING T1= rdtsc(); @@ -2633,20 +2630,17 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri #ifdef MORE_TIMING T0= rdtsc(); #endif - if(mode & H_DEBLOCK) + if(mode & H_X1_FILTER) + horizX1Filter(dstBlock-4, stride, QP); + else if(mode & H_DEBLOCK) { - if(mode & H_X1_FILTER) - horizX1Filter(dstBlock-4, stride, QP); - else + if( isHorizDCAndCopy2Temp(dstBlock-4, stride)) { - if( isHorizDCAndCopy2Temp(dstBlock-4, stride)) - { - if(isHorizMinMaxOk(tempBlock, TEMP_STRIDE, QP)) - doHorizLowPassAndCopyBack(dstBlock-4, stride, QP); - } - else - doHorizDefFilterAndCopyBack(dstBlock-4, stride, QP); + if(isHorizMinMaxOk(tempBlock, TEMP_STRIDE, QP)) + doHorizLowPassAndCopyBack(dstBlock-4, stride, QP); } + else + doHorizDefFilterAndCopyBack(dstBlock-4, stride, QP); } #ifdef MORE_TIMING T1= rdtsc(); -- 2.7.4