mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
Merge branch 'master' into 39-polyphase-channelizer
This commit is contained in:
@@ -19,6 +19,7 @@ package dsp.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import sample.real.RealSampleListener;
|
||||
|
||||
public class FloatFIRFilter implements RealSampleListener
|
||||
@@ -139,7 +140,7 @@ public class FloatFIRFilter implements RealSampleListener
|
||||
private void generateIndexMap( int size )
|
||||
{
|
||||
//Ensure we have an odd size
|
||||
assert( size % 2 == 1 );
|
||||
Validate.isTrue(size % 2 == 1);
|
||||
|
||||
mIndexMap = new int[ size ][ size ];
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package dsp.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import sample.real.RealSampleListener;
|
||||
|
||||
public class FloatHalfBandFilter implements RealSampleListener
|
||||
@@ -149,7 +150,7 @@ public class FloatHalfBandFilter implements RealSampleListener
|
||||
private void generateIndexMap( int size )
|
||||
{
|
||||
//Ensure we have an odd size
|
||||
assert( size % 2 == 1 );
|
||||
Validate.isTrue(size % 2 == 1);
|
||||
|
||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ package dsp.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import sample.real.RealSampleListener;
|
||||
|
||||
public class FloatHalfBandNoDecimateFilter implements RealSampleListener
|
||||
@@ -139,7 +140,7 @@ public class FloatHalfBandNoDecimateFilter implements RealSampleListener
|
||||
private void generateIndexMap( int size )
|
||||
{
|
||||
//Ensure we have an odd size
|
||||
assert( size % 2 == 1 );
|
||||
Validate.isTrue(size % 2 == 1);
|
||||
|
||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package dsp.filter.cic;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import sample.Listener;
|
||||
import sample.complex.ComplexBuffer;
|
||||
import sample.complex.ComplexSampleListener;
|
||||
@@ -67,7 +68,7 @@ public class ComplexPrimeCICDecimate implements Listener<ComplexBuffer>
|
||||
public ComplexPrimeCICDecimate( int decimation, int order,
|
||||
int passFrequency, int attenuation, WindowType windowType )
|
||||
{
|
||||
assert( decimation <= 700 );
|
||||
Validate.isTrue(decimation <= 700);
|
||||
|
||||
|
||||
List<Integer> stageSizes = getPrimeFactors( decimation );
|
||||
|
||||
@@ -20,6 +20,7 @@ package dsp.filter.cic;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -81,7 +82,7 @@ public class RealPrimeCICDecimate
|
||||
public RealPrimeCICDecimate( int decimation, int order, int passFrequency,
|
||||
int attenuation, WindowType windowType, int outputBufferSize )
|
||||
{
|
||||
assert( decimation <= 700 );
|
||||
Validate.isTrue(decimation <= 700);
|
||||
|
||||
mOutputBufferSize = outputBufferSize;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
******************************************************************************/
|
||||
package dsp.filter.halfband.real;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
public class HalfBandFilter
|
||||
{
|
||||
private float[] mBuffer;
|
||||
@@ -122,7 +124,7 @@ public class HalfBandFilter
|
||||
private void generateIndexMap( int size )
|
||||
{
|
||||
//Ensure we have an odd size
|
||||
assert( size % 2 == 1 );
|
||||
Validate.isTrue(size % 2 == 1);
|
||||
|
||||
int mapWidth = ( ( size + 1 ) / 2 ) + 1;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package dsp.filter.interpolator;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -31,7 +32,7 @@ public class RealInterpolator extends Interpolator
|
||||
public float filter( float[] samples, int offset, float mu )
|
||||
{
|
||||
/* Ensure we have enough samples in the array */
|
||||
assert( samples.length >= offset + 7 );
|
||||
Validate.isTrue(samples.length >= offset + 7);
|
||||
|
||||
/* Identify the filter bank that corresponds to mu */
|
||||
int index = (int)( NSTEPS * mu );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
******************************************************************************/
|
||||
package dsp.filter.polyphase;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -53,7 +54,7 @@ public class PolyphaseFIRInterpolatingFilter
|
||||
public PolyphaseFIRInterpolatingFilter( double[] coefficients, int interpolation )
|
||||
{
|
||||
/* Ensure coefficients are an integral multiple of the interpolation factor */
|
||||
assert( coefficients.length % interpolation == 0 );
|
||||
Validate.isTrue(coefficients.length % interpolation == 0);
|
||||
|
||||
mTaps = coefficients;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
******************************************************************************/
|
||||
package dsp.gain;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -49,7 +50,7 @@ public class DirectGainControl implements GainController, RealSampleListener
|
||||
*/
|
||||
public DirectGainControl( float gain, float minimum, float maximum, float increment )
|
||||
{
|
||||
assert( minimum > 0 );
|
||||
Validate.isTrue(minimum > 0);
|
||||
|
||||
mDefaultGain = gain;
|
||||
mGain = gain;
|
||||
|
||||
Reference in New Issue
Block a user