aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2020-05-28 07:27:31 -0400
committerChris Johnson <jinx6568@sover.net>2020-05-28 07:27:31 -0400
commit3c0d151e1a8014ece2a3982ec0e7b364e23a7575 (patch)
tree49b6d5ab10e32050b65a67394c94a0977746884a /plugins/MacAU
parent897c0830e603a950e838a3753f89334bdf56bb71 (diff)
downloadairwindows-lv2-port-3c0d151e1a8014ece2a3982ec0e7b364e23a7575.tar.gz
airwindows-lv2-port-3c0d151e1a8014ece2a3982ec0e7b364e23a7575.tar.bz2
airwindows-lv2-port-3c0d151e1a8014ece2a3982ec0e7b364e23a7575.zip
Laserbat spotted an interesting bug in legacy NJAD code!
Diffstat (limited to 'plugins/MacAU')
-rwxr-xr-xplugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp4
-rwxr-xr-xplugins/MacAU/Ditherbox/Ditherbox.cpp4
-rwxr-xr-xplugins/MacAU/NaturalizeDither/NaturalizeDither.cpp2
-rwxr-xr-xplugins/MacAU/NotJustAnotherCD/NotJustAnotherCD.cpp2
-rwxr-xr-xplugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp2
-rwxr-xr-xplugins/MacAU/Righteous4/Righteous4.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp b/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp
index a4b1edf..41929f0 100755
--- a/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp
+++ b/plugins/MacAU/Distance2/Ditherbox/Ditherbox.cpp
@@ -573,7 +573,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP,
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
@@ -655,7 +655,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP,
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
diff --git a/plugins/MacAU/Ditherbox/Ditherbox.cpp b/plugins/MacAU/Ditherbox/Ditherbox.cpp
index a4b1edf..41929f0 100755
--- a/plugins/MacAU/Ditherbox/Ditherbox.cpp
+++ b/plugins/MacAU/Ditherbox/Ditherbox.cpp
@@ -573,7 +573,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP,
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
@@ -655,7 +655,7 @@ void Ditherbox::DitherboxKernel::Process( const Float32 *inSourceP,
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
diff --git a/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp b/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp
index 0104530..76531b4 100755
--- a/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp
+++ b/plugins/MacAU/NaturalizeDither/NaturalizeDither.cpp
@@ -280,7 +280,7 @@ void NaturalizeDither::NaturalizeDitherKernel::Process( const Float32 *inSourc
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
diff --git a/plugins/MacAU/NotJustAnotherCD/NotJustAnotherCD.cpp b/plugins/MacAU/NotJustAnotherCD/NotJustAnotherCD.cpp
index a7c0e6d..fe31998 100755
--- a/plugins/MacAU/NotJustAnotherCD/NotJustAnotherCD.cpp
+++ b/plugins/MacAU/NotJustAnotherCD/NotJustAnotherCD.cpp
@@ -284,7 +284,7 @@ void NotJustAnotherCD::NotJustAnotherCDKernel::Process( const Float32 *inSourc
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
diff --git a/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp b/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp
index 3eee651..2ca3c6f 100755
--- a/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp
+++ b/plugins/MacAU/NotJustAnotherDither/NotJustAnotherDither.cpp
@@ -286,7 +286,7 @@ void NotJustAnotherDither::NotJustAnotherDitherKernel::Process( const Float32
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;
diff --git a/plugins/MacAU/Righteous4/Righteous4.cpp b/plugins/MacAU/Righteous4/Righteous4.cpp
index be1a1f6..d906edb 100755
--- a/plugins/MacAU/Righteous4/Righteous4.cpp
+++ b/plugins/MacAU/Righteous4/Righteous4.cpp
@@ -491,7 +491,7 @@ void Righteous4::Righteous4Kernel::Process( const Float32 *inSourceP,
totalA = byn[1] + byn[2] + byn[3] + byn[4] + byn[5] + byn[6] + byn[7] + byn[8] + byn[9];
totalA /= 1000;
- if (totalA = 0) totalA = 1;
+ if (totalA = 0) totalA = 1; // spotted by Laserbat: this 'scaling back' code doesn't. It always divides by the fallback of 1. Old NJAD doesn't scale back the things we're comparing against. Kept to retain known behavior, use the one in StudioTan and Monitoring for a tuned-as-intended NJAD.
byn[1] /= totalA;
byn[2] /= totalA;
byn[3] /= totalA;