[Ffmpeg-devel] [PATCH] introduce swscale interface inlibavcodec

Michael Niedermayer michaelni
Tue Apr 4 13:00:03 CEST 2006


Hi

On Tue, Apr 04, 2006 at 11:10:12AM +0200, Luca Abeni wrote:
[...]
> move-ffmpeg-to-sws.diff depends on the cropping/padding patchset I
> posted earlier, so I'll commit it only after such patchset is accepted.
> In the meanwhile, I'll post the patch for moving output_example.c and
> ffplay.c to the sws interface.

i officially declare you maintainer of the old crop/pad/scale code
review it yourself ...


> 
> > > After applying these two patches, importing swscale becomes really easy
> > > (and the ffmpeg patch for importing it is much smaller...). In fact, I
> > > already have a working patch: I'll post it later, after checking if all
> > > the previous comments have been properly addressed (BTW, Michael, is the
> > > "USE_AVUTIL" thing I put in my last patch ok? If not, let me know and
> > > I'll remove it).
> > 
> > what USE_AVUTIL? i dont remember ...
> The one in swscaler_glue.c and swsutil.h in my last "import swscale" patch.
> Basically, swsutil.h contains something like
> +#include "avutil.h"
> +#ifdef USE_AVUTIL
> +#else
> [...]
> +#define av_malloc sws_malloc
> +#define av_free sws_free
> +#define av_log sws_log
> +extern void *(*av_malloc)(unsigned int size);
> +extern void (*av_free)(void *ptr);
> +extern void (*av_log)(void*, int level, const char *fmt, ...);
> +
> +#endif
> 
> The idea is that if USE_AVUTIL is defined (and it currently is not),
> then av_{free, malloc, log} are directly used. If it is not defined, the
> functions passed to sws_global_init() are used.
> When/if av_{free, malloc, log} will be moved to libavutil, swscale will
> be automagically ready for that (we will only need to define USE_AVUTIL
> in config.h).
> 
> When I wrote that part of the code, this seemed to be a smart idea :)
> But I am ready to remove this stuff if it is not acceptable.

remove it IMHO, sws should always use the functions passed into
sws_global_init()

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list