[Ffmpeg-devel] Add some other PIX_FMT_ ---> IMGFMT conversions to libswscale

Michael Niedermayer michaelni
Sat Aug 5 01:03:21 CEST 2006


On Sat, Aug 05, 2006 at 12:17:05AM +0200, Luca Abeni wrote:
> Hi all,
> while testing a version of ffmpeg using libswscale (see my previous
> email) I noticed that some PIX_FMT_* values are not converted in
> IMGFT_*...
> In particular, I noticed PIX_FMT_YUVJ420P, PIX_FMT_GRAY8, and
> PIX_FMT_MONOWHITE. Looking at some code in mplayer, I coocked up the
> attached patch for libswscale (is it correct?), but I do not know how to
> convert PIX_FMT_MONOWHITE. Can anyone help me?

i think thats not supported, and there arent many codecs which use it
after all mplayer with lavc doenst support it either ...
IMHO ignore it for now and after the swscaler move is done you can
add support for it to swscale :)

> 			Thanks,
> 				Luca

> Index: swscale.c
> ===================================================================
> --- swscale.c	(revision 19331)
> +++ swscale.c	(working copy)
> @@ -213,6 +213,7 @@
>  /* Used for ffmpeg --> MPlayer format name conversion */
>  static const int fmt_name[PIX_FMT_NB] = {
>      [PIX_FMT_YUV420P] = IMGFMT_I420,   ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
> +    [PIX_FMT_YUVJ420P] = IMGFMT_I420,

its not so simple, there are many slightly different YUV types, fabrice
picked 2, the one most commonly used in mpeg videos and the one used in jpeg
swscale supports any (minus bugs and half implemented stuff), via 

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list