[FFmpeg-devel] [PATCH] make img_convert symbol conditional on lavc version, not libswscale

Michael Niedermayer michaelni
Fri Jun 6 14:59:56 CEST 2008


On Fri, Jun 06, 2008 at 11:29:27AM +0200, Reinhard Tartler wrote:
> 
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> >> Duplicated code bloat is in general not an issue for general purpose
> >> distributions. 
> >
> > Ever tried to run (and especially use) recent software
> > (kde, gnome, firefox, ...) on an old computer? Iam writing this on a 500mhz P3
> > with 192mb ram. firefox is on it at least 20 times slower than any browser was
> > on a 90mhz pentium, with significantly less ram, when these where average
> > systems.
> 
> I see two approaches to this problem:
> 
>  - removing code
>  - modularise code
> 
> The first one is straight forward. Decide that old code is "depracated",
> remove the code from the library and force application developers to
> move and adapt to the new situation.

I would if i could, but the new code does not work with the regression tests
yet, it will be fixed in this years google summer of code hopefully ...

We could drop the old API of course but then i wanted to wait with that
until after SOC ... just for the unlikely case the new API might need to be
changed a little still ...


> 
> The second one provides the same functionality but enables applications
> to choose fine grained the implementations and code they need to
> run. Then only the needed code is loaded and run. This however means
> more work for the library developer.

More work is the last thing we need. Especially if the work is not moving
ffmpeg forward.


> 
> For this specific case: If libswscale would provide the same API as the
> imgresample.c implemenation, then it would have been trivial to port
> applications: Just include a new header and adjust LDFLAGS. What the
> patch this thread about aims at is to provide the "missing" functions
> imgresample.c provides and libswscale doesn't.

The problem is that swscale is
context= sws_getContext(source/destination image sizes, colorspaces, ...)

for each image 
    sws_scale(source, destination)


while the old api was
img_convert(source/destination image sizes, colorspaces, ...
            source, destination)

The only way swscale could be used through the old API is to build the
context for each image and throw it away afterward. A process which wastes
time ...

Also the old implemenation can be used through the new API if you do not
use --enable-swscale.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080606/0af2ed0a/attachment.pgp>



More information about the ffmpeg-devel mailing list