[Sumover-dev] [svn commit] r4311 - in vic/branches/mpeg4: . codec html render tcl video

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Tue Nov 11 22:19:31 GMT 2008


Author: douglask
Date: Tue Nov 11 22:18:32 2008
New Revision: 4311

Removed:
   vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl.h261as
Modified:
   vic/branches/mpeg4/CHANGES.html
   vic/branches/mpeg4/codec/compositor.cpp
   vic/branches/mpeg4/codec/decoder-bvc.cpp
   vic/branches/mpeg4/codec/decoder-dv.cpp
   vic/branches/mpeg4/codec/decoder-h261.cpp
   vic/branches/mpeg4/codec/decoder-h261as.cpp
   vic/branches/mpeg4/codec/decoder-h261v1.cpp
   vic/branches/mpeg4/codec/decoder-h263.cpp
   vic/branches/mpeg4/codec/decoder-h263v2.cpp
   vic/branches/mpeg4/codec/decoder-h264.cpp
   vic/branches/mpeg4/codec/decoder-jpeg.cpp
   vic/branches/mpeg4/codec/decoder-mpeg4.cpp
   vic/branches/mpeg4/codec/decoder-pvh.cpp
   vic/branches/mpeg4/codec/decoder.cpp
   vic/branches/mpeg4/codec/decoder.h
   vic/branches/mpeg4/codec/encoder-bvc.cpp
   vic/branches/mpeg4/codec/encoder-h261as.cpp
   vic/branches/mpeg4/codec/encoder-pvh.cpp
   vic/branches/mpeg4/codec/jpeg/jpeg.cpp
   vic/branches/mpeg4/codec/transcoder-jpeg.cpp
   vic/branches/mpeg4/html/CHANGES.html
   vic/branches/mpeg4/module.cpp
   vic/branches/mpeg4/module.h
   vic/branches/mpeg4/output-file.cpp
   vic/branches/mpeg4/output-fileStream.cpp
   vic/branches/mpeg4/render/color-dither.cpp
   vic/branches/mpeg4/render/color-ed.cpp
   vic/branches/mpeg4/render/color-hi.cpp
   vic/branches/mpeg4/render/color-quant.cpp
   vic/branches/mpeg4/render/color-true.cpp
   vic/branches/mpeg4/render/color-yuv.cpp
   vic/branches/mpeg4/render/renderer-window.cpp
   vic/branches/mpeg4/render/renderer-window.h
   vic/branches/mpeg4/render/rgb-converter.cpp
   vic/branches/mpeg4/render/rgb-converter.h
   vic/branches/mpeg4/tcl/cf-tm.tcl
   vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
   vic/branches/mpeg4/tcl/ui-h261_play.tcl
   vic/branches/mpeg4/tcl/ui-main.tcl
   vic/branches/mpeg4/tcl/ui-vdd.tcl
   vic/branches/mpeg4/video/assistor-plx.cpp
   vic/branches/mpeg4/video/assistor-xil.cpp
   vic/branches/mpeg4/video/grabber-bttv.cpp
   vic/branches/mpeg4/video/grabber-jv.cpp
   vic/branches/mpeg4/video/grabber-linux1394.cpp
   vic/branches/mpeg4/video/grabber-linux1394.h
   vic/branches/mpeg4/video/grabber-macosx.cpp
   vic/branches/mpeg4/video/grabber-meteor.cpp
   vic/branches/mpeg4/video/grabber-mme.cpp
   vic/branches/mpeg4/video/grabber-plx.cpp
   vic/branches/mpeg4/video/grabber-rtvc.cpp
   vic/branches/mpeg4/video/grabber-slv.cpp
   vic/branches/mpeg4/video/grabber-spigot.cpp
   vic/branches/mpeg4/video/grabber-sunrise.cpp
   vic/branches/mpeg4/video/grabber-svideo.cpp
   vic/branches/mpeg4/video/grabber-v4l2-old.cpp
   vic/branches/mpeg4/video/grabber-v4l2.cpp
   vic/branches/mpeg4/video/grabber-video4linux.cpp
   vic/branches/mpeg4/video/grabber-vigra.cpp
   vic/branches/mpeg4/video/grabber-vl.cpp
   vic/branches/mpeg4/video/grabber-vpix.cpp
   vic/branches/mpeg4/video/grabber-win32.cpp
   vic/branches/mpeg4/video/grabber-win32DS.cpp
   vic/branches/mpeg4/video/grabber-x11.cpp
   vic/branches/mpeg4/video/grabber-xil.cpp
   vic/branches/mpeg4/video/grabber-xv.cpp
   vic/branches/mpeg4/video/grabber.cpp
   vic/branches/mpeg4/video/grabber.h
   vic/branches/mpeg4/video/output-vl.cpp
   vic/branches/mpeg4/video/xil.h

Log:
Almost everywhere where 411 is referred to has now been replaced with 420.

The API for the SGI Starter Video board from the early 1990's mislabeled YUV420 as YUV411, VIC inherited this mislabeling throughout it's code.


Modified: vic/branches/mpeg4/CHANGES.html
==============================================================================
--- vic/branches/mpeg4/CHANGES.html	(original)
+++ vic/branches/mpeg4/CHANGES.html	Tue Nov 11 22:18:32 2008
@@ -452,7 +452,7 @@
 </I><LI>Fixed bug that caused first value of a plotted statistic to be way too large so that the autoscaling left all the other data unreadable. </LI>
 <LI>[internal] Don't include <I>osfcn.h</I> anywhere. </LI>
 <LI>Added PAL selectors to window size menu. Suggested by Toerless Eckert (Toerless.Eckert at Informatik.Uni-Erlangen.de). </LI>
-<LI>[internal] Factored out code shared among grabbers for capturing input video to an onscreen window. In the new model, tcl creates the capture window and installs it in the grabber. Revamped parallax and xv grabbers to use this approach. Added supported to xv grabber for CIF and 411 capture. </LI>
+<LI>[internal] Factored out code shared among grabbers for capturing input video to an onscreen window. In the new model, tcl creates the capture window and installs it in the grabber. Revamped parallax and xv grabbers to use this approach. Added supported to xv grabber for CIF and 420 capture. </LI>
 <LI>Improved configure search scheme for locating X libraries and includes. Thanks to input from Toerless Eckert (Toerless.Eckert at Informatik.Uni-Erlangen.de). </LI>
 <LI>[internal] Added RGB_Converter class to be shared among grabbers that capture from the frame buffer in RGB format and convert to YUV. </LI>
 <LI>[internal] Removed grabber-tx.cc from distribution since it's been superseded by grabber-xv.cc. </LI>
@@ -465,7 +465,7 @@
 <UL>
 </I><LI>Fixed bug where failure to connect to jvdriver on decode-side resulted in a core dump. </LI>
 <LI>Added Vic.sdesList so you can specify which RTP SDES items you want to see in the info window. Default is "cname tool email mesg". Also, display srcid in the info window. </LI>
-<LI>[internal] Added tcl hook so that decoder can assert that stream parameters have changed in a way that might affect the rendering modules. For example, the RTP/JPEG type might change causing the output format to change from YUV-422 to YUV-411. In this case, we might have disable hardware decoding (because the hardware doesn't support 411) or reallocate the software renderers because they depend on the decimation factor. </LI>
+<LI>[internal] Added tcl hook so that decoder can assert that stream parameters have changed in a way that might affect the rendering modules. For example, the RTP/JPEG type might change causing the output format to change from YUV-422 to YUV-420. In this case, we might have disable hardware decoding (because the hardware doesn't support 420) or reallocate the software renderers because they depend on the decimation factor. </LI>
 <LI>[internal] Changed interface between vic and jpeg/h.261 decoders with respect to bookkeeping blocks that changed. Now pass in a table that is filled in by the decoder, instead of using "render" call backs. </LI>
 <LI>Fixed bugs with -A. "-A rtp" didn't work; added back "-A vic" for backward compatibility. Reported by Toerless Eckert (Toerless.Eckert at Informatik.Uni-Erlangen). </LI>
 <LI>Added Use-Hardware button (in display panel) to control whether we use hardware decoding when possible. Created Vic.useHardwareDecode resource to set initial disposition of Use-Hardware button. </LI>

Modified: vic/branches/mpeg4/codec/compositor.cpp
==============================================================================
--- vic/branches/mpeg4/codec/compositor.cpp	(original)
+++ vic/branches/mpeg4/codec/compositor.cpp	Tue Nov 11 22:18:32 2008
@@ -111,9 +111,9 @@
 	void composite(Overlay* o, int x, int y);
 };
 
-class Compositor411 : public Compositor {
+class Compositor420 : public Compositor {
 public:
-	Compositor411();
+	Compositor420();
 	virtual int consume(const VideoFrame*);
 	void size(int w, int h);
 	void copy_block(u_char* ofrm, u_char* ochm, 
@@ -127,8 +127,8 @@
 	TclObject* match(const char* fmt) {
 		if (strcasecmp(fmt, "compositor/422") == 0)
 			return (new Compositor422);
-		if (strcasecmp(fmt, "compositor/411") == 0)
-			return (new Compositor411);
+		if (strcasecmp(fmt, "compositor/420") == 0)
+			return (new Compositor420);
 		return (0);
 	}
 } compositor;
@@ -474,11 +474,11 @@
 	}
 }
 
-Compositor411::Compositor411() : Compositor(FT_YUV_411)
+Compositor420::Compositor420() : Compositor(FT_YUV_420)
 {
 }
 
-void Compositor411::size(int w, int h)
+void Compositor420::size(int w, int h)
 {
 	Module::size(w, h);
 	int fs = framesize_;
@@ -489,7 +489,7 @@
 	Compositor::crinit(w, h);
 }
 
-void Compositor411::copy_block(u_char* ofrm, u_char* ochm, 
+void Compositor420::copy_block(u_char* ofrm, u_char* ochm, 
 			    const u_char* frm, const u_char* chm)
 {
 	int stride = width_;
@@ -521,7 +521,7 @@
 	}
 }
 
-int Compositor411::consume(const VideoFrame* vf)
+int Compositor420::consume(const VideoFrame* vf)
 {
 	if (!samesize(vf))
 		size(vf->width_, vf->height_);
@@ -564,7 +564,7 @@
 	return (cc);
 }
 
-void Compositor411::composite(Overlay* o, int x, int y)
+void Compositor420::composite(Overlay* o, int x, int y)
 {
 	if (x >= width_ || y >= height_)
 		return;

Modified: vic/branches/mpeg4/codec/decoder-bvc.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-bvc.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-bvc.cpp	Tue Nov 11 22:18:32 2008
@@ -75,7 +75,7 @@
 	stat_[STAT_BAD_SYNTAX].name = "Bvc-Bad-Syntax";
 	stat_[STAT_BAD_GEOM].name = "Bvc-Bad-Geom";
 	nstat_ = 2;
-	decimation_ = 411;
+	decimation_ = 420;
 
 	/*XXX*/
 	inw_ = 320;
@@ -865,13 +865,13 @@
 }
 
 /*
- * XXX should use PlaneDecoder class for 411 also
+ * XXX should use PlaneDecoder class for 420 also
  */
 
 int BvcDecoder::colorhist(u_int* hist) const
 {
 	int s = inw_ * inh_;
-	colorhist_411_556(hist, frm_, frm_ + s, frm_ + s + (s >> 2),
+	colorhist_420_556(hist, frm_, frm_ + s, frm_ + s + (s >> 2),
 			  inw_, inh_);
 	return (1);
 }

Modified: vic/branches/mpeg4/codec/decoder-dv.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-dv.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-dv.cpp	Tue Nov 11 22:18:32 2008
@@ -95,7 +95,7 @@
 	stat_[STAT_BAD_HEADER].name = "H261-Bad-Header";
 	nstat_ = 6;
 
-	decimation_ = 411;
+	decimation_ = 420;
 
 	/*
 	 * Assume PAL. 

Modified: vic/branches/mpeg4/codec/decoder-h261.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h261.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h261.cpp	Tue Nov 11 22:18:32 2008
@@ -87,7 +87,7 @@
 	stat_[STAT_BAD_HEADER].name = "H261-Bad-Header";
 	nstat_ = 6;
 
-	decimation_ = 411;
+	decimation_ = 420;
 	/*
 	 * Assume CIF.  Picture header will trigger a resize if
 	 * we encounter QCIF instead.
@@ -128,7 +128,7 @@
 	int w = inw_;
 	int h = inh_;
 	int s = w * h;
-	colorhist_411_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
+	colorhist_420_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
 	return (1);
 }
 

Modified: vic/branches/mpeg4/codec/decoder-h261as.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h261as.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h261as.cpp	Tue Nov 11 22:18:32 2008
@@ -86,7 +86,7 @@
 	stat_[STAT_BAD_HEADER].name = "H261AS-Bad-Header";
 	nstat_ = 6;
 
-	decimation_ = 411;
+	decimation_ = 420;
 	/*
 	 * Assume CIF.  Picture header will trigger a resize if
 	 * we encounter QCIF instead.
@@ -127,7 +127,7 @@
 	int w = inw_;
 	int h = inh_;
 	int s = w * h;
-	colorhist_411_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
+	colorhist_420_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
 	return (1);
 }
 

Modified: vic/branches/mpeg4/codec/decoder-h261v1.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h261v1.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h261v1.cpp	Tue Nov 11 22:18:32 2008
@@ -115,7 +115,7 @@
 	/* cause a resize trigger later */
 	inw_ = 0;
 	inh_ = 0;
-	decimation_ = 411;
+	decimation_ = 420;
 	seqno_ = 0;
 	packetsize_ = 0;
 	for (int i = 0; i < H261_SLOTS; ++i) {
@@ -329,7 +329,7 @@
 	int w = inw_;
 	int h = inh_;
 	int s = w * h;
-	colorhist_411_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
+	colorhist_420_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
 	return (1);
 }
 

Modified: vic/branches/mpeg4/codec/decoder-h263.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h263.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h263.cpp	Tue Nov 11 22:18:32 2008
@@ -72,7 +72,7 @@
 	h263decoder = NewH263Decoder();
 
 	nstat_ = 0;
-	decimation_	= 411;
+	decimation_	= 420;
 	srcformat_	= 0;
 	
 	h263streamsize_ = 0;
@@ -106,7 +106,7 @@
 int H263Decoder::colorhist(u_int* hist) const
 {
 	if (backframe_)
-		colorhist_411_556(hist,backframe_,backframe_+inw_*inh_,backframe_+inw_*inh_*3/2,inw_,inh_);
+		colorhist_420_556(hist,backframe_,backframe_+inw_*inh_,backframe_+inw_*inh_*3/2,inw_,inh_);
 	return (1);
 }
 

Modified: vic/branches/mpeg4/codec/decoder-h263v2.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h263v2.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h263v2.cpp	Tue Nov 11 22:18:32 2008
@@ -68,7 +68,7 @@
 	nstat_ = 6;
 #endif
 	
-	decimation_ = 411;
+	decimation_ = 420;
 	/*
 	* Assume CIF.  Picture header will trigger a resize if
 	* we encounter QCIF instead.
@@ -113,7 +113,7 @@
 	int w = inw_;
 	int h = inh_;
 	int s = w * h;
-	colorhist_411_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
+	colorhist_420_556(hist, frm, frm + s, frm + s + (s >> 2), w, h);
 #endif
 	return (1);
 }

Modified: vic/branches/mpeg4/codec/decoder-h264.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-h264.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-h264.cpp	Tue Nov 11 22:18:32 2008
@@ -86,7 +86,7 @@
 
 
     //Barz: =============================================
-    decimation_ = 411;
+    decimation_ = 420;
     /*
      * Assume CIF.  Picture header will trigger a resize if
      * we encounter QCIF instead.

Modified: vic/branches/mpeg4/codec/decoder-jpeg.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-jpeg.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-jpeg.cpp	Tue Nov 11 22:18:32 2008
@@ -299,7 +299,7 @@
 	config_.comp[0].hsf = 2;
 	int old_decimation = decimation_;
 	if (type_ == 1) {
-		decimation_ = 411;
+		decimation_ = 420;
 		config_.comp[0].vsf = 2;
 	} else {
 		decimation_ = 422;
@@ -330,8 +330,8 @@
 {
 	const u_char* frm = codec_->frame();
 	int off = inw_ * inh_;
-	if (decimation_ == 411)
-		colorhist_411_556(hist, frm, frm + off, frm + off + (off >> 2),
+	if (decimation_ == 420)
+		colorhist_420_556(hist, frm, frm + off, frm + off + (off >> 2),
 				  inw_, inh_);
 	else
 		colorhist_422_556(hist, frm, frm + off, frm + off + (off >> 1),

Modified: vic/branches/mpeg4/codec/decoder-mpeg4.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-mpeg4.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-mpeg4.cpp	Tue Nov 11 22:18:32 2008
@@ -64,7 +64,7 @@
 MPEG4Decoder::MPEG4Decoder():Decoder(2)
 {				/* , codec_(0), */
 
-    decimation_ = 411;
+    decimation_ = 420;
     /*
      * Assume CIF.  Picture header will trigger a resize if
      * we encounter QCIF instead.

Modified: vic/branches/mpeg4/codec/decoder-pvh.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder-pvh.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder-pvh.cpp	Tue Nov 11 22:18:32 2008
@@ -241,7 +241,7 @@
 	stat_[STAT_BAD_GEOM].name = "Pvh-Bad-Geom";
 	stat_[STAT_BAD_REFBIT].name = "Pvh-Bad-Refbits";
 	nstat_ = 3;
-	decimation_ = 411;
+	decimation_ = 420;
 
 	/*XXX*/
 	inw_ = 320;
@@ -1676,13 +1676,13 @@
 }
 
 /*
- * XXX should use PlaneDecoder class for 411 also
+ * XXX should use PlaneDecoder class for 420 also
  */
 
 int PvhDecoder::colorhist(u_int* hist) const
 {
 	int s = inw_ * inh_;
-	colorhist_411_556(hist, frm_, frm_ + s, frm_ + s + (s >> 2),
+	colorhist_420_556(hist, frm_, frm_ + s, frm_ + s + (s >> 2),
 			  inw_, inh_);
 	return (1);
 }

Modified: vic/branches/mpeg4/codec/decoder.cpp
==============================================================================
--- vic/branches/mpeg4/codec/decoder.cpp	(original)
+++ vic/branches/mpeg4/codec/decoder.cpp	Tue Nov 11 22:18:32 2008
@@ -250,7 +250,7 @@
 	}
 }
 
-void Decoder::colorhist_411_556(u_int* hist, const u_char* yp,
+void Decoder::colorhist_420_556(u_int* hist, const u_char* yp,
 					const u_char* up, const u_char* vp,
 					int width, int h) const
 {

Modified: vic/branches/mpeg4/codec/decoder.h
==============================================================================
--- vic/branches/mpeg4/codec/decoder.h	(original)
+++ vic/branches/mpeg4/codec/decoder.h	Tue Nov 11 22:18:32 2008
@@ -107,7 +107,7 @@
 
 	/*XXX steal back from rcvr */
 	int color_;
-	int decimation_;	/* 422 or 411 */
+	int decimation_;	/* 422 or 420 */
 	int inw_;		/* native image width */
 	int inh_;		/* native image height */
 
@@ -129,7 +129,7 @@
 	int nblk_;		/* number of 8x8 blocks */
 	int ndblk_;	/* number of blocks decoded in most recent frame */
 
-	void colorhist_411_556(u_int* hist, const u_char* y, const u_char* u,
+	void colorhist_420_556(u_int* hist, const u_char* y, const u_char* u,
 			       const u_char* v, int width, int height) const;
 	void colorhist_422_556(u_int* hist, const u_char* y, const u_char* u,
 			       const u_char* v, int width, int height) const;

Modified: vic/branches/mpeg4/codec/encoder-bvc.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-bvc.cpp	(original)
+++ vic/branches/mpeg4/codec/encoder-bvc.cpp	Tue Nov 11 22:18:32 2008
@@ -85,7 +85,7 @@
 		bb |= (bits) << (NBIT - (nbb)); \
 }
 
-BvcEncoder::BvcEncoder() : TransmitterModule(FT_YUV_411)
+BvcEncoder::BvcEncoder() : TransmitterModule(FT_YUV_420)
 {
 	bs_ = es_ = 0;
 	quant_ = 0;

Modified: vic/branches/mpeg4/codec/encoder-h261as.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-h261as.cpp	(original)
+++ vic/branches/mpeg4/codec/encoder-h261as.cpp	Tue Nov 11 22:18:32 2008
@@ -150,7 +150,7 @@
 } encoder_matcher_h261as;
 
 
-H261ASEncoder::H261ASEncoder() : TransmitterModule(FT_YUV_411),
+H261ASEncoder::H261ASEncoder() : TransmitterModule(FT_YUV_420),
 				 frame_buffer(0),
 				 frame_buffer_size(0),
 				 crref(0),

Modified: vic/branches/mpeg4/codec/encoder-pvh.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-pvh.cpp	(original)
+++ vic/branches/mpeg4/codec/encoder-pvh.cpp	Tue Nov 11 22:18:32 2008
@@ -387,7 +387,7 @@
 	Tcl& tcl = Tcl::instance();
 	if (argc == 2) {
 		if (strcmp(argv[1], "frame-format") == 0) {
-		    	tcl.result("411");
+		    	tcl.result("420");
 			return (TCL_OK);
 		}
 	} else if (argc == 4) {

Modified: vic/branches/mpeg4/codec/jpeg/jpeg.cpp
==============================================================================
--- vic/branches/mpeg4/codec/jpeg/jpeg.cpp	(original)
+++ vic/branches/mpeg4/codec/jpeg/jpeg.cpp	Tue Nov 11 22:18:32 2008
@@ -63,13 +63,13 @@
 #define	ODD(x)	((x & 1) == 1)
 
 //
-// derived decoders (411-pixel, 422-pixel, 411-DCT, and 422-DCT)
+// derived decoders (420-pixel, 422-pixel, 420-DCT, and 422-DCT)
 //
 
 
-class JpegDecoder_411 : public JpegPixelDecoder {
+class JpegDecoder_420 : public JpegPixelDecoder {
 public:
-	JpegDecoder_411(const config&, int, int);
+	JpegDecoder_420(const config&, int, int);
 	virtual int decode(const u_char* in, int len, u_char *marks, int mark);
 };
 
@@ -79,9 +79,9 @@
 	virtual int decode(const u_char* in, int len, u_char *marks, int mark);
 };
 
-class JpegDCTDecoder_411 : public JpegDCTDecoder {
+class JpegDCTDecoder_420 : public JpegDCTDecoder {
 public:
-	JpegDCTDecoder_411(const config&, int, int);
+	JpegDCTDecoder_420(const config&, int, int);
 	virtual int decode(const u_char* in, int len, u_char *marks, int mark);
 };
 
@@ -121,8 +121,8 @@
 	delete[] frm_; //SV-XXX: Debian
 }
 
-JpegDecoder_411::JpegDecoder_411(const config& c, int ow, int oh) 
-	        :JpegPixelDecoder(c, 411, ow, oh)
+JpegDecoder_420::JpegDecoder_420(const config& c, int ow, int oh) 
+	        :JpegPixelDecoder(c, 420, ow, oh)
 {
 	int n = osize_ + osize_ / 2;
 	frm_ = new u_char[n];		// pixel store
@@ -130,8 +130,8 @@
 	dct_unbias_ = 0;
 }
 
-JpegDCTDecoder_411::JpegDCTDecoder_411(const config& c, int ow, int oh) 
-		   :JpegDCTDecoder(c, 411, ow, oh)
+JpegDCTDecoder_420::JpegDCTDecoder_420(const config& c, int ow, int oh) 
+		   :JpegDCTDecoder(c, 420, ow, oh)
 {
 	int n = osize_ + osize_ / 2;
 	frm_ = new short[n];		// DCT store
@@ -195,9 +195,9 @@
 	    c.comp[1].hsf == 1 && c.comp[1].vsf == 1 &&
 	    c.comp[2].hsf == 1 && c.comp[2].vsf == 1) {	
 
-		// 411 decoder, RTP type 1, vsf = 2
+		// 420 decoder, RTP type 1, vsf = 2
 		if (c.comp[0].vsf == 2)
-				return (new JpegDecoder_411(c, ow, oh));
+				return (new JpegDecoder_420(c, ow, oh));
 
 		// 422 decoder, RTP type 0, vsf = 1
 		if (c.comp[0].vsf == 1)
@@ -212,9 +212,9 @@
 	    c.comp[1].hsf == 1 && c.comp[1].vsf == 1 &&
 	    c.comp[2].hsf == 1 && c.comp[2].vsf == 1) {	
 
-		// 411 decoder, RTP type 1, vsf = 2
+		// 420 decoder, RTP type 1, vsf = 2
 		if (c.comp[0].vsf == 2) 
-			return (new JpegDCTDecoder_411(c, ow, oh));
+			return (new JpegDCTDecoder_420(c, ow, oh));
 
 		// 422 decoder, RTP type 0, vsf = 1
 		if (c.comp[0].vsf == 1)
@@ -1179,10 +1179,10 @@
 }
 
 /*
- * 411 Decoders
+ * 420 Decoders
  */
 
-int JpegDecoder_411::decode(const u_char* in, int len, u_char *marks, int mark)
+int JpegDecoder_420::decode(const u_char* in, int len, u_char *marks, int mark)
 {
 	inb_ = in;
 	end_ = in + len;
@@ -1320,7 +1320,7 @@
 // decode only to DCT not pixels (i.e. don't to rdct step)
 // output is stored interleaved 4 Y's followed by 1 U and 1 V block
 //
-int JpegDCTDecoder_411::decode(const u_char* in, int len, u_char *marks, int mark)
+int JpegDCTDecoder_420::decode(const u_char* in, int len, u_char *marks, int mark)
 {
 	inb_ = in;
 	end_ = in + len;

Modified: vic/branches/mpeg4/codec/transcoder-jpeg.cpp
==============================================================================
--- vic/branches/mpeg4/codec/transcoder-jpeg.cpp	(original)
+++ vic/branches/mpeg4/codec/transcoder-jpeg.cpp	Tue Nov 11 22:18:32 2008
@@ -115,7 +115,7 @@
 	if (!ss || (jf->q_ != q_))
 		return (1);	// new q or sizes
 
-	if ((jf->type_ == 1) && (decimation_ != 411))
+	if ((jf->type_ == 1) && (decimation_ != 420))
 		return (1);	// new decimation/scaling factor
 
 	return (0);		// apparently no change
@@ -158,7 +158,7 @@
 JpegTranscoder::configure(JpegFrame *jf)
 {
 
-	decimation_ = (jf->type_ == 1) ? 411 : 422;
+	decimation_ = (jf->type_ == 1) ? 420 : 422;
 
 	/*
 	 * set up JPEG configuration block
@@ -167,7 +167,7 @@
 	JpegDecoder::defaults(config_);
 
 	config_.comp[0].hsf = 2;
-	config_.comp[0].vsf = (decimation_ == 411) ? 2 : 1;
+	config_.comp[0].vsf = (decimation_ == 420) ? 2 : 1;
 	config_.comp[1].hsf = 1;
 	config_.comp[1].vsf = 1;
 	config_.comp[2].hsf = 1;

Modified: vic/branches/mpeg4/html/CHANGES.html
==============================================================================
--- vic/branches/mpeg4/html/CHANGES.html	(original)
+++ vic/branches/mpeg4/html/CHANGES.html	Tue Nov 11 22:18:32 2008
@@ -641,7 +641,7 @@
 <li>[internal] Factored out code shared among grabbers for capturing input
   video to an onscreen window.  In the new model, tcl creates the capture
   window and installs it in the grabber.  Revamped parallax and xv grabbers
-  to use this approach.  Added supported to xv grabber for CIF and 411
+  to use this approach.  Added supported to xv grabber for CIF and 420
   capture.
 
 <li>Improved configure search scheme for locating X libraries and includes.
@@ -677,8 +677,8 @@
 <li>[internal] Added tcl hook so that decoder can assert that stream parameters
   have changed in a way that might affect the rendering modules.  For example,
   the RTP/JPEG type might change causing the output format to change from
-  YUV-422 to YUV-411.  In this case, we might have disable hardware decoding
-  (because the hardware doesn't support 411) or reallocate the software
+  YUV-422 to YUV-420.  In this case, we might have disable hardware decoding
+  (because the hardware doesn't support 420) or reallocate the software
   renderers because they depend on the decimation factor.
 
 <li>[internal] Changed interface between vic and jpeg/h.261 decoders with

Modified: vic/branches/mpeg4/module.cpp
==============================================================================
--- vic/branches/mpeg4/module.cpp	(original)
+++ vic/branches/mpeg4/module.cpp	Tue Nov 11 22:18:32 2008
@@ -40,7 +40,7 @@
 const char* Module::fttoa(int ft)
 {
 	switch (ft) {
-	case FT_YUV_411:  return ("411");
+	case FT_YUV_420:  return ("420");
 	case FT_YUV_422:  return ("422");
 	case FT_YUV_CIF:  return ("cif");
 	case FT_JPEG:	  return ("jpeg");
@@ -56,8 +56,8 @@
 
 int Module::atoft(const char* s)
 {
-	if (strcasecmp(s, "411") == 0)
-		return FT_YUV_411;
+	if (strcasecmp(s, "420") == 0)
+		return FT_YUV_420;
 	if (strcasecmp(s, "422") == 0)
 		return FT_YUV_422;
 	if (strcasecmp(s, "cif") == 0)

Modified: vic/branches/mpeg4/module.h
==============================================================================
--- vic/branches/mpeg4/module.h	(original)
+++ vic/branches/mpeg4/module.h	Tue Nov 11 22:18:32 2008
@@ -106,7 +106,7 @@
 };
 
 #define FT_HW		0x80
-#define FT_YUV_411	1
+#define FT_YUV_420	1
 #define FT_YUV_422	2
 #define FT_YUV_CIF	3
 #define FT_JPEG		(1|FT_HW)
@@ -138,7 +138,7 @@
 	int width_;
 	int height_;
 	int framesize_;
-	int ft_;		/* stream type: 422/411/cif/jpeg etc. */
+	int ft_;		/* stream type: 422/420/cif/jpeg etc. */
 };
 
 class TransmitterModule : public Module {

Modified: vic/branches/mpeg4/output-file.cpp
==============================================================================
--- vic/branches/mpeg4/output-file.cpp	(original)
+++ vic/branches/mpeg4/output-file.cpp	Tue Nov 11 22:18:32 2008
@@ -93,7 +93,7 @@
 	lasttime_=0;
 	cisname=NULL;
 	switch (type) {
-	case FT_YUV_411:
+	case FT_YUV_420:
 		break;
 	case FT_JPEG|FT_HW:
 		memcpy(jfif_header1,jfif_header1_,sizeof(jfif_header1_));
@@ -196,7 +196,7 @@
 //		xil_cis_set_attribute(cis_, "HEIGHT", (void *)hf->height_);
 		break;
 	}
-	case FT_YUV_411:
+	case FT_YUV_420:
 		p=vf->bp_;
 		len=vf->width_*vf->height_*6/4;
 		break;
@@ -247,8 +247,8 @@
 */
 	if (argc == 3 ) {
 		if (!strcmp(argv[1],"renderer")) {
-			if (!strcmp(argv[2],"411")) {
-				FILEOutputAssistor* p = new FILEOutputAssistor(FT_YUV_411);
+			if (!strcmp(argv[2],"420")) {
+				FILEOutputAssistor* p = new FILEOutputAssistor(FT_YUV_420);
 				tcl.result(p->name());
 				return (TCL_OK);
 			}
@@ -267,7 +267,7 @@
 				return (TCL_OK);
 			}
 #if 0
-			if (!strcmp(argv[2],"jpeg/411") || !strcmp(argv[2],"jpeg/422")) {
+			if (!strcmp(argv[2],"jpeg/420") || !strcmp(argv[2],"jpeg/422")) {
 				FILEOutputAssistor* p = new FILEOutputAssistor(FT_JPEG|FT_HW,filename_,&deviceattributes_);
 				tcl.result(p->name());
 				return (TCL_OK);

Modified: vic/branches/mpeg4/output-fileStream.cpp
==============================================================================
--- vic/branches/mpeg4/output-fileStream.cpp	(original)
+++ vic/branches/mpeg4/output-fileStream.cpp	Tue Nov 11 22:18:32 2008
@@ -96,7 +96,7 @@
 	lasttime_=0;
 	cisname=NULL;
 	switch (type) {
-	case FT_YUV_411:
+	case FT_YUV_420:
 		break;
 	case FT_JPEG|FT_HW:
 		memcpy(jfif_header1,jfif_header1_,sizeof(jfif_header1_));
@@ -153,8 +153,8 @@
 	sentfirstheader=0;
 	lastjpegtype_ = type;
 	switch (type) {
-	case 1: /* 411 */
-		decimation_ = 411;
+	case 1: /* 420 */
+		decimation_ = 420;
 		break;
 	default:
 		decimation_ = 422;
@@ -192,7 +192,7 @@
 			jfif_header1[i++] = w&0xff;
 			i++; 	/* components (3) */
 				i++;	/* comp id 0 */
-				if (decimation_ == 411)
+				if (decimation_ == 420)
 					jfif_header1[i++] = 0x22;/* 0x22 for 2 hor/2 vert */
 				else
 					jfif_header1[i++] = 0x21;/* 0x21 for 2 hor/1 vert */
@@ -225,7 +225,7 @@
 			jfif_header2[i++] = w&0xff;
 			i++; 	/* components (3) */
 				i++;	/* comp id 0 */
-				if (decimation_ == 411)
+				if (decimation_ == 420)
 					jfif_header2[i++] = 0x22;/* 0x22 for 2 hor/2 vert */
 				else
 					jfif_header2[i++] = 0x21;/* 0x21 for 2 hor/1 vert */
@@ -307,7 +307,7 @@
 //		xil_cis_set_attribute(cis_, "HEIGHT", (void *)hf->height_);
 		break;
 	}
-	case FT_YUV_411:
+	case FT_YUV_420:
 		p=vf->bp_;
 		len=vf->width_*vf->height_*6/4;
 		break;
@@ -348,8 +348,8 @@
 */
 	if (argc == 3 ) {
 		if (!strcmp(argv[1],"renderer")) {
-			if (!strcmp(argv[2],"411")) {
-				FILEOutputAssistor* p = new FILEOutputAssistor(FT_YUV_411);
+			if (!strcmp(argv[2],"420")) {
+				FILEOutputAssistor* p = new FILEOutputAssistor(FT_YUV_420);
 				tcl.result(p->name());
 				return (TCL_OK);
 			}
@@ -367,7 +367,7 @@
 				tcl.result(p->name());
 				return (TCL_OK);
 			}
-			if (!strcmp(argv[2],"jpeg/411") || !strcmp(argv[2],"jpeg/422")) {
+			if (!strcmp(argv[2],"jpeg/420") || !strcmp(argv[2],"jpeg/422")) {
 				//FILEOutputAssistor* p = new FILEOutputAssistor(FT_JPEG|FT_HW,filename_,&deviceattributes_);
 				FILEOutputAssistor* p = new FILEOutputAssistor(FT_JPEG|FT_HW);
 				tcl.result(p->name());

Modified: vic/branches/mpeg4/render/color-dither.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-dither.cpp	(original)
+++ vic/branches/mpeg4/render/color-dither.cpp	Tue Nov 11 22:18:32 2008
@@ -189,15 +189,15 @@
 			     u_int width, u_int height) const;
 	void dither_up2_422(const u_char* frm, u_int off, u_int x,
 			    u_int width, u_int height) const;
-	void dither_411(const u_char* frm, u_int off, u_int x,
+	void dither_420(const u_char* frm, u_int off, u_int x,
 			u_int width, u_int height) const;
-	void dither_down2_411(const u_char* frm, u_int off, u_int x,
+	void dither_down2_420(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
-	void dither_down4_411(const u_char* frm, u_int off, u_int x,
+	void dither_down4_420(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
-	void dither_down_411(const u_char* frm, u_int off, u_int x,
+	void dither_down_420(const u_char* frm, u_int off, u_int x,
 			     u_int width, u_int height) const;
-	void dither_up2_411(const u_char* frm, u_int off, u_int x,
+	void dither_up2_420(const u_char* frm, u_int off, u_int x,
 			    u_int width, u_int height) const;
 };
 
@@ -217,23 +217,23 @@
 void DitherWindowRenderer::update()
 {
 	static DitherMethod methods[] = {
-		&DitherWindowRenderer::dither_up2_411,
+		&DitherWindowRenderer::dither_up2_420,
 		&DitherWindowRenderer::dither_up2_422,
 		&DitherWindowRenderer::dither_gray_up,
 		&DitherWindowRenderer::dither_gray_up,
-		&DitherWindowRenderer::dither_411,
+		&DitherWindowRenderer::dither_420,
 		&DitherWindowRenderer::dither_422,
 		&DitherWindowRenderer::dither_gray,
 		&DitherWindowRenderer::dither_gray,
-		&DitherWindowRenderer::dither_down2_411,
+		&DitherWindowRenderer::dither_down2_420,
 		&DitherWindowRenderer::dither_down2_422,
 		&DitherWindowRenderer::dither_gray_down,
 		&DitherWindowRenderer::dither_gray_down,
-		&DitherWindowRenderer::dither_down4_411,
+		&DitherWindowRenderer::dither_down4_420,
 		&DitherWindowRenderer::dither_down4_422,
 		&DitherWindowRenderer::dither_gray_down,
 		&DitherWindowRenderer::dither_gray_down,
-		&DitherWindowRenderer::dither_down_411,
+		&DitherWindowRenderer::dither_down_420,
 		&DitherWindowRenderer::dither_down_422,
 		&DitherWindowRenderer::dither_gray_down,
 		&DitherWindowRenderer::dither_gray_down,
@@ -655,7 +655,7 @@
 	}
 }
 
-void DitherWindowRenderer::dither_411(const u_char* frm,
+void DitherWindowRenderer::dither_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {
@@ -736,7 +736,7 @@
 	}
 }
 
-void DitherWindowRenderer::dither_down2_411(const u_char* frm,
+void DitherWindowRenderer::dither_down2_420(const u_char* frm,
 					    u_int off, u_int x,
 					    u_int width, u_int height) const
 {
@@ -793,7 +793,7 @@
 	}
 }
 
-void DitherWindowRenderer::dither_down4_411(const u_char* frm,
+void DitherWindowRenderer::dither_down4_420(const u_char* frm,
 					    u_int off, u_int x,
 					    u_int width, u_int height) const
 {
@@ -894,7 +894,7 @@
 	}
 }
 
-void DitherWindowRenderer::dither_down_411(const u_char* frm,
+void DitherWindowRenderer::dither_down_420(const u_char* frm,
 					   u_int off, u_int x,
 					   u_int width, u_int height) const
 {
@@ -938,7 +938,7 @@
 	}
 }
 
-void DitherWindowRenderer::dither_up2_411(const u_char* frm,
+void DitherWindowRenderer::dither_up2_420(const u_char* frm,
 					  u_int off, u_int x,
 					  u_int width, u_int height) const
 {

Modified: vic/branches/mpeg4/render/color-ed.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-ed.cpp	(original)
+++ vic/branches/mpeg4/render/color-ed.cpp	Tue Nov 11 22:18:32 2008
@@ -192,15 +192,15 @@
 			     u_int width, u_int height) const;
 	void dither_up2_422(const u_char* frm, u_int off, u_int x,
 			    u_int width, u_int height) const;
-	void dither_411(const u_char* frm, u_int off, u_int x,
+	void dither_420(const u_char* frm, u_int off, u_int x,
 			u_int width, u_int height) const;
-	void dither_down2_411(const u_char* frm, u_int off, u_int x,
+	void dither_down2_420(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
-	void dither_down4_411(const u_char* frm, u_int off, u_int x,
+	void dither_down4_420(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
-	void dither_down_411(const u_char* frm, u_int off, u_int x,
+	void dither_down_420(const u_char* frm, u_int off, u_int x,
 			     u_int width, u_int height) const;
-	void dither_up2_411(const u_char* frm, u_int off, u_int x,
+	void dither_up2_420(const u_char* frm, u_int off, u_int x,
 			    u_int width, u_int height) const;
 };
 
@@ -220,23 +220,23 @@
 void EDWindowRenderer::update()
 {
 	static EDMethod	methods[] = {
-		&EDWindowRenderer::dither_up2_411,
+		&EDWindowRenderer::dither_up2_420,
 		&EDWindowRenderer::dither_up2_422,
 		&EDWindowRenderer::dither_gray_up,
 		&EDWindowRenderer::dither_gray_up,
-		&EDWindowRenderer::dither_411,
+		&EDWindowRenderer::dither_420,
 		&EDWindowRenderer::dither_422,
 		&EDWindowRenderer::dither_gray,
 		&EDWindowRenderer::dither_gray,
-		&EDWindowRenderer::dither_down2_411,
+		&EDWindowRenderer::dither_down2_420,
 		&EDWindowRenderer::dither_down2_422,
 		&EDWindowRenderer::dither_gray_down,
 		&EDWindowRenderer::dither_gray_down,
-		&EDWindowRenderer::dither_down4_411,
+		&EDWindowRenderer::dither_down4_420,
 		&EDWindowRenderer::dither_down4_422,
 		&EDWindowRenderer::dither_gray_down,
 		&EDWindowRenderer::dither_gray_down,
-		&EDWindowRenderer::dither_down_411,
+		&EDWindowRenderer::dither_down_420,
 		&EDWindowRenderer::dither_down_422,
 		&EDWindowRenderer::dither_gray_down,
 		&EDWindowRenderer::dither_gray_down,
@@ -736,7 +736,7 @@
 #endif
 }
 
-void EDWindowRenderer::dither_411(const u_char* frm,
+void EDWindowRenderer::dither_420(const u_char* frm,
 				  u_int off, u_int x,
 				  u_int width, u_int height) const
 {
@@ -810,7 +810,7 @@
 #endif
 }
 
-void EDWindowRenderer::dither_down2_411(const u_char* frm, u_int off, u_int x,
+void EDWindowRenderer::dither_down2_420(const u_char* frm, u_int off, u_int x,
 					u_int width, u_int height) const
 {
 #ifndef TESTING
@@ -903,7 +903,7 @@
 #endif
 }
 
-void EDWindowRenderer::dither_down4_411(const u_char* frm,
+void EDWindowRenderer::dither_down4_420(const u_char* frm,
 					u_int off, u_int x,
 					u_int width, u_int height) const
 {
@@ -970,7 +970,7 @@
 #endif
 }
 
-void EDWindowRenderer::dither_down_411(const u_char* frm,
+void EDWindowRenderer::dither_down_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -1041,7 +1041,7 @@
 #endif
 }
 
-void EDWindowRenderer::dither_up2_411(const u_char* frm,
+void EDWindowRenderer::dither_up2_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {

Modified: vic/branches/mpeg4/render/color-hi.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-hi.cpp	(original)
+++ vic/branches/mpeg4/render/color-hi.cpp	Tue Nov 11 22:18:32 2008
@@ -220,15 +220,15 @@
 			  u_int width, u_int height) const;
 	void map_up2_422(const u_char* frm, u_int off, u_int x,
 			 u_int width, u_int height) const;
-	void map_411(const u_char* frm, u_int off, u_int x,
+	void map_420(const u_char* frm, u_int off, u_int x,
 		     u_int width, u_int height) const;
-	void map_down2_411(const u_char* frm, u_int off, u_int x,
+	void map_down2_420(const u_char* frm, u_int off, u_int x,
 			   u_int width, u_int height) const;
-	void map_down4_411(const u_char* frm, u_int off, u_int x,
+	void map_down4_420(const u_char* frm, u_int off, u_int x,
 			   u_int width, u_int height) const;
-	void map_down_411(const u_char* frm, u_int off, u_int x,
+	void map_down_420(const u_char* frm, u_int off, u_int x,
 			  u_int width, u_int height) const;
-	void map_up2_411(const u_char* frm, u_int off, u_int x,
+	void map_up2_420(const u_char* frm, u_int off, u_int x,
 			 u_int width, u_int height) const;
 	void map_gray(const u_char* frm, u_int off, u_int x,
 		      u_int width, u_int height) const;
@@ -258,23 +258,23 @@
 void HiWindowRenderer::update()
 {
 	static HiMethod methods[] = {
-	    &HiWindowRenderer::map_up2_411,
+	    &HiWindowRenderer::map_up2_420,
 	    &HiWindowRenderer::map_up2_422,
 	    &HiWindowRenderer::map_gray_up2,
 	    &HiWindowRenderer::map_gray_up2,
-	    &HiWindowRenderer::map_411,
+	    &HiWindowRenderer::map_420,
 	    &HiWindowRenderer::map_422,
 	    &HiWindowRenderer::map_gray,
 	    &HiWindowRenderer::map_gray,
-	    &HiWindowRenderer::map_down2_411,
+	    &HiWindowRenderer::map_down2_420,
 	    &HiWindowRenderer::map_down2_422,
 	    &HiWindowRenderer::map_gray_down2,
 	    &HiWindowRenderer::map_gray_down2,
-	    &HiWindowRenderer::map_down4_411,
+	    &HiWindowRenderer::map_down4_420,
 	    &HiWindowRenderer::map_down4_422,
 	    &HiWindowRenderer::map_gray_down4,
 	    &HiWindowRenderer::map_gray_down4,
-	    &HiWindowRenderer::map_down_411,
+	    &HiWindowRenderer::map_down_420,
 	    &HiWindowRenderer::map_down_422,
 	    &HiWindowRenderer::map_gray_down,
 	    &HiWindowRenderer::map_gray_down,
@@ -523,7 +523,7 @@
 	}
 }
 
-void HiWindowRenderer::map_411(const u_char* frm, u_int off,
+void HiWindowRenderer::map_420(const u_char* frm, u_int off,
 				 u_int x, u_int width, u_int height) const
 {
 	register u_int iw = width_;
@@ -539,15 +539,15 @@
 		register u_short* xip2 = xip + iw;
 		register const u_char* yp2 = yp + iw;
 
-#define FOUR411(n) \
+#define FOUR420(n) \
 		uv = yuv2rgb + UVINDX(up[(n)/2], vp[(n)/2]); \
 		ONEPIX(yp[(n)], xip[(n)]) \
 		ONEPIX(yp[(n)+1], xip[(n)+1]) \
 		ONEPIX(yp2[(n)], xip2[(n)]) \
 		ONEPIX(yp2[(n)+1], xip2[(n)+1])
 
-		FOUR411(0)
-		FOUR411(2)
+		FOUR420(0)
+		FOUR420(2)
 
 		xip += 4;
 		yp += 4;
@@ -567,7 +567,7 @@
 	}
 }
 
-void HiWindowRenderer::map_down2_411(const u_char* frm,
+void HiWindowRenderer::map_down2_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -583,14 +583,14 @@
 	for (register int len = w * height >> 1; len > 0; len -= 8) {
 		PIXSETUP
 
-#define ONE411(n) \
+#define ONE420(n) \
 		uv = yuv2rgb + UVINDX(up[(n)/2], vp[(n)/2]); \
 		ONEPIX(yp[(n)], xip[(n)/2])
 
-		ONE411(0)
-		ONE411(2)
-		ONE411(4)
-		ONE411(6)
+		ONE420(0)
+		ONE420(2)
+		ONE420(4)
+		ONE420(6)
 
 		xip += 4;
 		yp += 8;
@@ -610,7 +610,7 @@
 	}
 }
 
-void HiWindowRenderer::map_down4_411(const u_char* frm,
+void HiWindowRenderer::map_down4_420(const u_char* frm,
 				       u_int off, u_int x, 
 				       u_int width, u_int height) const
 {
@@ -651,7 +651,7 @@
 /*
  * decimate by some power of 2 >= 2^3.
  */
-void HiWindowRenderer::map_down_411(const u_char* frm,
+void HiWindowRenderer::map_down_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {
@@ -689,7 +689,7 @@
 	}
 }
 
-void HiWindowRenderer::map_up2_411(const u_char* frm,
+void HiWindowRenderer::map_up2_420(const u_char* frm,
 				     u_int off, u_int x,
 				     u_int width, u_int height) const
 {

Modified: vic/branches/mpeg4/render/color-quant.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-quant.cpp	(original)
+++ vic/branches/mpeg4/render/color-quant.cpp	Tue Nov 11 22:18:32 2008
@@ -104,15 +104,15 @@
 			  u_int width, u_int height) const;
 	void map_up2_422(const u_char* frm, u_int off, u_int x,
 			 u_int width, u_int height) const;
-	void map_411(const u_char* frm, u_int off, u_int x,
+	void map_420(const u_char* frm, u_int off, u_int x,
 		     u_int width, u_int height) const;
-	void map_down2_411(const u_char* frm, u_int off, u_int x,
+	void map_down2_420(const u_char* frm, u_int off, u_int x,
 			   u_int width, u_int height) const;
-	void map_down4_411(const u_char* frm, u_int off, u_int x,
+	void map_down4_420(const u_char* frm, u_int off, u_int x,
 			   u_int width, u_int height) const;
-	void map_down_411(const u_char* frm, u_int off, u_int x,
+	void map_down_420(const u_char* frm, u_int off, u_int x,
 			  u_int width, u_int height) const;
-	void map_up2_411(const u_char* frm, u_int off, u_int x,
+	void map_up2_420(const u_char* frm, u_int off, u_int x,
 			 u_int width, u_int height) const;
 };
 
@@ -132,23 +132,23 @@
 void QuantWindowRenderer::update()
 {
 	static QuantMethod methods[] = {
-	  &QuantWindowRenderer::map_up2_411,
+	  &QuantWindowRenderer::map_up2_420,
 	  &QuantWindowRenderer::map_up2_422,
 	  &QuantWindowRenderer::dither_gray_up,
 	  &QuantWindowRenderer::dither_gray_up,
-	  &QuantWindowRenderer::map_411,
+	  &QuantWindowRenderer::map_420,
 	  &QuantWindowRenderer::map_422,
 	  &QuantWindowRenderer::dither_gray,
 	  &QuantWindowRenderer::dither_gray,
-	  &QuantWindowRenderer::map_down2_411,
+	  &QuantWindowRenderer::map_down2_420,
 	  &QuantWindowRenderer::map_down2_422,
 	  &QuantWindowRenderer::dither_gray_down,
 	  &QuantWindowRenderer::dither_gray_down,
-	  &QuantWindowRenderer::map_down4_411,
+	  &QuantWindowRenderer::map_down4_420,
 	  &QuantWindowRenderer::map_down4_422,
 	  &QuantWindowRenderer::dither_gray_down,
 	  &QuantWindowRenderer::dither_gray_down,
-	  &QuantWindowRenderer::map_down_411,
+	  &QuantWindowRenderer::map_down_420,
 	  &QuantWindowRenderer::map_down_422,
 	  &QuantWindowRenderer::dither_gray_down,
 	  &QuantWindowRenderer::dither_gray_down,
@@ -497,7 +497,7 @@
 }
 
 
-void QuantWindowRenderer::map_411(const u_char* frm, u_int off,
+void QuantWindowRenderer::map_420(const u_char* frm, u_int off,
 				  u_int x, u_int width, u_int height) const
 {
 	register u_int iw = width_;
@@ -574,7 +574,7 @@
 	}
 }
 
-void QuantWindowRenderer::map_down2_411(const u_char* frm,
+void QuantWindowRenderer::map_down2_420(const u_char* frm,
 					u_int off, u_int x,
 					u_int width, u_int height) const
 {
@@ -628,7 +628,7 @@
 	}
 }
 
-void QuantWindowRenderer::map_down4_411(const u_char* frm,
+void QuantWindowRenderer::map_down4_420(const u_char* frm,
 					u_int off, u_int x,
 					u_int width, u_int height) const
 {
@@ -715,15 +715,15 @@
 	}
 }
 
-void QuantWindowRenderer::map_down_411(const u_char* frm,
+void QuantWindowRenderer::map_down_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
 	/*XXX*/
-	map_down4_411(frm, off, x, width, height);
+	map_down4_420(frm, off, x, width, height);
 }
 
-void QuantWindowRenderer::map_up2_411(const u_char* frm,
+void QuantWindowRenderer::map_up2_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {

Modified: vic/branches/mpeg4/render/color-true.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-true.cpp	(original)
+++ vic/branches/mpeg4/render/color-true.cpp	Tue Nov 11 22:18:32 2008
@@ -236,15 +236,15 @@
 				  u_int width, u_int height) const;
 	void map_up2_422(const u_char* frm, u_int off, u_int x,
 				 u_int width, u_int height) const;
-	void map_411(const u_char* frm, u_int off, u_int x,
+	void map_420(const u_char* frm, u_int off, u_int x,
 			     u_int width, u_int height) const;
-	void map_down2_411(const u_char* frm, u_int off, u_int x,
+	void map_down2_420(const u_char* frm, u_int off, u_int x,
 				   u_int width, u_int height) const;
-	void map_down4_411(const u_char* frm, u_int off, u_int x,
+	void map_down4_420(const u_char* frm, u_int off, u_int x,
 				   u_int width, u_int height) const;
-	void map_down_411(const u_char* frm, u_int off, u_int x,
+	void map_down_420(const u_char* frm, u_int off, u_int x,
 				  u_int width, u_int height) const;
-	void map_up2_411(const u_char* frm, u_int off, u_int x,
+	void map_up2_420(const u_char* frm, u_int off, u_int x,
 				 u_int width, u_int height) const;
 	void map_gray(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
@@ -284,15 +284,15 @@
 				  u_int width, u_int height) const;
 	void map_up2_422(const u_char* frm, u_int off, u_int x,
 				 u_int width, u_int height) const;
-	void map_411(const u_char* frm, u_int off, u_int x,
+	void map_420(const u_char* frm, u_int off, u_int x,
 			     u_int width, u_int height) const;
-	void map_down2_411(const u_char* frm, u_int off, u_int x,
+	void map_down2_420(const u_char* frm, u_int off, u_int x,
 				   u_int width, u_int height) const;
-	void map_down4_411(const u_char* frm, u_int off, u_int x,
+	void map_down4_420(const u_char* frm, u_int off, u_int x,
 				   u_int width, u_int height) const;
-	void map_down_411(const u_char* frm, u_int off, u_int x,
+	void map_down_420(const u_char* frm, u_int off, u_int x,
 				  u_int width, u_int height) const;
-	void map_up2_411(const u_char* frm, u_int off, u_int x,
+	void map_up2_420(const u_char* frm, u_int off, u_int x,
 				 u_int width, u_int height) const;
 	void map_gray(const u_char* frm, u_int off, u_int x,
 			      u_int width, u_int height) const;
@@ -328,23 +328,23 @@
 void TrueWindowRenderer24::update()
 {
 	static True24Method methods[] = {
-	    &TrueWindowRenderer24::map_up2_411,
+	    &TrueWindowRenderer24::map_up2_420,
 	    &TrueWindowRenderer24::map_up2_422,
 	    &TrueWindowRenderer24::map_gray_up2,
 	    &TrueWindowRenderer24::map_gray_up2,
-	    &TrueWindowRenderer24::map_411,
+	    &TrueWindowRenderer24::map_420,
 	    &TrueWindowRenderer24::map_422,
 	    &TrueWindowRenderer24::map_gray,
 	    &TrueWindowRenderer24::map_gray,
-	    &TrueWindowRenderer24::map_down2_411,
+	    &TrueWindowRenderer24::map_down2_420,
 	    &TrueWindowRenderer24::map_down2_422,
 	    &TrueWindowRenderer24::map_gray_down2,
 	    &TrueWindowRenderer24::map_gray_down2,
-	    &TrueWindowRenderer24::map_down4_411,
+	    &TrueWindowRenderer24::map_down4_420,
 	    &TrueWindowRenderer24::map_down4_422,
 	    &TrueWindowRenderer24::map_gray_down4,
 	    &TrueWindowRenderer24::map_gray_down4,
-	    &TrueWindowRenderer24::map_down_411,
+	    &TrueWindowRenderer24::map_down_420,
 	    &TrueWindowRenderer24::map_down_422,
 	    &TrueWindowRenderer24::map_gray_down,
 	    &TrueWindowRenderer24::map_gray_down,
@@ -355,23 +355,23 @@
 void TrueWindowRenderer32::update()
 {
 	static True32Method methods[] = {
-	    &TrueWindowRenderer32::map_up2_411,
+	    &TrueWindowRenderer32::map_up2_420,
 	    &TrueWindowRenderer32::map_up2_422,
 	    &TrueWindowRenderer32::map_gray_up2,
 	    &TrueWindowRenderer32::map_gray_up2,
-	    &TrueWindowRenderer32::map_411,
+	    &TrueWindowRenderer32::map_420,
 	    &TrueWindowRenderer32::map_422,
 	    &TrueWindowRenderer32::map_gray,
 	    &TrueWindowRenderer32::map_gray,
-	    &TrueWindowRenderer32::map_down2_411,
+	    &TrueWindowRenderer32::map_down2_420,
 	    &TrueWindowRenderer32::map_down2_422,
 	    &TrueWindowRenderer32::map_gray_down2,
 	    &TrueWindowRenderer32::map_gray_down2,
-	    &TrueWindowRenderer32::map_down4_411,
+	    &TrueWindowRenderer32::map_down4_420,
 	    &TrueWindowRenderer32::map_down4_422,
 	    &TrueWindowRenderer32::map_gray_down4,
 	    &TrueWindowRenderer32::map_gray_down4,
-	    &TrueWindowRenderer32::map_down_411,
+	    &TrueWindowRenderer32::map_down_420,
 	    &TrueWindowRenderer32::map_down_422,
 	    &TrueWindowRenderer32::map_gray_down,
 	    &TrueWindowRenderer32::map_gray_down,
@@ -690,7 +690,7 @@
 	}
 }
 
-void TrueWindowRenderer32::map_411(const u_char* frm, u_int off,
+void TrueWindowRenderer32::map_420(const u_char* frm, u_int off,
 				 u_int x, u_int width, u_int height) const
 {
 	register u_int iw = width_;
@@ -709,15 +709,15 @@
 		register RGBPointer xip2 = xip + iw;
 		register const u_char* yp2 = yp + iw;
 
-#define FOUR411(n) \
+#define FOUR420(n) \
 		uv = yuv2rgb[(up[(n)/2] << 8) | vp[(n)/2]]; \
 		ONEPIX(yp[(n)], xip[(n)]) \
 		ONEPIX(yp[(n)+1], xip[(n)+1]) \
 		ONEPIX(yp2[(n)], xip2[(n)]) \
 		ONEPIX(yp2[(n)+1], xip2[(n)+1])
 
-		FOUR411(0)
-		FOUR411(2)
+		FOUR420(0)
+		FOUR420(2)
 
 		xip += 4;
 		yp += 4;
@@ -738,7 +738,7 @@
 }
 
 #ifdef notdef
-void TrueWindowRenderer32::map_411_16(const u_char* frm, u_int off,
+void TrueWindowRenderer32::map_420_16(const u_char* frm, u_int off,
 				    u_int x, u_int width, u_int height) const
 {
 #ifdef FIX_THIS
@@ -809,7 +809,7 @@
 }
 #endif
 
-void TrueWindowRenderer32::map_down2_411(const u_char* frm,
+void TrueWindowRenderer32::map_down2_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -828,14 +828,14 @@
 		register u_int l, uv;
 		register u_int uflo, sum;
 
-#define ONE411(n) \
+#define ONE420(n) \
 		uv = yuv2rgb[(up[(n)/2] << 8) | vp[(n)/2]]; \
 		ONEPIX(yp[(n)], xip[(n)/2])
 
-		ONE411(0)
-		ONE411(2)
-		ONE411(4)
-		ONE411(6)
+		ONE420(0)
+		ONE420(2)
+		ONE420(4)
+		ONE420(6)
 
 		xip += 4;
 		yp += 8;
@@ -855,7 +855,7 @@
 	}
 }
 
-void TrueWindowRenderer32::map_down4_411(const u_char* frm,
+void TrueWindowRenderer32::map_down4_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -899,7 +899,7 @@
 /*
  * decimate by some power of 2 >= 2^3.
  */
-void TrueWindowRenderer32::map_down_411(const u_char* frm,
+void TrueWindowRenderer32::map_down_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {
@@ -940,7 +940,7 @@
 	}
 }
 
-void TrueWindowRenderer32::map_up2_411(const u_char* frm,
+void TrueWindowRenderer32::map_up2_420(const u_char* frm,
 				     u_int off, u_int x,
 				     u_int width, u_int height) const
 {
@@ -1508,7 +1508,7 @@
 	}
 }
 
-void TrueWindowRenderer24::map_411(const u_char* frm, u_int off,
+void TrueWindowRenderer24::map_420(const u_char* frm, u_int off,
 				 u_int x, u_int width, u_int height) const
 {
 	register u_int iw = width_;
@@ -1527,15 +1527,15 @@
 		register char* xip2 = xip + 3*iw;
 		register const u_char* yp2 = yp + iw;
 
-#define PFOUR411(n) \
+#define PFOUR420(n) \
 		uv = yuv2rgb[(up[(n)/2] << 8) | vp[(n)/2]]; \
 		PONEPIX(yp[(n)], xip[3*(n)]) \
 		PONEPIX(yp[(n)+1], xip[3*(n)+3]) \
 		PONEPIX(yp2[(n)], xip2[3*(n)]) \
 		PONEPIX(yp2[(n)+1], xip2[3*(n)+3])
 
-		PFOUR411(0)
-		PFOUR411(2)
+		PFOUR420(0)
+		PFOUR420(2)
 
 		xip += 12;
 		yp += 4;
@@ -1556,7 +1556,7 @@
 }
 
 #ifdef notdef
-void TrueWindowRenderer24::map_411_16(const u_char* frm, u_int off,
+void TrueWindowRenderer24::map_420_16(const u_char* frm, u_int off,
 				    u_int x, u_int width, u_int height) const
 {
 #ifdef FIX_THIS
@@ -1627,7 +1627,7 @@
 }
 #endif
 
-void TrueWindowRenderer24::map_down2_411(const u_char* frm,
+void TrueWindowRenderer24::map_down2_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -1646,14 +1646,14 @@
 		register u_int l, uv;
 		register u_int uflo, sum;
 
-#define PONE411(n) \
+#define PONE420(n) \
 		uv = yuv2rgb[(up[(n)/2] << 8) | vp[(n)/2]]; \
 		PONEPIX(yp[(n)], xip[3*(n)/2])
 
-		PONE411(0)
-		PONE411(2)
-		PONE411(4)
-		PONE411(6)
+		PONE420(0)
+		PONE420(2)
+		PONE420(4)
+		PONE420(6)
 
 		xip += 12;
 		yp += 8;
@@ -1673,7 +1673,7 @@
 	}
 }
 
-void TrueWindowRenderer24::map_down4_411(const u_char* frm,
+void TrueWindowRenderer24::map_down4_420(const u_char* frm,
 				       u_int off, u_int x,
 				       u_int width, u_int height) const
 {
@@ -1717,7 +1717,7 @@
 /*
  * decimate by some power of 2 >= 2^3.
  */
-void TrueWindowRenderer24::map_down_411(const u_char* frm,
+void TrueWindowRenderer24::map_down_420(const u_char* frm,
 				      u_int off, u_int x,
 				      u_int width, u_int height) const
 {
@@ -1758,7 +1758,7 @@
 	}
 }
 
-void TrueWindowRenderer24::map_up2_411(const u_char* frm,
+void TrueWindowRenderer24::map_up2_420(const u_char* frm,
 				     u_int off, u_int x,
 				     u_int width, u_int height) const
 {

Modified: vic/branches/mpeg4/render/color-yuv.cpp
==============================================================================
--- vic/branches/mpeg4/render/color-yuv.cpp	(original)
+++ vic/branches/mpeg4/render/color-yuv.cpp	Tue Nov 11 22:18:32 2008
@@ -236,7 +236,7 @@
 	void map_422(u_char* xip,
 		     const u_char* frm, u_int off, u_int x,
 		     u_int width, u_int height) const;
-	void map_411(u_char* xip,
+	void map_420(u_char* xip,
 		     const u_char* frm, u_int off, u_int x,
 		     u_int width, u_int height) const;
 };
@@ -250,8 +250,8 @@
 {
 	if (!color_)
 		method_ = &map_gray;
-	else if (decimation_ == 411)
-		method_ = &map_411;
+	else if (decimation_ == 420)
+		method_ = &map_420;
 	else
 		method_ = &map_422;
 }
@@ -384,18 +384,18 @@
 }
 
 #if 0
-YuvColorizer_411::YuvColorizer_411(const YuvColorModel& cm, int w, int h, int s)
+YuvColorizer_420::YuvColorizer_420(const YuvColorModel& cm, int w, int h, int s)
 {
-    printf("new YuvColorizer_411\n");
+    printf("new YuvColorizer_420\n");
 }
 #endif
 
-YuvColorizer_411::~YuvColorizer_411()
+YuvColorizer_420::~YuvColorizer_420()
 {
-    printf("delete YuvColorizer_411\n");
+    printf("delete YuvColorizer_420\n");
 }
 
-void YuvColorizer::colorize_411(SharedVideoImage* image,
+void YuvColorizer::colorize_420(SharedVideoImage* image,
 			       register const u_char *y_data,
 			       register const u_char* u_data,
 			       register const u_char *v_data,
@@ -410,7 +410,7 @@
     int cbcrwidth = frame->nCbCrBytesPerRow;
 
 #ifdef DEBUG_XX
-    printf("YuvColorizer_411::colorize: scale=%d Y_bpr=%d UV_bpr=%d frame %dx%d x=%d y=%d %dx%d\n",
+    printf("YuvColorizer_420::colorize: scale=%d Y_bpr=%d UV_bpr=%d frame %dx%d x=%d y=%d %dx%d\n",
 	   scale_, frame->nYBytesPerRow, frame->nCbCrBytesPerRow, frame->width, frame->height, x, y, width, height);
 #endif
 
@@ -499,7 +499,7 @@
     }
 }
 
-void YuvColorizer_411::colorize(SharedVideoImage* image,
+void YuvColorizer_420::colorize(SharedVideoImage* image,
 			       const u_char *y_data,
 			       const u_char* u_data,
 			       const u_char *v_data,
@@ -512,12 +512,12 @@
 	image->yuvScale = 0;
     }
 
-    colorize_411(image,
+    colorize_420(image,
 		 y_data, u_data, v_data,
 		 x, y, width, height);
 }
 
-void Int2YuvColorizer_411::colorize(SharedVideoImage* image,
+void Int2YuvColorizer_420::colorize(SharedVideoImage* image,
 				   const u_char *y_data,
 				   const u_char* u_data,
 				   const u_char *v_data,
@@ -530,30 +530,30 @@
 	image->yuvScale = -1;
     }
 
-    colorize_411(image,
+    colorize_420(image,
 		 y_data, u_data, v_data,
 		 x, y, width, height);
 }
 
 #if 0
-YuvColorizer16_411::YuvColorizer16_411(const YuvColorModel& cm, int w, int h, int s)
+YuvColorizer16_420::YuvColorizer16_420(const YuvColorModel& cm, int w, int h, int s)
 {
-    printf("new YuvColorizer16_411\n");
+    printf("new YuvColorizer16_420\n");
 }
 #endif
 
-YuvColorizer16_411::~YuvColorizer16_411()
+YuvColorizer16_420::~YuvColorizer16_420()
 {
-    printf("delete YuvColorizer16_411\n");
+    printf("delete YuvColorizer16_420\n");
 }
 
-void YuvColorizer16_411::colorize(SharedVideoImage* image,
+void YuvColorizer16_420::colorize(SharedVideoImage* image,
 				 register const u_char *y_data,
 				 register const u_char* u_data,
 				 register const u_char *v_data,
 				 int x, int y, int width, int height) const
 {
-    printf("YuvColorizer16_411::colorize: \n");
+    printf("YuvColorizer16_420::colorize: \n");
 }
 
 
@@ -694,7 +694,7 @@
 	h = YUV_NEXT_MULT(h, 4);
 
 	yuvError status;
-	if ((status = yuvCreateFrame(YUV_FORMAT_411,
+	if ((status = yuvCreateFrame(YUV_FORMAT_420,
 				     w, h,
 				     w, h,
 				     ((w % 16) || (h % 16))?0:YUV_CREATE_FRAME_HINTS,

Modified: vic/branches/mpeg4/render/renderer-window.cpp
==============================================================================
--- vic/branches/mpeg4/render/renderer-window.cpp	(original)
+++ vic/branches/mpeg4/render/renderer-window.cpp	Tue Nov 11 22:18:32 2008
@@ -39,7 +39,7 @@
 #include "color.h"
 
 WindowRenderer::WindowRenderer(VideoWindow* w, int decimation) :
-	BlockRenderer(decimation == 422 ? FT_YUV_422 : FT_YUV_411),
+	BlockRenderer(decimation == 422 ? FT_YUV_422 : FT_YUV_420),
 	window_(w),
 	image_(0),
 	ww_(w->width()),

Modified: vic/branches/mpeg4/render/renderer-window.h
==============================================================================
--- vic/branches/mpeg4/render/renderer-window.h	(original)
+++ vic/branches/mpeg4/render/renderer-window.h	Tue Nov 11 22:18:32 2008
@@ -74,7 +74,7 @@
 	int outw_;              /* width of target image (maybe != width_) */
 	int outh_;              /* height of target image (maybe != height_) */
 	int color_;		/* false to render grayscale */
-	int decimation_;	/* 422 or 411 */
+	int decimation_;	/* 422 or 420 */
 };
 
 inline int WindowRenderer::index() const

Modified: vic/branches/mpeg4/render/rgb-converter.cpp
==============================================================================
--- vic/branches/mpeg4/render/rgb-converter.cpp	(original)
+++ vic/branches/mpeg4/render/rgb-converter.cpp	Tue Nov 11 22:18:32 2008
@@ -50,7 +50,7 @@
 u_int32_t RGB_Converter::b2yuv_[256];
 
 RGB_Converter_422 RGB_Converter_422::instance_;
-RGB_Converter_411 RGB_Converter_411::instance_;
+RGB_Converter_420 RGB_Converter_420::instance_;
 
 RGB_Converter::RGB_Converter(int bpp, u_int8_t *map, int ncol) :
 	bpp_(bpp), ncol_(0), ymap_(0), umap_(0), vmap_(0), method_(0)
@@ -195,7 +195,7 @@
 	if (invert) \
 		p -= stride << 1;
 
-#define INIT411 \
+#define INIT420 \
 	if (outw == 0) \
 		outw = inw; \
 	if (outh == 0) \
@@ -236,7 +236,7 @@
 	up += outpad >> 2; \
 	vp += outpad >> 2;
 
-#define ADVANCE411 \
+#define ADVANCE420 \
 		p += inpad; \
 		yp += outw + outpad; \
 		up += outpad >> 1; \
@@ -299,9 +299,9 @@
 	}
 }
 
-void RGB_Converter_411::convert32(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert32(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 	for (h >>= 1; --h >= 0; ) {
 		for (int x = 0; x < w; x += 2) {
 			u_int32_t yuv = R[p[ROFF]];
@@ -331,7 +331,7 @@
 			p += 4;
 			++yp;
 		}
-		ADVANCE411
+		ADVANCE420
 	}
 }
 
@@ -368,9 +368,9 @@
 	}
 }
 
-void RGB_Converter_411::convert24(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert24(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 	for (h >>= 1; --h >= 0; ) {
 		for (int x = 0; x < w; x += 2) {
 			u_int32_t yuv = R[p[ROFF]];
@@ -400,7 +400,7 @@
 			p += 3;
 			++yp;
 		}
-		ADVANCE411
+		ADVANCE420
 	}
 }
 
@@ -436,9 +436,9 @@
 	}
 }
 
-void RGB_Converter_411::convert16(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert16(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 	next_line /= 2;
 	u_int16_t* sp;
 	for (h >>= 1; --h >= 0; ) {
@@ -472,7 +472,7 @@
 			++yp;
 		}
 		p = (u_int8_t *)sp;
-		ADVANCE411
+		ADVANCE420
 	}
 }
 
@@ -498,9 +498,9 @@
 	}
 }
 
-void RGB_Converter_411::convert8(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert8(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 
 	UNUSED(R); //SV-XXX
         UNUSED(G); //SV-XXX
@@ -519,7 +519,7 @@
 			p++;
 			++yp;
 		}
-		ADVANCE411
+		ADVANCE420
 	}
 }
 
@@ -545,9 +545,9 @@
 	}
 }
 
-void RGB_Converter_411::convert4(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert4(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 
         UNUSED(R); //SV-XXX
         UNUSED(G); //SV-XXX
@@ -568,7 +568,7 @@
 
 			p++;
 		}
-		ADVANCE411
+		ADVANCE420
 	}
 }
 
@@ -607,9 +607,9 @@
 	}
 }
 
-void RGB_Converter_411::convert1(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
+void RGB_Converter_420::convert1(u_int8_t* p, int inw, int inh, u_int8_t* frm, int outw, int outh, int invert)
 {
-	INIT411
+	INIT420
 
         UNUSED(R); //SV-XXX
         UNUSED(G); //SV-XXX
@@ -652,6 +652,6 @@
 			}
 			p++;
 		}
-		ADVANCE411
+		ADVANCE420
 	}
 }

Modified: vic/branches/mpeg4/render/rgb-converter.h
==============================================================================
--- vic/branches/mpeg4/render/rgb-converter.h	(original)
+++ vic/branches/mpeg4/render/rgb-converter.h	Tue Nov 11 22:18:32 2008
@@ -92,9 +92,9 @@
 	static RGB_Converter_422 instance_;
 };
 
-class RGB_Converter_411 : public RGB_Converter {
+class RGB_Converter_420 : public RGB_Converter {
 public:
-	RGB_Converter_411(int bpp = 32, u_int8_t* map = NULL, int ncol = 0) :
+	RGB_Converter_420(int bpp = 32, u_int8_t* map = NULL, int ncol = 0) :
 		RGB_Converter(bpp, map, ncol) {}
 	static RGB_Converter* instance() { return (&instance_); }
 protected:
@@ -106,7 +106,7 @@
 	virtual void convert1(u_int8_t* rgb, int w, int h, u_int8_t* frm, int outw, int outh, int invert);
 
 	/* Backwards compatibility :-) */
-	static RGB_Converter_411 instance_;
+	static RGB_Converter_420 instance_;
 };
 
 #endif

Modified: vic/branches/mpeg4/tcl/cf-tm.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/cf-tm.tcl	(original)
+++ vic/branches/mpeg4/tcl/cf-tm.tcl	Tue Nov 11 22:18:32 2008
@@ -37,9 +37,9 @@
 #
 
 proc tm_bootstrap {} {
-	global tm411 tm422
-	if ![info exists tm411] {
-		set tm411 [new module compositor/411]
+	global tm420 tm422
+	if ![info exists tm420] {
+		set tm420 [new module compositor/420]
 		set tm422 [new module compositor/422]
 	}
 }
@@ -51,10 +51,10 @@
 	}
 	set ff [$encoder frame-format]
 	if { $ff == "cif" } {
-		set ff 411
+		set ff 420
 	}
-	if { $ff == "411" || $ff == "422" } {
-		global tm411 tm422
+	if { $ff == "420" || $ff == "422" } {
+		global tm420 tm422
 		tm_bootstrap
 		set tm [set tm$ff]
 		$tm target $encoder
@@ -117,43 +117,43 @@
 }
 
 proc tm_destroy id {
-	global tm411 tm422 tm_obj
+	global tm420 tm422 tm_obj
 	if [tm_check $id] {
 		set o $tm_obj($id)
 		unset tm_obj($id)
-		$tm411 detach $o
+		$tm420 detach $o
 		$tm422 detach $o
 		delete $o
 	}
 }
 
 proc tm_place { id x y depth } {
-	global tm411 tm422 tm_obj tm_depth
+	global tm420 tm422 tm_obj tm_depth
 	if [tm_check $id] {
 		set o $tm_obj($id)
 		if { ![info exists tm_depth($o)] } {
 			set tm_depth($o) $depth
-			$tm411 attach $o $x $y $depth
+			$tm420 attach $o $x $y $depth
 			$tm422 attach $o $x $y $depth
 		} elseif { $tm_depth($o) != $depth } {
 			set tm_depth($o) $depth
-			$tm411 detach $o
+			$tm420 detach $o
 			$tm422 detach $o
-			$tm411 attach $o $x $y $depth
+			$tm420 attach $o $x $y $depth
 			$tm422 attach $o $x $y $depth
 		} else {
-			$tm411 move $o $x $y
+			$tm420 move $o $x $y
 			$tm422 move $o $x $y
 		}
 	}
 }
 
 proc tm_remove id {
-	global tm411 tm422 tm_obj
+	global tm420 tm422 tm_obj
 	if [tm_check $id] {
 		set o $tm_obj($id)
 		unset tm_obj($id)
-		$tm411 detach $o
+		$tm420 detach $o
 		$tm422 detach $o
 		delete $o
 	}

Modified: vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl	(original)
+++ vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl	Tue Nov 11 22:18:32 2008
@@ -381,8 +381,8 @@
 		set ff [$grabtarget frame-format]
 		set V(grabber) [$videoDevice open $ff]
 		# special cases
-		if { $V(grabber) == "" && $ff == "411" } {
-			# try cif instead of 411
+		if { $V(grabber) == "" && $ff == "420" } {
+			# try cif instead of 420
 			set V(grabber) [$videoDevice open cif]
 		}
 		if { $V(grabber) == "" } {
@@ -637,7 +637,7 @@
 	if [inList 422 $formats] {
 		set fmtList "$fmtList nv nvdct cellb jpeg raw"
 	}
-	if [inList 411 $formats] {
+	if [inList 420 $formats] {
 		set fmtList "$fmtList bvc pvh"
 	}
 	if [inList cif $sizes] {

Modified: vic/branches/mpeg4/tcl/ui-h261_play.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-h261_play.tcl	(original)
+++ vic/branches/mpeg4/tcl/ui-h261_play.tcl	Tue Nov 11 22:18:32 2008
@@ -165,7 +165,7 @@
 
 	update 
 	global V showChanges
-	set r [$V(colorModel) renderer $w 411]
+	set r [$V(colorModel) renderer $w 420]
 	$r color 1
 	if {$showChanges} {
 		$r irthresh 2000

Modified: vic/branches/mpeg4/tcl/ui-main.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-main.tcl	(original)
+++ vic/branches/mpeg4/tcl/ui-main.tcl	Tue Nov 11 22:18:32 2008
@@ -849,7 +849,7 @@
 # affect the choice of renderer.  For example, when a jpeg stream
 # changes from type-0 to type-1 we might have to revert from
 # hardware to software decoding, or we might have to reallocate
-# a 422 renderer as a 411 renderer.  This never needs to happen
+# a 422 renderer as a 420 renderer.  This never needs to happen
 # for most stream types (i.e., because the decimation factor is fixed).
 #
 proc decoder_changed d {

Modified: vic/branches/mpeg4/tcl/ui-vdd.tcl
==============================================================================
--- vic/branches/mpeg4/tcl/ui-vdd.tcl	(original)
+++ vic/branches/mpeg4/tcl/ui-vdd.tcl	Tue Nov 11 22:18:32 2008
@@ -189,7 +189,7 @@
 	update 
 
 	#XXX
-	set decimation 411
+	set decimation 420
 	global vicPriv
 	set target [$vicPriv(colorModel) renderer $w $decimation]
 	decoder target $target

Modified: vic/branches/mpeg4/video/assistor-plx.cpp
==============================================================================
--- vic/branches/mpeg4/video/assistor-plx.cpp	(original)
+++ vic/branches/mpeg4/video/assistor-plx.cpp	Tue Nov 11 22:18:32 2008
@@ -131,7 +131,7 @@
 int PlxWindowAssistor::consume(const VideoFrame* vf)
 {
 	JpegFrame* p = (JpegFrame*)vf;
-	// Can't handle 411, only 422 XXX
+	// Can't handle 420, only 422 XXX
 	if (p->type_ != 0)
 		return (0);
 

Modified: vic/branches/mpeg4/video/assistor-xil.cpp
==============================================================================
--- vic/branches/mpeg4/video/assistor-xil.cpp	(original)
+++ vic/branches/mpeg4/video/assistor-xil.cpp	Tue Nov 11 22:18:32 2008
@@ -222,7 +222,7 @@
 		cisname = "Jpeg";
 		memcpy(jfif_header1,jfif_header1_,sizeof(jfif_header1_));
 		memcpy(jfif_header2,jfif_header2_,sizeof(jfif_header2_));
-		decimation_ = 411;
+		decimation_ = 420;
 		lastjpegtype_ = 0xff; // invalid, so we reset first..
 		break;
 	case FT_CELLB:
@@ -364,8 +364,8 @@
 	sentfirstheader=0;
 	lastjpegtype_ = type;
 	switch (type) {
-	case 1: /* 411 */
-		decimation_ = 411;
+	case 1: /* 420 */
+		decimation_ = 420;
 		break;
 	default:
 		decimation_ = 422;
@@ -403,7 +403,7 @@
 			jfif_header1[i++] = w&0xff;
 			i++; 	/* components (3) */
 				i++;	/* comp id 0 */
-				if (decimation_ == 411)
+				if (decimation_ == 420)
 					jfif_header1[i++] = 0x22;/* 0x22 for 2 hor/2 vert */
 				else
 					jfif_header1[i++] = 0x21;/* 0x21 for 2 hor/1 vert */
@@ -436,7 +436,7 @@
 			jfif_header2[i++] = w&0xff;
 			i++; 	/* components (3) */
 				i++;	/* comp id 0 */
-				if (decimation_ == 411)
+				if (decimation_ == 420)
 					jfif_header2[i++] = 0x22;/* 0x22 for 2 hor/2 vert */
 				else
 					jfif_header2[i++] = 0x21;/* 0x21 for 2 hor/1 vert */
@@ -854,7 +854,7 @@
 				return (TCL_OK);
 			}
 			/*
-			if (!strcmp(argv[2],"jpeg/411") || !strcmp(argv[2],"jpeg/422")) {
+			if (!strcmp(argv[2],"jpeg/420") || !strcmp(argv[2],"jpeg/422")) {
 				XILOutputAssistor* p = new XILOutputAssistor(FT_JPEG|FT_HW,filename_,&deviceattributes_);
 				tcl.result(p->name());
 				return (TCL_OK);

Modified: vic/branches/mpeg4/video/grabber-bttv.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-bttv.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-bttv.cpp	Tue Nov 11 22:18:32 2008
@@ -69,7 +69,7 @@
 #define CIF_HEIGHT  288
 
 #define CF_422 0
-#define CF_411 1
+#define CF_420 1
 #define CF_CIF 2
 
 class BTTVGrabber : public Grabber {
@@ -109,7 +109,7 @@
   if(access("/dev/bttv",R_OK) == 0)
    	{
     	attributes_ = " \
-		format { 411 422 } \
+		format { 420 422 } \
 		size { small cif large } \
 		port { TV Port-1 Port-2 S-Video}";
   	} else
@@ -363,7 +363,7 @@
     set_size_422(basewidth_ / decimate_, baseheight_ / decimate_);
     break;
   case CF_CIF:
-    set_size_411(basewidth_ / decimate_, baseheight_ / decimate_);
+    set_size_420(basewidth_ / decimate_, baseheight_ / decimate_);
     break;
   }
 

Modified: vic/branches/mpeg4/video/grabber-jv.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-jv.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-jv.cpp	Tue Nov 11 22:18:32 2008
@@ -141,7 +141,7 @@
 	void setsize(int w, int h);
 };
 
-class Jv411Grabber : public JvCIFGrabber {
+class Jv420Grabber : public JvCIFGrabber {
     protected:
 	virtual void setsize(int xsize, int ysize);
 };
@@ -164,7 +164,7 @@
 void JvDevice::j300(int v)
 {
 	attributes_ = (v == 0) ? "format { jpeg } size { small large }" :
-		"format { 411 422 jpeg } size { small large cif }";
+		"format { 420 422 jpeg } size { small large cif }";
 }
 
 int JvDevice::command(int argc, const char*const* argv)
@@ -176,8 +176,8 @@
 			o = new JvJpegGrabber;
 		else if (strcmp(fmt, "422") == 0)
 			o = new Jv422Grabber;
-		else if (strcmp(fmt, "411") == 0)
-			o = new Jv411Grabber;
+		else if (strcmp(fmt, "420") == 0)
+			o = new Jv420Grabber;
 		else if (strcmp(fmt, "cif") == 0)
 			o = new JvCIFGrabber;
 		if (o != 0)
@@ -631,9 +631,9 @@
 	}
 }
 
-void Jv411Grabber::setsize(int w, int h)
+void Jv420Grabber::setsize(int w, int h)
 {
-	set_size_411(w, h);
+	set_size_420(w, h);
 }
 JvJpegGrabber::JvJpegGrabber() : q_(50)
 {

Modified: vic/branches/mpeg4/video/grabber-linux1394.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-linux1394.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-linux1394.cpp	Tue Nov 11 22:18:32 2008
@@ -111,10 +111,10 @@
     }
 
     switch (mode) {
-      case MODE411:
+      case MODE420:
         width = capture.frame_width;
         height = capture.frame_height;
-        set_size_411(width, height);
+        set_size_420(width, height);
         break;
       case MODE422:
         width = capture.frame_width;
@@ -312,7 +312,7 @@
     }
 }
 
-void Linux1394Grabber::firewire411_to_planar411(char *dest, char *src)
+void Linux1394Grabber::firewire411_to_planar420(char *dest, char *src)
 {
     int i;
     char *s, *y,*u,*v;
@@ -341,7 +341,7 @@
     }
 }
 
-void Linux1394Grabber::firewire422_to_planar411(char *dest, char *src)
+void Linux1394Grabber::firewire422_to_planar420(char *dest, char *src)
 {
     int  a1,b;
     char *s, *y,*u,*v;
@@ -389,8 +389,8 @@
 
 
 Camera::Camera(const raw1394handle_t h, const nodeid_t i)
-  : handle(h), id(i), best411(0), best422(0),
-    mode411(false), mode422(false),
+  : handle(h), id(i), best420(0), best422(0),
+    mode420(false), mode422(false),
     small(false), medium(false), large(false)
 {
     int err;
@@ -415,8 +415,8 @@
             //best422 = MODE_640x480_YUV422;  // FIXME: Framerate problems
         }
         if (has_mode(MODE_640x480_YUV411, MODE_FORMAT0_MIN)) {
-            small = medium = mode411 = true;
-            best411 = MODE_640x480_YUV411;
+            small = medium = mode420 = true;
+            best420 = MODE_640x480_YUV411;
         }
     }
 
@@ -467,7 +467,7 @@
 
         char *attr = new char[512];
         strcpy(attr, "format {");
-        if (camera->mode411) strcat(attr, " 411 ");
+        if (camera->mode420) strcat(attr, " 420 ");
         if (camera->mode422) strcat(attr, " 422 ");
 
         strcat(attr, "} size {");
@@ -489,8 +489,8 @@
             fprintf(stderr, "Linux1394: creating grabber with %s\n", argv[2]);
 
             mode_t mode;
-            if (strcmp(argv[2], "411") == 0) {
-                mode = MODE411;
+            if (strcmp(argv[2], "420") == 0) {
+                mode = MODE420;
             } else if (strcmp(argv[2], "422") == 0) {
                 mode = MODE422;
             } else if (strcmp(argv[2], "cif") == 0) {

Modified: vic/branches/mpeg4/video/grabber-linux1394.h
==============================================================================
--- vic/branches/mpeg4/video/grabber-linux1394.h	(original)
+++ vic/branches/mpeg4/video/grabber-linux1394.h	Tue Nov 11 22:18:32 2008
@@ -29,7 +29,7 @@
 #define BYTE_ORDER_LAST BYTE_ORDER_VYUY
 
 typedef enum {
-    MODE411,
+    MODE420,
     MODE422,
     MODECIF
 } modes_t;
@@ -45,11 +45,11 @@
     dc1394_feature_set features;
     dc1394_miscinfo misc;
 
-    unsigned int best411;
+    unsigned int best420;
     unsigned int best422;
     unsigned int bestcif;
 
-    bool mode411, mode422,
+    bool mode420, mode422,
          small, medium, large;
 
   private:
@@ -74,8 +74,8 @@
 
  protected:
 
-    void firewire411_to_planar411(char *dest, char *src);
-    void firewire422_to_planar411(char *dest, char *src);
+    void firewire411_to_planar420(char *dest, char *src);
+    void firewire422_to_planar420(char *dest, char *src);
     void firewire422_to_planar422(char *dest, char *src);
 
     const Camera *camera;

Modified: vic/branches/mpeg4/video/grabber-macosx.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-macosx.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-macosx.cpp	Tue Nov 11 22:18:32 2008
@@ -82,9 +82,9 @@
 #define SPSIF_PAL_HEIGHT   288
 
 // Color subsampling options.
-#define CF_422 422
-#define CF_411 411
-#define CF_CIF 4112
+#define CF_422 0
+#define CF_420 1
+#define CF_CIF 2
 
 typedef struct  {
 	GWorldPtr gWorld;
@@ -122,8 +122,8 @@
     int setupDecom(void);
 	
     // YUV conversion functions.
-    void packedYUYV422_to_planarYUYV422(char *dest, char *src);
-    void packedYUYV422_to_planarYUYV411(char *dest, char *src);
+    void packed422_to_planar422(char *dest, const char *src);
+    void packed422_to_planar420(char *dest, const char *src);
 	
     // The frame information.
     int decimate_;
@@ -193,7 +193,7 @@
     try {
 		// Remember the format.
 		if (strcmp(format, "422") == 0) format_ = CF_422;
-		else if (strcmp(format, "411") == 0) format_ = CF_411;
+		else if (strcmp(format, "420") == 0) format_ = CF_420;
 		else if (strcmp(format, "cif") == 0) format_ = CF_CIF;
 		else throw Exception("Unrecognized format");
     } catch (Exception e) {
@@ -292,11 +292,11 @@
 		 */
         switch (format_) {
             case CF_422:
-                packedYUYV422_to_planarYUYV422((char*)frame_, theData);
+                packed422_to_planar422((char*)frame_, theData);
                 break;
-            case CF_411:
+            case CF_420:
             case CF_CIF:
-                packedYUYV422_to_planarYUYV411((char*)frame_, theData);
+                packed422_to_planar420((char*)frame_, theData);
                 break;
         }
 
@@ -331,8 +331,8 @@
 		case CF_422:
 			set_size_422(width_, height_);
 			break;
-		case CF_411:
-			set_size_411(width_, height_);
+		case CF_420:
+			set_size_420(width_, height_);
 			break;
 		case CF_CIF:
 			set_size_cif(width_, height_);
@@ -674,7 +674,7 @@
 			p2cstrcpy(dev_str, (*sgdeviceList)->entry[i].name);
 			if ((sgDeviceNameFlagDeviceUnavailable & (*sgdeviceList)->entry[i].flags) == 0) {
 				attr = new char[512];
-				strcpy(attr, "size {large small cif} format {411 422 cif} type {ntsc pal secam} port {");
+				strcpy(attr, "size {large small cif} format {420 422 cif} type {ntsc pal secam} port {");
 				if ((*sgdeviceList)->entry[i].inputs != NULL) {
 					fprintf(stderr,"OSX Capture: \"%s\" has %i input(s)\n", dev_str, (*(((*sgdeviceList)->entry[i]).inputs))->count);
 					for (int j = 0; j < (*(((*sgdeviceList)->entry[i]).inputs))->count; j++) {
@@ -711,16 +711,15 @@
 }
 
 
-void MacOSXGrabber::packedYUYV422_to_planarYUYV422(char *dest, char *src)
+void MacOSXGrabber::packed422_to_planar422(char *dest, const char *src)
 {
     int i;
-    char *s, *y,*u,*v;
+    char *y,*u,*v;
     unsigned int a, *srca;
 	
     srca = (unsigned int *)src;
 	
     i = (width_ * height_)/2;
-    s = src;
     y = dest;
     u = y + width_ * height_;
     v = u + width_ * height_ / 2;
@@ -747,7 +746,7 @@
     }
 }
 
-void MacOSXGrabber::packedYUYV422_to_planarYUYV411(char *dest, char *src)
+void MacOSXGrabber::packed422_to_planar420(char *dest, const char *src)
 {
     int  a1,b;
     char *s, *y,*u,*v;
@@ -755,7 +754,6 @@
 	
     srca = (unsigned int *)src;
 	
-    s = src;
     y = dest;
     u = y + width_ * height_;
     v = u + width_ * height_ / 4;

Modified: vic/branches/mpeg4/video/grabber-meteor.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-meteor.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-meteor.cpp	Tue Nov 11 22:18:32 2008
@@ -164,7 +164,7 @@
 {
 	if(free)
 		attributes_ = "\
-format {422 411} \
+format {422 420} \
 type {pal ntsc secam auto} \
 size {large normal small cif} \
 port {RCA Port-1 Port-2 Port-3 S-Video RGB}";

Modified: vic/branches/mpeg4/video/grabber-mme.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-mme.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-mme.cpp	Tue Nov 11 22:18:32 2008
@@ -162,7 +162,7 @@
 };
 
 
-class Mme411Grabber : public MmeCIFGrabber {
+class Mme420Grabber : public MmeCIFGrabber {
     protected:
 	virtual void setsize(int xsize, int ysize);
 };
@@ -209,8 +209,8 @@
 	      o = new MmeJpegGrabber;
 	    else if (strcmp(fmt, "422") == 0)
 	      o = new Mme422Grabber;
-	    else if (strcmp(fmt, "411") == 0)
-	      o = new Mme411Grabber;
+	    else if (strcmp(fmt, "420") == 0)
+	      o = new Mme420Grabber;
 	    else if (strcmp(fmt, "cif") == 0)
 	      o = new MmeCIFGrabber;
 	    if (o != 0) {
@@ -946,9 +946,9 @@
 /***********************************************************************/
 
 
-void Mme411Grabber::setsize(int w, int h)
+void Mme420Grabber::setsize(int w, int h)
 {
-	set_size_411(w, h);
+	set_size_420(w, h);
 }
 
 /***********************************************************************/

Modified: vic/branches/mpeg4/video/grabber-plx.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-plx.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-plx.cpp	Tue Nov 11 22:18:32 2008
@@ -172,7 +172,7 @@
 	RGB_Converter* converter_;
 };
 
-class Plx411Grabber : public Plx422Grabber {
+class Plx420Grabber : public Plx422Grabber {
 public:
 	virtual void setsize();
 };
@@ -204,7 +204,7 @@
 PlxDevice::PlxDevice(const char *s) : InputDevice(s) 
 {
 	attributes_ = "\
-format { 422 411 jpeg } \
+format { 422 420 jpeg } \
 size { small large cif } \
 port { Input-1 Input-2 }";
 }
@@ -219,8 +219,8 @@
 			o = new PlxJpegGrabber;
 		else if (strcmp(fmt, "422") == 0)
 			o = new Plx422Grabber;
-		else if (strcmp(fmt, "411") == 0)
-			o = new Plx411Grabber;
+		else if (strcmp(fmt, "420") == 0)
+			o = new Plx420Grabber;
 		else if (strcmp(fmt, "cif") == 0)
 			o = new PlxCIFGrabber;
 		if (o != 0)
@@ -498,14 +498,14 @@
 	return (target_->consume(&f));
 }
 
-void Plx411Grabber::setsize()
+void Plx420Grabber::setsize()
 {
 	int w = capwin_->basewidth() / decimate_;
 	int h = capwin_->baseheight() / decimate_;
 	capwin_->setsize(w, h);
-	converter_ = RGB_Converter_411::instance();
+	converter_ = RGB_Converter_420::instance();
 	image_ = StandardVideoImage::allocate(capwin_->tkwin(), w, h);
-	set_size_411(w, h);
+	set_size_420(w, h);
 	allocref();
 }
 
@@ -514,9 +514,9 @@
 	int w = 2 * 352 / decimate_;
 	int h = 2 * 288 / decimate_;
 	capwin_->setsize(w, h);
-	converter_ = RGB_Converter_411::instance();
+	converter_ = RGB_Converter_420::instance();
 	image_ = StandardVideoImage::allocate(capwin_->tkwin(), w, h);
-	set_size_411(w, h);
+	set_size_420(w, h);
 	allocref();
 }
 

Modified: vic/branches/mpeg4/video/grabber-rtvc.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-rtvc.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-rtvc.cpp	Tue Nov 11 22:18:32 2008
@@ -306,7 +306,7 @@
 	: InputDevice(s), devno_(devno)
 {
 	attributes_ = "\
-format { 411 422 jpeg } \
+format { 420 422 jpeg } \
 size { small large cif } \
 port { Composite-1 Composite-2 S-Video }";
 }

Modified: vic/branches/mpeg4/video/grabber-slv.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-slv.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-slv.cpp	Tue Nov 11 22:18:32 2008
@@ -46,7 +46,7 @@
 // Besides the grabber library used in this module the SlicVideo framegrabber
 // also supports XIL under SunOS 5.x. Currently tested only with SunOS 5.x.
 //
-// This module supports yuv411 and yuv422 framgrabbing in any size,
+// This module supports yuv420 and yuv422 framgrabbing in any size,
 // including cif. When using cif the images will be centered and probably
 // cropped, depending on the video signal. Both PAL and NTSC video signal
 // have been tested. The module will search for installed SlicVideo boards
@@ -116,16 +116,16 @@
 }
 #include <slvlib.h>
 
-static int slv_read_frame_yuv(SLV *slvptr, int is411, u_char *yp, int y_stride,
+static int slv_read_frame_yuv(SLV *slvptr, int is420, u_char *yp, int y_stride,
 		   u_char *up, int u_stride, u_char *vp, int v_stride);
 
-static int slv_read_field_yuv(SLV *slvptr, int is411, u_char *yp, int y_stride,
+static int slv_read_field_yuv(SLV *slvptr, int is420, u_char *yp, int y_stride,
 		   u_char *up, int u_stride, u_char *vp, int v_stride);
 
-static int slv_copyin_yuv(SLV *slvptr, u_int fbuf, int is411, u_char *yp,
+static int slv_copyin_yuv(SLV *slvptr, u_int fbuf, int is420, u_char *yp,
 	int y_stride, u_char *up, int u_stride, u_char *vp, int v_stride);
 
-static const int  f_411	= 0;
+static const int  f_420	= 0;
 static const int  f_422	= 1;
 static const int  f_cif	= 2;
 
@@ -221,7 +221,7 @@
 {
 	if(free)
 		attributes_ = "\
-format { 411 422 } \
+format { 420 422 } \
 size { small large cif } \
 port { Composite-1 Composite-2 S-Video}";
 	else
@@ -255,7 +255,7 @@
 		fprintf(stderr, "slv: new grabber %s, %s\n", name, format);
 
 	coder_format_ = -1;
-	if(!strcmp(format,"411")) coder_format_ = f_411;
+	if(!strcmp(format,"420")) coder_format_ = f_420;
 	if(!strcmp(format,"422")) coder_format_ = f_422;
 	if(!strcmp(format,"cif")) coder_format_ = f_cif;
 	if(coder_format_ == -1) {
@@ -335,7 +335,7 @@
 	size_y = vformat_ysize / decimate_;
 
 	switch(coder_format_) {
-		case f_411: set_size_411(size_x , size_y); break;
+		case f_420: set_size_420(size_x , size_y); break;
 		case f_422: set_size_422(size_x , size_y); break;
 		case f_cif: set_size_cif(size_x , size_y); break;
 		default:
@@ -399,7 +399,7 @@
 				 y_output_size_ : y_output_size_ / 2);
 	
 	if(slv_debug) {
-		char *fmt[] = {"411", "422", "cif"};
+		char *fmt[] = {"420", "422", "cif"};
 
 		fprintf(stderr, "slv: reformat:\n");
 		fprintf(stderr, "  input window:  %d X %d (offset: %d + %d, %d + %d)\n",
@@ -550,7 +550,7 @@
 {
   if(use_internal_api) {
 
-	int y_stride, y_offset, uv_stride, uv_offset, is411;
+	int y_stride, y_offset, uv_stride, uv_offset, is420;
 	u_char *y_ptr, *u_ptr, *v_ptr;
 
 	// grab a frame or field of dimensions
@@ -569,7 +569,7 @@
 		y_ptr = frame_ + y_offset;
 		u_ptr = frame_ + framesize_ + uv_offset;
 		v_ptr = frame_ + framesize_ * 3 / 2 + uv_offset;
-		is411 = 0;
+		is420 = 0;
 	} else {
 		y_stride  = outw_;
 		y_offset  = x_output_border_ + y_output_border_ * y_stride;
@@ -579,16 +579,16 @@
 		y_ptr = frame_ + y_offset;
 		u_ptr = frame_ + framesize_ + uv_offset;
 		v_ptr = frame_ + framesize_ * 5 / 4 + uv_offset;
-		is411 = 1;
+		is420 = 1;
 	}
 
 	if(decimate_ == 1) {
-		slv_read_frame_yuv(handle_, is411,
+		slv_read_frame_yuv(handle_, is420,
 			       y_ptr, y_stride,
 			       u_ptr, uv_stride,
 			       v_ptr, uv_stride);
 	} else {
-		slv_read_field_yuv(handle_, is411,
+		slv_read_field_yuv(handle_, is420,
 			       y_ptr, y_stride,
 			       u_ptr, uv_stride,
 			       v_ptr, uv_stride);
@@ -738,7 +738,7 @@
 			   ((s3>> 8)&0xff)<< 8 | ((s4>> 8)&0xff)     ;
 }
 
-static int slv_read_frame_yuv(SLV *slvptr, int is411, u_char *yp, int y_stride,
+static int slv_read_frame_yuv(SLV *slvptr, int is420, u_char *yp, int y_stride,
 		   u_char *up, int u_stride, u_char *vp, int v_stride)
 {
 	u_int fbuf_e, fbuf_o;
@@ -788,12 +788,12 @@
 		}
 	}
 
-	status = slv_copyin_yuv(slvptr, fbuf_o, is411,
+	status = slv_copyin_yuv(slvptr, fbuf_o, is420,
 		                yp, y_stride * 2,
 		                up, u_stride * 2,
 		                vp, v_stride * 2);
 	slv_release_fbufs(slvptr, fbuf_o);
-	status = slv_copyin_yuv(slvptr, fbuf_e, is411,
+	status = slv_copyin_yuv(slvptr, fbuf_e, is420,
 		                yp + y_stride, y_stride * 2,
 		                up + u_stride, u_stride * 2,
 		                vp + v_stride, v_stride * 2);
@@ -802,7 +802,7 @@
 	return(SLV_SUCCESS);
 }
 
-static int slv_read_field_yuv(SLV *slvptr, int is411, u_char *yp, int y_stride,
+static int slv_read_field_yuv(SLV *slvptr, int is420, u_char *yp, int y_stride,
 		   u_char *up, int u_stride, u_char *vp, int v_stride)
 {
 	u_int fbuf;
@@ -810,14 +810,14 @@
 
 	fbuf = slv_acquire_next_fbuf(slvptr);
 	if(fbuf != 0) {
-		status = slv_copyin_yuv(slvptr, fbuf, is411,
+		status = slv_copyin_yuv(slvptr, fbuf, is420,
 			    yp, y_stride, up, u_stride, vp, v_stride);
 		slv_release_fbufs(slvptr, fbuf);
 	}
 	return(status);
 }
 
-static int slv_copyin_yuv(SLV *slvptr, u_int fbuf, int is411, u_char *yp,
+static int slv_copyin_yuv(SLV *slvptr, u_int fbuf, int is420, u_char *yp,
 	int y_stride, u_char *up, int u_stride, u_char *vp, int v_stride)
 {
 	u_int	 i, j;
@@ -905,7 +905,7 @@
 		up += u_stride - linebytes / 4;
 		vp += v_stride - linebytes / 4;
 
-		if(is411 && !(i & 0x1)) {
+		if(is420 && !(i & 0x1)) {
 			up -= u_stride;
 			vp -= v_stride;
 		}

Modified: vic/branches/mpeg4/video/grabber-spigot.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-spigot.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-spigot.cpp	Tue Nov 11 22:18:32 2008
@@ -76,7 +76,7 @@
 
 	int video_format_;	/* video input format: NTSC or PAL */
 	int port_;		/* video input port */
-	int coder_format_;	/* 411, 422, or cif */
+	int coder_format_;	/* 420, 422, or cif */
 	int vtof_;		/* Vertical top of frame (lines to skip) */
 	int secam_;		/* secam mode ? */
 	u_int basewidth_;	/* Height of frame to be captured */
@@ -89,7 +89,7 @@
 	int	hskip_;		/* amount of input to toss on each line */
 };
 
-static const int	f_411 = 0;	/* coder_format_s */
+static const int	f_420 = 0;	/* coder_format_s */
 static const int	f_422 = 1;
 static const int	f_cif = 2;
 
@@ -118,7 +118,7 @@
 {
 	if(access(devname, R_OK) == 0)
 		attributes_ = "\
-format {422 411} \
+format {422 420} \
 size {normal small cif} \
 port {RCA S-Video}";
 	else
@@ -141,7 +141,7 @@
 SpigotGrabber::SpigotGrabber(const char* name, const char* format)
 {
 	coder_format_ = -1;
-	if(!strcmp(format, "411")) coder_format_ = f_411;
+	if(!strcmp(format, "420")) coder_format_ = f_420;
 	if(!strcmp(format, "422")) coder_format_ = f_422;
 	if(!strcmp(format, "cif")) coder_format_ = f_cif;
 	if(coder_format_ == -1) {
@@ -212,8 +212,8 @@
 		}
 		hskip_ = 0;
 		break;
-	case f_411:
-		set_size_411(w, h);
+	case f_420:
+		set_size_420(w, h);
 		hwrap_ = 0;
 		loff_ = 0;
 		coff_ = 0;

Modified: vic/branches/mpeg4/video/grabber-sunrise.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-sunrise.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-sunrise.cpp	Tue Nov 11 22:18:32 2008
@@ -232,8 +232,8 @@
 	else if (strcmp(fmt, "cif") == 0)
 	    o = cif_grabber();
 /*
-	else if (strcmp(fmt, "411") == 0)
-	    o = new Jv411Grabber;
+	else if (strcmp(fmt, "420") == 0)
+	    o = new Jv420Grabber;
 	*/
 	if (o != 0)
 	    Tcl::instance().result(o->name());

Modified: vic/branches/mpeg4/video/grabber-svideo.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-svideo.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-svideo.cpp	Tue Nov 11 22:18:32 2008
@@ -103,7 +103,7 @@
 	else {
 		(void)svCloseVideo(handle);
 #ifdef notyet
-		attributes_ = "format { 422 411 cif } \
+		attributes_ = "format { 422 420 cif } \
 			size { small large cif } port { xxx }";
 #else
 		attributes_ = "format { 422 }";

Modified: vic/branches/mpeg4/video/grabber-v4l2-old.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-v4l2-old.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-v4l2-old.cpp	Tue Nov 11 22:18:32 2008
@@ -69,7 +69,7 @@
 static const int  one = 1, zero = 0;
 
 #define CF_422 0
-#define CF_411 1
+#define CF_420 1
 #define CF_CIF 2
 
 typedef struct tag_vimage
@@ -98,7 +98,7 @@
         void setsize();
 
         void packed422_to_planar422(char *, char*);
-        void packed422_to_planar411(char *, char*);
+        void packed422_to_planar420(char *, char*);
 
         void setctrl(int, int, char *, int);
 
@@ -214,7 +214,7 @@
                         capability.maxwidth,capability.maxheight);
 
                 attr = new char[512];
-                strcpy(attr,"format { 411 422 cif } ");
+                strcpy(attr,"format { 420 422 cif } ");
 
                 if (capability.maxwidth  > PAL_WIDTH/2 &&
                                         capability.maxheight > PAL_HEIGHT/2) {
@@ -303,8 +303,8 @@
         }
 
         /* fill in defaults */
-        if(!strcmp(cformat, "411"))
-                cformat_ = CF_411;
+        if(!strcmp(cformat, "420"))
+                cformat_ = CF_420;
         if(!strcmp(cformat, "422"))
                 cformat_ = CF_422;
         if(!strcmp(cformat, "cif"))
@@ -585,10 +585,10 @@
         }
 
         switch (cformat_) {
-        case CF_411:
+        case CF_420:
 
         case CF_CIF:
-                packed422_to_planar411((char*)frame_,fr);
+                packed422_to_planar420((char*)frame_,fr);
                 break;
 
         case CF_422:
@@ -640,7 +640,7 @@
 
 }
 
-void V4l2Grabber::packed422_to_planar411(char *dest, char *src)
+void V4l2Grabber::packed422_to_planar420(char *dest, char *src)
 {
         int  a1,b;
         int w,h;
@@ -691,12 +691,12 @@
                 DEBUG(fprintf(stderr,"v4l2: format"));
                 switch (cformat_) {
                 case CF_CIF:
-                        set_size_411(width_, height_);
+                        set_size_420(width_, height_);
                         DEBUG(fprintf(stderr," cif"));
                         break;
-                case CF_411:
-                        set_size_411(width_, height_);
-                        DEBUG(fprintf(stderr," 411"));
+                case CF_420:
+                        set_size_420(width_, height_);
+                        DEBUG(fprintf(stderr," 420"));
                         break;
                 case CF_422:
                         set_size_422(width_, height_);

Modified: vic/branches/mpeg4/video/grabber-v4l2.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-v4l2.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-v4l2.cpp	Tue Nov 11 22:18:32 2008
@@ -85,7 +85,7 @@
 #define CIF_HEIGHT  288
 
 #define CF_422 0
-#define CF_411 1
+#define CF_420 1
 #define CF_CIF 2
 
 /* YUV Byte order */
@@ -274,7 +274,7 @@
                 }
 
                 attr = new char[512];
-                strcpy(attr,"format { 411 422 cif } ");
+                strcpy(attr,"format { 420 422 cif } ");
                 strcat(attr,"size { small large cif } ");
 
                 debug_msg("V4L2:   ports:");
@@ -434,8 +434,8 @@
         }
 
         /* fill in defaults */
-        if(!strcmp(cformat, "411"))
-                cformat_ = CF_411;
+        if(!strcmp(cformat, "420"))
+                cformat_ = CF_420;
         if(!strcmp(cformat, "422"))
                 cformat_ = CF_422;
         if(!strcmp(cformat, "cif"))
@@ -767,7 +767,7 @@
         }
 
         switch (cformat_) {
-        case CF_411:
+        case CF_420:
         case CF_CIF:
                 if( have_YUV420P )
                        memcpy((void *)frame_, (const void *)fr, (size_t)height_*width_*3/2)
@@ -1093,7 +1093,7 @@
         int format_ok = 0;
 
         switch (cformat_) {
-        case CF_411:
+        case CF_420:
         case CF_CIF:
                 if( have_YUV420P )
                        pixelformat = V4L2_PIX_FMT_YUV420;
@@ -1130,12 +1130,12 @@
                 debug_msg("V4L2: format");
                 switch (cformat_) {
                 case CF_CIF:
-                        set_size_411(width_, height_);
+                        set_size_420(width_, height_);
                         debug_msg(" cif");
                         break;
-                case CF_411:
-                        set_size_411(width_, height_);
-                        debug_msg(" 411");
+                case CF_420:
+                        set_size_420(width_, height_);
+                        debug_msg(" 420");
                         break;
                 case CF_422:
                         set_size_422(width_, height_);

Modified: vic/branches/mpeg4/video/grabber-video4linux.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-video4linux.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-video4linux.cpp	Tue Nov 11 22:18:32 2008
@@ -81,7 +81,7 @@
 static const int one = 1, zero = 0;
 
 #define CF_422 0
-#define CF_411 1
+#define CF_420 1
 #define CF_CIF 2
 
 
@@ -248,7 +248,7 @@
 		  capability.type & VID_TYPE_SCALES ? " (scales)" : "");
 
 	attr = new char[512];
-	strcpy(attr, "format { 411 422 cif } ");
+	strcpy(attr, "format { 420 422 cif } ");
 
 	if (capability.maxwidth > PAL_WIDTH / 2 &&
 	    capability.maxheight > PAL_HEIGHT / 2) {
@@ -411,8 +411,8 @@
     }
 
     /* fill in defaults */
-    if (!strcmp(cformat, "411"))
-	cformat_ = CF_411;
+    if (!strcmp(cformat, "420"))
+	cformat_ = CF_420;
     if (!strcmp(cformat, "422"))
 	cformat_ = CF_422;
     if (!strcmp(cformat, "cif"))
@@ -624,7 +624,7 @@
     }
 
     switch (cformat_) {
-    case CF_411:
+    case CF_420:
     case CF_CIF:
 	if (have_420P)
 	    memcpy((void *) frame_, (const void *) fr,
@@ -983,12 +983,12 @@
 
     switch (cformat_) {
     case CF_CIF:
-	set_size_411(width_, height_);
+	set_size_420(width_, height_);
 	debug_msg(" cif");
 	break;
-    case CF_411:
-	set_size_411(width_, height_);
-	debug_msg(" 411");
+    case CF_420:
+	set_size_420(width_, height_);
+	debug_msg(" 420");
 	break;
     case CF_422:
 	set_size_422(width_, height_);

Modified: vic/branches/mpeg4/video/grabber-vigra.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-vigra.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-vigra.cpp	Tue Nov 11 22:18:32 2008
@@ -85,7 +85,7 @@
 {
 	if (access("/dev/vigrapix0", R_OK) == 0)
 		attributes_ = "\
-format { 411 422 } \
+format { 420 422 } \
 size { small large cif } \
 port { Composite S-Video-1 S-Video-2}";
 	else

Modified: vic/branches/mpeg4/video/grabber-vl.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-vl.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-vl.cpp	Tue Nov 11 22:18:32 2008
@@ -98,9 +98,9 @@
 	virtual void saveblks(const u_char* in);
 };
 
-class VL411Grabber : public VLCIFGrabber {
+class VL420Grabber : public VLCIFGrabber {
     public:
-	VL411Grabber(vlDevice&);
+	VL420Grabber(vlDevice&);
     protected:
 	virtual void setsize(int xsize, int ysize);
 };
@@ -134,7 +134,7 @@
 	}
 	char* cp = new char[80 + nport * (VL_NAME_SIZE + 1)];
 	attributes_ = cp;
-	strcpy(cp, "format { 411 422 } size { small cif } port { ");
+	strcpy(cp, "format { 420 422 } size { small cif } port { ");
 	cp += strlen(cp);
 	*cp++ = ' ';
 	for (int i = 0; i < nport; ++i) {
@@ -163,8 +163,8 @@
 			TclObject* o = 0;
 			if (strcmp(argv[2], "422") == 0)
 				o = new VLGrabber(*this);
-			else if (strcmp(argv[2], "411") == 0)
-				o = new VL411Grabber(*this);
+			else if (strcmp(argv[2], "420") == 0)
+				o = new VL420Grabber(*this);
 			else if (strcmp(argv[2], "cif") == 0)
 				o = new VLCIFGrabber(*this);
 			if (o != 0)
@@ -562,7 +562,7 @@
 	set_size_cif(w, h);
 }
 
-/* 411 */
+/* 420 */
 inline void 
 VLCIFGrabber::saveblk(const u_char* in, u_char* yp, u_char* up,
 		      u_char* vp, int stride, int is)
@@ -647,12 +647,12 @@
 	}
 }
 
-VL411Grabber::VL411Grabber(vlDevice& device)
+VL420Grabber::VL420Grabber(vlDevice& device)
 	: VLCIFGrabber(device)
 {
 }
 
-void VL411Grabber::setsize(int w, int h)
+void VL420Grabber::setsize(int w, int h)
 {
-	set_size_411(w, h);
+	set_size_420(w, h);
 }

Modified: vic/branches/mpeg4/video/grabber-vpix.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-vpix.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-vpix.cpp	Tue Nov 11 22:18:32 2008
@@ -91,9 +91,9 @@
 	u_int decimate_;
 };
 
-class VideoPix411Grabber : public VideoPixGrabber {
+class VideoPix420Grabber : public VideoPixGrabber {
     public:
-	VideoPix411Grabber();
+	VideoPix420Grabber();
     protected:
 	virtual void NTSCgrabSmall();
 	virtual void NTSCgrabMedium();
@@ -106,7 +106,7 @@
 	int hskip_;		/* amount of input to throw out on each line */
 };
 
-class CIFVideoPixGrabber : public VideoPix411Grabber {
+class CIFVideoPixGrabber : public VideoPix420Grabber {
     protected:
 	virtual void PALgrabSmall();
 	virtual void PALgrabMedium();
@@ -125,7 +125,7 @@
 {
 	if (access("/dev/vfc0", R_OK) == 0)
 		attributes_ = "\
-format { 411 422 } \
+format { 420 422 } \
 size { small cif } \
 port { Composite-1 Composite-2 S-Video}";
 	else
@@ -140,8 +140,8 @@
 			TclObject* o = 0;
 			if (strcmp(argv[2], "422") == 0)
 				o = new VideoPixGrabber;
-			else if (strcmp(argv[2], "411") == 0)
-				o = new VideoPix411Grabber;
+			else if (strcmp(argv[2], "420") == 0)
+				o = new VideoPix420Grabber;
 			else if (strcmp(argv[2], "cif") == 0)
 				o = new CIFVideoPixGrabber;
 			if (o != 0)
@@ -670,16 +670,16 @@
 	return (target_->consume(&f));
 }
 
-VideoPix411Grabber::VideoPix411Grabber()
+VideoPix420Grabber::VideoPix420Grabber()
 	: loff_(0), coff_(0), hwrap_(0), hskip_(0)
 {
 }
 
-void VideoPix411Grabber::setsize()
+void VideoPix420Grabber::setsize()
 {
 	if (format_ < 0)
 		return;
-	set_size_411(basewidth_ / decimate_, baseheight_ / decimate_);
+	set_size_420(basewidth_ / decimate_, baseheight_ / decimate_);
 	allocref();
 	loff_ = 0;
 	coff_ = 0;
@@ -707,7 +707,7 @@
 	coff_ = (outw_ >> 1) * (voff >> 1) + (hoff >> 1);
 }
 
-void VideoPix411Grabber::NTSCgrabMedium()
+void VideoPix420Grabber::NTSCgrabMedium()
 {
 	VOLATILE u_int* iochan = (u_int*)vfcdev_->vfc_port1;
 	PRESKIP(VFC_OSKIP_NTSC)
@@ -798,7 +798,7 @@
 	}
 }
 
-void VideoPix411Grabber::NTSCgrabSmall()
+void VideoPix420Grabber::NTSCgrabSmall()
 {
 	VOLATILE u_int* iochan = (u_int*)vfcdev_->vfc_port1;
 	PRESKIP(VFC_OSKIP_NTSC)
@@ -887,7 +887,7 @@
 	}
 }
 
-void VideoPix411Grabber::PALgrabMedium()
+void VideoPix420Grabber::PALgrabMedium()
 {
 	VOLATILE u_int* iochan = (u_int*)vfcdev_->vfc_port1;
 	PRESKIP(VFC_ESKIP_PAL)
@@ -974,7 +974,7 @@
 	}
 }
 
-void VideoPix411Grabber::PALgrabSmall()
+void VideoPix420Grabber::PALgrabSmall()
 {
 	VOLATILE u_int* iochan = (u_int*)vfcdev_->vfc_port1;
 	PRESKIP(VFC_ESKIP_PAL)

Modified: vic/branches/mpeg4/video/grabber-win32.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-win32.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-win32.cpp	Tue Nov 11 22:18:32 2008
@@ -215,15 +215,15 @@
 	converter_->convert(rgb_, inw, inh, frm, outw, outh, invert);
 }
 
-class IC_Converter_411 : public IC_Converter {
+class IC_Converter_420 : public IC_Converter {
 public:
-	IC_Converter_411(DWORD comp, int bpp, int inw, int inh);
+	IC_Converter_420(DWORD comp, int bpp, int inw, int inh);
 };
 
-IC_Converter_411::IC_Converter_411(DWORD comp, int bpp, int inw, int inh)
+IC_Converter_420::IC_Converter_420(DWORD comp, int bpp, int inw, int inh)
 	: IC_Converter(comp, bpp, inw, inh)
 {
-	converter_ = new RGB_Converter_411(rgb_bpp_, NULL, 0);
+	converter_ = new RGB_Converter_420(rgb_bpp_, NULL, 0);
 }
 
 class IC_Converter_422 : public IC_Converter {
@@ -237,12 +237,12 @@
 	converter_ = new RGB_Converter_422(rgb_bpp_, NULL, 0);
 }
 
-class YUYV_Converter_411 : public Converter {
+class YUYV_Converter_420 : public Converter {
 public:
 	virtual void convert(u_int8_t *in, int inw, int inh, u_int8_t *frm, int outw, int outh, int invert = 0);
 };
 
-void YUYV_Converter_411::convert(u_int8_t *in, int inw, int inh, u_int8_t *frm, int outw, int outh, int invert)
+void YUYV_Converter_420::convert(u_int8_t *in, int inw, int inh, u_int8_t *frm, int outw, int outh, int invert)
 {
 	u_int8_t *yp = (u_int8_t*)frm;
 	int off = outw * outh;
@@ -447,11 +447,11 @@
 		vfwdev_ = index;
 		switch (get_device_type(name)) {
 		case gray_QuickCam_95:
-			attributes_ = "format { 422 411 } size { small cif } port { QuickCam } ";
+			attributes_ = "format { 422 420 } size { small cif } port { QuickCam } ";
 			break;
 		case Generic:
 		default:
-			attributes_ = "format { 422 411 } size { large small cif } port { external-in } ";
+			attributes_ = "format { 422 420 } size { large small cif } port { external-in } ";
 			break;
 		}
 	} else
@@ -897,13 +897,13 @@
 	if (fmt_!=NULL) {
 	    switch (fmt_->biCompression) {
 		case BI_RGB:
-		    converter(new RGB_Converter_411(fmt_->biBitCount, (u_int8_t *)(fmt_ + 1), fmt_->biClrUsed));
+		    converter(new RGB_Converter_420(fmt_->biBitCount, (u_int8_t *)(fmt_ + 1), fmt_->biClrUsed));
 		    break;
 		case mmioFOURCC('Y','U','Y','V'):
-		    converter(new YUYV_Converter_411());
+		    converter(new YUYV_Converter_420());
 		    break;
 		default:
-		    converter(new IC_Converter_411(fmt_->biCompression, fmt_->biBitCount, fmt_->biWidth, fmt_->biHeight));
+		    converter(new IC_Converter_420(fmt_->biCompression, fmt_->biBitCount, fmt_->biWidth, fmt_->biHeight));
 		    break;
 	    }
 	}

Modified: vic/branches/mpeg4/video/grabber-win32DS.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-win32DS.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-win32DS.cpp	Tue Nov 11 22:18:32 2008
@@ -876,7 +876,7 @@
 
 void DirectShowCIFGrabber::start() {
    DirectShowGrabber::start();
-   converter(new RGB_Converter_411(24, (u_int8_t *)NULL, 0));
+   converter(new RGB_Converter_420(24, (u_int8_t *)NULL, 0));
    ReleaseMutex(cb_mutex_);
    Grabber::timeout();
 }
@@ -915,10 +915,10 @@
    debug_msg("new DirectShowDevice():  friendlyName=%s\n", friendlyName);
    pDirectShowFilter_  = pCapFilt;           
    //SV: XXX got rid of 422 format since there's no grabber returned for it and vic crashes
-   attributes_        = "format { 411 } size { large small cif } port { extern-in } type { pal ntsc } ";
+   attributes_        = "format { 420 } size { large small cif } port { extern-in } type { pal ntsc } ";
    DirectShowCIFGrabber o(pDirectShowFilter_, friendlyName);
    
-   strcat(attri_, "format { 411 } size { large small cif } type { pal ntsc } port { ");
+   strcat(attri_, "format { 420 } size { large small cif } type { pal ntsc } port { ");
    if(o.hasSVideo() || o.hasComposite()){
      if(o.hasSVideo()){
        strcat(attri_, "S-Video ");

Modified: vic/branches/mpeg4/video/grabber-x11.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-x11.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-x11.cpp	Tue Nov 11 22:18:32 2008
@@ -198,7 +198,7 @@
 	if (name_) //SV-XXX: Debian
 		attributes_ = "\
 size {large normal small cif} \
-format {411}" ;
+format {420}" ;
 	else
 		attributes_ = "disabled";
 }
@@ -1192,7 +1192,7 @@
 	height_ = 240 ;
 	x_origin_ = y_origin_ = 0 ; /* XXX */
 
-	if (strcmp(format, "411") && strcmp(format, "cif")) {
+	if (strcmp(format, "420") && strcmp(format, "cif")) {
 		fprintf(stderr,
 			"vic: x11Grabber: unsupported format: %s\n",
 			format);
@@ -1259,7 +1259,7 @@
 
 	/* XXX set size of captured window ? */
 
-	set_size_411(columns, rows); /* was 422... */
+	set_size_420(columns, rows); /* was 422... */
 	X11Grab_Initialize(rootwin_, columns, rows); /* XXX */
 
 	allocref();	/* allocate reference frame */
@@ -1356,7 +1356,7 @@
 
 
 /*
- * captures in CIF or 411 -- color info is half the luma info.
+ * captures in CIF or 420 -- color info is half the luma info.
  */
 int
 X11Grabber::capture()

Modified: vic/branches/mpeg4/video/grabber-xil.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-xil.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-xil.cpp	Tue Nov 11 22:18:32 2008
@@ -129,7 +129,7 @@
 	/*XXX ports should be queried from xil */
 	attributes = (char*)malloc(2000);
 	attributes[0]='\0';
-	strcat(attributes,"format { 411 422 jpeg cellb ");
+	strcat(attributes,"format { 420 422 jpeg cellb ");
 	if (deviceattributes_.capabilities & XILCAP_HWGRAB_H261)
 		strcat(attributes,"h261 ");
 	strcat(attributes,"}\n");
@@ -656,7 +656,7 @@
 	image_ = xil_create(xil_, basewidth_/decimate_, baseheight_/decimate_, nbands_, datatype_);
 }
 
-/* 411 */
+/* 420 */
 inline void 
 XILCIFGrabber::saveblk(const u_char* in,
 	u_char* yp, u_char* up, u_char* vp, int stride, int istride)
@@ -998,7 +998,7 @@
 
 	if (p >= ep)
 		return (0);
-	// the 1 is the type and means 411 encoding.
+	// the 1 is the type and means 420 encoding.
 	JpegFrame f(media_ts(), p, ep - p, q_, 1,
 		    basewidth_ / decimate_, baseheight_ / decimate_);
 	return (target_->consume(&f));

Modified: vic/branches/mpeg4/video/grabber-xv.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-xv.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-xv.cpp	Tue Nov 11 22:18:32 2008
@@ -163,7 +163,7 @@
 	virtual void setsize();
 };
 
-class Xv411Grabber : public XvGrabber {
+class Xv420Grabber : public XvGrabber {
 protected:
 	virtual void setsize();
 };
@@ -178,8 +178,8 @@
 
 XvDevice::XvDevice(const char* s) : InputDevice(s)
 {
-	/*XXX port & 411*/
-	attributes_ = "format { 422 411 } size { small large cif }";
+	/*XXX port & 420*/
+	attributes_ = "format { 422 420 } size { small large cif }";
 }
 
 int XvDevice::command(int argc, const char*const* argv)
@@ -360,18 +360,18 @@
 	int w = 2 * 352 / decimate_;
 	int h = 2 * 288 / decimate_;
 	capwin_->setsize(w, h);
-	capwin_->converter(RGB_Converter_411::instance());
-	set_size_411(w, h);
+	capwin_->converter(RGB_Converter_420::instance());
+	set_size_420(w, h);
 	allocref();
 }
 
-void Xv411Grabber::setsize()
+void Xv420Grabber::setsize()
 {
 	int w = capwin_->basewidth() / decimate_;
 	int h = capwin_->baseheight() / decimate_;
 	capwin_->setsize(w, h);
-	capwin_->converter(RGB_Converter_411::instance());
-	set_size_411(w, h);
+	capwin_->converter(RGB_Converter_420::instance());
+	set_size_420(w, h);
 	allocref();
 }
 

Modified: vic/branches/mpeg4/video/grabber.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber.cpp	(original)
+++ vic/branches/mpeg4/video/grabber.cpp	Tue Nov 11 22:18:32 2008
@@ -421,7 +421,7 @@
 	hstop_ = blkw_;
 }
 
-void Grabber::set_size_411(int w, int h)
+void Grabber::set_size_420(int w, int h)
 {
 	delete[] framebase_; //SV-XXX: Debian
 
@@ -506,8 +506,8 @@
 
 	default:
 		/* XXX this shouldn't happen */
-		debug_msg("vic: CIF grabber: bad geometry - trying 411\n");
-		set_size_411(w,h);
+		debug_msg("vic: CIF grabber: bad geometry - trying 420\n");
+		set_size_420(w,h);
 		return;
 		//abort();
 	}

Modified: vic/branches/mpeg4/video/grabber.h
==============================================================================
--- vic/branches/mpeg4/video/grabber.h	(original)
+++ vic/branches/mpeg4/video/grabber.h	Tue Nov 11 22:18:32 2008
@@ -85,7 +85,7 @@
 	double advance();
 
 	void set_size_422(int w, int h);
-	void set_size_411(int w, int h);
+	void set_size_420(int w, int h);
 	void set_size_cif(int w, int h);
 	void allocref();
 

Modified: vic/branches/mpeg4/video/output-vl.cpp
==============================================================================
--- vic/branches/mpeg4/video/output-vl.cpp	(original)
+++ vic/branches/mpeg4/video/output-vl.cpp	Tue Nov 11 22:18:32 2008
@@ -106,9 +106,9 @@
 	void blankrow(u_char* bp) const;
 };
 
-class VLOutboard_411 : public VLOutboard {
+class VLOutboard_420 : public VLOutboard {
 public:
-	VLOutboard_411(VLOutputDevice& d) : VLOutboard(d, FT_YUV_411) {}
+	VLOutboard_420(VLOutputDevice& d) : VLOutboard(d, FT_YUV_420) {}
 protected:
 	virtual void scaleframe(u_char* bp, const u_char* frm) const;
 	virtual void upscaleframe(u_char* bp, const u_char* frm) const;
@@ -167,8 +167,8 @@
 				tcl.result(p->name());
 				return (TCL_OK);
 			}
-			if (strcmp(argv[2], "411") == 0) {
-				VLOutboard* p = new VLOutboard_411(*this);
+			if (strcmp(argv[2], "420") == 0) {
+				VLOutboard* p = new VLOutboard_420(*this);
 				tcl.result(p->name());
 				return (TCL_OK);
 			}
@@ -491,7 +491,7 @@
 	}
 }
 
-void VLOutboard_411::fill_two_rows(u_char* bp, const u_char* yp,
+void VLOutboard_420::fill_two_rows(u_char* bp, const u_char* yp,
 				   const u_char* up, const u_char* vp,
 				   int skip0, int skip1, int os) const
 {
@@ -520,7 +520,7 @@
 	}
 }
 
-void VLOutboard_411::scaleframe(u_char* bp, const u_char* frm) const
+void VLOutboard_420::scaleframe(u_char* bp, const u_char* frm) const
 {
 	int voff = iv0_ * width_;
 	register const u_char* yp = frm + ih0_ + voff;
@@ -547,7 +547,7 @@
 	}
 }
 
-void VLOutboard_411::fill_four_rows(u_char* bp, const u_char* yp,
+void VLOutboard_420::fill_four_rows(u_char* bp, const u_char* yp,
 				    const u_char* up, const u_char* vp,
 				    int skip0, int skip1, int os) const
 {
@@ -596,7 +596,7 @@
 	}
 }
 
-void VLOutboard_411::upscaleframe(u_char* bp, const u_char* frm) const
+void VLOutboard_420::upscaleframe(u_char* bp, const u_char* frm) const
 {
 	int voff = iv0_ * width_;
 	register const u_char* yp = frm + ih0_ + voff;

Modified: vic/branches/mpeg4/video/xil.h
==============================================================================
--- vic/branches/mpeg4/video/xil.h	(original)
+++ vic/branches/mpeg4/video/xil.h	Tue Nov 11 22:18:32 2008
@@ -161,14 +161,14 @@
 	XILWindowAssistorMatcher() : Matcher("assistor") {
 		extern class AssistorList assistorlist;
 
-		assistorlist.register_assistor("xil","jpeg/411 jpeg/422 h261 cellb");
+		assistorlist.register_assistor("xil","jpeg/420 jpeg/422 h261 cellb");
 	}
 	TclObject* match(const char* id) {
 		if (strncmp(id,"xil/",4)) // direct XIL assistor request
 			return (0);
 		id=id+4; // skip over "xil/"
 		//fprintf(stderr,"XILWindowAssistorMatcher::"__FUNCTION__"(%s)\n",id);
-		if (!strcmp(id, "jpeg/422") || !strcmp(id, "jpeg/411"))
+		if (!strcmp(id, "jpeg/422") || !strcmp(id, "jpeg/420"))
 			return (new XILWindowAssistor(FT_HW|FT_JPEG/*,filename_,&deviceattributes_*/));
 		if (!strcmp(id, "h.261") || !strcmp(id, "h261"))
 			return (new XILWindowAssistor(FT_H261/*,filename_,&deviceattributes_*/));
@@ -281,9 +281,9 @@
 	void saveblks(const u_char* in, int istride);
 };
 
-class XIL411Grabber : public XILCIFGrabber {
+class XIL420Grabber : public XILCIFGrabber {
     public:
-	XIL411Grabber(char *filename,struct deviceattributes *devattr);
+	XIL420Grabber(char *filename,struct deviceattributes *devattr);
     protected:
 	virtual void setsize(int xsize, int ysize);
 };



More information about the Sumover-dev mailing list