# Rational\_resampling question

**URL:** <https://www.ruby-forum.com/t/rational-resampling-question/85081>\
**Category:** GNU Radio\
**Created:** [February 9, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/rational-resampling-question/85081 "2007-02-09T22:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgranqvist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@hgranqvist](https://www.ruby-forum.com/u/hgranqvist)\
**Post date:** [February 9, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/rational-resampling-question/85081/1 "2007-02-09T22:27:45Z")

</div>

Hello,

If I want to use the rational resampler without filtering, is it valid  
do this?

taps = [1]  
self.resampler = gr.rational\_resampler\_base\_scc( 3, 2, taps )

Thanks,  
Hans

---

<div class="post-metadata">

**Author:** ![hgranqvist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e480ec/32.png) [@hgranqvist](https://www.ruby-forum.com/u/hgranqvist)\
**Post date:** [February 11, 2007, 1:00am UTC](https://www.ruby-forum.com/t/rational-resampling-question/85081/2 "2007-02-11T01:00:12Z")

</div>

On Fri, Feb 09, 2007 at 01:26:30PM -0800, Hans G. wrote:

> Hello,
> 
> If I want to use the rational resampler without filtering, is it valid do this?
> 
> taps = [1]  
> self.resampler = gr.rational\_resampler\_base\_scc( 3, 2, taps )

If by valid you mean, “will it compute what I ask it”, the answer is  
yes. However, I don’t think you’re going to like the answer you get.

Why do you want to remove the filtering?  
FWIW, it’s a polyphase implementation and runs at the low rate.

See gnuradio-core/src/lib/filter/gr\_rational\_resampler\_base\_scc.cc  
for the implementation.

Also, if you’re trying to solve a performance problem, I _strongly_  
suggest that you use floats or complex, not shorts.  
Trust me, they’re _much_ faster.

Using \*\_scc you’ve effectively moved the short to float conversion  
into the inner loop of the dot product. This results in terrible  
performance on most machines since the conversion is relatively slow  
and you’re performing it O(N^2) times.

If you’re using the USRP as the front end, I suggest that you adjust  
to doing most everything at complex baseband. It simplifies many  
things, and we’ve got very fast SIMD filtering kernels for floats and  
complexes, not to mention fft-based filtering too.

Eric
