Use mplayer as resize engine

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

Post Reply
User avatar
foxyshadis
Posts: 384
Joined: Sat Nov 18, 2006 8:57 am

Use mplayer as resize engine

Post by foxyshadis » Fri Jan 12, 2007 7:48 pm

I know you intend to work on resizing at some point this year, so I thought this might interest you. In ffdshow, we use a stripped down chunk of mplayer called software scaler to do all of our resizing (and post-processing - who knows, that might be interesting too). It's a self-contained dll, you only need a few function calls to set up and perform the resize.

It has a number of advantages over xnview's implementation - it's extremely fast (and multithreaded), capable of doing hundreds of 720x480 -> 1280x1024 resizes per second on my system, compared to only a few per second in xnview (though it's hard to measure with any accuracy). It's also more correct, images won't walk off the edge of pictures with multiple resizes. I notice the different resizes in xnview all seem to be centered differently, only a couple are correct.

It's GPL, but many experts say that you can use GPL in self-contained libraries as long as the code for the library itself is available. It's up to you.

Its assembly optimizations also require compiling with gcc or icl, as a fyi.

If you're interested, I can send you more information.

User avatar
xnview
Author of XnView
Posts: 33449
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Use mplayer as resize engine

Post by xnview » Sat Jan 13, 2007 7:32 am

foxyshadis wrote:I know you intend to work on resizing at some point this year, so I thought this might interest you. In ffdshow, we use a stripped down chunk of mplayer called software scaler to do all of our resizing (and post-processing - who knows, that might be interesting too). It's a self-contained dll, you only need a few function calls to set up and perform the resize.

It has a number of advantages over xnview's implementation - it's extremely fast (and multithreaded), capable of doing hundreds of 720x480 -> 1280x1024 resizes per second on my system, compared to only a few per second in xnview (though it's hard to measure with any accuracy). It's also more correct, images won't walk off the edge of pictures with multiple resizes. I notice the different resizes in xnview all seem to be centered differently, only a couple are correct.

It's GPL, but many experts say that you can use GPL in self-contained libraries as long as the code for the library itself is available. It's up to you.

Its assembly optimizations also require compiling with gcc or icl, as a fyi.

If you're interested, I can send you more information.
If it's GPL, i can't use it...
Pierre.

User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Re: Use mplayer as resize engine

Post by Olivier_G » Mon Jan 22, 2007 2:29 pm

foxyshadis wrote:many experts say that you can use GPL in self-contained libraries as long as the code for the library itself is available.
Would be worth confirming that part, IMHO...
Olivier

User avatar
foxyshadis
Posts: 384
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis » Tue Jan 23, 2007 12:20 pm

This is one of my sources: http://en.wikipedia.org/wiki/GNU_Genera ... d_disputes
Unfortunately the rest dropped off my browser history, and I need to go over the mailing lists again.

Post Reply