[FFmpeg-user] Does converting to yuv444p by default make sense?
thljcl
jiachielee at live.com
Wed Jul 31 01:58:19 CEST 2013
In doing scientific research, we learn the laws of Physics based on
experimental data and logical understanding and deduction; not because of
someone says so. That said, I would never claim that I’ll never be wrong; in
fact, I make mistakes as frequent as any human being does. I’m also told by
Buddha not to take others’ words for granted for any other reasons other
than my own reasoning and understanding; no matter who they are.
I said that yuv444p can fully represent every single color in 24-bit RGB
color space is based on the algorithms used to encoding RGB color into
yuv444p. We know that lossy compression is irreversible. That is, there is
no way to recover the original information from a file of lossy compression.
The way to determine whether yuv444p can fully represent every single color
in 24-bit RGB color space is to determine whether the algorithm or function
to encode 24-bit RGB color space is reversible or if the function itself has
inverse function. Let me give you an example.
We are taught the existence of inverse trigonometric function. But
trigonometric functions themselves do not have inverse functions. Sounds
strange? Trigonometric functions are inverse functions of inverse
trigonometric function; but vice versa is not true. A function is a
one-to-one or many-to-one relationship. Inverse trigonometric function is
one-to-one relationship but trigonometric function is many-to-one
relationship. That is why inverse trigonometric function, strictly speaking,
is not the inverse function for trigonometric function.
In lossy compression, the algorithm is similar to many-to-one relationship.
That is, for a given encoder’s settings, we have an output file of certain
amount of information. Since some information is discarded during the
encoding process, we cannot recover the discarded information from the
output file. Such a function does not have an inverse. Or, we say that lossy
compression is irreversible.
How does YUV444p relate to RGB24? It depends on the standards being used.
But either way the function does have an inverse. Let’s take a look at ITU-R
BT.601 conversion at
<iframe width="640" height="390"
src="http://www.youtube.com/embed/FyLN46hGZzU" frameborder="0"
allowfullscreen></iframe>
It’s a slideshow I specifically created to show the derivation. While I
derive the inverse transformation matrix myself; the conversion matrix for
RGB24 to YUV444P I got from http://bit.ly/14gWnv0.
Basically, if you’ve learned linear algebra before, you may understand right
away why YUV444p can represent all colors from R’G’B’. Before you denounce
my answer, please watch the video first to see if there is anything wrong
with my math.
The reason for the loss of color information due to chroma subsampling
scheme such as YUV420p or YUV422p is due to the sharing of color information
between pixels, rather than having each individual pixel has its own color
information in all three channels, which are Y’, Cb, and Cr. There is no
denying that the reason for such transformation is for the chroma
subsampling scheme, i.e. reduction of color information; but it’s not due to
the non-invertible transformation matrix.
--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Does-converting-to-yuv444p-by-default-make-sense-tp4660219p4660346.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
More information about the ffmpeg-user
mailing list