[FFmpeg-user] Levels and Primaries

Rio Kierkels riokierkels at gmail.com
Wed Feb 12 11:11:32 CET 2014

> Does that mean that you see no problem when converting
> from rgb to yuv420p with libswscale?
> (Sorry, but I am not a native speaker and an apparent
> native speaker has written twice that he can reproduce
> your problem.)

The problem is that I still cannot with 100% certainty check what levels
are written to disk.
Different applications seem to compensate in their waveform monitors for it
so it's always the question of what am I looking at.
But as far as I can tell the R'G'B' to Y'CbCr conversion includes the
scaling operation in its matrix.
Again this is checked with all the blackbox tools that I have at my exposal.
And I'm not using libswscale explicitly but the -pix_fmt option, I think
that in the background
libswscale is called.

> > A more accurate representation would be ycbcr (just
> > a side note).
> But then existing FFmpeg users would ask why the
> console output / option names changed...
> In other words: This is purely historical but is
> unlikely to change afaict.
User education is part of the problem. If nobody insists on using the
correct terminology it will never change.
Charles Poynton actually has written an entire chapter about the wrong
usage of the terms Luminance and Luma
being used interchangeably while meaning completely different things. This
is a problem that exists for over 50 years.
Luminance is proportional to the intensity of linear light either in
absolute form or relative form.
Luma is the weighted sum of R'B'G' components (not the ' telling you that
they are nonlinear or "gamma-corrected") known as Y' (again note the ' ).

Sorry, Carl Eugen

This is nothing to apologize for. I can yell anything I want expecting
somebody else to do the dirty work but that's just not my style ;)
When my C++ coding skills are a bit better and my familiarity with the
ffmpeg codebase is a bit better I'll be able to contribute
stuff like this myself.

I'm just trying to keep this conversation going.



More information about the ffmpeg-user mailing list