Commit 0e32ec04 authored by michael's avatar michael

added compiletime option to turn width%8==0 on


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@2287 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 28e31c6f
...@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
if(!isColor) yHistogram[ srcBlock[srcStride*5] ]++; if(!isColor) yHistogram[ srcBlock[srcStride*5] ]++;
#ifdef PP_FUNNY_STRIDE
//can we mess with a 8x16 block, if not use a temp buffer, yes again //can we mess with a 8x16 block, if not use a temp buffer, yes again
if(x+7 >= width) if(x+7 >= width)
{ {
...@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
dstBlock= tempDstBlock; dstBlock= tempDstBlock;
srcBlock= tempSrcBlock; srcBlock= tempSrcBlock;
} }
#endif
blockCopy(dstBlock + dstStride*5, dstStride, blockCopy(dstBlock + dstStride*5, dstStride,
srcBlock + srcStride*5, srcStride, 8, mode & LEVEL_FIX); srcBlock + srcStride*5, srcStride, 8, mode & LEVEL_FIX);
...@@ -2657,6 +2659,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2657,6 +2659,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
dering(dstBlock - stride*9 + width-9, stride, QP); dering(dstBlock - stride*9 + width-9, stride, QP);
//FIXME dering filter will not be applied to last block (bottom right) //FIXME dering filter will not be applied to last block (bottom right)
#ifdef PP_FUNNY_STRIDE
/* did we use a tmp-block buffer */ /* did we use a tmp-block buffer */
if(x+7 >= width) if(x+7 >= width)
{ {
...@@ -2669,6 +2672,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2669,6 +2672,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
memcpy(dstBlock+i*dstStride, tempDstBlock+i*dstStride, width-x); memcpy(dstBlock+i*dstStride, tempDstBlock+i*dstStride, width-x);
} }
} }
#endif
dstBlock+=8; dstBlock+=8;
srcBlock+=8; srcBlock+=8;
......
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
#define GET_PP_QUALITY_MAX 6 #define GET_PP_QUALITY_MAX 6
//must be defined if stride%8 != 0
#define PP_FUNNY_STRIDE
//#define TIMING //#define TIMING
//#define MORE_TIMING //#define MORE_TIMING
......
...@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
if(!isColor) yHistogram[ srcBlock[srcStride*5] ]++; if(!isColor) yHistogram[ srcBlock[srcStride*5] ]++;
#ifdef PP_FUNNY_STRIDE
//can we mess with a 8x16 block, if not use a temp buffer, yes again //can we mess with a 8x16 block, if not use a temp buffer, yes again
if(x+7 >= width) if(x+7 >= width)
{ {
...@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
dstBlock= tempDstBlock; dstBlock= tempDstBlock;
srcBlock= tempSrcBlock; srcBlock= tempSrcBlock;
} }
#endif
blockCopy(dstBlock + dstStride*5, dstStride, blockCopy(dstBlock + dstStride*5, dstStride,
srcBlock + srcStride*5, srcStride, 8, mode & LEVEL_FIX); srcBlock + srcStride*5, srcStride, 8, mode & LEVEL_FIX);
...@@ -2657,6 +2659,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2657,6 +2659,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
dering(dstBlock - stride*9 + width-9, stride, QP); dering(dstBlock - stride*9 + width-9, stride, QP);
//FIXME dering filter will not be applied to last block (bottom right) //FIXME dering filter will not be applied to last block (bottom right)
#ifdef PP_FUNNY_STRIDE
/* did we use a tmp-block buffer */ /* did we use a tmp-block buffer */
if(x+7 >= width) if(x+7 >= width)
{ {
...@@ -2669,6 +2672,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri ...@@ -2669,6 +2672,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
memcpy(dstBlock+i*dstStride, tempDstBlock+i*dstStride, width-x); memcpy(dstBlock+i*dstStride, tempDstBlock+i*dstStride, width-x);
} }
} }
#endif
dstBlock+=8; dstBlock+=8;
srcBlock+=8; srcBlock+=8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment