change colors on the fly with mpc

Go down

change colors on the fly with mpc Empty change colors on the fly with mpc

Post by Cosmin3 Sun Apr 25, 2021 2:23 pm

Hi,

Are there any filters that could be activated so color of every pixel can be modified "on the fly"?
I mean with the same algorithm.
Just a simple example: each of the red/green/blue colors from the pixel can be modified using this:
fc = a * ic + b.
fc = final color
ic = initial color
a, b = constants.
Why do I need this: some movies are recorded with red/green/blue/... filters. But they use too much and I want to "tone it down".
And I need it "on the fly" to avoid waiting a lot of time to recompress the movie and to avoid the loss of video quality.
It's not impossible to make the filter so fast - with the use of CPU instructions (MMX/MMX2, SSE..SSe4.1 and so on...).
I'm a programmer too - Delphi and a bit of C - so I can help - if you agree ofcourse...
fc can be calculated for multiple pixels simultaneously.

A better way for the user to get what he/she wants is to load a picture, select some pixels, load the movie to be changed and, onto a frame, select a few corresponding points.
MPC calculates the transforming matrice or function and applies it "on the fly"...

What do you think about this...?

Thank you in advance.

Kind regards,
A user.

Cosmin3

Posts : 2
Join date : 2021-04-25

Back to top Go down

change colors on the fly with mpc Empty Re: change colors on the fly with mpc

Post by Admin Sun Apr 25, 2021 7:45 pm

You can do that with a PixelShader in MPC-HC.
Menu > Play > Shaders

You can use NightVision and Sepia shaders as an example. I can't provide any help with writing a new shader. You need to seek help and documentation elsewhere.

You can find more examples here:
https://github.com/butterw/bShaders
https://github.com/dinfinity/mpc-pixel-shaders

Admin
Admin

Posts : 5837
Join date : 2011-06-17

https://codecs.forumotion.net

Back to top Go down

change colors on the fly with mpc Empty Re: change colors on the fly with mpc

Post by Cosmin3 Mon Apr 26, 2021 9:16 pm

Thank you.
I will try that.

Cosmin3

Posts : 2
Join date : 2021-04-25

Back to top Go down

change colors on the fly with mpc Empty Re: change colors on the fly with mpc

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum