[MPlayer-dev-eng] [PATCH] tga loader for libmpcodecs

D Richard Felker III dalias at aerifal.cx
Wed Sep 11 19:43:03 CEST 2002


On Wed, Sep 11, 2002 at 06:23:46PM +0200, Tilman Sauerbeck wrote:
> On Tue, 10 Sep 2002 17:39:48 -0400 D Richard Felker III <dalias at aerifal.cx> wrote:
> 
> > > anyway the code could be optimized a lot, by doing memcpy() for the cases
> > > when input and output bpp matches.
> > 
> > Is it possible to use the demuxer buffer in an export-type mpi? Seems
> > like that would be optimal, for uncompressed tga's.
> 
> Yes, Arpi, I'll do that tonight.
> Richard, is there any example I can look to see what you are talking about?

Look at existing video filters that use MP_IMGTYPE_EXPORT. I know I
used it in the eq filter to export the unmodified chroma planes to the
next filter in the chain. The basic idea is that rather than
allocating a new buffer with the mp image, you can specify that you
want to fill in the planes pointers and strides yourself, with blocks
of memory you already have.

As Arpi said, exporting from demuxer might or might not be safe,
depending on when the demuxer buffer gets freed, but you can try it.
You might want to put a note in a comment to remind anyone to remove
this feature if the demuxer architecture ever changes in a way that
breaks it.

Rich





More information about the MPlayer-dev-eng mailing list