[op25-dev] Re: p25_frame_assembler performance problems

lukekb@gmail.com [op25-dev] op25-dev at yahoogroups.com
Sun Feb 21 19:59:14 UTC 2016


So I don't fully understand it, but it looks like the problem is with forecast() in p25_frame_assembler.cc. My guess is that with the current forecast it would sometimes return that 0 Input samples are required because of the float to int conversion. The following code below makes a huge different for performance. What is the best way to submit a pull request?  

 

 void
 p25_frame_assembler_impl::forecast(int nof_output_items, gr_vector_int &nof_input_items_reqd)
 {
    // for do_imbe=false: we output packed bytes (4:1 ratio)
    // for do_imbe=true: input rate= 4800, output rate= 1600 = 32 * 50 (3:1)
    // for do_audio_output: output rate=8000 (ratio 0.6:1)
    const size_t nof_inputs = nof_input_items_reqd.size();
    double samples_reqd = 4.0 * nof_output_items;
     int nof_samples_reqd;
    if (d_do_imbe)
      samples_reqd = 3.0 * nof_output_items;
    samples_reqd = nof_output_items;
    if (d_do_audio_output)
      samples_reqd = 0.6 * nof_output_items;
    
    nof_samples_reqd = (int)ceil(samples_reqd);
     for(int i = 0; i < nof_inputs; i++) {
       nof_input_items_reqd[i] = nof_samples_reqd;
     }
      
 }

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/op25-dev/attachments/20160221/7034fabf/attachment.html>


More information about the op25-dev mailing list