[Sumover-dev] [svn commit] r4126 - vic/branches/mpeg4/render

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Sat Mar 8 12:01:20 GMT 2008


Author: douglask
Date: Sat Mar  8 12:01:15 2008
New Revision: 4126

Modified:
   vic/branches/mpeg4/render/color-swscale.cpp
   vic/branches/mpeg4/render/vw.cpp

Log:
In the past a vertical offset hack was used to get rid of an ugly border when
displaying CIF sized images in a NTSC sized window. This hack should not
be used with SWScaler as it will introduce a border at the top of the image.

'sws_scale_ordered' has been deprecated by 'sws_scale', but still use it
if using an older SWScaler


Modified: vic/branches/mpeg4/render/color-swscale.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-swscale.cpp	(original)
+++ vic/branches/mpeg4/render/color-swscale.cpp	Sat Mar  8 12:01:15 2008
@@ -111,7 +111,11 @@
 	    sws_src[1] = sws_src[0] + framesize_;
 	    sws_src[2] = sws_src[1] + framesize_/4;
 
+#if LIBSWSCALE_VERSION_INT  >= ((0<<16)+(5<<8)+0)
+     	sws_scale(sws_context, sws_src, sws_src_stride, 0, height_, sws_tar, sws_tar_stride);
+#else
      	sws_scale_ordered(sws_context, sws_src, sws_src_stride, 0, height_, sws_tar, sws_tar_stride);
+#endif
 	  }	
 	}
 protected:

Modified: vic/branches/mpeg4/render/vw.cpp
==============================================================================
--- vic/branches/mpeg4/render/vw.cpp	(original)
+++ vic/branches/mpeg4/render/vw.cpp	Sat Mar  8 12:01:15 2008
@@ -1454,6 +1454,9 @@
 			return (TCL_OK);
 		}
 	} else if (argc == 3) {
+#ifdef HAVE_SWSCALE
+		return (TCL_OK);
+#else
 		if (strcmp(argv[1], "voff") == 0) {
 			voff_ = atoi(argv[2]);
 			return (TCL_OK);
@@ -1462,6 +1465,7 @@
 			hoff_ = atoi(argv[2]);
 			return (TCL_OK);
 		}
+#endif
 	}
 	return (BareWindow::command(argc, argv));
 }



More information about the Sumover-dev mailing list