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 > VirtualDub, VDubMod & AviDemux
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th January 2004, 19:36   #1  |  Link
BBugsBunny
Registered User
 
BBugsBunny's Avatar
 
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
BBugsBunny is offline   Reply With Quote
Old 14th January 2004, 15:26   #2  |  Link
Dali Lama
Registered User
 
Join Date: Jan 2002
Posts: 331
Hi,

That looks like a realy nice filter for poorly lit DV videos. Thanks a lot! I am sure many people will appreciate this filter. I just hope people in the DV forums find out about this

Thanks,

Dali
Dali Lama is offline   Reply With Quote
Old 20th January 2004, 19:07   #3  |  Link
trevlac
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
trevlac is offline   Reply With Quote
Old 20th January 2004, 21:52   #4  |  Link
BBugsBunny
Registered User
 
BBugsBunny's Avatar
 
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).
BBugsBunny is offline   Reply With Quote
Old 21st January 2004, 16:28   #5  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
Quote:
Originally posted by BBugsBunny
So perhaps anyone else knows why VirtualDub uses 56,183,19 and if 77,151,28 would be more correct?
The actual 601 spec document says Y = 77/256 + 150/256 + 29/256.


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
I don't recall if you did this. I slapped my head when I 1st saw this technique and said 'of course'. I posted because I didn't know this until recently.
trevlac is offline   Reply With Quote
Old 21st January 2004, 19:02   #6  |  Link
BBugsBunny
Registered User
 
BBugsBunny's Avatar
 
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
BBugsBunny is offline   Reply With Quote
Reply


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 21:37.


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