X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprocsignal.cpp;h=1685f191857147033fa92fc0acbdab778f2cfbf4;hp=1c4f25f03e7670beca493f8f853569786edd48a2;hb=5a6caa64e880f613b82e516031028d02fd127257;hpb=3ea498d51ce4597e9649cd21f155b51175ea0bea diff --git a/libctsim/procsignal.cpp b/libctsim/procsignal.cpp index 1c4f25f..1685f19 100644 --- a/libctsim/procsignal.cpp +++ b/libctsim/procsignal.cpp @@ -1,15 +1,15 @@ /***************************************************************************** ** File IDENTIFICATION ** -** Name: filter.cpp -** Purpose: Routines for signal-procesing filters -** Progammer: Kevin Rosenberg -** Date Started: Aug 1984 +** Name: procsignal.cpp +** Purpose: Routines for processing signals and projections +** Progammer: Kevin Rosenberg +** Date Started: Aug 1984 ** ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: procsignal.cpp,v 1.30 2001/03/21 21:45:31 kevin Exp $ +** $Id: procsignal.cpp,v 1.32 2001/03/30 19:17:32 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -28,7 +28,7 @@ #include "ct.h" #ifdef HAVE_WXWINDOWS -#include "dlgezplot.h" +#include "nographics.h" #endif // FilterMethod ID/Names @@ -871,9 +871,11 @@ ProcessSignal::addZeropadFactor (int n, int iZeropad) if (iZeropad > 0) { double dLogBase2 = log(n) / log(2); int iLogBase2 = static_cast(floor (dLogBase2)); - if (dLogBase2 != floor(dLogBase2)) - iLogBase2++; // raise up to next power of 2 - n = 1 << (iLogBase2 + (iZeropad - 1)); + int iPaddedN = 1 << (iLogBase2 + iZeropad); +#ifdef DEBUG + sys_error (ERR_TRACE, "Zeropadding %d to %d", n, iPaddedN); +#endif + return iPaddedN; } return n;