mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
39 [WIP] - restructured the polyphase filter process. Previous version
was not computationally feasible with my 3rd Gen i7 processor running and airspy at 10 MHz. Restructured the polyphase channelizer to use vector iteration structures that the JDK 9 JIT compiler can translate into SIMD instructions. Separated the IFFT processing from the filter process so that they can be executed on separate threads and this allows the processing to occur real time. P25 C4FM decoding at 25 kHz channel sample rate using an airspy 10MHz sample stream seems to be working nicely with ~25% CPU usage and ~300 to 500 MB memory usage. Incremental (parallel) channel decoding should have a minimal increase in CPU loading since all of the 12.5 kHz channels are available in the polyphase channelizer and the only additional workload is the decoding of the 25 kHz sample stream. There is still an issue with stopping channels and the channelizer keeps processing, and occasionally when starting traffic channels something deadlocks and causes out of memory.
This commit is contained in:
@@ -115,6 +115,23 @@ public class OverflowableTransferQueue<E>
|
||||
return drainCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves elements from the queue into the collection up to the maximum number of elements specified
|
||||
*/
|
||||
public int drainTo(Collection<? super E> collection)
|
||||
{
|
||||
int drainCount = mQueue.drainTo(collection);
|
||||
|
||||
int size = mCounter.addAndGet(-drainCount);
|
||||
|
||||
if(mOverflow.get() && size <= mResetThreshold)
|
||||
{
|
||||
setOverflow(false);
|
||||
}
|
||||
|
||||
return drainCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a listener to receive overflow state change events.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user