[Ffmpeg-devel] Re: pixel format names in swscale
Fri Mar 24 09:58:58 CET 2006
Luca Abeni wrote:
> 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.
IMHO it would be better to use ffmpeg style. Also, future libavfilter
will need those definitions, it might be the time to create another header.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel