[Ffmpeg-devel] pixel format names in swscale

Luca Abeni lucabe72
Fri Mar 24 09:41:41 CET 2006


which stile of pixel format name should we pass to sws_getContext()?
ffmpeg style (PIX_FMT_*) or mplayer style (IMGFMT_*)?

If we decide to go for ffmpeg style, then the PIX_FMT_* ---> IMGFMT_*
conversion will happen in sws_getContext() (as in my last patch), but
this will create a dependency of swscale on libavcodec. The only
solution I can think about would be to move the enum PixelFormat
definition from avcodec.h to avutil.h.

If we decide to go for mplayer style, then the PIX_FMT_* ---> IMGFMT_*
conversion will happen in the application using swscale (ffmpeg.c, for
example) and img_format.h will have to become a public header... I do
not particularly like this solution (it forces me to put a lot of
"#ifdef CONFIG_SWSCALE" in ffmpeg.c), but it seems to be the one that
forces less dependencies between libavcodec and libswscale.

Michael, what do you think? Maybe there is some other solution that I am
not seeing. Anyway, I have a working patch (with the sws_global_init()
you suggested yesterday); I just need some more testing, and I'll post
it in the lunch break.

Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Le speciali Offerte di Benvenuto di Cassine di Pietra:
* scopra il gusto ed i vantaggi delle tradizioni contadine
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3924&d=24-3

More information about the ffmpeg-devel mailing list