[FFmpeg-devel] [RFC] 16-bit component library

Loren Merritt lorenm
Sat May 26 23:58:50 CEST 2007

On Sat, 26 May 2007, erik98 at sunflower.com wrote:
> Oyvind Kolas wrote:
>> One thing you do not seem to take into account is the positioning of
>> chroma samples for planar pixelformats using chroma sub-sampling,
> There seem to be two options here.  1) Explicitly enumerate the extra
> "components" (ie. Y,U,Y',V = 4 components) 2) Add a component
> sub-index. (ie. Y[0],U,Y[1],V)
> I tend to favor the first since that seems to be how other programmers
> seem to treat the situation, but perhaps there is another option?
> Regardless, it seems I should expand the pixel-definition (which is
> then "compiled" into the actual structure used by the read/write
> functions) to account for relative sample rates...

You seem to be talking about packed formats. The Y,U,Y',V of your example 
would be YUY2. Packed formats are necessarily more complex to support 
generically than planar formats.

"positioning of chroma samples" means how the data is rendered (e.g. when 
converting to RGB or 4:4:4), not how it's stored in memory.

--Loren Merritt

More information about the ffmpeg-devel mailing list