[XviD-devel] "Generic" plugin mechanism
Christoph Lampert
xvid-devel@xvid.org
Fri, 24 Jan 2003 19:17:08 +0100 (CET)
Hi,
I noticed that my "idea" of passing a function pointer to XviD core
is just the first part of a generic plugin system. Let me just "think
aloud":
There could be slots within encoding, in particular _before_ and _after_
the main encoding step, where generic functions could be called with
access to internal encoder data. Either just one, doing everything it
wants, or several, read from a linked list, etc.
My idea are things like prefiltering of the input image e.g. with access
to adaptive quantization information, maybe also with access to motion
data.
A PSNR-filter would also be possible (without the codec providing extra
infrastructure), by using a pre-slot (buffering the input), and a
post-slot (calculating PSNR) together.
Of course, such filters could become a part of XVID itself, but since
there are so many possible filters around, it might be easier to just
write a small wrapper and use a routine which is not a part of the core.
XVID could contain a "library" of default filters, but if somebody wants
to add and test a new one... no problem.
I would like slots for "plugins" as a part of the core, not of VfW etc,
because that way, things are more portable to non-Windows plattforms.
What do you think?
gruel