Windows Media Encoder supports Microsoft DirectShow® and Microsoft DirectX® Media Objects (DMO) transform filters by providing a wrapper plug-in.
you can look in the directx SDK samples for the contrast filter:
x:\DXSDK\Samples\C++\DirectShow\Filters\Contrast
This will show you how to build a filter that WME will recognize