[FFmpeg-devel] Adding 10-bit depth YUV

Michael Niedermayer michaelni
Sat May 12 12:19:16 CEST 2007


Hi

On Sat, May 12, 2007 at 04:08:27AM +0200, ?yvind Kol?s wrote:
> On 5/11/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Fri, May 11, 2007 at 01:55:40PM +0200, ?yvind Kol?s wrote:
> > > On 5/10/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> > iam not speaking about n routines to convert n formats we have that since
> > years but 1 routine to convert n formats based on a description of the
> > format (like where how many bits are which component ...)
> > the intent is to make it very easy to add new pixel formats and then
> > just write fast conversation functions when its actually needed
> 
> This is exactly what babl provides.
> 
> A sample of some of the code in babl/base/model-ycbcr.c
> 
> static void
> formats (void)
> {
>   babl_format_new (
>     "name", "Y'CbCr u8",
>     "id", BABL_YCBCR420,
>     "planar",
>     babl_model_id (BABL_YCBCR),
>     babl_type_id (BABL_U8_LUMA),
>     babl_sampling (1, 1),
>     babl_component_id (BABL_LUMA),
>     babl_type_id (BABL_U8_CHROMA),
>     babl_sampling (2, 2),
>     babl_component_id (BABL_CB),
>     babl_sampling (2, 2),
>     babl_component_id (BABL_CR),
>     NULL);
>   return;
> 
>   babl_format_new (
>     "name", "y'cbcr420",
>     "id", BABL_YCBCR420,
>     "planar",
>     babl_model_id (BABL_YCBCR),
>     babl_type_id (BABL_U8_LUMA),
>     babl_sampling (1, 1),
>     babl_component_id (BABL_LUMA),
>     babl_type_id (BABL_U8_CHROMA),
>     babl_sampling (2, 2),
>     babl_component_id (BABL_CB),
>     babl_sampling (2, 2),
>     babl_component_id (BABL_CR),
>     NULL);
> 
> This registers a new named format, with a given model, and the
> corresponding packing
> of the named components, and their datatypes.

and how much code is needed to do the actual generic slow conversion?
and i mean in the lib not the application

also does it support formats like rgb 5:5:5 or NV12 (2 plane YUV)

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070512/aa8c3824/attachment.pgp>



More information about the ffmpeg-devel mailing list