[FFmpeg-devel] [PATCH] avformat/mxfenc: Add color siting element

Michael Niedermayer michaelni at gmx.at
Thu May 21 12:29:52 CEST 2015


On Thu, May 21, 2015 at 08:20:48AM +0100, tim nicholson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 19/05/15 16:50, Michael Niedermayer wrote:
> > On Tue, May 19, 2015 at 03:35:42PM +0100, tim nicholson wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> On 19/05/15 14:11, Michael Niedermayer wrote:
> >>> On Tue, May 19, 2015 at 12:07:24PM +0100, tim nicholson wrote:
> >>>> On 19/05/15 01:33, Michael Niedermayer wrote:
> >>>>> [...]
> >>> the avchroma locations are explained by the ascii art above the enum
> :
> >>>  *  X   X      3 4 X      X are luma samples,
> >>>  *             1 2        1-6 are possible chroma positions
> >>>  *  X   X      5 6 X      0 is undefined/unknown position
> >>>
> >>> and from this the english directions are exactly where the chroma
> >>> samples are located, this also matches how H264 defines chroma
> >>> locations.
> >>
> >> I cannot get the ascii art to make sense to me at all, it just doesn'
> t
> >> click. I do no see how you can represent "co-siting" in ascii art wit
> h a
> >> single character and the "3" position certainly doesn't do it for me!
> > 
> > ascii art improved
> > does it make sense now ?
> > 
> 
> Better, but I still cannot see the difference between say 3 and 4, or 1
> and 2.
> 
> > [...]
> 
> My understanding of S377 using 2/3 ascii chars/pixel is:-
> 
> 00h:-
> 
> YC Y- YC -Y-
> YC Y- YC -Y-
> YC Y- YC -Y-

S377-2009 speaks about the first sample of the image only
"The first luma sample of the image is co-sited with the first color difference sample(s), as in ITU-R Rec
 601, SMPTE 314M 4:1:1 or MPEG-2 4:2:2."

Your ASCII art matches my interpretation of this though 00h can be
more than 4:2:2, it explicitly also lists 4:1:1


> 
> 01h:-
> 
> Y- C- Y- C- Y-
> Y- C- Y- C- Y-
> Y- C- Y- C- Y-

This implies 4:4:4


Y- C- Y- Y- C- Y-
Y- C- Y- Y- C- Y-
Y- C- Y- Y- C- Y-

would be possible too
not to mention the mxf text for 01h
"The color sample is sited at the point horizontally midway between the luma sample on each line."
does not say which luma samples are used for the midpoint
also it speaks about "color sample" while 00h speaks about
"color difference sample(s)"
color samples would be RGB, difference Cb Cr. the MXF spec isnt
really wording this very unambigously


> 
> 03h:-
> 
> Y-    Y-
> - -- C- --
> Y-    Y-

This ascii art seems to be faulty in some form it looks like
chroma had more positions than luma horizontally


> 
> 05h:-
> 
> YCr Y- YCr
> YCb Y- YCb
> YCr Y- YCr
> 

> 06h:-
> 
> 
> Y- Y- Y- Y-
> C- C- C- C-
> Y- Y- Y- Y-

The text from the spec is
"The color sample is sited at the point vertically midway between the luma sample on each column, as in
 MPEG-2 4:2:0."

i think your ascii art matches how i would interpet it for 4:4:0 or
4:4:4, not sure if you intended this to be not 4:2:0


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150521/6bed274a/attachment.asc>


More information about the ffmpeg-devel mailing list