Log in

View Full Version : Manual_WP (C plugin - x64 only)


crabshank
1st November 2019, 21:29
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 (https://github.com/crabshank/HLSL-Reshade-colour-remappers/blob/master/Essential%20video%20filters/White%20Point%20Avisynth.hlsl) for greater speed but the input is only RGB32.

qyot27
2nd November 2019, 00:39
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.

crabshank
2nd November 2019, 01:45
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.

Groucho2004
2nd November 2019, 11:21
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.

crabshank
14th July 2020, 20:39
Major updates, see first post.