[Ffmpeg-devel] swscale.h in libavcodec and libswscale
Mon Oct 16 10:53:06 CEST 2006
On Mon, Oct 16, 2006 at 10:07:33AM +0200, Luca Abeni wrote:
> On Sun, 2006-10-15 at 19:38 +0200, Diego Biurrun wrote:
> > We curently have two headers called swscale.h, one in libswscale and one
> > in libavcodec.
> Yes, I created libavcodec/swscale.h some time ago.
> The fact is that now ffmpeg provides the swscale interface for image
> rescaling / pixel format conversion even if libswscale is not compile.
> This permits to have a consistent interface that can be used regardless
> of the fact that --enable-swscaler has been configured or not.
> In my opinion, this is not a problem: unless I am missing something, the
> correct swscale.h is always included, and "make install" installs the
> correct file. Of course, I might be wrong... Let me know, and I'll fix
> the problem.
Yes, it works. It's just the ugliness resulting from having two largely
redundant subsystems ..
> > I stumbled across this after noticing these warnings in vhook/:
> > null.c:77: warning: implicit declaration of function 'sws_getCachedContext'
> Uhmmm... I guess this is my fault: when sws_getCachedContext has been
> added to swscale, I forgot to add it to the swscale emulation code in
> > I can easily fix the warnings by adding -I$(SRC_PATH)/libswscale to
> > CFLAGS before -I$(SRC_PATH)/libavcodec.
> Did you configure with "--enable-swscaler"?
> If yes, "-I$(SRC_PATH)/libswscale" should already be before "-I
> $(SRC_PATH)/libavcodec" (at least, I think it was when I initially
> committed the swscale support).
Only in the top-level Makefile, not in any of the subdirectories. vhook
is a bit special in that it does not use common.mak in any case.
> If not, then the warning is showing a real problem, and adding "-I
> $(SRC_PATH)/libswscale" would just hide it (you would not see any
> compilation warning, but the resulting .so file would reference a
> non-existing function, and would be unusable). The real fix is to
> implement 'sws_getCachedContext' in the swscale emulation. If noone
> disagree with this statement, I'll provide a patch in few days.
> > While it be removed eventually?
> My idea is that it will be removed when swscale will become the default
> (and --enable-swscaler will disappear).
Are you planning to do this soon? :)
More information about the ffmpeg-devel