discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Possible bug in keep_m_in_n and patch


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Possible bug in keep_m_in_n and patch
Date: Wed, 24 Sep 2014 12:49:36 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

No comment on the patch, but in general, it helps us a lot if you do this via github & pull request.

M

On 24.09.2014 12:21, Zhe Feng wrote:
Dear all,

I checked the keep_m_in_n block and found a possible bug in it. In the
work function, the code wrote:

consume_each(d_n);
return d_m;

which I think it should be

consume_each(blks*d_n);
return blks*d_m.

while blks=std::min(noutput_items/d_m, ninput_items[0]/d_n).

Since both m and n of the block might change, which means the output to
input rate might change. I changed the set_output_multiple(m) to
set_relative_rate(d_n/d_m). And we made the set_relative_rate(d_n/d_m)
be called in the set_m and set_n function to make sure the rate is
updated on time.

The patch is attached. Could you check it?

Thanks!
Best,
Zhe


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]