[Ffmpeg-devel] About swscale
Luca Abeni
lucabe72
Wed Jun 21 13:53:48 CEST 2006
Hi Michael,
On Wed, 2006-06-21 at 13:42 +0200, Michael Niedermayer wrote:
[...]
> > Index: main/configure
> > ===================================================================
> > --- main.orig/configure 2006-05-19 07:41:28.000000000 +0200
> > +++ main/configure 2006-05-19 11:09:59.000000000 +0200
> > @@ -7343,6 +7343,30 @@
> > fi
> > echores "$_lircc"
> >
> > +echocheck "Software Scaler"
> > +_swscaler=no
> > +cat > $TMPC <<EOF
> > +#include <stdint.h>
> > +#include "libswscale/swscale.h"
> > +int main(void) { return 0; }
> > +EOF
> > +cc_check -I . && _swscaler=yes
> > +echores "$_swscaler"
> > +if test "$_swscaler" = no ; then
> > +die "Software Scaler not found. Please copy libswscale from FFMpeg"
> > +fi
Well, I wrote that code before the subversion move. The idea behind this
part of the patch is to check if someone applied the patch without
moving postproc ---> libswscale (this cannot happen now with subversion,
because svn can be told to automatically checkout libswscale from the
ffmpeg repository). In that case, the configure script dies.
> > +echocheck "New software scaler"
> > +_new_swscaler=no
> > +cat > $TMPC <<EOF
> > +#include <stdint.h>
> > +#include "libswscale/swscale.h"
> > +#ifndef LIBSWSCALE_BUILD
> > +#error Old Software Scaler
> > +#endif
> > +int main(void) { return 0; }
> > +EOF
> > +cc_check -I . && _new_swscaler=yes
> > +echores "$_new_swscaler"
>
> is this check good for anything?
Sorry, this second check is not useful. I just put it in to print a
message saying if swscale.diff has been applied (in this case,
_new_swscaler=yes). But it can be removed.
> > #############################################################################
> > echo "Creating config.mak"
> > cat > config.mak << EOF
> > @@ -7537,6 +7561,7 @@
> > AMR_NB=$_amr_nb
> > AMR_NB_FIXED=$_amr_nb_fixed
> > AMR_WB=$_amr_wb
> > +NEW_SWSCALER=$_new_swscaler
>
> this seems unused?
Sorry, leftover from a previous version of the patch. I apologize.
> [...]
> > Index: main/sws_interface.c
> > ===================================================================
> > --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> > +++ main/sws_interface.c 2006-05-19 11:11:56.000000000 +0200
> > @@ -0,0 +1,39 @@
> > +#include <stdint.h>
> > +#include <stdarg.h>
> > +#include "mp_msg.h"
> > +#include "libswscale/swscale.h"
> > +
> > +#ifdef HAVE_MALLOC_H
> > +#include <malloc.h>
> > +#endif
> > +
> > +#ifdef LIBSWSCALE_BUILD
>
> wont that always be true?
It will be true only if swscale.diff has been applied. I wrote this
check so that after applying mplayer-sws.diff mplayer can still compile
even if swscale.diff is not committed.
But if you prefer I can just remove this part of the patch, and we will
modify the code when applying swscale.diff.
I'll remove the configure checks and resubmit the patch...
Thanks,
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
More information about the ffmpeg-devel
mailing list