[Ffmpeg-devel] The tag "CS=ITU601"

Michael Niedermayer michaelni
Fri Sep 29 20:45:57 CEST 2006


Hi

On Mon, Sep 25, 2006 at 12:19:02PM -0700, Keith Goldfarb wrote:
> Hello developers,
> 
> My name is Keith Goldfarb and I work at Rhythm & Hues
> Studios in Los Angeles.
> 
> In January, 2005, Michael Niedermayer added a check for a
> specific string, "CS=ITU601" into mjpeg.c
> 
> 
>   1824 : 	michael 	3852 	 else if(!strcmp(cbuf, "CS=ITU601")){
>   1825 : 	  	  	s->cs_itu601= 1;
>   1826 : 	  	  	}
> 
> While I understand the motivation for this change and the
> need to distinguish between these two different (grrr) ways
> of encoding yuv data, I cannot find any reference to this
> string anywhere but in this one source file.
> 
> Is this an established standard tag to indicate the 601 yuv
> encoding, or something specific to libavcodec?

it was our idea, so no its not an established standard, the problem
was that some applications (IIRC mplayer/mencoder) which use libavcodec
store ITU601 style yuv in jpeg they generate, which is obviously not
correct so ive added this string to at least make it clear what was
stored

libavcodec will also by default fail if you try to use it to store
itu601 yuv in jpeg, an application first has to set
AVCodecContext.strict_std_compliance to FF_COMPLIANCE_INOFFICIAL or lower
so programs which use libavcodec must litterally first request lavc
to generate non standard files before lavc will add this tag and accept
itu601 yuv for *jpeg

there is also one case where itu601 support makes sense beyond supporting
applications which lack support for differencing between yuv variants and
that is lossless jpeg, for lossless encoding you of course cannot do
lossy colorspace convertion ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list