[Ffmpeg-devel] circular dependency between libavcodec andlibswscale

Michael Niedermayer michaelni
Wed Mar 22 17:43:01 CET 2006


On Wed, Mar 22, 2006 at 04:11:26PM +0100, Luca Abeni wrote:
> Hi all,
> On Wed, 2006-03-22 at 15:37 +0100, Luca Abeni wrote:
> [...]
> > I am wondering how to solve this problem... The simplest solution is to
> > leave img_resample() in libavcodec, internal only (so it will be renamef
> > ff_img_resample()), for mpegvideo.c. But I do not like this solution at
> > all...
> > 
> > I can modify mpegvideo.c to use swscale (as suggested by the FIXME :),
> > but this would leave the circular dependency.
> > 
> > Any ideas?
> Looks like I did not think about the really simple idea: linking all the
> swscale code into libavcodec (so, no libswscale :)
> Given the current dependencies, maybe this is really the most natural
> solution.

hmm, i really dont like the dependancy between swscale & lavc

there are people who will want to use swscale without lavc
and there are people who want lavc without swscale

a naive solution for the first part seems to be:
sws_global_init(malloc_ptr, free_ptr, printf_ptr);

and for the second one, i really think we can avoid swscale completely
i mean lavc just needs 1/2^n downscaling of 8bit planar data, that can 
easily be done without a swscale dependancy, ill work on the 1/2^n thingy


More information about the ffmpeg-devel mailing list