From f81980e3fd9fbfcc10b20a87258534a95f64a349 Mon Sep 17 00:00:00 2001 From: 78Gausen <50046966+78Gausen@users.noreply.github.com> Date: Wed, 14 Feb 2024 20:58:04 -0300 Subject: [PATCH] New Lanczos filter variants (#42) Using the usual kernels for N=2 and N=3. 4, 8 and 16 phases normalized for 128 and 256 (10bit). Meant to reduce horizontal blur on N64 core when VI bilinear is in use. Less phases produce a closer to original output while adding some diffusion. --- .../lanczos2_16p_128.txt | 24 ++++++++++++++++++ .../lanczos2_16p_256.txt | 25 +++++++++++++++++++ .../lanczos2_4p_128.txt | 14 +++++++++++ .../lanczos2_4p_256.txt | 15 +++++++++++ .../lanczos2_8p_128.txt | 18 +++++++++++++ .../lanczos2_8p_256.txt | 19 ++++++++++++++ .../lanczos3_16p_128.txt | 24 ++++++++++++++++++ .../lanczos3_16p_256.txt | 25 +++++++++++++++++++ .../lanczos3_4p_128.txt | 14 +++++++++++ .../lanczos3_4p_256.txt | 15 +++++++++++ .../lanczos3_8p_128.txt | 18 +++++++++++++ .../lanczos3_8p_256.txt | 19 ++++++++++++++ 12 files changed, 230 insertions(+) create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_256.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_256.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_256.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_256.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_256.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_128.txt create mode 100644 Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_256.txt diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_128.txt new file mode 100644 index 0000000..e7c3d24 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_128.txt @@ -0,0 +1,24 @@ +# 16 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_16p_128.txt + +# Coefficients + 0, 128, 0, 0 + -4, 127, 6, 0 + -8, 124, 13, -1 + -10, 118, 21, -1 + -11, 111, 30, -2 + -11, 103, 40, -4 + -10, 93, 50, -5 + -9, 83, 61, -6 + -8, 72, 72, -8 + -6, 61, 83, -9 + -5, 50, 93, -10 + -4, 40, 103, -11 + -2, 30, 111, -11 + -1, 21, 118, -10 + -1, 13, 124, -8 + 0, 6, 127, -4 + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_256.txt new file mode 100644 index 0000000..f759388 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_16p_256.txt @@ -0,0 +1,25 @@ +10bit +# 16 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_16p_256.txt + +# Coefficients + 0, 256, 0, 0 + -9, 254, 11, 0 + -15, 247, 25, -1 + -19, 236, 42, -3 + -21, 222, 60, -5 + -22, 205, 79, -7 + -21, 186, 100, -10 + -19, 166, 122, -13 + -16, 144, 144, -16 + -13, 122, 166, -19 + -10, 100, 186, -21 + -7, 79, 205, -22 + -5, 60, 222, -21 + -3, 42, 236, -19 + -1, 25, 247, -15 + 0, 11, 254, -9 + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_128.txt new file mode 100644 index 0000000..1440eed --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_128.txt @@ -0,0 +1,14 @@ +# 4 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_4p_128.txt + +# Coefficients + 0, 128, 0, 0 + -11, 111, 30, -2 + -8, 72, 72, -8 + -2, 30, 111, -11 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_256.txt new file mode 100644 index 0000000..fb12f68 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_4p_256.txt @@ -0,0 +1,15 @@ +10bit +# 4 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_4p_256.txt + +# Coefficients + 0, 256, 0, 0 + -21, 222, 60, -5 + -16, 144, 144, -16 + -5, 60, 222, -21 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_128.txt new file mode 100644 index 0000000..cc85de2 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_128.txt @@ -0,0 +1,18 @@ +# 8 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_8p_128.txt + +# Coefficients + 0, 128, 0, 0 + -8, 124, 13, -1 + -11, 111, 30, -2 + -10, 93, 50, -5 + -8, 72, 72, -8 + -5, 50, 93, -10 + -2, 30, 111, -11 + -1, 13, 124, -8 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_256.txt new file mode 100644 index 0000000..6e6e95e --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos2_8p_256.txt @@ -0,0 +1,19 @@ +10bit +# 8 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos2_8p_256.txt + +# Coefficients + 0, 256, 0, 0 + -15, 247, 25, -1 + -21, 222, 60, -5 + -21, 186, 100, -10 + -16, 144, 144, -16 + -10, 100, 186, -21 + -5, 60, 222, -21 + -1, 25, 247, -15 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_128.txt new file mode 100644 index 0000000..a602412 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_128.txt @@ -0,0 +1,24 @@ +# 16 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_16p_128.txt + +# Coefficients + 0, 128, 0, 0 + -6, 129, 7, -2 + -11, 127, 16, -4 + -15, 124, 25, -6 + -18, 119, 36, -9 + -19, 112, 47, -12 + -20, 103, 59, -14 + -19, 93, 71, -16 + -18, 82, 82, -18 + -16, 71, 93, -19 + -14, 59, 103, -20 + -12, 47, 112, -19 + -9, 36, 119, -18 + -6, 25, 124, -15 + -4, 16, 127, -11 + -2, 7, 129, -6 + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_256.txt new file mode 100644 index 0000000..b4a34b0 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_16p_256.txt @@ -0,0 +1,25 @@ +10bit +# 16 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_16p_256.txt + +# Coefficients + 0, 256, 0, 0 + -12, 257, 15, -4 + -22, 255, 32, -8 + -30, 248, 51, -13 + -35, 237, 72, -18 + -39, 223, 95, -23 + -40, 206, 118, -28 + -39, 186, 142, -33 + -37, 165, 165, -37 + -33, 142, 186, -39 + -28, 118, 206, -40 + -23, 95, 223, -39 + -18, 72, 237, -35 + -13, 51, 248, -30 + -8, 32, 255, -22 + -4, 15, 257, -12 + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_128.txt new file mode 100644 index 0000000..8c18c3a --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_128.txt @@ -0,0 +1,14 @@ +# 4 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_4p_128.txt + +# Coefficients + 0, 128, 0, 0 + -18, 119, 36, -9 + -18, 82, 82, -18 + -9, 36, 119, -18 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_256.txt new file mode 100644 index 0000000..9411bda --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_4p_256.txt @@ -0,0 +1,15 @@ +10bit +# 4 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_4p_256.txt + +# Coefficients + 0, 256, 0, 0 + -35, 237, 72, -18 + -37, 165, 165, -37 + -18, 72, 237, -35 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_128.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_128.txt new file mode 100644 index 0000000..8747a83 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_128.txt @@ -0,0 +1,18 @@ +# 8 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_8p_128.txt + +# Coefficients + 0, 128, 0, 0 + -11, 127, 16, -4 + -18, 119, 36, -9 + -20, 103, 59, -14 + -18, 82, 82, -18 + -14, 59, 103, -20 + -9, 36, 119, -18 + -4, 16, 127, -11 + + + diff --git a/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_256.txt b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_256.txt new file mode 100644 index 0000000..cec5491 --- /dev/null +++ b/Filters/Upscaling - Lanczos Bicubic etc/lanczos3_8p_256.txt @@ -0,0 +1,19 @@ +10bit +# 8 Phase Filters +# Single Set of Coefficients + +# The original filename is: +# lanczos3_8p_256.txt + +# Coefficients + 0, 256, 0, 0 + -22, 255, 32, -8 + -35, 237, 72, -18 + -40, 206, 118, -28 + -37, 165, 165, -37 + -28, 118, 206, -40 + -18, 72, 237, -35 + -8, 32, 255, -22 + + +