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

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st November 2019, 21:29   #1  |  Link
crabshank
Registered User
 
Join Date: Oct 2019
Posts: 5
Manual_WP (C plugin - x64 only)

https://github.com/crabshank/Avisynth-filters

This filter allows you to fix the white balance of media by changing the white point of it using the appropriate Bradford transform and transfer functions for 11 (I could easily add more) colour spaces:

"mode" parameter:

0 (Default) - sRGB

1 - Rec. 601 NTSC

2 - Rec. 601 PAL

3 - Rec. 709

4 - Rec. 2020

5 - DCI-P3

6 - Display P3

7 - Orginal NTSC (47 CFR § 73.682 - TV transmission standards)

8 - Rec. 601 D93 (Use for Japanese media)

9 - Rec. 709 D93 (Some Japanese media may use this)

10 - DCI-P3 (D60/ACES)

It allows you to enter the xy value directly or, much more easily, enter the RGB values (0-255/0-65535) that you wish to turn grey. It also allows you to enter a target white point for the final output ("dst_x" and "dst_y" - D65 is the default).

I also have a hlsl version of this for greater speed but the input is only RGB32.

Last edited by crabshank; 14th July 2020 at 20:40. Reason: Major changes
crabshank is offline   Reply With Quote
Old 2nd November 2019, 00:39   #2  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Pull request submitted. 64-bit only required making sure the build system could do it (I used CMake, because why not?), there were no actual code changes required. Encompasses both plugins, not just WhitePoint.
qyot27 is offline   Reply With Quote
Old 2nd November 2019, 01:45   #3  |  Link
crabshank
Registered User
 
Join Date: Oct 2019
Posts: 5
Quote:
Originally Posted by qyot27 View Post
Pull request submitted. 64-bit only required making sure the build system could do it (I used CMake, because why not?), there were no actual code changes required. Encompasses both plugins, not just WhitePoint.
Thanks a lot, main thing now will be to compile yours (to .dlls) in Code::Blocks if possible.
crabshank is offline   Reply With Quote
Old 2nd November 2019, 11:21   #4  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by crabshank View Post
I would like to make this x64 and speed it up, so if anyone can help, it would be much appreciated.
As for speeding it up - The bottleneck is most likely the nested loops that access array elements of type double in "functions_c.h". You could probably speed this up considerably by using compiler intrinsics.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 2nd November 2019 at 13:35.
Groucho2004 is offline   Reply With Quote
Old 14th July 2020, 20:39   #5  |  Link
crabshank
Registered User
 
Join Date: Oct 2019
Posts: 5
Major updates, see first post.
crabshank is offline   Reply With Quote
Reply

Tags
color correction, white balance, white point

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 16:02.


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