Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 18th April 2007, 20:57   #1  |  Link
AviSynth plugger
Fizick's Avatar
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Linear interpolation of color correction with key frames

I try create a new plugin (beta version) ColorKeyFrame - Linear interpolation of color correction with key frames.

(It is useful for clips with varying clopors, for example for DV camcorder clips in complex light condition)

The plugin is similar and based on ColorYUV AviSynth filter.
In Avisynth it is a hard to set different color correction for various part of clip, especially smoothly varying correction.
(the Animate function is not very convinient).
There are two functions in new plugin: ColorKeyFrame and ColorInterpolate.
Several ColorKeyFrame commands can be used to define color correction data for some given frames (key frames).
ColorInterpolate function make color correction by given values at key frames
and smooth transition of color correction between key frames by linear interpolation of the color correction data.
If you define exactly one key frame, the color correction by ColorInterpolation
will be uniform for whole clip, just as ColorYUV.

First version of the plugin uses some hack of Avisynth interface to transmit its setting
(the similar method is used by DGDecode (hints), IVTC, DePan, MVTools (motion vectors), etc).
Output of ColorKeyFrame function is special clip with color correction data
(for given key frame and previous key frames) in framebuffer.
This output can be used as a source for next call of ColoKeyFrame
for defining of correction of some other key frame, and so on.
Finally the output of last ColorKeyFrame is used as second input clip (keys)
for ColorInterpolation function to interpolate the color correction.

Now all frames store the same data (it is not per-frame property).
May be more apppropriate method is exist for storing and transmitting of per-clip data?
Firstly I supposed that user_data in plugininit2 function may be used.
Or may be strings?
(Text file may be used too)
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.

Last edited by Fizick; 19th April 2007 at 18:01.
Fizick is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 23:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.