From dd42da2607e2904868214181947a34059a38fcb4 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Mon, 7 Jul 2025 09:23:07 +0200 Subject: [PATCH] disable clipping and filtering on noise and sync symbols --- encode.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/encode.cc b/encode.cc index e24b339..0783202 100644 --- a/encode.cc +++ b/encode.cc @@ -107,9 +107,10 @@ struct Encoder : public Common value scale = value(0.5) / std::sqrt(value(tone_count)); for (int i = 0; i < symbol_len; ++i) tdom[i] *= scale; - clipping_and_filtering(scale, papr_reduction); - if (papr_reduction) + if (papr_reduction) { + clipping_and_filtering(scale, true); tone_reservation(); + } auto clamp = [](value v){ return v < value(-1) ? value(-1) : v > value(1) ? value(1) : v; }; for (int i = 0; i < symbol_len; ++i) tdom[i] = cmplx(clamp(tdom[i].real()), clamp(tdom[i].imag()));