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. |
|
11th January 2004, 19:36 | #1 | Link |
Registered User
Join Date: Nov 2003
Location: Austria
Posts: 75
|
New Filter: Gradation Curves v1.10
I've developed a new filter that can edit the gradation curves similar to curves of painting programs.
The filter is downloadable here: https://neosol.at/vdub/index.html What the filter can do / what the filter can be used for: For example if dark areas of a video are too dark, the filter can be used to brighten them up, without changing light and mid tones. The filter can invert the color space like the internal invert filter and can apply coring also, like the coring filter plugin that exists for VirtualDub. If the tone of a video is, for example too blue, the filter can be used to compensate this. The overall brightness can be changed also. And the good thing is, it can all be done at the same time with one filter instance only. This way I also want to thank Phaeron for helping & showing me how to store the gradation curves data in the processing settings (.vcf file). Changes to v1.0: * An import/export function has been integrated to import/export curves from/to Adobe Photoshop. (Map Files .amp can be saved in the curves function of Adobe Photoshop by selecting pen mode.) * A small bug in the weighted mode is now fixed. Last edited by BBugsBunny; 13th February 2022 at 16:06. Reason: site moved - new link |
20th January 2004, 19:07 | #3 | Link |
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
@Bugs,
Why do you use the 709 spec numbers to calculate Y? 54,183,19 It is my understanding that 601 is Std TV, and the numbers would be something like 77,150,29. The reason I ask is that I'm working on a color correction scope plugin (histograms/wfm/hot pixels/channels), that really does not fix anything, just shows what you have in a more objective fashion. The appropriate use of the specs and the range for RGB (aka 16-235 vs 0-255) has me puzzled. Your curves tool would be a great compliment, letting one fix most things in 1 shot. Here is a link with more info: http://www.video-demystified.com/mm/tutor/ch03.pdf |
20th January 2004, 21:52 | #4 | Link |
Registered User
Join Date: Nov 2003
Location: Austria
Posts: 75
|
@trevlac,
actually I got the values from the internal greyscale filter of VirtualDub. The "normal mode" works similar to Photoshops curves, but as I found out, that setting more extreme values can give some rather strange effects, I thought of a "weighted mode". So first I had (R+G+B)/3. Then I took a look at the internal assembler routine of the greyscale filter of VirtualDub, that says in a comment: "Y = (54 * R + 183 * G + 19 * B)/256" I thought it would be better than (R+G+B)/3 and at that point I've read no specs about Y calculation. Now I've taken a look at a Rhode&Schwarz info paper about TV technology and there it says something like 77,151,28 as well. So perhaps anyone else knows why VirtualDub uses 56,183,19 and if 77,151,28 would be more correct? I could change this in an upcoming release easily... At the moment I'm trying to integrate a possibility to edit the curve with the mouse - but this seems to be not so easy (at least for me). |
21st January 2004, 16:28 | #5 | Link | |
budala
Join Date: Oct 2003
Location: U.S.
Posts: 545
|
Quote:
You can also speed up the calculation by storing the pre calculated values in 3 256 dim arrays. Then you do something like Code:
//** Init proc for(i=0;i<256;i++) { RedY[i] = i*77; GreenY[i] = i*150; BlueY[i] = i*29; } .... //** main proc Y = (RedY[Red] + GreenY[Green] + BlueY[Blue])>>8 |
|
21st January 2004, 19:02 | #6 | Link |
Registered User
Join Date: Nov 2003
Location: Austria
Posts: 75
|
I've updated the filter to version 1.11
This fixes the bug of the out-of-bounds memory access (access violation) when storing the processing settings. Also I changed the Y calculation to: Y = (77 * R + 150 * G + 29 * B)/256 |
|
|