[Sumover-dev] [svn commit] r3908 - in vic/branches/mpeg4: render

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Mon Nov 6 15:21:36 GMT 2006


Author: barz
Date: Mon Nov  6 15:21:45 2006
New Revision: 3908

Modified:
   vic/branches/mpeg4/main.cpp
   vic/branches/mpeg4/module.cpp
   vic/branches/mpeg4/render/renderer-window.cpp
   vic/branches/mpeg4/render/renderer.cpp
   vic/branches/mpeg4/vic.vcproj

Log:


Modified: vic/branches/mpeg4/main.cpp
==============================================================================
--- vic/branches/mpeg4/main.cpp	(original)
+++ vic/branches/mpeg4/main.cpp	Mon Nov  6 15:21:45 2006
@@ -481,13 +481,14 @@
 			usage(NULL);
 	}
 
+#ifndef WIN32
 	/* CPU capabilities detection */
 	GetCpuCaps(&gCpuCaps);
 	printf("cpudetect: %s\n", gCpuCaps.cpuname);
 	printf("cpudetect: MMX=%d MMX2=%d SSE=%d SSE2=%d 3DNow=%d 3DNowExt=%d\n",  \
 	        gCpuCaps.hasMMX, gCpuCaps.hasMMX2, gCpuCaps.hasSSE, gCpuCaps.hasSSE2, \
 	       	gCpuCaps.has3DNow, gCpuCaps.has3DNowExt );
-
+#endif
 	
 	Tcl::init("vic");
 	Tcl& tcl = Tcl::instance();

Modified: vic/branches/mpeg4/module.cpp
==============================================================================
--- vic/branches/mpeg4/module.cpp	(original)
+++ vic/branches/mpeg4/module.cpp	Mon Nov  6 15:21:45 2006
@@ -36,7 +36,7 @@
     "@(#) $Header$ (LBL)";
 #endif
 #include "module.h"
-#include "deinterlace.h"
+// #include "deinterlace.h"
 
 char* Module::fttoa(int ft)
 {
@@ -131,6 +131,6 @@
 }
 
 void VideoFrame::deinterlace() {
-   Deinterlace::Render(bp_, width_, height_);
+   // Deinterlace::Render(bp_, width_, height_);
 }
 

Modified: vic/branches/mpeg4/render/renderer-window.cpp
==============================================================================
--- vic/branches/mpeg4/render/renderer-window.cpp	(original)
+++ vic/branches/mpeg4/render/renderer-window.cpp	Mon Nov  6 15:21:45 2006
@@ -85,7 +85,8 @@
 	scale_ = 0;
 	outw_ = (ww_ >> 2) << 2;
 	outh_ = (wh_ >> 2) << 2;
-/*
+
+// 	should be commented if we use libswscale 
 	int d = distance(ww_, width_);
 	int t = distance(ww_, width_ << 1);
 	if (t < d) {
@@ -111,7 +112,7 @@
 		outw_ = width_ >> scale_;
 		outh_ = height_ >> scale_;
 	}
-*/    
+// commen end
 }
 
 void WindowRenderer::sync() const

Modified: vic/branches/mpeg4/render/renderer.cpp
==============================================================================
--- vic/branches/mpeg4/render/renderer.cpp	(original)
+++ vic/branches/mpeg4/render/renderer.cpp	Mon Nov  6 15:21:45 2006
@@ -123,72 +123,60 @@
 			return (0);
 		need_update_ = 0;
 	}
-
-	render(vf->bp_, 0, 0, 0, 0);
-	
-	// put the image to display
-	// in WindowRenderer::push
-	push(NULL, 0, 0, 0, 0);
-	sync();
-	
 	/*
-		//
-		//  check how many blocks we need to update.  If more than
-		//  12%, do a single image push call for them.  Otherwise,
-		// only push the ones that change.
-		//
-		u_int now = now_;
-		const u_int8_t* ts = p->crvec_;
-		u_int bcnt = 0;
-		int w = width_ >> 3;
-		int y;
-		for (y = height_ >> 3; --y >= 0; ) {
-			for (int x = 0; x < w; ++x)
-				if (!RV_PAST(now, ts[x]))
-					++bcnt;
-			ts += w;
-		}
-		int immed = bcnt < irthresh_;
-	
-	
-	#ifdef WIN32
-		immed = 0;
-	#endif
-	
-		int ymin = height_;
-		int ymax = 0;
-		ts = p->crvec_;
-		for (y = 0; y < height_; y += 8) {
-			for (int x = 0; x < width_; ) {
-				if (RV_PAST(now, ts[x >> 3])) {
-					x += 8;
-					continue;
-				}
-				int sx = x;
-				do {
-					x += 8;
-				} while (x < width_ && !RV_PAST(now, ts[x >> 3]));
-	
-				if (y < ymin)
-					ymin = y;
-				if (y > ymax)
-					ymax = y;
-				// XXX
-				int off = y * width_ + sx;
-				render(p->bp_, off, sx, x - sx, 8);
-				if (immed)
-					push(p->bp_, y, y + 8, sx, x);
+	 * check how many blocks we need to update.  If more than
+	 * 12%, do a single image push call for them.  Otherwise,
+	 * only push the ones that change.
+	 */
+	u_int now = now_;
+	const u_int8_t* ts = p->crvec_;
+	u_int bcnt = 0;
+	int w = width_ >> 3;
+	int y;
+	for (y = height_ >> 3; --y >= 0; ) {
+		for (int x = 0; x < w; ++x)
+			if (!RV_PAST(now, ts[x]))
+				++bcnt;
+		ts += w;
+	}
+	int immed = bcnt < irthresh_;
+
+#ifdef WIN32
+	immed = 0;
+#endif
+
+	int ymin = height_;
+	int ymax = 0;
+	ts = p->crvec_;
+	for (y = 0; y < height_; y += 8) {
+		for (int x = 0; x < width_; ) {
+			if (RV_PAST(now, ts[x >> 3])) {
+				x += 8;
+				continue;
 			}
-			ts += width_ >> 3;
-		}
-		// XXX
-		now_ = p->ts_;
-		if (ymin <= ymax) {
-			if (!immed)
-				push(p->bp_, ymin, ymax + 8, 0, 0);
-			sync();
+			int sx = x;
+			do {
+				x += 8;
+			} while (x < width_ && !RV_PAST(now, ts[x >> 3]));
+
+			if (y < ymin)
+				ymin = y;
+			if (y > ymax)
+				ymax = y;
+			/*XXX*/
+			int off = y * width_ + sx;
+			render(p->bp_, off, sx, x - sx, 8);
+			if (immed)
+				push(p->bp_, y, y + 8, sx, x);
 		}
+		ts += width_ >> 3;
+	}
+	/*XXX*/
+	now_ = p->ts_;
+	if (ymin <= ymax) {
+		if (!immed)
+			push(p->bp_, ymin, ymax + 8, 0, 0);
+		sync();
 	}
-	*/
 	return (0);
 }

Modified: vic/branches/mpeg4/vic.vcproj
==============================================================================
--- vic/branches/mpeg4/vic.vcproj	(original)
+++ vic/branches/mpeg4/vic.vcproj	Mon Nov  6 15:21:45 2006
@@ -481,7 +481,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/I ../common"
 				Optimization="0"
-				AdditionalIncludeDirectories=".\,render,rtp,net,win32,video,codec,codec\tmndec,codec\tmn-x,codec\jpeg,codec\p64,codec\h263,codec\mpeg,..\common\src,..\tk-8.0\win,..\tcl-8.0\win,..\tk-8.0\generic,..\tk-8.0\xlib,..\tcl-8.0\generic,..\IPv6Kit\inc,mst_wm\incls"
+				AdditionalIncludeDirectories=".\win32\include,.\ffmpeg,.\,render,rtp,net,win32,video,codec,codec\tmndec,codec\tmn-x,codec\jpeg,codec\p64,codec\h263,codec\mpeg,..\common\src,..\tk-8.0\win,..\tcl-8.0\win,..\tk-8.0\generic,..\tk-8.0\xlib,..\tcl-8.0\generic,..\IPv6Kit\inc,mst_wm\incls"
 				PreprocessorDefinitions="DEBUG;_DEBUG;DEBUG_MEM;WIN32;SIGRET=void;SIGARGS=int;NLAYER=8;ED_YBITS=4;VIC;USE_TIME;WINDOWS;HAVE_IPV6;NEED_INET_NTOP;NEED_INET_PTON;WINXP_IPV6"
 				RuntimeLibrary="5"
 				UsePrecompiledHeader="2"
@@ -12113,6 +12113,9 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath=".\render\color-x11.cpp">
+			</File>
+			<File
 				RelativePath="render\color-yuv.cpp">
 				<FileConfiguration
 					Name="Debug|Win32">



More information about the Sumover-dev mailing list