[SCM] libav/experimental: added compiletime option to turn width%8==0 on

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:30:14 UTC 2013


The following commit has been merged in the experimental branch:
commit a0e8aca3645cf1d6c5cd9129efc4edde5c0343a8
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Oct 19 13:56:12 2001 +0000

    added compiletime option to turn width%8==0 on
    
    Originally committed as revision 2287 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

diff --git a/postproc/postprocess.c b/postproc/postprocess.c
index f558a1e..c4c1665 100644
--- a/postproc/postprocess.c
+++ b/postproc/postprocess.c
@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
 
 			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
 			if(x+7 >= width)
 			{
@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
 				dstBlock= tempDstBlock;
 				srcBlock= tempSrcBlock;
 			}
+#endif
 
 			blockCopy(dstBlock + dstStride*5, dstStride,
 				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
 				dering(dstBlock - stride*9 + width-9, stride, QP);
 			//FIXME dering filter will not be applied to last block (bottom right)
 
+#ifdef PP_FUNNY_STRIDE
 			/* did we use a tmp-block buffer */
 			if(x+7 >= width)
 			{
@@ -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);
 				}
 			}
+#endif
 
 			dstBlock+=8;
 			srcBlock+=8;
diff --git a/postproc/postprocess.h b/postproc/postprocess.h
index 20880a9..4aa395c 100644
--- a/postproc/postprocess.h
+++ b/postproc/postprocess.h
@@ -59,6 +59,9 @@
 
 #define GET_PP_QUALITY_MAX 6
 
+//must be defined if stride%8 != 0
+#define PP_FUNNY_STRIDE
+
 //#define TIMING
 //#define MORE_TIMING
 
diff --git a/postproc/postprocess_template.c b/postproc/postprocess_template.c
index f558a1e..c4c1665 100644
--- a/postproc/postprocess_template.c
+++ b/postproc/postprocess_template.c
@@ -2561,6 +2561,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
 
 			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
 			if(x+7 >= width)
 			{
@@ -2577,6 +2578,7 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStri
 				dstBlock= tempDstBlock;
 				srcBlock= tempSrcBlock;
 			}
+#endif
 
 			blockCopy(dstBlock + dstStride*5, dstStride,
 				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
 				dering(dstBlock - stride*9 + width-9, stride, QP);
 			//FIXME dering filter will not be applied to last block (bottom right)
 
+#ifdef PP_FUNNY_STRIDE
 			/* did we use a tmp-block buffer */
 			if(x+7 >= width)
 			{
@@ -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);
 				}
 			}
+#endif
 
 			dstBlock+=8;
 			srcBlock+=8;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list