On 30-Jan-2003 Matto Marjanovic wrote: | I was under the impression that mpeg2enc does *not* clip out-of-range | values and does simply encode them. Although values outside of | [16,235] do not map to R'G'B' codes, they are still valid values | --- and necessary even, if you want to encode things like | standard colorbars. | There is a simple scenario I used to test theese things: I created a jpeg with colorbars of known RGB-values ( grey0(=black), grey8, ..., grey255(=white), and similar for red, green, blue ). Then I duplicated the file many times and made a YUV stream of it using jpeg2yuv. I piped this stream to some mjpeg-tools and checked the value range of the YUV stream after each tool by inserting a selfmade yuvfilter. At last I encoded the stream with mpeg2enc, decoded it with mplayer to jpegs again and checked the colorbars with gimp.
Result: Everything works well if YUV ranges are kept within [16-235]-range. mpeg2enc then encodes [black-white] and after decoding the original colorbars are replicated. When YUV-ranges broaden before mpeg2enc, then the resulting colorbars have an increased contrast and the dark/light bars are replicated as black/white. So it's indifferent where in mpeg2enc/dec the clipping/whatever takes place. The main thing is, that out-of-border-values finally get lost. This is bad. It's not intended. So why not accept standards and try to cleanup software? Regards, Ralf -- -------------------------------------------------------------------------- | Ralf Oehler | | GDA - Gesellschaft fuer Digitale _/ | Archivierungstechnik mbH & CoKG _/ | Ein Unternehmen der Bechtle AG #/_/_/_/ _/_/_/_/ _/_/_/_/ | _/ _/ _/ _/ _/ | E-Mail: [EMAIL PROTECTED] _/ _/ _/ _/ _/ _/ | Tel.: +49 6182-9271-23 _/_/_/_/ _/_/_/#/ _/_/_/#/ | Fax.: +49 6182-25035 _/ | Mail: GDA, Bensbruchstraße 11, _/_/_/_/ | D-63533 Mainhausen | HTTP: www.GDAmbH.com -------------------------------------------------------------------------- time is a funny concept ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users