rpms/pwlib/devel pwlib-1.10.10.rescale.patch,NONE,1.1

Daniel Veillard (veillard) fedora-extras-commits at redhat.com
Thu Mar 27 15:13:19 UTC 2008


Author: veillard

Update of /cvs/pkgs/rpms/pwlib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5333

Added Files:
	pwlib-1.10.10.rescale.patch 
Log Message:
Coops forgot the patch, Daniel


pwlib-1.10.10.rescale.patch:

--- NEW FILE pwlib-1.10.10.rescale.patch ---
diff -up pwlib-1.10.10/src/ptlib/common/vconvert.cxx.rescale pwlib-1.10.10/src/ptlib/common/vconvert.cxx
--- pwlib-1.10.10/src/ptlib/common/vconvert.cxx.rescale	2007-06-18 21:23:27.000000000 +0200
+++ pwlib-1.10.10/src/ptlib/common/vconvert.cxx	2008-03-22 19:22:15.000000000 +0100
@@ -1384,7 +1384,8 @@ BOOL PStandardColourConverter::SBGGR8toY
 #define USE_SBGGR8_NATIVE 1 // set to 0 to use the double conversion algorithm (Bayer->RGB->YUV420P)
   
 #if USE_SBGGR8_NATIVE
-
+if ((srcFrameWidth == dstFrameWidth) && (srcFrameHeight == dstFrameHeight))
+{
   // kernels for Y conversion, normalised by 2^16
   const int kR[]={1802,9667,1802,9667,19661,9667,1802,9667,1802}; 
   const int kG1[]={7733,9830,7733,3604,7733,3604,7733,9830,7733};
@@ -1467,17 +1468,17 @@ BOOL PStandardColourConverter::SBGGR8toY
     *bytesReturned = srcFrameHeight*srcFrameWidth+2*hSize*vSize;
 
   return true;
-
-#else //USE_SBGGR8_NATIVE
-
+}
+else
+#endif //USE_SBGGR8_NATIVE
+{
   // shortest but less efficient (one malloc per conversion!)
   BYTE * tempDest=(BYTE*)malloc(3*srcFrameWidth*srcFrameHeight);
   SBGGR8toRGB(src, tempDest, NULL);
-  BOOL r = RGBtoYUV420P(tempDest, dst, bytesReturned, 3, 2, 0);
+  BOOL r = RGBtoYUV420P(tempDest, dst, bytesReturned, 3, 0, 2);
   free(tempDest);
   return r;
-
-#endif //USE_SBGGR8_NATIVE
+}
 }
 
 BOOL PStandardColourConverter::SBGGR8toRGB(const BYTE * src,




More information about the fedora-extras-commits mailing list