0

I recently created my own DirectShow movie player as a control for use in WPF. This all works fine, but my customer would like a feature to boost colors depending on his preference.

Based on an old application he uses, he defines this as three seperate sliders, one for each color channel (RGB).

When R would be set to 255, and the others lower to zero, the red color in the playing video would be boosted, or at least "noticeably more red".

I have already messed with Hue, Saturation, Contrast, Brightness, all kinds of RGB to HSL/HSV calculations as found on wikipedia and such, but none of those really do what I expect.

Could anyone point me in the right direction? Perhaps an exposed interface in DirectShow I missed, because I'm kind of clueless at the moment. Is it even possible by default in DirectShow?

Lennard Fonteijn
  • 2,193
  • 2
  • 20
  • 32

1 Answers1

0

Do you use oldskool directshow graphfilter interfaces?

IID_IAMVideoProcAmp:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd376033%28v=vs.85%29.aspx
this interface has brightness, contrast, hue, saturation, sharpness, gamma etc.. setters and getters.

Transform Filter
http://msdn.microsoft.com/en-us/library/windows/desktop/dd391015%28v=vs.85%29.aspx
This might not be click-click-it-works task if you create everything from scratch. Transformation filter is a capability to create intermediate filters changing video buffer pixels at runtime.

Do you use C#, C++ or other language?

You did say using Windows Presentation Framework(WPF), but then mediaplayer is a directshow application. My understanding is directshow is more or less dead tech.

Study WPF Effects interface, its a modern shader tech where you should easier transform pixel colors or whatnot effects be created.
Pixel Shader Effect Examples

Edit Few directshow filter related links for reference

Community
  • 1
  • 1
Whome
  • 9,559
  • 6
  • 43
  • 59