diff --git a/tools/ld-chroma-decoder/encoder/ntscencoder.cpp b/tools/ld-chroma-decoder/encoder/ntscencoder.cpp index 919118ea8..6dfa9cd64 100644 --- a/tools/ld-chroma-decoder/encoder/ntscencoder.cpp +++ b/tools/ld-chroma-decoder/encoder/ntscencoder.cpp @@ -268,15 +268,13 @@ static double syncPulseGate(double t, double startTime, SyncPulseType type) return raisedCosineGate(t, startTime, startTime + length, 200.0e-9 / 2.0); } -// 1.3 MHz low-pass Gaussian filter, as used in pyctools-pal's coder. -// Generated by: c = scipy.signal.gaussian(13, 1.49); c / sum(c) +// 1.3 MHz low-pass filter // -// The UV filter should be 0 dB at 0 Hz, >= -3 dB at 1.3 MHz, <= -20 dB at -// 4.0 MHz. [Clarke p8] -static constexpr std::array uvFilterCoeffs { - 8.06454142158873e-05, 0.0009604748783110286, 0.007290763490157312, 0.035272860169480155, 0.10876496139131472, - 0.21375585039760908, 0.2677488885178237, 0.21375585039760908, 0.10876496139131472, 0.035272860169480155, - 0.007290763490157312, 0.0009604748783110286, 8.06454142158873e-05 +// The filter should be 0 dB at 0 Hz, >= -2 dB at 1.3 MHz, < -20 dB at +// 3.6 MHz. [Clarke p15] +static constexpr std::array uvFilterCoeffs { + 0.0021, 0.0191, 0.0903, 0.2308, 0.3153, + 0.2308, 0.0903, 0.0191, 0.0021 }; static constexpr auto uvFilter = makeFIRFilter(uvFilterCoeffs);