[Ffmpeg-devel] [PATCH] introduce swscale interface inlibavcodec
Mon Apr 10 15:03:13 CEST 2006
On Mon, 2006-04-10 at 13:13 +0200, Michael Niedermayer wrote:
> > > hmm, i thought sws should support both mplayer style and ffmpeg style img
> > > formats externally ...
> > I must have misunderstood something, then ;-)
> > Anyway, I can add a new flag SWS_FFMPEG_PIXFMT that enables ffmpeg style
> > format names when set (so, mplayer will not set such flag and will
> > continue to use its own format names. FFMpeg will set the flag and will
> > use PIX_FMT_*).
> well using only ffmpeg style formats is fine too (and maybe better) but
> then why did you move img_format.h over?
It's used by swscale internally. So, I copied it in libswscale to allow
swscale.c & friends to compile. My plan was:
1) first import swscale, with FFMpeg style PIX_FMT_* used in the
interface, but without changing swscale internals (to avoid introducing
2) after that, swscale can be changed to use PIX_FMT_* internally
(instead of converting from ffmpeg's names to mplayer's names in
getContext). This is "potentially dangerous", so I was thinking about
doing this change in a second time, after things proved to be stable
So, my plan was to have img_format.h as a private header in libswscale
for a (hopefully) short "transition period".
At this point, I do not know if this idea was good enough, or if it's
better to add a SWS_FFMPEG_PIXFMT flag and allow both FFMpeg's and
mplayer's pixel format names in the interface. Let me know which
solution is better, and I'll go for it.
> > Finally, the last question: which functions should mplayer pass to
> > sws_global_init()? (Ok, mp_msg() for logging, but I assume av_malloc()
> > and av_free() are not ok, because in this way it would become impossible
> > to compile mplayer without libavcodec...)
> memalign(16 or larger) if available, malloc() if not and free()
Ok, I'll use them when preparing the mplayer's patch.
Copy this in your signature, if you think it is important:
N O W A R ! ! !
More information about the ffmpeg-devel