[Ffmpeg-devel] swscale patch
Fri Jul 14 19:56:33 CEST 2006
On Fri, Jul 14, 2006 at 03:27:10PM +0200, Luca Abeni wrote:
> Hi Michael,
> sorry for not replying before... I lost the last version of the patch
> (the one with sws_log as a field of SwsContext), and I am redoing it.
> I had it working, but there still are some issues to address:
> 1) sws_log is sometimes called when a sws context is not available (for
> example, in sws_printVec() and sws_orderYUV(). I commented out those
> log() for now, but I am searching for a better solution
> 2) all the functions that call sws_getContext() must see the prototype
> of my_log() (defined in a new swscaler_support.c file in the mplayer
> main directory). Should I add a new header file just for it, explicitly
> declare my_log() as external in all the .c files using it, or put the
> prototype in some other header file?
> (I know, my_log() is a terrible name... I am going to change it)
hmmmmmmm, the whole becomes more and more messy, i think that simply
using av_log() and requireing all av_log() implementations to be thread
safe or somehow gurantee that av_log will never be called from 2 threads
at once would be the only reasonable solution
after all av_log() is used in lavc/lavf too ...
> On Wed, 2006-07-05 at 12:26 +0200, Michael Niedermayer wrote:
> > hmm, somehow iam not completely happy with the whole malloc/free handling ...
> I tried to think about it... The only idea I had is to undefine
> DHAVE_AV_CONFIG_H before including avutil.h in swscale_internal.h, so
> that malloc() and free() can be used... So, we would not need to
> introduce sws_alloc() and sws_free().
ive thought about the malloc() problem a little and i think i ve found
move av_malloc() and relatives into libavutil, a system which doesnt
have malloc() can always choose not to compile mem.c (mem.c could be
put under some "ifeq CONFIG_AV_MALLOC,yes" or so in the Makefile)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel