[FFmpeg-user] Chroma subsampling formats
Mark Filipak
markfilipak.imdb at gmail.com
Tue Jul 15 22:33:49 EEST 2025
On 15/07/2025 14.51, Paul B Mahol wrote:
> On Tue, Jul 15, 2025 at 6:00 PM Mark Filipak <markfilipak.imdb at gmail.com>
> wrote:
>
>> Are these correct? Or, is there some official reference I can consult?
>>
>
> Maybe correct for packed formats only.
Thanks for replying, Paul.
Ya know, I've tried to read H.262 & H.264 about pixel planes and it all seems so vague to me that I
finally give up looking at words that just lack meaningful content. Maybe the answers were there and
I just didn't see them but I get along much better with pictures of objects than with words about
objects. Specifically, where are those planes? Perhaps "plane" is a metaphor for something. I just
don't know.
>> Reference: https://en.wikipedia.org/wiki/Chroma_subsampling
>
> Isn't this very obvious and straightforward read?
Not for me.
• J: horizontal sampling reference (width of the conceptual region). Usually, 4.
• a: number of chrominance samples (Cr, Cb) in the first row of J pixels.
• b: number of changes of chrominance samples (Cr, Cb) between first and second row of J pixels. b
is usually either zero or equal to a (except in rare irregular cases like 4:4:1 and 4:2:1, which do
not follow this convention).
The explanation of 'b' is vague. I think it's wrong -- the wrong 'method'. I think the authors made
it up -- "number of changes" -- because it somehow makes sense to them. But "irregular cases like
4:4:1 and 4:2:1" doesn't make sense, does it?
I think 'b' is simply the number of chroma samples in the lines of the second field, or it's '0' if
the second field isn't stored because it's not needed because it will be copied from the first
field. I don't think it has anything to do with "changes". The test is: Are my 4:4:1 and 4:2:1
(below) correct?
>> Y element, pixels 0..3
>> / Cb element, pixels 0..3
>> / / Cr element, pixels 0..3
>> / / /
>> 4:4:1 ¤¤¤¤ ¤¤¤¤ ¤¤¤¤ —— lines in field 0
>> ¤¤¤¤ ¤••• ¤••• —— lines in field 1
>>
>> 4:2:1 ¤¤¤¤ ¤•¤• ¤•¤•
>> ¤¤¤¤ ¤••• ¤•••
> Also you forgot that chroma, when subsampled, can have different positions,
> top, top-left, center, ..
No. I didn't forget.
--Mark.
More information about the ffmpeg-user
mailing list