Merge branch 'alsa_drop_samples'
authorTom Rondeau <trondeau@vt.edu>
Wed, 22 Dec 2010 23:05:52 +0000 (18:05 -0500)
committerTom Rondeau <trondeau@vt.edu>
Wed, 22 Dec 2010 23:05:52 +0000 (18:05 -0500)
44 files changed:
config/usrp_libusb.m4
gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_channelizer_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_interpolator_ccf.cc
gnuradio-core/src/lib/filter/gr_sincos.c
gnuradio-core/src/lib/filter/gr_single_pole_iir.h
gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.cc.t
gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_XXX.h.t
gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_ccf.h [deleted file]
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccc.h
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_ccf.h
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fcc.h
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fff.h
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_fsf.h
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.cc
gnuradio-core/src/lib/filter/qa_gri_fir_filter_with_buffer_scc.h
gnuradio-core/src/lib/general/gr_circular_file.cc
gnuradio-core/src/lib/general/gr_fll_band_edge_cc.cc
gnuradio-core/src/lib/general/gr_float_to_complex.cc
gnuradio-core/src/lib/general/gr_skiphead.cc
gnuradio-core/src/lib/general/gr_skiphead.h
gnuradio-core/src/lib/general/gr_skiphead.i
gnuradio-core/src/lib/gengen/gr_add_XX.cc.t
gnuradio-core/src/lib/gengen/gr_divide_XX.cc.t
gnuradio-core/src/lib/gengen/gr_multiply_XX.cc.t
gnuradio-core/src/lib/gengen/gr_sub_XX.cc.t
gnuradio-core/src/lib/runtime/gr_preferences.cc
gnuradio-core/src/lib/swig/gnuradio.i
gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py
gnuradio-examples/python/pfb/resampler.py [new file with mode: 0755]
gr-audio-jack/src/audio_jack_sink.cc
gr-audio-jack/src/audio_jack_source.cc
gr-audio-portaudio/src/audio_portaudio_sink.cc
gr-audio-portaudio/src/audio_portaudio_source.cc
gr-msdd6000/src/msdd_rs_source_simple.cc
gr-msdd6000/src/msdd_source_simple.cc
gr-trellis/src/lib/fsm.cc
gr-trellis/src/lib/interleaver.cc
usrp/doc/Doxyfile.in

index a434d379ddfb3382e1d554a7a2eb2a5797210658..cc3410f4190fc970f7568ef9fc12c823fb4f0d15 100644 (file)
@@ -24,28 +24,43 @@ dnl Boston, MA 02110-1301, USA.
 
 
 AC_DEFUN([USRP_LIBUSB], [
-  dnl Use PKGCONFIG to check for packages first, then check to
-  dnl make sure the USB_* variables work (whether from PKGCONFIG
-  dnl or overridden by the user)
-
-  dnl do not use LDFLAGS, since PKGCONFIG will provide everything
+  dnl do not use LDFLAGS, except on Windows
   saved_LDFLAGS=${LDFLAGS}
-  LDFLAGS=
-  LIBUSB_PKG_CONFIG_NAME=
+  case "$host_os" in
+    cygwin* | mingw*)
+    ;;
+    *)
+      LDFLAGS=
+    ;;
+  esac
 
-  dnl loop over various possible 'libusb' PKGCONFIG names, and choose
-  dnl the first one that meets both the user's selection (via
-  dnl configure flags) as well as what is installed
+  dnl this variable is set in usrp/usrp.pc.in as a requirement
+  dnl for libusrp; it is OK to be empty.
+  LIBUSB_PKG_CONFIG_NAME=
 
-  dnl create the list of libusb PKGCONFIG modules to test
+  dnl for Windows (cygin, mingw), do not use PKGCONFIG since LIBUSB
+  dnl does not install a .pc file.  For all other OSs, use
+  dnl PKGCONFIG to check for various package names first.
   libusb_list=''
-  if test x$1 = xyes; then
-    dnl libusb-1.0 was requested; just test for it
-    libusb_list="libusb-1.0"
-  else
-    dnl test for legacy libusb only
-    libusb_list="libusb libusb-legacy"
-  fi
+  case "$host_os" in
+    cygwin* | mingw*)
+      libusb_list='libusb'
+    ;;
+    *)
+      dnl create the list of libusb PKGCONFIG modules to test
+      if test x$1 = xyes; then
+        dnl libusb-1.0 was requested; just test for it
+        libusb_list="libusb-1.0"
+      else
+        dnl test for legacy libusb only
+        libusb_list="libusb libusb-legacy"
+      fi
+    ;;
+  esac
+
+  dnl loop over various possible 'libusb' names, and
+  dnl choose the first one that meets both the user's selection
+  dnl (via configure flags) as well as what is installed
   for libusb_name in ${libusb_list}; do
     dnl clear internal variables
     libusbok=no
@@ -54,31 +69,45 @@ AC_DEFUN([USRP_LIBUSB], [
     usb_lib_func=''
     usb_lib_name=''
 
-    dnl start checks
-    AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}'])
-    if test ${libusb_name} = "libusb-1.0"; then
-      dnl see if the pkgconfig module is available
-      PKG_CHECK_MODULES(USB, ${libusb_name}, [
-        libusbok=yes
-        have_libusb1=yes
-        usb_header='libusb-1.0/libusb.h'
-        usb_lib_func='libusb_bulk_transfer'
-      ], [libusbok=no])
-    else
-      dnl see if the pkgconfig module is available
-      PKG_CHECK_MODULES(USB, ${libusb_name}, [
-        libusbok=yes
+    case "$host_os" in
+      cygwin* | mingw*)
+        USB_INCLUDEDIR=
+        USB_INCLUDES=
+        USB_LIBS=-lusb
         usb_header='usb.h'
         usb_lib_func='usb_bulk_write'
-      ], [libusbok=no])
-    fi
+        libusbok=yes
+      ;;
+      *)
+        dnl start checks
+        AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}'])
+        if test ${libusb_name} = "libusb-1.0"; then
+          dnl see if the pkgconfig module is available
+          PKG_CHECK_MODULES(USB, ${libusb_name}, [
+            libusbok=yes
+            have_libusb1=yes
+            usb_header='libusb-1.0/libusb.h'
+            usb_lib_func='libusb_bulk_transfer'
+          ], [libusbok=no])
+        else
+          dnl see if the pkgconfig module is available
+          PKG_CHECK_MODULES(USB, ${libusb_name}, [
+            libusbok=yes
+            usb_header='usb.h'
+            usb_lib_func='usb_bulk_write'
+          ], [libusbok=no])
+        fi
+      ;;
+    esac
     if test $libusbok = yes; then
-      dnl PKGCONFIG found a version of LIBUSB.
+      dnl PKGCONFIG found a version of LIBUSB, or the info was
+      dnl provided by the user, or the OS is Windows.
+
       dnl Check it to make sure it meets enough criteria:
       dnl Verify that $usb_header is a valid header. If so, then
       dnl verify that $usb_lib_func can be found in the library
       dnl $usb_lib_name.  if so, verify that the symbol 'usb_debug' is
-      dnl found in the library.
+      dnl found in the library if not using Windows.
 
       dnl Check for the header.  Similar to AC_CHECK_HEADERS,
       dnl but doesn't append to known \#defines.
@@ -135,28 +164,43 @@ AC_DEFUN([USRP_LIBUSB], [
         if test $libusbok = yes; then
           if test ${libusb_name} != "libusb-1.0"; then
             dnl PKGCONFIG found a legacy version of libusb; make sure the
-            dnl variable _usb_debug is available in the found library
-            AC_LANG_PUSH(C)
-            save_CPPFLAGS="$CPPFLAGS"
-            CPPFLAGS="$USB_INCLUDES"
-            save_LIBS="$LIBS"
-            LIBS="$USB_LIBS"
-            AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name])
-            AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-              extern int usb_debug;]],
-              [[usb_debug = 0;]])],
-              [libusbok=yes],[libusbok=no])
-            AC_MSG_RESULT([$libusbok])
-            LIBS="$save_LIBS"
-            CPPFLAGS="$save_CPPFLAGS"
-            AC_LANG_POP(C)
+            dnl variable _usb_debug is available in the found library.
+           dnl Do not test on Windows, since that symbol is not defined.
+            case "$host_os" in
+              cygwin* | mingw*)
+              ;;
+            *)
+              AC_LANG_PUSH(C)
+              save_CPPFLAGS="$CPPFLAGS"
+              if test x$USB_INCLUDEDIR != x; then
+                CPPFLAGS="$USB_INCLUDES"
+              fi
+              save_LIBS="$LIBS"
+              LIBS="$USB_LIBS"
+              AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name])
+              AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+                extern int usb_debug;]],
+                [[usb_debug = 0;]])],
+                [libusbok=yes],[libusbok=no])
+              AC_MSG_RESULT([$libusbok])
+              LIBS="$save_LIBS"
+              CPPFLAGS="$save_CPPFLAGS"
+              AC_LANG_POP(C)
+              ;;
+            esac
           fi
         fi
       fi
     fi
     dnl if everything checks out OK, finish up
     if test $libusbok = yes; then
-      LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
+      case "$host_os" in
+        cygwin* | mingw*)
+        ;;
+        *)
+          LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
+        ;;
+      esac
       break
     else
       dnl something wasn't found in this LIBUSB version.
@@ -173,7 +217,9 @@ AC_DEFUN([USRP_LIBUSB], [
     dnl final error checking, mostly to create #define's
     AC_LANG_PUSH(C)
     save_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$USB_INCLUDES"
+    if test x$USB_INCLUDEDIR != x; then
+      CPPFLAGS="$USB_INCLUDES"
+    fi
     dnl Check for the header.
     AC_CHECK_HEADERS([$usb_header], [], [libusbok=no])
     CPPFLAGS="$save_CPPFLAGS"
@@ -185,18 +231,20 @@ AC_DEFUN([USRP_LIBUSB], [
       dnl check for the library (again)
       AC_LANG_PUSH(C)
       save_CPPFLAGS="$CPPFLAGS"
-      CPPFLAGS="$USB_INCLUDES"
+      if test x$USB_INCLUDEDIR != x; then
+        CPPFLAGS="$USB_INCLUDES"
+      fi
       save_LIBS="$LIBS"
       LIBS="$USB_LIBS"
       AC_CHECK_LIB([$usb_lib_name], [$usb_lib_func], [], [
         libusbok=no
         AC_MSG_RESULT([USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org])])
-      case "$host_os" in
-        cygwin* | mingw*)
-          USB_LIBS="$LIBS"
-          ;;
-        *) ;;
-      esac
+#      case "$host_os" in
+#        cygwin* | mingw*)
+#          USB_LIBS="$LIBS"
+#          ;;
+#        *) ;;
+#      esac
       LIBS="$save_LIBS"
       CPPFLAGS="$save_CPPFLAGS"
       AC_LANG_POP(C)
index 39963200363512c98dff4b83ddfd63b79f68593f..84b0c578f59bc12310a261e6391f2a20d7034c7f 100644 (file)
@@ -71,7 +71,7 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate,
 
   // Create an FIR filter for each channel and zero out the taps
   std::vector<float> vtaps(0, d_int_rate);
-  for(int i = 0; i < d_int_rate; i++) {
+  for(unsigned int i = 0; i < d_int_rate; i++) {
     d_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
     d_diff_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
   }
@@ -97,8 +97,6 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps,
                                       std::vector< std::vector<float> > &ourtaps,
                                       std::vector<gr_fir_ccf*> &ourfilter)
 {
-  int i,j;
-
   unsigned int ntaps = newtaps.size();
   d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_int_rate);
 
@@ -114,10 +112,10 @@ gr_pfb_arb_resampler_ccf::create_taps (const std::vector<float> &newtaps,
   }
   
   // Partition the filter
-  for(i = 0; i < d_int_rate; i++) {
+  for(unsigned int i = 0; i < d_int_rate; i++) {
     // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out
     ourtaps[d_int_rate-1-i] = std::vector<float>(d_taps_per_filter, 0);
-    for(j = 0; j < d_taps_per_filter; j++) {
+    for(unsigned int j = 0; j < d_taps_per_filter; j++) {
       ourtaps[d_int_rate - 1 - i][j] = tmp_taps[i + j*d_int_rate];
     }
     
@@ -173,14 +171,16 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items,
     return 0;               // history requirements may have changed.
   }
 
-  int i = 0, j, count = d_start_index;
+  int i = 0, count = d_start_index;
+  unsigned int j;
   gr_complex o0, o1;
 
   // Restore the last filter position
   j = d_last_filter;
 
   // produce output as long as we can and there are enough input samples
-  while((i < noutput_items) && (count < ninput_items[0]-1)) {
+  int max_input = ninput_items[0]-(int)d_taps_per_filter;
+  while((i < noutput_items) && (count < max_input)) {
 
     // start j by wrapping around mod the number of channels
     while((j < d_int_rate) && (i < noutput_items)) {
index cb67b81040130225dfd9a9db3473256ae6767091..db16a634b773af6774a160d630795c8eee6b5918 100644 (file)
@@ -55,7 +55,6 @@ gr_pfb_channelizer_ccf::gr_pfb_channelizer_ccf (unsigned int numchans,
   // This tests the specified input sample rate to see if it conforms to this
   // requirement within a few significant figures.
   double intp = 0;
-  double x = (10000.0*rint(numchans / oversample_rate)) / 10000.0;
   double fltp = modf(numchans / oversample_rate, &intp);
   if(fltp != 0.0)
     throw std::invalid_argument("gr_pfb_channelizer: oversample rate must be N/i for i in [1, N]"); 
index 8a0ad1c4c61e213fa718fb0cfb24ff43f36f7163..e20bc38bb1cb4efc198c17f4f886f8326b862a8b 100644 (file)
@@ -132,7 +132,7 @@ gr_pfb_interpolator_ccf::work (int noutput_items,
   int i = 0, count = 0;
 
   while(i < noutput_items) {
-    for(int j = 0; j < d_rate; j++) {
+    for(unsigned int j = 0; j < d_rate; j++) {
       out[i] = d_filters[j]->filter(&in[count]);
       i++;
     }
index 240a84852606fd6bad1d663fa9d3639c211b0a77..57b26b22fab5dac9bfc22bfb8358594b580f329d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -24,7 +24,9 @@
 #include "config.h"
 #endif
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE            // ask for GNU extensions if available
+#endif
 
 #include <gr_sincos.h>
 #include <math.h>
index bd59e53ace25b846d75559f3115bbb2bc837a9d4..da919b35c678a93bf4279f7669e3f4b657be4779 100644 (file)
@@ -71,12 +71,12 @@ public:
     d_prev_output = 0;
   }
 
-  tap_type prev_output () { return d_prev_output; }
+  o_type prev_output () { return d_prev_output; }
     
 protected:
   tap_type     d_alpha;
   tap_type     d_one_minus_alpha;
-  tap_type     d_prev_output;
+  o_type       d_prev_output;
 };
 
 
@@ -87,7 +87,7 @@ template<class o_type, class i_type, class tap_type>
 o_type
 gr_single_pole_iir<o_type, i_type, tap_type>::filter (const i_type input)
 {
-  tap_type     output;
+  o_type       output;
 
   output = d_alpha * input + d_one_minus_alpha * d_prev_output;
   d_prev_output = output;
index c0d061c81773c51c9c3314aa6fde5cbc91c28aa6..1540688403c555c11cd4cf389dbfe5ff909eeaa7 100644 (file)
@@ -77,6 +77,26 @@ void
   return (@O_TYPE@)out;
 }
 
+@O_TYPE@
+@NAME@::filter (const @I_TYPE@ input[], unsigned long dec)
+{
+  unsigned int i;
+
+  for(i = 0; i < dec; i++) {
+    d_buffer[d_idx] = input[i];
+    d_buffer[d_idx+ntaps()] = input[i];
+    d_idx++;
+    if(d_idx >= ntaps())
+      d_idx = 0;
+  }
+
+  @ACC_TYPE@ out = 0;
+  for(i = 0; i < ntaps(); i++) {
+    out += @INPUT_CAST@ d_buffer[d_idx + i] * d_taps[i];
+  }
+  return (@O_TYPE@)out;
+}
+
 void
 @NAME@::filterN (@O_TYPE@ output[],
                 const @I_TYPE@ input[],
@@ -86,3 +106,16 @@ void
     output[i] = filter(input[i]);
   }
 }
+
+void
+@NAME@::filterNdec (@O_TYPE@ output[],
+                   const @I_TYPE@ input[],
+                   unsigned long n,
+                   unsigned long decimate)
+{
+  unsigned long j = 0;
+  for(unsigned long i = 0; i < n; i++) {
+    output[i] = filter(&input[j], decimate);
+    j += decimate;
+  }
+}
index d566b367465908aec6525ed2814dadf303221c94..23d64b65dd82ff12a0787e8c5c712c8c48785dd0 100644 (file)
@@ -69,13 +69,25 @@ public:
   /*!
    * \brief compute a single output value.
    *
-   * \p input must have ntaps() valid entries.
-   * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
+   * \p input is a single input value of the filter type
    *
    * \returns the filtered input value.
    */
   @O_TYPE@ filter (@I_TYPE@ input);
 
+  
+  /*!
+   * \brief compute a single output value; designed for decimating filters.
+   *
+   * \p input is a single input value of the filter type. The value of dec is the
+   *    decimating value of the filter, so input[] must have dec valid values.
+   *    The filter pushes dec number of items onto the circ. buffer before computing
+   *    a single output.
+   *
+   * \returns the filtered input value.
+   */
+  @O_TYPE@ filter (const @I_TYPE@ input[], unsigned long dec);
+
   /*!
    * \brief compute an array of N output values.
    *
@@ -93,7 +105,7 @@ public:
    * compute the output values.
    */
   void filterNdec (@O_TYPE@ output[], const @I_TYPE@ input[],
-                  unsigned long n, unsigned decimate);
+                  unsigned long n, unsigned long decimate);
 
   /*!
    * \brief install \p new_taps as the current taps.
diff --git a/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_ccf.h b/gnuradio-core/src/lib/filter/gri_fir_filter_with_buffer_ccf.h
deleted file mode 100644 (file)
index 2b69f8b..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2010 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-/*
- * WARNING: This file is automatically generated by generate_gri_fir_XXX.py
- * Any changes made to this file will be overwritten.
- */
-
-
-#ifndef INCLUDED_GRI_FIR_FILTER_WITH_BUFFER_CCF_H
-#define INCLUDED_GRI_FIR_FILTER_WITH_BUFFER_CCF_H
-
-#include <vector>
-#include <gr_types.h>
-#include <gr_reverse.h>
-#include <string.h>
-#include <cstdio>
-
-/*!
- * \brief FIR with internal buffer for gr_complex input, 
-          gr_complex output and float taps
- * \ingroup filter
- * 
- */
-
-class gri_fir_filter_with_buffer_ccf {
-
-protected:
-  std::vector<float>   d_taps;         // reversed taps
-  gr_complex                     *d_buffer;
-  unsigned int                  d_idx;
-
-public:
-
-  // CONSTRUCTORS
-
-  /*!
-   * \brief construct new FIR with given taps.
-   *
-   * Note that taps must be in forward order, e.g., coefficient 0 is
-   * stored in new_taps[0], coefficient 1 is stored in
-   * new_taps[1], etc.
-   */
-  gri_fir_filter_with_buffer_ccf (const std::vector<float> &taps);
-
-  ~gri_fir_filter_with_buffer_ccf ();
-
-  // MANIPULATORS
-
-  /*!
-   * \brief compute a single output value.
-   *
-   * \p input must have ntaps() valid entries.
-   * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
-   *
-   * \returns the filtered input value.
-   */
-  gr_complex filter (gr_complex input);
-
-  /*!
-   * \brief compute an array of N output values.
-   *
-   * \p input must have (n - 1 + ntaps()) valid entries.
-   * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values.
-   */
-  void filterN (gr_complex output[], const gr_complex input[],
-               unsigned long n);
-
-  /*!
-   * \brief compute an array of N output values, decimating the input
-   *
-   * \p input must have (decimate * (n - 1) + ntaps()) valid entries.
-   * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to 
-   * compute the output values.
-   */
-  void filterNdec (gr_complex output[], const gr_complex input[],
-                  unsigned long n, unsigned decimate);
-
-  /*!
-   * \brief install \p new_taps as the current taps.
-   */
-  void set_taps (const std::vector<float> &taps);
-
-  // ACCESSORS
-
-  /*!
-   * \return number of taps in filter.
-   */
-  unsigned ntaps () const { return d_taps.size (); }
-
-  /*!
-   * \return current taps
-   */
-  const std::vector<float> get_taps () const
-  {
-    return gr_reverse(d_taps);
-  }
-};
-
-#endif /* INCLUDED_GRI_FIR_FILTER_WITH_BUFFER_CCF_H */
index cff81ab13c0dec4824903b6f30674a53ffdc4e3a..e87d93ebff4ca641e32faf284ee04f0c1c5a6bc9 100644 (file)
@@ -73,14 +73,31 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_ccc::t1 ()
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_ccc::t2 ()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_ccc::t3 ()
+{
+  test_decimate(5);
+}
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_ccc::t1 ()
+qa_gri_fir_filter_with_buffer_ccc::test_decimate(unsigned int decimate)
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -107,11 +124,13 @@ qa_gri_fir_filter_with_buffer_ccc::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -121,7 +140,7 @@ qa_gri_fir_filter_with_buffer_ccc::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
       //
@@ -130,7 +149,7 @@ qa_gri_fir_filter_with_buffer_ccc::t1 ()
       // arithmetic, while the SSE version is using 32 bit float point
       // arithmetic.
       
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o],
                                       abs (expected_output[o]) * ERR_DELTA);
       }
index 411a66a9aa8f36204450b27b4d10b9cd02fb0c92..f9f206f66425a24d607ae8c410a00cf0fa3c6fd7 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_ccc : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_ccc);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
+  void test_decimate(unsigned int decimate);
 
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index f2e09db1cf0ae96d3d0839bda5914ae89dfa0663..c25853b1e40c8cb392cdd37fa5c10ed44b1e8c47 100644 (file)
@@ -80,14 +80,31 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_ccf::t1 ()
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_ccf::t2 ()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_ccf::t3 ()
+{
+  test_decimate(5);
+}
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_ccf::t1 ()  
+qa_gri_fir_filter_with_buffer_ccf::test_decimate (unsigned int decimate)
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -114,11 +131,13 @@ qa_gri_fir_filter_with_buffer_ccf::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -128,7 +147,7 @@ qa_gri_fir_filter_with_buffer_ccf::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
       //
@@ -137,7 +156,7 @@ qa_gri_fir_filter_with_buffer_ccf::t1 ()
       // arithmetic, while the SSE version is using 32 bit float point
       // arithmetic.
       
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o],
                                       abs (expected_output[o]) * ERR_DELTA);
       }
index b80be70a79f896fd20d38a719eb2e56ba6c3e321..924b4bc2e53e2afdadbb5aab4e9faf6fa5cbf53d 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_ccf : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_ccf);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
+  void test_decimate(unsigned int decimate);
 
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index de0da9f1ca9557ac3c06c92fc38a879af3adec0c..19f270200dfd377b006a1c81134f0eec764fe8f7 100644 (file)
@@ -80,14 +80,32 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_fcc::t1()
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fcc::t2()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fcc::t3()
+{
+  test_decimate(5);
+}
+
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_fcc::t1 ()
+qa_gri_fir_filter_with_buffer_fcc::test_decimate(unsigned int decimate)
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -114,11 +132,13 @@ qa_gri_fir_filter_with_buffer_fcc::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -128,7 +148,7 @@ qa_gri_fir_filter_with_buffer_fcc::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
       //
@@ -137,7 +157,7 @@ qa_gri_fir_filter_with_buffer_fcc::t1 ()
       // arithmetic, while the SSE version is using 32 bit float point
       // arithmetic.
       
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o],
                                       abs (expected_output[o]) * ERR_DELTA);
       }
index 81b39f4884725634c18467fdb87c9b3ebc06fae0..6201800f9deb8c7e802b27f05a8e28d59ab2c233 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_fcc : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_fcc);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
+  void test_decimate(unsigned int decimate);
 
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index ce689a54bbbd9cc0cbbf5ffec4e46dc7335e0e24..8401e484bf79828fe5746521289ee7ea4058ff40 100644 (file)
@@ -69,14 +69,31 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_fff::t1 ()  
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fff::t2 ()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fff::t3 ()
+{
+  test_decimate(5);
+}
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_fff::t1 ()  
+qa_gri_fir_filter_with_buffer_fff::test_decimate(unsigned int decimate)
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -103,11 +120,13 @@ qa_gri_fir_filter_with_buffer_fff::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -117,7 +136,7 @@ qa_gri_fir_filter_with_buffer_fff::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
       //
@@ -126,7 +145,7 @@ qa_gri_fir_filter_with_buffer_fff::t1 ()
       // arithmetic, while the SSE version is using 32 bit float point
       // arithmetic.
       
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_DOUBLES_EQUAL(expected_output[o], actual_output[o],
                                     fabsf (expected_output[o]) * ERR_DELTA);
       }
index 5bb6c3e937ae71943b54eb9f008291deadae9bc2..54a9cdc53a46fcc34f86f0fd79f23616e6c2035f 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_fff : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_fff);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
+  void test_decimate(unsigned int decimate);
 
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index f09a1d7ac6eb02be7df0806ac99de9df1a3a6edb..091505380cf2de00142c964519498882922204b5 100644 (file)
@@ -67,14 +67,31 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return (o_type)sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_fsf::t1 ()
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fsf::t2 ()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_fsf::t3 ()
+{
+  test_decimate(5);
+}
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_fsf::t1 ()  
+qa_gri_fir_filter_with_buffer_fsf::test_decimate (unsigned int decimate)  
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -101,11 +118,13 @@ qa_gri_fir_filter_with_buffer_fsf::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -115,10 +134,10 @@ qa_gri_fir_filter_with_buffer_fsf::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_EQUAL(expected_output[o], actual_output[o]);
       }
       delete f1;
index 38899b35208d9f0200cb5512151ed3485e2d9f0f..9c901464ed7b8c474843636ca0f62dcf5317f3d3 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_fsf : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_fsf);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
-
+  void test_decimate(unsigned int decimate);
+  
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index 4ba433ebfd7c27116a2ba735586c47e9454b4bad..03cd7102232ccf4ffb09cd2fa6aaec35186f1eda 100644 (file)
@@ -80,14 +80,31 @@ ref_dotprod (const i_type input[], const tap_type taps[], int ntaps)
   return sum;
 }
 
+void
+qa_gri_fir_filter_with_buffer_scc::t1 ()
+{
+  test_decimate(1);
+}
+
+void
+qa_gri_fir_filter_with_buffer_scc::t2 ()
+{
+  test_decimate(2);
+}
+
+void
+qa_gri_fir_filter_with_buffer_scc::t3 ()
+{
+  test_decimate(5);
+}
+
 //
 // Test for ntaps in [0,9], and input lengths in [0,17].
 // This ensures that we are building the shifted taps correctly,
 // and exercises all corner cases on input alignment and length.
 //
-
 void
-qa_gri_fir_filter_with_buffer_scc::t1 ()  
+qa_gri_fir_filter_with_buffer_scc::test_decimate (unsigned int decimate)
 {
   const int    MAX_TAPS        = 9;
   const int    OUTPUT_LEN      = 17;
@@ -114,11 +131,13 @@ qa_gri_fir_filter_with_buffer_scc::t1 ()
 
       // compute expected output values
       memset(dline, 0, INPUT_LEN*sizeof(i_type));
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        // use an actual delay line for this test
-       for(int oo = INPUT_LEN-1; oo > 0; oo--)
-         dline[oo] = dline[oo-1];
-       dline[0] = input[o];
+       for(int dd = 0; dd < (int)decimate; dd++) {
+         for(int oo = INPUT_LEN-1; oo > 0; oo--)
+           dline[oo] = dline[oo-1];
+         dline[0] = input[decimate*o+dd];
+       }
        expected_output[o] = ref_dotprod (dline, taps, n);
       }
 
@@ -128,7 +147,7 @@ qa_gri_fir_filter_with_buffer_scc::t1 ()
 
       // zero the output, then do the filtering
       memset (actual_output, 0, sizeof (actual_output));
-      f1->filterN (actual_output, input, ol);
+      f1->filterNdec (actual_output, input, ol/decimate, decimate);
 
       // check results
       //
@@ -137,7 +156,7 @@ qa_gri_fir_filter_with_buffer_scc::t1 ()
       // arithmetic, while the SSE version is using 32 bit float point
       // arithmetic.
 
-      for (int o = 0; o < ol; o++){
+      for (int o = 0; o < (int)(ol/decimate); o++){
        CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected_output[o], actual_output[o],
                                       abs (expected_output[o]) * ERR_DELTA);
       }
index fd9fe5b767faef38c60fb0d99dcaa6b888cd1083..970ca3749834a91efdb6680d957970d2121b4e99 100644 (file)
@@ -29,13 +29,16 @@ class qa_gri_fir_filter_with_buffer_scc : public CppUnit::TestCase {
 
   CPPUNIT_TEST_SUITE (qa_gri_fir_filter_with_buffer_scc);
   CPPUNIT_TEST (t1);
+  CPPUNIT_TEST (t2);
+  CPPUNIT_TEST (t3);
   CPPUNIT_TEST_SUITE_END ();
 
  private:
+  void test_decimate(unsigned int decimate);
 
   void t1 ();
-  // void t2 ();
-  // void t3 ();
+  void t2 ();
+  void t3 ();
 
 };
 
index 468b49a1087246ac2e2a1ddaa77bb3fa8a3ead9d..c9222597a873da93ca5f2081bc7f314d73a9a9d1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -66,7 +66,10 @@ gr_circular_file::gr_circular_file (const char *filename,
       exit (1);
     }
 #ifdef HAVE_MMAP       /* FIXME */
-    ftruncate (d_fd, size + HEADER_SIZE);
+    if(ftruncate (d_fd, size + HEADER_SIZE) != 0) {
+      perror (filename);
+      exit (1);
+    }
 #endif
   }
   else {
index ff997e7a978fd78f14e53d7b2355a1597631a342..c32398e6d55ca2e29c16484d29a0c8b487db5a42 100644 (file)
@@ -161,8 +161,9 @@ gr_fll_band_edge_cc::work (int noutput_items,
   const gr_complex *in  = (const gr_complex *) input_items[0];
   gr_complex *out = (gr_complex *) output_items[0];
 
-  float *frq, *phs;
-  gr_complex *err;
+  float *frq = NULL;
+  float *phs = NULL;
+  gr_complex *err = NULL;
   if(output_items.size() > 2) {
     frq = (float *) output_items[1];
     phs = (float *) output_items[2];
index 89ef188698f9e4d63c466df42063467f30659c67..a392abd06e85118538f007891e2d29542a201a14 100644 (file)
@@ -52,12 +52,12 @@ gr_float_to_complex::work (int noutput_items,
 
   switch (input_items.size ()){
   case 1:
-    for (int j = 0; j < noutput_items*d_vlen; j++)
+    for (size_t j = 0; j < noutput_items*d_vlen; j++)
       out[j] = gr_complex (r[j], 0);
     break;
 
   case 2:
-    for (int j = 0; j < noutput_items*d_vlen; j++)
+    for (size_t j = 0; j < noutput_items*d_vlen; j++)
       out[j] = gr_complex (r[j], i[j]);
     break;
 
index ea7e9405f17d694313804e028492a5bf8f9dec7c..1670eb7cf38dd7bdcee413589e8655fd3a350d7b 100644 (file)
@@ -27,7 +27,7 @@
 #include <gr_io_signature.h>
 #include <string.h>
 
-gr_skiphead::gr_skiphead (size_t itemsize, size_t nitems_to_skip)
+gr_skiphead::gr_skiphead (size_t itemsize, uint64_t nitems_to_skip)
   : gr_block ("skiphead",
              gr_make_io_signature(1, 1, itemsize),
              gr_make_io_signature(1, 1, itemsize)),
@@ -36,7 +36,7 @@ gr_skiphead::gr_skiphead (size_t itemsize, size_t nitems_to_skip)
 }
 
 gr_skiphead_sptr
-gr_make_skiphead (size_t itemsize, size_t nitems_to_skip)
+gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip)
 {
   return gnuradio::get_initial_sptr(new gr_skiphead (itemsize, nitems_to_skip));
 }
@@ -55,11 +55,11 @@ gr_skiphead::general_work(int noutput_items,
 
   while (ii < ninput_items){
 
-    long long ni_total = ii + d_nitems;        // total items processed so far
+    uint64_t ni_total = ii + d_nitems;         // total items processed so far
     if (ni_total < d_nitems_to_skip){          // need to skip some more
 
       int n_to_skip = (int) std::min(d_nitems_to_skip - ni_total,
-                                    (long long)(ninput_items - ii));
+                                    (uint64_t)(ninput_items - ii));
       ii += n_to_skip;
     }
 
index 965feff9b2015a0aa159db7c95f36d8c09337f65..933c126e36dd40ca6a9626f8fba2ab619e28a39d 100644 (file)
@@ -39,11 +39,11 @@ typedef boost::shared_ptr<gr_skiphead> gr_skiphead_sptr;
 
 class gr_skiphead : public gr_block
 {
-  friend gr_skiphead_sptr gr_make_skiphead (size_t itemsize, size_t nitems_to_skip);
-  gr_skiphead (size_t itemsize, size_t nitems_to_skip);
+  friend gr_skiphead_sptr gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip);
+  gr_skiphead (size_t itemsize, uint64_t nitems_to_skip);
 
-  long long            d_nitems_to_skip;
-  long long            d_nitems;               // total items seen
+  uint64_t             d_nitems_to_skip;
+  uint64_t             d_nitems;               // total items seen
 
  public:
 
@@ -54,7 +54,7 @@ class gr_skiphead : public gr_block
 };
 
 gr_skiphead_sptr
-gr_make_skiphead (size_t itemsize, size_t nitems_to_skip);
+gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip);
 
 
 #endif /* INCLUDED_GR_SKIPHEAD_H */
index 52c0808f01350d195f47dc9f718001b43ee76b64..45cbd04372e499340bc32da7b6f3b1a64327d1b2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2005,2007 Free Software Foundation, Inc.
+ * Copyright 2005,2007,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -22,9 +22,9 @@
 
 GR_SWIG_BLOCK_MAGIC(gr,skiphead);
 
-gr_skiphead_sptr gr_make_skiphead (size_t itemsize, size_t nitems_to_skip);
+gr_skiphead_sptr gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip);
 
 class gr_skiphead : public gr_block {
-  friend gr_skiphead_sptr gr_make_skiphead (size_t itemsize, size_t nitems_to_skip);
-  gr_skiphead (size_t itemsize, size_t nitems_to_skip);
+  friend gr_skiphead_sptr gr_make_skiphead (size_t itemsize, uint64_t nitems_to_skip);
+  gr_skiphead (size_t itemsize, uint64_t nitems_to_skip);
 };
index 58a25325af4dafee959e46a434c282696939e31a..0e8b23ee16c4167271a8fa8442b8d06eeb503417 100644 (file)
@@ -52,7 +52,7 @@ int
 
   int ninputs = input_items.size ();
 
-  for (int i = 0; i < noutput_items*d_vlen; i++){
+  for (size_t i = 0; i < noutput_items*d_vlen; i++){
     @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
     for (int j = 1; j < ninputs; j++)
       acc += ((@I_TYPE@ *) input_items[j])[i];
index 1200145fa39b82198e87cc1947b3a912e29b7447..ea245b57bb1bd0e15cfbc5b583d890b1055b9234 100644 (file)
@@ -53,13 +53,13 @@ int
   int ninputs = input_items.size ();
 
   if (ninputs == 1){           // compute reciprocal
-    for (int i = 0; i < noutput_items*d_vlen; i++)
+    for (size_t i = 0; i < noutput_items*d_vlen; i++)
       *optr++ = (@O_TYPE@) ((@O_TYPE@) 1 /
                            ((@I_TYPE@ *) input_items[0])[i]);
   }
 
   else {
-    for (int i = 0; i < noutput_items*d_vlen; i++){
+    for (size_t i = 0; i < noutput_items*d_vlen; i++){
       @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
       for (int j = 1; j < ninputs; j++)
        acc /= ((@I_TYPE@ *) input_items[j])[i];
index 13ec0c8b342db700304a4624fc6f9eab2ac9210b..5d270c763487b3ad58106b3ffb63654e7da600f4 100644 (file)
@@ -52,7 +52,7 @@ int
 
   int ninputs = input_items.size ();
 
-  for (int i = 0; i < noutput_items*d_vlen; i++){
+  for (size_t i = 0; i < noutput_items*d_vlen; i++){
     @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
     for (int j = 1; j < ninputs; j++)
       acc *= ((@I_TYPE@ *) input_items[j])[i];
index f0ed75217f911ebad2be34135b32b012c8bef78e..1dcdf81ad5a311417e44f37fbaec7af10b37172c 100644 (file)
@@ -53,12 +53,12 @@ int
   int ninputs = input_items.size ();
 
   if (ninputs == 1){           // negate
-    for (int i = 0; i < noutput_items*d_vlen; i++)
+    for (size_t i = 0; i < noutput_items*d_vlen; i++)
       *optr++ = (@O_TYPE@) -((@I_TYPE@ *) input_items[0])[i];
   }
 
   else {
-    for (int i = 0; i < noutput_items*d_vlen; i++){
+    for (size_t i = 0; i < noutput_items*d_vlen; i++){
       @I_TYPE@ acc = ((@I_TYPE@ *) input_items[0])[i];
       for (int j = 1; j < ninputs; j++)
        acc -= ((@I_TYPE@ *) input_items[j])[i];
index e0be2db62788b1681028121a3e6be2b21012fb7c..5f741224834e16fee6458cd1d5fa2b706565472d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2003 Free Software Foundation, Inc.
+ * Copyright 2003,2010 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -77,11 +77,20 @@ gr_preferences::get (const char *key)
   static char buf[1024];
 
   FILE         *fp = fopen (pathname (key), "r");
-  if (fp == 0)
+  if (fp == 0) {
+    perror (pathname (key));
     return 0;
+  }
 
   memset (buf, 0, sizeof (buf));
-  fread (buf, 1, sizeof (buf) - 1, fp);
+  size_t ret = fread (buf, 1, sizeof (buf) - 1, fp);
+  if(ret == 0) {
+    if(ferror(fp) != 0) {
+      perror (pathname (key));
+      fclose (fp);
+      return 0;
+    }
+  }
   fclose (fp);
   return buf;
 }
@@ -97,6 +106,13 @@ gr_preferences::set (const char *key, const char *value)
     return;
   }
 
-  fwrite (value, 1, strlen (value), fp);
+  size_t ret = fwrite (value, 1, strlen (value), fp);
+  if(ret == 0) {
+    if(ferror(fp) != 0) {
+      perror (pathname (key));
+      fclose (fp);
+      return;
+    }
+  }
   fclose (fp);
 };
index 7d0241f1c237f22eccb83808cf4de7dc6c562e54..e15a0059c65f8ebef11b63429c902508e957cc77 100644 (file)
@@ -46,6 +46,8 @@
 
 typedef std::complex<float>            gr_complex;
 typedef std::complex<double>           gr_complexd;
+typedef unsigned long long              uint64_t;
+typedef long long                       int64_t;
 
 
 // instantiate the required template specializations
index e40d9636ad8fdf9fdfc9e75c3703d732a13297a4..cd9289fa5fbcdbc08e13f47070086b50e2d249bf 100644 (file)
@@ -31,15 +31,22 @@ class pfb_arb_resampler_ccf(gr.hier_block2):
     streams. This block is provided to be consistent with the interface to the
     other PFB block.
     '''
-    def __init__(self, rate, taps, flt_size=32):
+    def __init__(self, rate, taps=None, flt_size=32, atten=80):
        gr.hier_block2.__init__(self, "pfb_arb_resampler_ccf",
                                gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
                                gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
         
         self._rate = rate
-        self._taps = taps
         self._size = flt_size
 
+        if taps is not None:
+            self._taps = taps
+        else:
+            # Create a filter that covers the full bandwidth of the input signal
+            bw = 0.5
+            tb = 0.1
+            self._taps = gr.firdes.low_pass_2(self._size, self._size, bw, tb, atten)
+
         self.pfb = gr.pfb_arb_resampler_ccf(self._rate, self._taps, self._size)
 
         self.connect(self, self.pfb)
diff --git a/gnuradio-examples/python/pfb/resampler.py b/gnuradio-examples/python/pfb/resampler.py
new file mode 100755 (executable)
index 0000000..6be7cf1
--- /dev/null
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+
+from gnuradio import gr, blks2
+import scipy, pylab
+
+class mytb(gr.top_block):
+    def __init__(self, fs_in, fs_out, fc, N=10000):
+        gr.top_block.__init__(self)
+        
+        rerate = float(fs_out) / float(fs_in)
+        print "Resampling from %f to %f by %f " %(fs_in, fs_out, rerate)
+
+        # Creating our own taps
+        taps = gr.firdes.low_pass_2(32, 32, 0.25, 0.1, 80)
+
+        self.src = gr.sig_source_c(fs_in, gr.GR_SIN_WAVE, fc, 1)
+        #self.src = gr.noise_source_c(gr.GR_GAUSSIAN, 1)
+        self.head = gr.head(gr.sizeof_gr_complex, N)
+
+        # A resampler with our taps
+        self.resamp_0 = blks2.pfb_arb_resampler_ccf(rerate, taps,
+                                                    flt_size=32)
+
+        # A resampler that just needs a resampling rate.
+        # Filter is created for us and designed to cover
+        # entire bandwidth of the input signal.
+        # An optional atten=XX rate can be used here to 
+        # specify the out-of-band rejection (default=80).
+        self.resamp_1 = blks2.pfb_arb_resampler_ccf(rerate)
+
+        self.snk_in = gr.vector_sink_c()
+        self.snk_0 = gr.vector_sink_c()
+        self.snk_1 = gr.vector_sink_c()
+
+        self.connect(self.src, self.head, self.snk_in)
+        self.connect(self.head, self.resamp_0, self.snk_0)
+        self.connect(self.head, self.resamp_1, self.snk_1)
+
+def main():
+    fs_in = 8000
+    fs_out = 20000
+    fc = 1000
+    N = 10000
+
+    tb = mytb(fs_in, fs_out, fc, N)
+    tb.run()
+
+
+    # Plot PSD of signals
+    nfftsize = 2048
+    fig1 = pylab.figure(1, figsize=(10,10), facecolor="w")
+    sp1 = fig1.add_subplot(2,1,1)
+    sp1.psd(tb.snk_in.data(), NFFT=nfftsize,
+            noverlap=nfftsize/4, Fs = fs_in)
+    sp1.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in/1000.0)))
+    sp1.set_xlim([-fs_in/2, fs_in/2])
+
+    sp2 = fig1.add_subplot(2,1,2)
+    sp2.psd(tb.snk_0.data(), NFFT=nfftsize,
+            noverlap=nfftsize/4, Fs = fs_out,
+            label="With our filter")
+    sp2.psd(tb.snk_1.data(), NFFT=nfftsize,
+            noverlap=nfftsize/4, Fs = fs_out,
+            label="With auto-generated filter")
+    sp2.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out/1000.0)))
+    sp2.set_xlim([-fs_out/2, fs_out/2])
+    sp2.legend()
+
+    # Plot signals in time
+    Ts_in = 1.0/fs_in
+    Ts_out = 1.0/fs_out
+    t_in = scipy.arange(0, len(tb.snk_in.data())*Ts_in, Ts_in)
+    t_out = scipy.arange(0, len(tb.snk_0.data())*Ts_out, Ts_out)
+
+    fig2 = pylab.figure(2, figsize=(10,10), facecolor="w")
+    sp21 = fig2.add_subplot(2,1,1)
+    sp21.plot(t_in, tb.snk_in.data())
+    sp21.set_title(("Input Signal at f_s=%.2f kHz" % (fs_in/1000.0)))
+    sp21.set_xlim([t_in[100], t_in[200]])
+
+    sp22 = fig2.add_subplot(2,1,2)
+    sp22.plot(t_out, tb.snk_0.data(),
+              label="With our filter")
+    sp22.plot(t_out, tb.snk_1.data(),
+              label="With auto-generated filter")
+    sp22.set_title(("Output Signals at f_s=%.2f kHz" % (fs_out/1000.0)))
+    r = float(fs_out)/float(fs_in)
+    sp22.set_xlim([t_out[r * 100], t_out[r * 200]])
+    sp22.legend()
+
+    pylab.show()
+
+if __name__ == "__main__":
+    main()
+
index 6e39135c968d550f4f2b967ff6de2d7d878bca4c..f28fddc344c9e3bc9f971d3aad2b55ca386c67b8 100644 (file)
@@ -105,12 +105,17 @@ audio_jack_sink::audio_jack_sink (int sampling_rate,
     d_nunderuns (0)
 {
 #ifndef NO_PTHREAD
-    pthread_cond_init(&d_ringbuffer_ready, NULL);;
-    pthread_mutex_init(&d_jack_process_lock, NULL);
+  pthread_cond_init(&d_ringbuffer_ready, NULL);;
+  pthread_mutex_init(&d_jack_process_lock, NULL);
 #endif
-
+  
   // try to become a client of the JACK server
-  if ((d_jack_client = jack_client_new (d_device_name.c_str ())) == 0) {
+  jack_options_t options = JackNullOption;
+  jack_status_t status;
+  const char *server_name = NULL;
+  if ((d_jack_client = jack_client_open (d_device_name.c_str (),
+                                        options, &status,
+                                        server_name)) == NULL) {
     fprintf (stderr, "audio_jack_sink[%s]: jack server not running?\n",
             d_device_name.c_str());
     throw std::runtime_error ("audio_jack_sink");
index ca3df51d7f5eaf9601cfa8602963e1757414f4db..a92e970f5825efb3febb2c5b2cf4f297fefdeb28 100644 (file)
@@ -110,7 +110,12 @@ audio_jack_source::audio_jack_source (int sampling_rate,
 #endif
 
   // try to become a client of the JACK server
-  if ((d_jack_client = jack_client_new (d_device_name.c_str ())) == 0) {
+  jack_options_t options = JackNullOption;
+  jack_status_t status;
+  const char *server_name = NULL;
+  if ((d_jack_client = jack_client_open (d_device_name.c_str (),
+                                        options, &status,
+                                        server_name)) == NULL) {
     fprintf (stderr, "audio_jack_source[%s]: jack server not running?\n",
             d_device_name.c_str());
     throw std::runtime_error ("audio_jack_source");
index 9a3baf40ef8b48997a48de4a28505b1a66b9a709..64e64ccf4536a3fdcb8b649ba0557234b41dd9e9 100644 (file)
@@ -102,7 +102,10 @@ portaudio_sink_callback (const void *inputBuffer,
 
   else {                       // underrun
     self->d_nunderuns++;
-    ::write(2, "aU", 2);       // FIXME change to non-blocking call
+    ssize_t r = ::write(2, "aU", 2);   // FIXME change to non-blocking call
+    if(r == -1) {
+      perror("audio_portaudio_source::portaudio_source_callback write error to stderr.");
+    }
 
     // FIXME we should transfer what we've got and pad the rest
     memset(outputBuffer, 0, nreqd_samples * sizeof(sample_t));
index 23801a8bf7e873602254797b1082c5683b5ff238..e508fda22f6d1aa8f708459465654b92439ac6e5 100644 (file)
@@ -105,7 +105,10 @@ portaudio_source_callback (const void *inputBuffer,
 
   else {                       // overrun
     self->d_noverruns++;
-    ::write(2, "aO", 2);       // FIXME change to non-blocking call
+    ssize_t r = ::write(2, "aO", 2);   // FIXME change to non-blocking call
+    if(r == -1) {
+      perror("audio_portaudio_source::portaudio_source_callback write error to stderr.");
+    }
 
     self->d_ringbuffer_ready = false;
     self->d_ringbuffer_cond.notify_one();  // Tell the sink to get going!
index c44808f5176c4c8d5eb0086a6734e30e9423dd6f..70e692d8321243913b63133413c34cb3b83784e0 100644 (file)
@@ -64,7 +64,10 @@ msdd_rs_source_simple::work (int noutput_items,
        /* Read a buffer out -- looking at UDP payload at this point.*/
        rcv->read( &buffer[0], BUF_LEN );
        
-       int seq = *((int*) &buffer[2]);
+       //int seq = *((int*) &buffer[2]);
+       int seq;
+       memcpy(&seq, &buffer[2], 4*sizeof(char));
+
        char type = buffer[0];
        //printf("Sequence %d\n",seq);
        
index 076a305f1fbf0be2395db263cc1c3b1f5485838c..20b15c43d982f35890fe9255c5399a87b7412aa5 100644 (file)
@@ -64,7 +64,9 @@ msdd_source_simple::work (int noutput_items,
     char buffer[BUF_LEN];
     rcv->read( &buffer[0], BUF_LEN );
 
-    int seq = *((int*) &buffer[2]);
+    //int seq = *((int*) &buffer[2]);
+    int seq;
+    memcpy(&seq, &buffer[2], 4*sizeof(char));
 
     if(d_lastseq == -MSDD_COMPLEX_SAMPLES_PER_PACKET){
       // not started case
index c65b134562a8e17edd7671cf62a40129ec792ca6..5950b56b9d2ae612fad5597e66bf4e3d1707eab0 100644 (file)
@@ -86,16 +86,30 @@ fsm::fsm(const char *name)
   if((fsmfile=fopen(name,"r"))==NULL) 
     throw std::runtime_error ("fsm::fsm(const char *name): file open error\n");
     //printf("file open error in fsm()\n");
+
+  if(fscanf(fsmfile,"%d %d %d\n",&d_I,&d_S,&d_O) == EOF) {
+    if(ferror(fsmfile) != 0)
+      throw std::runtime_error ("fsm::fsm(const char *name): file read error\n");
+  }
   
-  fscanf(fsmfile,"%d %d %d\n",&d_I,&d_S,&d_O);
   d_NS.resize(d_I*d_S);
   d_OS.resize(d_I*d_S);
 
   for(int i=0;i<d_S;i++) {
-    for(int j=0;j<d_I;j++) fscanf(fsmfile,"%d",&(d_NS[i*d_I+j]));
+    for(int j=0;j<d_I;j++) {
+      if(fscanf(fsmfile,"%d",&(d_NS[i*d_I+j])) == EOF) {
+       if(ferror(fsmfile) != 0)
+         throw std::runtime_error ("fsm::fsm(const char *name): file read error\n");
+      }
+    }
   }
   for(int i=0;i<d_S;i++) {
-    for(int j=0;j<d_I;j++) fscanf(fsmfile,"%d",&(d_OS[i*d_I+j]));
+    for(int j=0;j<d_I;j++) {
+      if(fscanf(fsmfile,"%d",&(d_OS[i*d_I+j])) == EOF) {
+       if(ferror(fsmfile) != 0)
+         throw std::runtime_error ("fsm::fsm(const char *name): file read error\n");
+      }
+    }
   }
  
   generate_PS_PI();
index 077416f808715506ae5309ae8ad11a92f5463ef3..ff15eeadc8a974c03577acf170e5dbe79ff8a341 100644 (file)
@@ -75,11 +75,20 @@ interleaver::interleaver(const char *name)
     throw std::runtime_error ("file open error in interleaver()");
     //printf("file open error in interleaver()\n");
   
-  fscanf(interleaverfile,"%d\n",&d_K);
+  if(fscanf(interleaverfile,"%d\n",&d_K) == EOF) {
+    if(ferror(interleaverfile) != 0)
+      throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n");
+  }
+
   d_INTER.resize(d_K);
   d_DEINTER.resize(d_K);
 
-  for(int i=0;i<d_K;i++) fscanf(interleaverfile,"%d",&(d_INTER[i]));
+  for(int i=0;i<d_K;i++) {
+    if(fscanf(interleaverfile,"%d",&(d_INTER[i])) == EOF) {
+      if(ferror(interleaverfile) != 0)
+       throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n");
+    }
+  }
   
   // generate DEINTER table
   for(int i=0;i<d_K;i++) {
index 5043b1471f9aa06b4b2937166e6113cd92c1c435..33c5bcf03d3daca1a7e2373822505e92ff7f184a 100644 (file)
@@ -73,16 +73,6 @@ CREATE_SUBDIRS         = NO
 
 OUTPUT_LANGUAGE        = English
 
-# This tag can be used to specify the encoding used in the generated output. 
-# The encoding is not always determined by the language that is chosen, 
-# but also whether or not the output is meant for Windows or non-Windows users. 
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
-# forces the Windows encoding (this is the default for the Windows binary), 
-# whereas setting the tag to NO uses a Unix-style encoding (the default for 
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
 # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
 # include brief member descriptions after the members that are listed in 
 # the file and class documentation (similar to JavaDoc). 
@@ -167,13 +157,6 @@ JAVADOC_AUTOBRIEF      = NO
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = YES
-
 # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
 # member inherits the documentation from any documented member that it 
 # re-implements.
@@ -1118,32 +1101,40 @@ DOT_PATH               =
 
 DOTFILE_DIRS           = 
 
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
-MAX_DOT_GRAPH_WIDTH    = 1024
+DOT_GRAPH_MAX_NODES    = 50
 
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
-# this value, doxygen will try to truncate the graph, so that it fits within 
-# the specified constraint. Beware that most browsers cannot cope with very 
-# large images.
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
-MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 0
 
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes that 
-# lay further from the root node will be omitted. Note that setting this option to 
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
-# note that a graph may be further truncated if the graph's image dimensions are 
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
 
-MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = YES
 
 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
 # generate a legend page explaining the meaning of the various boxes and