[MPlayer-dev-eng] [PATCH] cleanup swscale usage

Jason Tackaberry tack at urandom.ca
Tue May 9 14:27:10 CEST 2006


Hi Luca,

On Tue, 2006-05-09 at 10:12 +0200, Luca Abeni wrote:
> I am currently trying to move swscale from the mplayer tree to the
> ffmpeg tree (so that it can be used by ffmpeg and by other projects).
> This would require some modifications to swscale (I already posted some
> patches on the ffmpeg mailing list), and some modifications to mplayer
> to use the modified swscale.

Some time ago I looked at porting swscale to xine as a shared library.
One of the requirements is that it had to compile with -fPIC (for
x86_64).  This involved changing the code not to clobber the ebx
register.  I've attached a patch that does this.  It's against an older
version of swscaler so might not apply cleanly to recent cvs, but should
give you an idea.

Unfortunately I hit a roadblock with my efforts and haven't had time to
revisit it.  I was getting a linker error (not compiler error) on x86_64
with -fPIC.  I can't find the post I made to mplayer-dev-eng about this,
but here's a reference to another post on xine devel list:

   http://article.gmane.org/gmane.comp.video.xine.devel/14594

I was able to get things working fine on x86 with -fPIC.  It was just
x86_64 that gave me grief, and my asm-fu isn't strong enough to grok the
issues in swscaler's code.

Anyway, I'd be thrilled to see swscaler more portable. :)

Cheers,
Jason.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscaler-fpic.patch
Type: text/x-patch
Size: 20977 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060509/640c0f5e/attachment.bin>


More information about the MPlayer-dev-eng mailing list